# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetLaunchTemplateVersionResult',
    'AwaitableGetLaunchTemplateVersionResult',
    'get_launch_template_version',
    'get_launch_template_version_output',
]

@pulumi.output_type
class GetLaunchTemplateVersionResult:
    """
    A collection of values returned by getLaunchTemplateVersion.
    """
    def __init__(__self__, deployment_set_group_number=None, deployment_set_id=None, description=None, eip=None, host_name=None, hpc_cluster_id=None, id=None, image_id=None, image_name=None, instance_charge_type=None, instance_name=None, instance_type_id=None, keep_image_credential=None, key_pair_name=None, launch_template_id=None, network_interfaces=None, project_name=None, scheduled_instance=None, security_enhancement_strategy=None, spot_price_limit=None, spot_strategy=None, suffix_index=None, tags=None, unique_suffix=None, user_data=None, version_description=None, version_number=None, volumes=None, vpc_id=None, zone_id=None):
        if deployment_set_group_number and not isinstance(deployment_set_group_number, int):
            raise TypeError("Expected argument 'deployment_set_group_number' to be a int")
        pulumi.set(__self__, "deployment_set_group_number", deployment_set_group_number)
        if deployment_set_id and not isinstance(deployment_set_id, str):
            raise TypeError("Expected argument 'deployment_set_id' to be a str")
        pulumi.set(__self__, "deployment_set_id", deployment_set_id)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if eip and not isinstance(eip, dict):
            raise TypeError("Expected argument 'eip' to be a dict")
        pulumi.set(__self__, "eip", eip)
        if host_name and not isinstance(host_name, str):
            raise TypeError("Expected argument 'host_name' to be a str")
        pulumi.set(__self__, "host_name", host_name)
        if hpc_cluster_id and not isinstance(hpc_cluster_id, str):
            raise TypeError("Expected argument 'hpc_cluster_id' to be a str")
        pulumi.set(__self__, "hpc_cluster_id", hpc_cluster_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_id and not isinstance(image_id, str):
            raise TypeError("Expected argument 'image_id' to be a str")
        pulumi.set(__self__, "image_id", image_id)
        if image_name and not isinstance(image_name, str):
            raise TypeError("Expected argument 'image_name' to be a str")
        pulumi.set(__self__, "image_name", image_name)
        if instance_charge_type and not isinstance(instance_charge_type, str):
            raise TypeError("Expected argument 'instance_charge_type' to be a str")
        pulumi.set(__self__, "instance_charge_type", instance_charge_type)
        if instance_name and not isinstance(instance_name, str):
            raise TypeError("Expected argument 'instance_name' to be a str")
        pulumi.set(__self__, "instance_name", instance_name)
        if instance_type_id and not isinstance(instance_type_id, str):
            raise TypeError("Expected argument 'instance_type_id' to be a str")
        pulumi.set(__self__, "instance_type_id", instance_type_id)
        if keep_image_credential and not isinstance(keep_image_credential, bool):
            raise TypeError("Expected argument 'keep_image_credential' to be a bool")
        pulumi.set(__self__, "keep_image_credential", keep_image_credential)
        if key_pair_name and not isinstance(key_pair_name, str):
            raise TypeError("Expected argument 'key_pair_name' to be a str")
        pulumi.set(__self__, "key_pair_name", key_pair_name)
        if launch_template_id and not isinstance(launch_template_id, str):
            raise TypeError("Expected argument 'launch_template_id' to be a str")
        pulumi.set(__self__, "launch_template_id", launch_template_id)
        if network_interfaces and not isinstance(network_interfaces, list):
            raise TypeError("Expected argument 'network_interfaces' to be a list")
        pulumi.set(__self__, "network_interfaces", network_interfaces)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if scheduled_instance and not isinstance(scheduled_instance, dict):
            raise TypeError("Expected argument 'scheduled_instance' to be a dict")
        pulumi.set(__self__, "scheduled_instance", scheduled_instance)
        if security_enhancement_strategy and not isinstance(security_enhancement_strategy, str):
            raise TypeError("Expected argument 'security_enhancement_strategy' to be a str")
        pulumi.set(__self__, "security_enhancement_strategy", security_enhancement_strategy)
        if spot_price_limit and not isinstance(spot_price_limit, float):
            raise TypeError("Expected argument 'spot_price_limit' to be a float")
        pulumi.set(__self__, "spot_price_limit", spot_price_limit)
        if spot_strategy and not isinstance(spot_strategy, str):
            raise TypeError("Expected argument 'spot_strategy' to be a str")
        pulumi.set(__self__, "spot_strategy", spot_strategy)
        if suffix_index and not isinstance(suffix_index, int):
            raise TypeError("Expected argument 'suffix_index' to be a int")
        pulumi.set(__self__, "suffix_index", suffix_index)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if unique_suffix and not isinstance(unique_suffix, bool):
            raise TypeError("Expected argument 'unique_suffix' to be a bool")
        pulumi.set(__self__, "unique_suffix", unique_suffix)
        if user_data and not isinstance(user_data, str):
            raise TypeError("Expected argument 'user_data' to be a str")
        pulumi.set(__self__, "user_data", user_data)
        if version_description and not isinstance(version_description, str):
            raise TypeError("Expected argument 'version_description' to be a str")
        pulumi.set(__self__, "version_description", version_description)
        if version_number and not isinstance(version_number, str):
            raise TypeError("Expected argument 'version_number' to be a str")
        pulumi.set(__self__, "version_number", version_number)
        if volumes and not isinstance(volumes, list):
            raise TypeError("Expected argument 'volumes' to be a list")
        pulumi.set(__self__, "volumes", volumes)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)
        if zone_id and not isinstance(zone_id, str):
            raise TypeError("Expected argument 'zone_id' to be a str")
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="deploymentSetGroupNumber")
    def deployment_set_group_number(self) -> builtins.int:
        """
        当ECS实例要加入或调整的部署集策略为部署集组高可用策略（AvailabilityGroup）时，可以通过该参数指定实例在部署集中的分组号。
        """
        return pulumi.get(self, "deployment_set_group_number")

    @property
    @pulumi.getter(name="deploymentSetId")
    def deployment_set_id(self) -> builtins.str:
        """
        实例需要加入的部署集ID。
        """
        return pulumi.get(self, "deployment_set_id")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        实例的描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def eip(self) -> 'outputs.GetLaunchTemplateVersionEipResult':
        """
        实例绑定的公网IP信息。
        """
        return pulumi.get(self, "eip")

    @property
    @pulumi.getter(name="hostName")
    def host_name(self) -> builtins.str:
        """
        实例的主机名。Linux系统的主机名长度限制为2～59个字符。Windows系统的主机名长度限制为2～10个字符。
        """
        return pulumi.get(self, "host_name")

    @property
    @pulumi.getter(name="hpcClusterId")
    def hpc_cluster_id(self) -> builtins.str:
        """
        当创建高性能计算GPU型实例时，请指定高性能计算集群ID。
        """
        return pulumi.get(self, "hpc_cluster_id")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="imageId")
    def image_id(self) -> builtins.str:
        """
        镜像ID。
        """
        return pulumi.get(self, "image_id")

    @property
    @pulumi.getter(name="imageName")
    def image_name(self) -> builtins.str:
        """
        镜像名称。
        """
        return pulumi.get(self, "image_name")

    @property
    @pulumi.getter(name="instanceChargeType")
    def instance_charge_type(self) -> builtins.str:
        """
        实例和云盘的计费类型，取值：PostPaid：按量计费。PrePaid：包年包月。Esi：弹性预约实例。Segmented：时段型弹性预约实例。
        """
        return pulumi.get(self, "instance_charge_type")

    @property
    @pulumi.getter(name="instanceName")
    def instance_name(self) -> builtins.str:
        """
        实例的名称。
        """
        return pulumi.get(self, "instance_name")

    @property
    @pulumi.getter(name="instanceTypeId")
    def instance_type_id(self) -> builtins.str:
        """
        实例的规格。
        """
        return pulumi.get(self, "instance_type_id")

    @property
    @pulumi.getter(name="keepImageCredential")
    def keep_image_credential(self) -> builtins.bool:
        """
        是否保留镜像设置，取值：true：保留镜像设置，保留后将使用镜像预设的密码或密钥对登录实例。false（默认）：不保留镜像设置。
        """
        return pulumi.get(self, "keep_image_credential")

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> builtins.str:
        """
        实例绑定的密钥对。
        """
        return pulumi.get(self, "key_pair_name")

    @property
    @pulumi.getter(name="launchTemplateId")
    def launch_template_id(self) -> builtins.str:
        """
        实例启动模板 ID。
        """
        return pulumi.get(self, "launch_template_id")

    @property
    @pulumi.getter(name="networkInterfaces")
    def network_interfaces(self) -> Sequence['outputs.GetLaunchTemplateVersionNetworkInterfaceResult']:
        """
        实例挂载的网卡信息。
        """
        return pulumi.get(self, "network_interfaces")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        实例所属项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="scheduledInstance")
    def scheduled_instance(self) -> 'outputs.GetLaunchTemplateVersionScheduledInstanceResult':
        """
        弹性预约单信息。
        """
        return pulumi.get(self, "scheduled_instance")

    @property
    @pulumi.getter(name="securityEnhancementStrategy")
    def security_enhancement_strategy(self) -> builtins.str:
        """
        是否开启安全加固。Active:开启安全加固，仅对公共镜像生效。InActive:关闭安全加固，对所有镜像生效。
        """
        return pulumi.get(self, "security_enhancement_strategy")

    @property
    @pulumi.getter(name="spotPriceLimit")
    def spot_price_limit(self) -> builtins.float:
        """
        抢占式实例的每小时最高价格。
        """
        return pulumi.get(self, "spot_price_limit")

    @property
    @pulumi.getter(name="spotStrategy")
    def spot_strategy(self) -> builtins.str:
        """
        按量计费的抢占式策略。取值：NoSpot：表示创建正常按量计费实例。SpotAsPriceGo：系统自动出价，跟随当前市场实际价格的抢占式实例。SpotWithPriceLimit：设置出价上限的抢占式实例。
        """
        return pulumi.get(self, "spot_strategy")

    @property
    @pulumi.getter(name="suffixIndex")
    def suffix_index(self) -> builtins.int:
        """
        有序后缀的起始序号。
        """
        return pulumi.get(self, "suffix_index")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetLaunchTemplateVersionTagResult']:
        """
        实例的标签信息。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="uniqueSuffix")
    def unique_suffix(self) -> builtins.bool:
        """
        表示当创建多台实例时，是否为Hostname和InstanceName自动添加有序后缀。
        """
        return pulumi.get(self, "unique_suffix")

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> builtins.str:
        """
        实例的自定义数据。
        """
        return pulumi.get(self, "user_data")

    @property
    @pulumi.getter(name="versionDescription")
    def version_description(self) -> builtins.str:
        """
        模版版本描述。
        """
        return pulumi.get(self, "version_description")

    @property
    @pulumi.getter(name="versionNumber")
    def version_number(self) -> builtins.str:
        """
        模板版本号。
        """
        return pulumi.get(self, "version_number")

    @property
    @pulumi.getter
    def volumes(self) -> Sequence['outputs.GetLaunchTemplateVersionVolumeResult']:
        """
        实例绑定的云盘信息。
        """
        return pulumi.get(self, "volumes")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        私有网络ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        实例所属可用区ID。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetLaunchTemplateVersionResult(GetLaunchTemplateVersionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLaunchTemplateVersionResult(
            deployment_set_group_number=self.deployment_set_group_number,
            deployment_set_id=self.deployment_set_id,
            description=self.description,
            eip=self.eip,
            host_name=self.host_name,
            hpc_cluster_id=self.hpc_cluster_id,
            id=self.id,
            image_id=self.image_id,
            image_name=self.image_name,
            instance_charge_type=self.instance_charge_type,
            instance_name=self.instance_name,
            instance_type_id=self.instance_type_id,
            keep_image_credential=self.keep_image_credential,
            key_pair_name=self.key_pair_name,
            launch_template_id=self.launch_template_id,
            network_interfaces=self.network_interfaces,
            project_name=self.project_name,
            scheduled_instance=self.scheduled_instance,
            security_enhancement_strategy=self.security_enhancement_strategy,
            spot_price_limit=self.spot_price_limit,
            spot_strategy=self.spot_strategy,
            suffix_index=self.suffix_index,
            tags=self.tags,
            unique_suffix=self.unique_suffix,
            user_data=self.user_data,
            version_description=self.version_description,
            version_number=self.version_number,
            volumes=self.volumes,
            vpc_id=self.vpc_id,
            zone_id=self.zone_id)


def get_launch_template_version(id: Optional[builtins.str] = None,
                                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLaunchTemplateVersionResult:
    """
    Data Source schema for Byteplus::ECS::LaunchtemplateVersion


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:ecs/getLaunchTemplateVersion:getLaunchTemplateVersion', __args__, opts=opts, typ=GetLaunchTemplateVersionResult).value

    return AwaitableGetLaunchTemplateVersionResult(
        deployment_set_group_number=pulumi.get(__ret__, 'deployment_set_group_number'),
        deployment_set_id=pulumi.get(__ret__, 'deployment_set_id'),
        description=pulumi.get(__ret__, 'description'),
        eip=pulumi.get(__ret__, 'eip'),
        host_name=pulumi.get(__ret__, 'host_name'),
        hpc_cluster_id=pulumi.get(__ret__, 'hpc_cluster_id'),
        id=pulumi.get(__ret__, 'id'),
        image_id=pulumi.get(__ret__, 'image_id'),
        image_name=pulumi.get(__ret__, 'image_name'),
        instance_charge_type=pulumi.get(__ret__, 'instance_charge_type'),
        instance_name=pulumi.get(__ret__, 'instance_name'),
        instance_type_id=pulumi.get(__ret__, 'instance_type_id'),
        keep_image_credential=pulumi.get(__ret__, 'keep_image_credential'),
        key_pair_name=pulumi.get(__ret__, 'key_pair_name'),
        launch_template_id=pulumi.get(__ret__, 'launch_template_id'),
        network_interfaces=pulumi.get(__ret__, 'network_interfaces'),
        project_name=pulumi.get(__ret__, 'project_name'),
        scheduled_instance=pulumi.get(__ret__, 'scheduled_instance'),
        security_enhancement_strategy=pulumi.get(__ret__, 'security_enhancement_strategy'),
        spot_price_limit=pulumi.get(__ret__, 'spot_price_limit'),
        spot_strategy=pulumi.get(__ret__, 'spot_strategy'),
        suffix_index=pulumi.get(__ret__, 'suffix_index'),
        tags=pulumi.get(__ret__, 'tags'),
        unique_suffix=pulumi.get(__ret__, 'unique_suffix'),
        user_data=pulumi.get(__ret__, 'user_data'),
        version_description=pulumi.get(__ret__, 'version_description'),
        version_number=pulumi.get(__ret__, 'version_number'),
        volumes=pulumi.get(__ret__, 'volumes'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_launch_template_version_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLaunchTemplateVersionResult]:
    """
    Data Source schema for Byteplus::ECS::LaunchtemplateVersion


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:ecs/getLaunchTemplateVersion:getLaunchTemplateVersion', __args__, opts=opts, typ=GetLaunchTemplateVersionResult)
    return __ret__.apply(lambda __response__: GetLaunchTemplateVersionResult(
        deployment_set_group_number=pulumi.get(__response__, 'deployment_set_group_number'),
        deployment_set_id=pulumi.get(__response__, 'deployment_set_id'),
        description=pulumi.get(__response__, 'description'),
        eip=pulumi.get(__response__, 'eip'),
        host_name=pulumi.get(__response__, 'host_name'),
        hpc_cluster_id=pulumi.get(__response__, 'hpc_cluster_id'),
        id=pulumi.get(__response__, 'id'),
        image_id=pulumi.get(__response__, 'image_id'),
        image_name=pulumi.get(__response__, 'image_name'),
        instance_charge_type=pulumi.get(__response__, 'instance_charge_type'),
        instance_name=pulumi.get(__response__, 'instance_name'),
        instance_type_id=pulumi.get(__response__, 'instance_type_id'),
        keep_image_credential=pulumi.get(__response__, 'keep_image_credential'),
        key_pair_name=pulumi.get(__response__, 'key_pair_name'),
        launch_template_id=pulumi.get(__response__, 'launch_template_id'),
        network_interfaces=pulumi.get(__response__, 'network_interfaces'),
        project_name=pulumi.get(__response__, 'project_name'),
        scheduled_instance=pulumi.get(__response__, 'scheduled_instance'),
        security_enhancement_strategy=pulumi.get(__response__, 'security_enhancement_strategy'),
        spot_price_limit=pulumi.get(__response__, 'spot_price_limit'),
        spot_strategy=pulumi.get(__response__, 'spot_strategy'),
        suffix_index=pulumi.get(__response__, 'suffix_index'),
        tags=pulumi.get(__response__, 'tags'),
        unique_suffix=pulumi.get(__response__, 'unique_suffix'),
        user_data=pulumi.get(__response__, 'user_data'),
        version_description=pulumi.get(__response__, 'version_description'),
        version_number=pulumi.get(__response__, 'version_number'),
        volumes=pulumi.get(__response__, 'volumes'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        zone_id=pulumi.get(__response__, 'zone_id')))
