# 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__ = ['ScalingPolicyArgs', 'ScalingPolicy']

@pulumi.input_type
class ScalingPolicyArgs:
    def __init__(__self__, *,
                 scaling_group_id: pulumi.Input[builtins.str],
                 scaling_policy_name: pulumi.Input[builtins.str],
                 scaling_policy_type: pulumi.Input[builtins.str],
                 adjustment_type: Optional[pulumi.Input[builtins.str]] = None,
                 adjustment_value: Optional[pulumi.Input[builtins.int]] = None,
                 alarm_policy: Optional[pulumi.Input['ScalingPolicyAlarmPolicyArgs']] = None,
                 cooldown: Optional[pulumi.Input[builtins.int]] = None,
                 is_enabled_policy: Optional[pulumi.Input[builtins.bool]] = None,
                 scheduled_policy: Optional[pulumi.Input['ScalingPolicyScheduledPolicyArgs']] = None):
        """
        The set of arguments for constructing a ScalingPolicy resource.
        :param pulumi.Input[builtins.str] scaling_group_id: 伸缩组ID。
        :param pulumi.Input[builtins.str] scaling_policy_name: 伸缩规则名称。
        :param pulumi.Input[builtins.str] scaling_policy_type: 伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        :param pulumi.Input[builtins.str] adjustment_type: 伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        :param pulumi.Input[builtins.int] adjustment_value: 伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        :param pulumi.Input['ScalingPolicyAlarmPolicyArgs'] alarm_policy: 报警任务的详细信息。
        :param pulumi.Input[builtins.int] cooldown: 伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        :param pulumi.Input[builtins.bool] is_enabled_policy: 伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        :param pulumi.Input['ScalingPolicyScheduledPolicyArgs'] scheduled_policy: 定时任务/周期任务的详细信息。
        """
        pulumi.set(__self__, "scaling_group_id", scaling_group_id)
        pulumi.set(__self__, "scaling_policy_name", scaling_policy_name)
        pulumi.set(__self__, "scaling_policy_type", scaling_policy_type)
        if adjustment_type is not None:
            pulumi.set(__self__, "adjustment_type", adjustment_type)
        if adjustment_value is not None:
            pulumi.set(__self__, "adjustment_value", adjustment_value)
        if alarm_policy is not None:
            pulumi.set(__self__, "alarm_policy", alarm_policy)
        if cooldown is not None:
            pulumi.set(__self__, "cooldown", cooldown)
        if is_enabled_policy is not None:
            pulumi.set(__self__, "is_enabled_policy", is_enabled_policy)
        if scheduled_policy is not None:
            pulumi.set(__self__, "scheduled_policy", scheduled_policy)

    @property
    @pulumi.getter(name="scalingGroupId")
    def scaling_group_id(self) -> pulumi.Input[builtins.str]:
        """
        伸缩组ID。
        """
        return pulumi.get(self, "scaling_group_id")

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

    @property
    @pulumi.getter(name="scalingPolicyName")
    def scaling_policy_name(self) -> pulumi.Input[builtins.str]:
        """
        伸缩规则名称。
        """
        return pulumi.get(self, "scaling_policy_name")

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

    @property
    @pulumi.getter(name="scalingPolicyType")
    def scaling_policy_type(self) -> pulumi.Input[builtins.str]:
        """
        伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        """
        return pulumi.get(self, "scaling_policy_type")

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

    @property
    @pulumi.getter(name="adjustmentType")
    def adjustment_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        """
        return pulumi.get(self, "adjustment_type")

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

    @property
    @pulumi.getter(name="adjustmentValue")
    def adjustment_value(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        """
        return pulumi.get(self, "adjustment_value")

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

    @property
    @pulumi.getter(name="alarmPolicy")
    def alarm_policy(self) -> Optional[pulumi.Input['ScalingPolicyAlarmPolicyArgs']]:
        """
        报警任务的详细信息。
        """
        return pulumi.get(self, "alarm_policy")

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

    @property
    @pulumi.getter
    def cooldown(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        """
        return pulumi.get(self, "cooldown")

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

    @property
    @pulumi.getter(name="isEnabledPolicy")
    def is_enabled_policy(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        """
        return pulumi.get(self, "is_enabled_policy")

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

    @property
    @pulumi.getter(name="scheduledPolicy")
    def scheduled_policy(self) -> Optional[pulumi.Input['ScalingPolicyScheduledPolicyArgs']]:
        """
        定时任务/周期任务的详细信息。
        """
        return pulumi.get(self, "scheduled_policy")

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


@pulumi.input_type
class _ScalingPolicyState:
    def __init__(__self__, *,
                 adjustment_type: Optional[pulumi.Input[builtins.str]] = None,
                 adjustment_value: Optional[pulumi.Input[builtins.int]] = None,
                 alarm_policy: Optional[pulumi.Input['ScalingPolicyAlarmPolicyArgs']] = None,
                 cooldown: Optional[pulumi.Input[builtins.int]] = None,
                 is_enabled_policy: Optional[pulumi.Input[builtins.bool]] = None,
                 scaling_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_id: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 scheduled_policy: Optional[pulumi.Input['ScalingPolicyScheduledPolicyArgs']] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering ScalingPolicy resources.
        :param pulumi.Input[builtins.str] adjustment_type: 伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        :param pulumi.Input[builtins.int] adjustment_value: 伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        :param pulumi.Input['ScalingPolicyAlarmPolicyArgs'] alarm_policy: 报警任务的详细信息。
        :param pulumi.Input[builtins.int] cooldown: 伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        :param pulumi.Input[builtins.bool] is_enabled_policy: 伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        :param pulumi.Input[builtins.str] scaling_group_id: 伸缩组ID。
        :param pulumi.Input[builtins.str] scaling_policy_id: 伸缩规则ID。
        :param pulumi.Input[builtins.str] scaling_policy_name: 伸缩规则名称。
        :param pulumi.Input[builtins.str] scaling_policy_type: 伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        :param pulumi.Input['ScalingPolicyScheduledPolicyArgs'] scheduled_policy: 定时任务/周期任务的详细信息。
        :param pulumi.Input[builtins.str] status: 伸缩规则的状态。取值：Active：已启用。InActive：已停用。需保证伸缩组的状态为Active。
        """
        if adjustment_type is not None:
            pulumi.set(__self__, "adjustment_type", adjustment_type)
        if adjustment_value is not None:
            pulumi.set(__self__, "adjustment_value", adjustment_value)
        if alarm_policy is not None:
            pulumi.set(__self__, "alarm_policy", alarm_policy)
        if cooldown is not None:
            pulumi.set(__self__, "cooldown", cooldown)
        if is_enabled_policy is not None:
            pulumi.set(__self__, "is_enabled_policy", is_enabled_policy)
        if scaling_group_id is not None:
            pulumi.set(__self__, "scaling_group_id", scaling_group_id)
        if scaling_policy_id is not None:
            pulumi.set(__self__, "scaling_policy_id", scaling_policy_id)
        if scaling_policy_name is not None:
            pulumi.set(__self__, "scaling_policy_name", scaling_policy_name)
        if scaling_policy_type is not None:
            pulumi.set(__self__, "scaling_policy_type", scaling_policy_type)
        if scheduled_policy is not None:
            pulumi.set(__self__, "scheduled_policy", scheduled_policy)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="adjustmentType")
    def adjustment_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        """
        return pulumi.get(self, "adjustment_type")

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

    @property
    @pulumi.getter(name="adjustmentValue")
    def adjustment_value(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        """
        return pulumi.get(self, "adjustment_value")

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

    @property
    @pulumi.getter(name="alarmPolicy")
    def alarm_policy(self) -> Optional[pulumi.Input['ScalingPolicyAlarmPolicyArgs']]:
        """
        报警任务的详细信息。
        """
        return pulumi.get(self, "alarm_policy")

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

    @property
    @pulumi.getter
    def cooldown(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        """
        return pulumi.get(self, "cooldown")

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

    @property
    @pulumi.getter(name="isEnabledPolicy")
    def is_enabled_policy(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        """
        return pulumi.get(self, "is_enabled_policy")

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

    @property
    @pulumi.getter(name="scalingGroupId")
    def scaling_group_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩组ID。
        """
        return pulumi.get(self, "scaling_group_id")

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

    @property
    @pulumi.getter(name="scalingPolicyId")
    def scaling_policy_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则ID。
        """
        return pulumi.get(self, "scaling_policy_id")

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

    @property
    @pulumi.getter(name="scalingPolicyName")
    def scaling_policy_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则名称。
        """
        return pulumi.get(self, "scaling_policy_name")

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

    @property
    @pulumi.getter(name="scalingPolicyType")
    def scaling_policy_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        """
        return pulumi.get(self, "scaling_policy_type")

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

    @property
    @pulumi.getter(name="scheduledPolicy")
    def scheduled_policy(self) -> Optional[pulumi.Input['ScalingPolicyScheduledPolicyArgs']]:
        """
        定时任务/周期任务的详细信息。
        """
        return pulumi.get(self, "scheduled_policy")

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

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        伸缩规则的状态。取值：Active：已启用。InActive：已停用。需保证伸缩组的状态为Active。
        """
        return pulumi.get(self, "status")

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


@pulumi.type_token("bytepluscc:autoscaling/scalingPolicy:ScalingPolicy")
class ScalingPolicy(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 adjustment_type: Optional[pulumi.Input[builtins.str]] = None,
                 adjustment_value: Optional[pulumi.Input[builtins.int]] = None,
                 alarm_policy: Optional[pulumi.Input[Union['ScalingPolicyAlarmPolicyArgs', 'ScalingPolicyAlarmPolicyArgsDict']]] = None,
                 cooldown: Optional[pulumi.Input[builtins.int]] = None,
                 is_enabled_policy: Optional[pulumi.Input[builtins.bool]] = None,
                 scaling_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 scheduled_policy: Optional[pulumi.Input[Union['ScalingPolicyScheduledPolicyArgs', 'ScalingPolicyScheduledPolicyArgsDict']]] = None,
                 __props__=None):
        """
        伸缩规则用于定义触发扩缩容行为的条件和方式，包括规则类型、触发时间、伸缩行为、冷却时间等。在同一个伸缩组中，您可以启用多条伸缩规则，满足任意类型时均会执行伸缩动作。但当同一时间满足多个类型时，将优先执行手动触发的伸缩行为。

        ## Import

        ```sh
        $ pulumi import bytepluscc:autoscaling/scalingPolicy:ScalingPolicy example "scaling_group_id|scaling_policy_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] adjustment_type: 伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        :param pulumi.Input[builtins.int] adjustment_value: 伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        :param pulumi.Input[Union['ScalingPolicyAlarmPolicyArgs', 'ScalingPolicyAlarmPolicyArgsDict']] alarm_policy: 报警任务的详细信息。
        :param pulumi.Input[builtins.int] cooldown: 伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        :param pulumi.Input[builtins.bool] is_enabled_policy: 伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        :param pulumi.Input[builtins.str] scaling_group_id: 伸缩组ID。
        :param pulumi.Input[builtins.str] scaling_policy_name: 伸缩规则名称。
        :param pulumi.Input[builtins.str] scaling_policy_type: 伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        :param pulumi.Input[Union['ScalingPolicyScheduledPolicyArgs', 'ScalingPolicyScheduledPolicyArgsDict']] scheduled_policy: 定时任务/周期任务的详细信息。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ScalingPolicyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        伸缩规则用于定义触发扩缩容行为的条件和方式，包括规则类型、触发时间、伸缩行为、冷却时间等。在同一个伸缩组中，您可以启用多条伸缩规则，满足任意类型时均会执行伸缩动作。但当同一时间满足多个类型时，将优先执行手动触发的伸缩行为。

        ## Import

        ```sh
        $ pulumi import bytepluscc:autoscaling/scalingPolicy:ScalingPolicy example "scaling_group_id|scaling_policy_id"
        ```

        :param str resource_name: The name of the resource.
        :param ScalingPolicyArgs 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(ScalingPolicyArgs, 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,
                 adjustment_type: Optional[pulumi.Input[builtins.str]] = None,
                 adjustment_value: Optional[pulumi.Input[builtins.int]] = None,
                 alarm_policy: Optional[pulumi.Input[Union['ScalingPolicyAlarmPolicyArgs', 'ScalingPolicyAlarmPolicyArgsDict']]] = None,
                 cooldown: Optional[pulumi.Input[builtins.int]] = None,
                 is_enabled_policy: Optional[pulumi.Input[builtins.bool]] = None,
                 scaling_group_id: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 scaling_policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 scheduled_policy: Optional[pulumi.Input[Union['ScalingPolicyScheduledPolicyArgs', 'ScalingPolicyScheduledPolicyArgsDict']]] = 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__ = ScalingPolicyArgs.__new__(ScalingPolicyArgs)

            __props__.__dict__["adjustment_type"] = adjustment_type
            __props__.__dict__["adjustment_value"] = adjustment_value
            __props__.__dict__["alarm_policy"] = alarm_policy
            __props__.__dict__["cooldown"] = cooldown
            __props__.__dict__["is_enabled_policy"] = is_enabled_policy
            if scaling_group_id is None and not opts.urn:
                raise TypeError("Missing required property 'scaling_group_id'")
            __props__.__dict__["scaling_group_id"] = scaling_group_id
            if scaling_policy_name is None and not opts.urn:
                raise TypeError("Missing required property 'scaling_policy_name'")
            __props__.__dict__["scaling_policy_name"] = scaling_policy_name
            if scaling_policy_type is None and not opts.urn:
                raise TypeError("Missing required property 'scaling_policy_type'")
            __props__.__dict__["scaling_policy_type"] = scaling_policy_type
            __props__.__dict__["scheduled_policy"] = scheduled_policy
            __props__.__dict__["scaling_policy_id"] = None
            __props__.__dict__["status"] = None
        super(ScalingPolicy, __self__).__init__(
            'bytepluscc:autoscaling/scalingPolicy:ScalingPolicy',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            adjustment_type: Optional[pulumi.Input[builtins.str]] = None,
            adjustment_value: Optional[pulumi.Input[builtins.int]] = None,
            alarm_policy: Optional[pulumi.Input[Union['ScalingPolicyAlarmPolicyArgs', 'ScalingPolicyAlarmPolicyArgsDict']]] = None,
            cooldown: Optional[pulumi.Input[builtins.int]] = None,
            is_enabled_policy: Optional[pulumi.Input[builtins.bool]] = None,
            scaling_group_id: Optional[pulumi.Input[builtins.str]] = None,
            scaling_policy_id: Optional[pulumi.Input[builtins.str]] = None,
            scaling_policy_name: Optional[pulumi.Input[builtins.str]] = None,
            scaling_policy_type: Optional[pulumi.Input[builtins.str]] = None,
            scheduled_policy: Optional[pulumi.Input[Union['ScalingPolicyScheduledPolicyArgs', 'ScalingPolicyScheduledPolicyArgsDict']]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None) -> 'ScalingPolicy':
        """
        Get an existing ScalingPolicy 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] adjustment_type: 伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        :param pulumi.Input[builtins.int] adjustment_value: 伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        :param pulumi.Input[Union['ScalingPolicyAlarmPolicyArgs', 'ScalingPolicyAlarmPolicyArgsDict']] alarm_policy: 报警任务的详细信息。
        :param pulumi.Input[builtins.int] cooldown: 伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        :param pulumi.Input[builtins.bool] is_enabled_policy: 伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        :param pulumi.Input[builtins.str] scaling_group_id: 伸缩组ID。
        :param pulumi.Input[builtins.str] scaling_policy_id: 伸缩规则ID。
        :param pulumi.Input[builtins.str] scaling_policy_name: 伸缩规则名称。
        :param pulumi.Input[builtins.str] scaling_policy_type: 伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        :param pulumi.Input[Union['ScalingPolicyScheduledPolicyArgs', 'ScalingPolicyScheduledPolicyArgsDict']] scheduled_policy: 定时任务/周期任务的详细信息。
        :param pulumi.Input[builtins.str] status: 伸缩规则的状态。取值：Active：已启用。InActive：已停用。需保证伸缩组的状态为Active。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ScalingPolicyState.__new__(_ScalingPolicyState)

        __props__.__dict__["adjustment_type"] = adjustment_type
        __props__.__dict__["adjustment_value"] = adjustment_value
        __props__.__dict__["alarm_policy"] = alarm_policy
        __props__.__dict__["cooldown"] = cooldown
        __props__.__dict__["is_enabled_policy"] = is_enabled_policy
        __props__.__dict__["scaling_group_id"] = scaling_group_id
        __props__.__dict__["scaling_policy_id"] = scaling_policy_id
        __props__.__dict__["scaling_policy_name"] = scaling_policy_name
        __props__.__dict__["scaling_policy_type"] = scaling_policy_type
        __props__.__dict__["scheduled_policy"] = scheduled_policy
        __props__.__dict__["status"] = status
        return ScalingPolicy(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="adjustmentType")
    def adjustment_type(self) -> pulumi.Output[builtins.str]:
        """
        伸缩规则的伸缩行为，适用于简单规则和步进规则，QuantityChangeInCapacity：增加或减少指定数量的实例。PercentChangeInCapacity：增加或减少指定比例的实例。TotalCapacity： 将当前伸缩组的实例数量调整到指定数量。
        """
        return pulumi.get(self, "adjustment_type")

    @property
    @pulumi.getter(name="adjustmentValue")
    def adjustment_value(self) -> pulumi.Output[builtins.int]:
        """
        伸缩行为的调整数值，适用于简单规则和步进规则，当AdjustmentType参数取值为QuantityChangeInCapacity时：-100   - 100，不允许为0，单位：个。当AdjustmentType参数取值为PercentChangeInCapacity时：-100   - 10000，不允许为0，单位：%。当AdjustmentType参数取值为TotalCapacity时：默认为0   - 100，单位：个。
        """
        return pulumi.get(self, "adjustment_value")

    @property
    @pulumi.getter(name="alarmPolicy")
    def alarm_policy(self) -> pulumi.Output['outputs.ScalingPolicyAlarmPolicy']:
        """
        报警任务的详细信息。
        """
        return pulumi.get(self, "alarm_policy")

    @property
    @pulumi.getter
    def cooldown(self) -> pulumi.Output[builtins.int]:
        """
        伸缩规则的冷却时间。 取值：0-86400，单位：秒，不填则默认使用伸缩组的冷却时间。
        """
        return pulumi.get(self, "cooldown")

    @property
    @pulumi.getter(name="isEnabledPolicy")
    def is_enabled_policy(self) -> pulumi.Output[builtins.bool]:
        """
        伸缩规则的状态。取值：true：启用。false：停用。需保证伸缩组的状态为Active。
        """
        return pulumi.get(self, "is_enabled_policy")

    @property
    @pulumi.getter(name="scalingGroupId")
    def scaling_group_id(self) -> pulumi.Output[builtins.str]:
        """
        伸缩组ID。
        """
        return pulumi.get(self, "scaling_group_id")

    @property
    @pulumi.getter(name="scalingPolicyId")
    def scaling_policy_id(self) -> pulumi.Output[builtins.str]:
        """
        伸缩规则ID。
        """
        return pulumi.get(self, "scaling_policy_id")

    @property
    @pulumi.getter(name="scalingPolicyName")
    def scaling_policy_name(self) -> pulumi.Output[builtins.str]:
        """
        伸缩规则名称。
        """
        return pulumi.get(self, "scaling_policy_name")

    @property
    @pulumi.getter(name="scalingPolicyType")
    def scaling_policy_type(self) -> pulumi.Output[builtins.str]:
        """
        伸缩规则的类型，取值：Scheduled：定时任务。Recurrence：周期任务。Alarm：报警任务。
        """
        return pulumi.get(self, "scaling_policy_type")

    @property
    @pulumi.getter(name="scheduledPolicy")
    def scheduled_policy(self) -> pulumi.Output['outputs.ScalingPolicyScheduledPolicy']:
        """
        定时任务/周期任务的详细信息。
        """
        return pulumi.get(self, "scheduled_policy")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[builtins.str]:
        """
        伸缩规则的状态。取值：Active：已启用。InActive：已停用。需保证伸缩组的状态为Active。
        """
        return pulumi.get(self, "status")

