# 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
from ._inputs import *

__all__ = ['LaunchTemplateArgs', 'LaunchTemplate']

@pulumi.input_type
class LaunchTemplateArgs:
    def __init__(__self__, *,
                 launch_template_name: pulumi.Input[builtins.str],
                 default_version_number: Optional[pulumi.Input[builtins.int]] = None,
                 launch_template_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_tags: Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]] = None,
                 launch_template_version: Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']] = None):
        """
        The set of arguments for constructing a LaunchTemplate resource.
        :param pulumi.Input[builtins.str] launch_template_name: 实例启动模板名称。
        :param pulumi.Input[builtins.int] default_version_number: 实例启动模板的默认版本号。
        :param pulumi.Input[builtins.str] launch_template_project_name: 实例启动模版所属项目。
        :param pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs'] launch_template_version: 实例启动模板版本信息。
        """
        pulumi.set(__self__, "launch_template_name", launch_template_name)
        if default_version_number is not None:
            pulumi.set(__self__, "default_version_number", default_version_number)
        if launch_template_project_name is not None:
            pulumi.set(__self__, "launch_template_project_name", launch_template_project_name)
        if launch_template_tags is not None:
            pulumi.set(__self__, "launch_template_tags", launch_template_tags)
        if launch_template_version is not None:
            pulumi.set(__self__, "launch_template_version", launch_template_version)

    @property
    @pulumi.getter(name="launchTemplateName")
    def launch_template_name(self) -> pulumi.Input[builtins.str]:
        """
        实例启动模板名称。
        """
        return pulumi.get(self, "launch_template_name")

    @launch_template_name.setter
    def launch_template_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "launch_template_name", value)

    @property
    @pulumi.getter(name="defaultVersionNumber")
    def default_version_number(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        实例启动模板的默认版本号。
        """
        return pulumi.get(self, "default_version_number")

    @default_version_number.setter
    def default_version_number(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "default_version_number", value)

    @property
    @pulumi.getter(name="launchTemplateProjectName")
    def launch_template_project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例启动模版所属项目。
        """
        return pulumi.get(self, "launch_template_project_name")

    @launch_template_project_name.setter
    def launch_template_project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "launch_template_project_name", value)

    @property
    @pulumi.getter(name="launchTemplateTags")
    def launch_template_tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]]:
        return pulumi.get(self, "launch_template_tags")

    @launch_template_tags.setter
    def launch_template_tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]]):
        pulumi.set(self, "launch_template_tags", value)

    @property
    @pulumi.getter(name="launchTemplateVersion")
    def launch_template_version(self) -> Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']]:
        """
        实例启动模板版本信息。
        """
        return pulumi.get(self, "launch_template_version")

    @launch_template_version.setter
    def launch_template_version(self, value: Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']]):
        pulumi.set(self, "launch_template_version", value)


@pulumi.input_type
class _LaunchTemplateState:
    def __init__(__self__, *,
                 created_at: Optional[pulumi.Input[builtins.str]] = None,
                 default_version_number: Optional[pulumi.Input[builtins.int]] = None,
                 latest_version_number: Optional[pulumi.Input[builtins.int]] = None,
                 launch_template_id: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_tags: Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]] = None,
                 launch_template_version: Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']] = None,
                 updated_at: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering LaunchTemplate resources.
        :param pulumi.Input[builtins.str] created_at: 实例启动模板的创建时间。
        :param pulumi.Input[builtins.int] default_version_number: 实例启动模板的默认版本号。
        :param pulumi.Input[builtins.int] latest_version_number: 实例启动模的最新版本号。
        :param pulumi.Input[builtins.str] launch_template_id: 实例启动模板 ID。
        :param pulumi.Input[builtins.str] launch_template_name: 实例启动模板名称。
        :param pulumi.Input[builtins.str] launch_template_project_name: 实例启动模版所属项目。
        :param pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs'] launch_template_version: 实例启动模板版本信息。
        :param pulumi.Input[builtins.str] updated_at: 实例启动模板的更新时间。
        """
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if default_version_number is not None:
            pulumi.set(__self__, "default_version_number", default_version_number)
        if latest_version_number is not None:
            pulumi.set(__self__, "latest_version_number", latest_version_number)
        if launch_template_id is not None:
            pulumi.set(__self__, "launch_template_id", launch_template_id)
        if launch_template_name is not None:
            pulumi.set(__self__, "launch_template_name", launch_template_name)
        if launch_template_project_name is not None:
            pulumi.set(__self__, "launch_template_project_name", launch_template_project_name)
        if launch_template_tags is not None:
            pulumi.set(__self__, "launch_template_tags", launch_template_tags)
        if launch_template_version is not None:
            pulumi.set(__self__, "launch_template_version", launch_template_version)
        if updated_at is not None:
            pulumi.set(__self__, "updated_at", updated_at)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例启动模板的创建时间。
        """
        return pulumi.get(self, "created_at")

    @created_at.setter
    def created_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_at", value)

    @property
    @pulumi.getter(name="defaultVersionNumber")
    def default_version_number(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        实例启动模板的默认版本号。
        """
        return pulumi.get(self, "default_version_number")

    @default_version_number.setter
    def default_version_number(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "default_version_number", value)

    @property
    @pulumi.getter(name="latestVersionNumber")
    def latest_version_number(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        实例启动模的最新版本号。
        """
        return pulumi.get(self, "latest_version_number")

    @latest_version_number.setter
    def latest_version_number(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "latest_version_number", value)

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

    @launch_template_id.setter
    def launch_template_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "launch_template_id", value)

    @property
    @pulumi.getter(name="launchTemplateName")
    def launch_template_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例启动模板名称。
        """
        return pulumi.get(self, "launch_template_name")

    @launch_template_name.setter
    def launch_template_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "launch_template_name", value)

    @property
    @pulumi.getter(name="launchTemplateProjectName")
    def launch_template_project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例启动模版所属项目。
        """
        return pulumi.get(self, "launch_template_project_name")

    @launch_template_project_name.setter
    def launch_template_project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "launch_template_project_name", value)

    @property
    @pulumi.getter(name="launchTemplateTags")
    def launch_template_tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]]:
        return pulumi.get(self, "launch_template_tags")

    @launch_template_tags.setter
    def launch_template_tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LaunchTemplateLaunchTemplateTagArgs']]]]):
        pulumi.set(self, "launch_template_tags", value)

    @property
    @pulumi.getter(name="launchTemplateVersion")
    def launch_template_version(self) -> Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']]:
        """
        实例启动模板版本信息。
        """
        return pulumi.get(self, "launch_template_version")

    @launch_template_version.setter
    def launch_template_version(self, value: Optional[pulumi.Input['LaunchTemplateLaunchTemplateVersionArgs']]):
        pulumi.set(self, "launch_template_version", value)

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例启动模板的更新时间。
        """
        return pulumi.get(self, "updated_at")

    @updated_at.setter
    def updated_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "updated_at", value)


@pulumi.type_token("bytepluscc:ecs/launchTemplate:LaunchTemplate")
class LaunchTemplate(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 default_version_number: Optional[pulumi.Input[builtins.int]] = None,
                 launch_template_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LaunchTemplateLaunchTemplateTagArgs', 'LaunchTemplateLaunchTemplateTagArgsDict']]]]] = None,
                 launch_template_version: Optional[pulumi.Input[Union['LaunchTemplateLaunchTemplateVersionArgs', 'LaunchTemplateLaunchTemplateVersionArgsDict']]] = None,
                 __props__=None):
        """
        实例启动模板是一系列实例配置信息的集合，用于快速购买实例。在模板中，您可以存储除密码外的全部配置信息，包括密钥对、计算规格、云盘、网络等，如果配置信息均有效，便可以一键成功购买实例，无需进行重复配置。

        ## Import

        ```sh
        $ pulumi import bytepluscc:ecs/launchTemplate:LaunchTemplate example "launch_template_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.int] default_version_number: 实例启动模板的默认版本号。
        :param pulumi.Input[builtins.str] launch_template_name: 实例启动模板名称。
        :param pulumi.Input[builtins.str] launch_template_project_name: 实例启动模版所属项目。
        :param pulumi.Input[Union['LaunchTemplateLaunchTemplateVersionArgs', 'LaunchTemplateLaunchTemplateVersionArgsDict']] launch_template_version: 实例启动模板版本信息。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: LaunchTemplateArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        实例启动模板是一系列实例配置信息的集合，用于快速购买实例。在模板中，您可以存储除密码外的全部配置信息，包括密钥对、计算规格、云盘、网络等，如果配置信息均有效，便可以一键成功购买实例，无需进行重复配置。

        ## Import

        ```sh
        $ pulumi import bytepluscc:ecs/launchTemplate:LaunchTemplate example "launch_template_id"
        ```

        :param str resource_name: The name of the resource.
        :param LaunchTemplateArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(LaunchTemplateArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 default_version_number: Optional[pulumi.Input[builtins.int]] = None,
                 launch_template_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 launch_template_tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LaunchTemplateLaunchTemplateTagArgs', 'LaunchTemplateLaunchTemplateTagArgsDict']]]]] = None,
                 launch_template_version: Optional[pulumi.Input[Union['LaunchTemplateLaunchTemplateVersionArgs', 'LaunchTemplateLaunchTemplateVersionArgsDict']]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = LaunchTemplateArgs.__new__(LaunchTemplateArgs)

            __props__.__dict__["default_version_number"] = default_version_number
            if launch_template_name is None and not opts.urn:
                raise TypeError("Missing required property 'launch_template_name'")
            __props__.__dict__["launch_template_name"] = launch_template_name
            __props__.__dict__["launch_template_project_name"] = launch_template_project_name
            __props__.__dict__["launch_template_tags"] = launch_template_tags
            __props__.__dict__["launch_template_version"] = launch_template_version
            __props__.__dict__["created_at"] = None
            __props__.__dict__["latest_version_number"] = None
            __props__.__dict__["launch_template_id"] = None
            __props__.__dict__["updated_at"] = None
        super(LaunchTemplate, __self__).__init__(
            'bytepluscc:ecs/launchTemplate:LaunchTemplate',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_at: Optional[pulumi.Input[builtins.str]] = None,
            default_version_number: Optional[pulumi.Input[builtins.int]] = None,
            latest_version_number: Optional[pulumi.Input[builtins.int]] = None,
            launch_template_id: Optional[pulumi.Input[builtins.str]] = None,
            launch_template_name: Optional[pulumi.Input[builtins.str]] = None,
            launch_template_project_name: Optional[pulumi.Input[builtins.str]] = None,
            launch_template_tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['LaunchTemplateLaunchTemplateTagArgs', 'LaunchTemplateLaunchTemplateTagArgsDict']]]]] = None,
            launch_template_version: Optional[pulumi.Input[Union['LaunchTemplateLaunchTemplateVersionArgs', 'LaunchTemplateLaunchTemplateVersionArgsDict']]] = None,
            updated_at: Optional[pulumi.Input[builtins.str]] = None) -> 'LaunchTemplate':
        """
        Get an existing LaunchTemplate resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] created_at: 实例启动模板的创建时间。
        :param pulumi.Input[builtins.int] default_version_number: 实例启动模板的默认版本号。
        :param pulumi.Input[builtins.int] latest_version_number: 实例启动模的最新版本号。
        :param pulumi.Input[builtins.str] launch_template_id: 实例启动模板 ID。
        :param pulumi.Input[builtins.str] launch_template_name: 实例启动模板名称。
        :param pulumi.Input[builtins.str] launch_template_project_name: 实例启动模版所属项目。
        :param pulumi.Input[Union['LaunchTemplateLaunchTemplateVersionArgs', 'LaunchTemplateLaunchTemplateVersionArgsDict']] launch_template_version: 实例启动模板版本信息。
        :param pulumi.Input[builtins.str] updated_at: 实例启动模板的更新时间。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _LaunchTemplateState.__new__(_LaunchTemplateState)

        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["default_version_number"] = default_version_number
        __props__.__dict__["latest_version_number"] = latest_version_number
        __props__.__dict__["launch_template_id"] = launch_template_id
        __props__.__dict__["launch_template_name"] = launch_template_name
        __props__.__dict__["launch_template_project_name"] = launch_template_project_name
        __props__.__dict__["launch_template_tags"] = launch_template_tags
        __props__.__dict__["launch_template_version"] = launch_template_version
        __props__.__dict__["updated_at"] = updated_at
        return LaunchTemplate(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[builtins.str]:
        """
        实例启动模板的创建时间。
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="defaultVersionNumber")
    def default_version_number(self) -> pulumi.Output[builtins.int]:
        """
        实例启动模板的默认版本号。
        """
        return pulumi.get(self, "default_version_number")

    @property
    @pulumi.getter(name="latestVersionNumber")
    def latest_version_number(self) -> pulumi.Output[builtins.int]:
        """
        实例启动模的最新版本号。
        """
        return pulumi.get(self, "latest_version_number")

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

    @property
    @pulumi.getter(name="launchTemplateName")
    def launch_template_name(self) -> pulumi.Output[builtins.str]:
        """
        实例启动模板名称。
        """
        return pulumi.get(self, "launch_template_name")

    @property
    @pulumi.getter(name="launchTemplateProjectName")
    def launch_template_project_name(self) -> pulumi.Output[builtins.str]:
        """
        实例启动模版所属项目。
        """
        return pulumi.get(self, "launch_template_project_name")

    @property
    @pulumi.getter(name="launchTemplateTags")
    def launch_template_tags(self) -> pulumi.Output[Sequence['outputs.LaunchTemplateLaunchTemplateTag']]:
        return pulumi.get(self, "launch_template_tags")

    @property
    @pulumi.getter(name="launchTemplateVersion")
    def launch_template_version(self) -> pulumi.Output['outputs.LaunchTemplateLaunchTemplateVersion']:
        """
        实例启动模板版本信息。
        """
        return pulumi.get(self, "launch_template_version")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> pulumi.Output[builtins.str]:
        """
        实例启动模板的更新时间。
        """
        return pulumi.get(self, "updated_at")

