# 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__ = [
    'GetScalingConfigurationResult',
    'AwaitableGetScalingConfigurationResult',
    'get_scaling_configuration',
    'get_scaling_configuration_output',
]

@pulumi.output_type
class GetScalingConfigurationResult:
    """
    A collection of values returned by getScalingConfiguration.
    """
    def __init__(__self__, created_at=None, eip=None, host_name=None, hpc_cluster_id=None, id=None, image_id=None, instance_charge_type=None, instance_description=None, instance_name=None, instance_type_overrides=None, instance_types=None, ipv6_address_count=None, key_pair_name=None, lifecycle_state=None, password=None, project_name=None, scaling_configuration_id=None, scaling_configuration_name=None, scaling_group_id=None, security_enhancement_strategy=None, security_group_ids=None, spot_strategy=None, tags=None, updated_at=None, user_data=None, volumes=None, zone_id=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        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 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_description and not isinstance(instance_description, str):
            raise TypeError("Expected argument 'instance_description' to be a str")
        pulumi.set(__self__, "instance_description", instance_description)
        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_overrides and not isinstance(instance_type_overrides, list):
            raise TypeError("Expected argument 'instance_type_overrides' to be a list")
        pulumi.set(__self__, "instance_type_overrides", instance_type_overrides)
        if instance_types and not isinstance(instance_types, list):
            raise TypeError("Expected argument 'instance_types' to be a list")
        pulumi.set(__self__, "instance_types", instance_types)
        if ipv6_address_count and not isinstance(ipv6_address_count, int):
            raise TypeError("Expected argument 'ipv6_address_count' to be a int")
        pulumi.set(__self__, "ipv6_address_count", ipv6_address_count)
        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 lifecycle_state and not isinstance(lifecycle_state, str):
            raise TypeError("Expected argument 'lifecycle_state' to be a str")
        pulumi.set(__self__, "lifecycle_state", lifecycle_state)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        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 scaling_configuration_id and not isinstance(scaling_configuration_id, str):
            raise TypeError("Expected argument 'scaling_configuration_id' to be a str")
        pulumi.set(__self__, "scaling_configuration_id", scaling_configuration_id)
        if scaling_configuration_name and not isinstance(scaling_configuration_name, str):
            raise TypeError("Expected argument 'scaling_configuration_name' to be a str")
        pulumi.set(__self__, "scaling_configuration_name", scaling_configuration_name)
        if scaling_group_id and not isinstance(scaling_group_id, str):
            raise TypeError("Expected argument 'scaling_group_id' to be a str")
        pulumi.set(__self__, "scaling_group_id", scaling_group_id)
        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 security_group_ids and not isinstance(security_group_ids, list):
            raise TypeError("Expected argument 'security_group_ids' to be a list")
        pulumi.set(__self__, "security_group_ids", security_group_ids)
        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 tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        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 volumes and not isinstance(volumes, list):
            raise TypeError("Expected argument 'volumes' to be a list")
        pulumi.set(__self__, "volumes", volumes)
        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="createdAt")
    def created_at(self) -> builtins.str:
        """
        资源创建时间(UTC时间)
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def eip(self) -> 'outputs.GetScalingConfigurationEipResult':
        """
        公网IP。
        """
        return pulumi.get(self, "eip")

    @property
    @pulumi.getter(name="hostName")
    def host_name(self) -> builtins.str:
        """
        实例的主机名。取值：Linux实例允许使用点号分隔字符成多段，每段中允许使用字母、数字或中划线“-”。不能以点号“.”或中划线“-”开头或结尾，且不能连续使用点号“.”或中划线“-”。Linux系统的主机名长度限制为2～63个字符。Windows实例允许使用字母、数字或中划线“-”，不能完全是数字。不能以中划线“-”开头或结尾，且不能连续使用中划线“-”。Windows系统的主机名长度限制在2～15个字符。如不填，则遵循以下规则自动生成：结构：iv  - + 初始主机名，例如iv-3tigy72q3u3vj0******。已创建实例保持原主机名生成逻辑，不随实例重启发生变化。初始主机名生成逻辑：Linux：提取实例IDi-之后的全部字符。Windows：提取实例IDi-之后的后12位字符。
        """
        return pulumi.get(self, "host_name")

    @property
    @pulumi.getter(name="hpcClusterId")
    def hpc_cluster_id(self) -> builtins.str:
        """
        实例所属的高性能计算集群的ID。仅当InstanceTypes.N指定为“高性能计算GPU型”时有效。
        """
        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="instanceChargeType")
    def instance_charge_type(self) -> builtins.str:
        """
        实例计费类型。取值：PrePaid（包年包月）/PostPaid（按量付费）
        """
        return pulumi.get(self, "instance_charge_type")

    @property
    @pulumi.getter(name="instanceDescription")
    def instance_description(self) -> builtins.str:
        """
        实例的描述，取值：不能以数字、中划线开头。只能包含中文、字母、数字、下划线和中划线。长度限制在0 ~ 255之间。不填默认为空字符串。
        """
        return pulumi.get(self, "instance_description")

    @property
    @pulumi.getter(name="instanceName")
    def instance_name(self) -> builtins.str:
        """
        实例的名称，取值：以字母或中文开头。只能包含中文、字母、数字、下划线“_”、中划线“-”和点号“.”。长度限制为1～128个字符。
        """
        return pulumi.get(self, "instance_name")

    @property
    @pulumi.getter(name="instanceTypeOverrides")
    def instance_type_overrides(self) -> Sequence['outputs.GetScalingConfigurationInstanceTypeOverrideResult']:
        return pulumi.get(self, "instance_type_overrides")

    @property
    @pulumi.getter(name="instanceTypes")
    def instance_types(self) -> Sequence[builtins.str]:
        """
        实例的计算规格列表。
        """
        return pulumi.get(self, "instance_types")

    @property
    @pulumi.getter(name="ipv6AddressCount")
    def ipv6_address_count(self) -> builtins.int:
        """
        是否为实例网卡分配IPv6地址。取值：0：不分配IPv6地址。1：分配IPv6地址，系统自动为您分配IPv6网段。
        """
        return pulumi.get(self, "ipv6_address_count")

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> builtins.str:
        """
        KeyPairName string 可选 示例值：kp-test-123，使用“SSH密钥对”登录实例时，请输入密钥对的名称。如果同时设置了KeyPairName和Password，则仅生效KeyPairName。
        """
        return pulumi.get(self, "key_pair_name")

    @property
    @pulumi.getter(name="lifecycleState")
    def lifecycle_state(self) -> builtins.str:
        """
        生命周期状态。取值：Active（活跃）/InActive（非活跃）
        """
        return pulumi.get(self, "lifecycle_state")

    @property
    @pulumi.getter
    def password(self) -> builtins.str:
        """
        使用“密码”方式登录实例时，请设置root登录密码：长度限制在8～30之间，密码只能由大写字母、小写字母、数字和特殊字符组成，且必须包含至少三项，特殊字符可以使用：`~!#$%^&*()_-+= |，不能以“/”和“$6$”开头
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        伸缩配置创建的实例所属项目，默认为空。一个资源只能归属于一个项目。
        只能包含字母、数字、下划线“_”、点“.”和中划线“-”。
        长度限制在64个字符以内。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="scalingConfigurationId")
    def scaling_configuration_id(self) -> builtins.str:
        """
        伸缩配置ID。
        """
        return pulumi.get(self, "scaling_configuration_id")

    @property
    @pulumi.getter(name="scalingConfigurationName")
    def scaling_configuration_name(self) -> builtins.str:
        """
        伸缩配置的名称，在同一地域下同一伸缩组内伸缩配置名称唯一。取值:只能以中文、字母开头。只能包含中文、字母、数字、下划线和中划线。长度限制为1 ~ 128个字符。暂不支持特殊字符。
        """
        return pulumi.get(self, "scaling_configuration_name")

    @property
    @pulumi.getter(name="scalingGroupId")
    def scaling_group_id(self) -> builtins.str:
        """
        伸缩配置所属的伸缩组ID。
        """
        return pulumi.get(self, "scaling_group_id")

    @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="securityGroupIds")
    def security_group_ids(self) -> Sequence[builtins.str]:
        """
        实例主网卡关联的安全组ID。
        """
        return pulumi.get(self, "security_group_ids")

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

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetScalingConfigurationTagResult']:
        """
        标签键值对。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> builtins.str:
        """
        资源更新时间(UTC时间)
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> builtins.str:
        """
        实例自定义数据。设置的自定义数据必须经过Base64编码，且Base64编码前的自定义数据大小不能超过16KB。不填则默认为空。
        """
        return pulumi.get(self, "user_data")

    @property
    @pulumi.getter
    def volumes(self) -> Sequence['outputs.GetScalingConfigurationVolumeResult']:
        """
        云盘。
        """
        return pulumi.get(self, "volumes")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        伸缩配置可用区ID。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetScalingConfigurationResult(GetScalingConfigurationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetScalingConfigurationResult(
            created_at=self.created_at,
            eip=self.eip,
            host_name=self.host_name,
            hpc_cluster_id=self.hpc_cluster_id,
            id=self.id,
            image_id=self.image_id,
            instance_charge_type=self.instance_charge_type,
            instance_description=self.instance_description,
            instance_name=self.instance_name,
            instance_type_overrides=self.instance_type_overrides,
            instance_types=self.instance_types,
            ipv6_address_count=self.ipv6_address_count,
            key_pair_name=self.key_pair_name,
            lifecycle_state=self.lifecycle_state,
            password=self.password,
            project_name=self.project_name,
            scaling_configuration_id=self.scaling_configuration_id,
            scaling_configuration_name=self.scaling_configuration_name,
            scaling_group_id=self.scaling_group_id,
            security_enhancement_strategy=self.security_enhancement_strategy,
            security_group_ids=self.security_group_ids,
            spot_strategy=self.spot_strategy,
            tags=self.tags,
            updated_at=self.updated_at,
            user_data=self.user_data,
            volumes=self.volumes,
            zone_id=self.zone_id)


def get_scaling_configuration(id: Optional[builtins.str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetScalingConfigurationResult:
    """
    Data Source schema for Byteplus::AutoScaling::ScalingConfiguration


    :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:autoscaling/getScalingConfiguration:getScalingConfiguration', __args__, opts=opts, typ=GetScalingConfigurationResult).value

    return AwaitableGetScalingConfigurationResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        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'),
        instance_charge_type=pulumi.get(__ret__, 'instance_charge_type'),
        instance_description=pulumi.get(__ret__, 'instance_description'),
        instance_name=pulumi.get(__ret__, 'instance_name'),
        instance_type_overrides=pulumi.get(__ret__, 'instance_type_overrides'),
        instance_types=pulumi.get(__ret__, 'instance_types'),
        ipv6_address_count=pulumi.get(__ret__, 'ipv6_address_count'),
        key_pair_name=pulumi.get(__ret__, 'key_pair_name'),
        lifecycle_state=pulumi.get(__ret__, 'lifecycle_state'),
        password=pulumi.get(__ret__, 'password'),
        project_name=pulumi.get(__ret__, 'project_name'),
        scaling_configuration_id=pulumi.get(__ret__, 'scaling_configuration_id'),
        scaling_configuration_name=pulumi.get(__ret__, 'scaling_configuration_name'),
        scaling_group_id=pulumi.get(__ret__, 'scaling_group_id'),
        security_enhancement_strategy=pulumi.get(__ret__, 'security_enhancement_strategy'),
        security_group_ids=pulumi.get(__ret__, 'security_group_ids'),
        spot_strategy=pulumi.get(__ret__, 'spot_strategy'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        user_data=pulumi.get(__ret__, 'user_data'),
        volumes=pulumi.get(__ret__, 'volumes'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_scaling_configuration_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetScalingConfigurationResult]:
    """
    Data Source schema for Byteplus::AutoScaling::ScalingConfiguration


    :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:autoscaling/getScalingConfiguration:getScalingConfiguration', __args__, opts=opts, typ=GetScalingConfigurationResult)
    return __ret__.apply(lambda __response__: GetScalingConfigurationResult(
        created_at=pulumi.get(__response__, 'created_at'),
        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'),
        instance_charge_type=pulumi.get(__response__, 'instance_charge_type'),
        instance_description=pulumi.get(__response__, 'instance_description'),
        instance_name=pulumi.get(__response__, 'instance_name'),
        instance_type_overrides=pulumi.get(__response__, 'instance_type_overrides'),
        instance_types=pulumi.get(__response__, 'instance_types'),
        ipv6_address_count=pulumi.get(__response__, 'ipv6_address_count'),
        key_pair_name=pulumi.get(__response__, 'key_pair_name'),
        lifecycle_state=pulumi.get(__response__, 'lifecycle_state'),
        password=pulumi.get(__response__, 'password'),
        project_name=pulumi.get(__response__, 'project_name'),
        scaling_configuration_id=pulumi.get(__response__, 'scaling_configuration_id'),
        scaling_configuration_name=pulumi.get(__response__, 'scaling_configuration_name'),
        scaling_group_id=pulumi.get(__response__, 'scaling_group_id'),
        security_enhancement_strategy=pulumi.get(__response__, 'security_enhancement_strategy'),
        security_group_ids=pulumi.get(__response__, 'security_group_ids'),
        spot_strategy=pulumi.get(__response__, 'spot_strategy'),
        tags=pulumi.get(__response__, 'tags'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        user_data=pulumi.get(__response__, 'user_data'),
        volumes=pulumi.get(__response__, 'volumes'),
        zone_id=pulumi.get(__response__, 'zone_id')))
