# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'ScalingPlanApplicationSource',
    'ScalingPlanApplicationSourceTagFilter',
    'ScalingPlanScalingInstruction',
    'ScalingPlanScalingInstructionCustomizedLoadMetricSpecification',
    'ScalingPlanScalingInstructionPredefinedLoadMetricSpecification',
    'ScalingPlanScalingInstructionTargetTrackingConfiguration',
    'ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification',
    'ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification',
]

@pulumi.output_type
class ScalingPlanApplicationSource(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "cloudformationStackArn":
            suggest = "cloudformation_stack_arn"
        elif key == "tagFilters":
            suggest = "tag_filters"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanApplicationSource. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanApplicationSource.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanApplicationSource.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 cloudformation_stack_arn: Optional[str] = None,
                 tag_filters: Optional[Sequence['outputs.ScalingPlanApplicationSourceTagFilter']] = None):
        """
        :param str cloudformation_stack_arn: The Amazon Resource Name (ARN) of a AWS CloudFormation stack.
        :param Sequence['ScalingPlanApplicationSourceTagFilterArgs'] tag_filters: A set of tags.
        """
        if cloudformation_stack_arn is not None:
            pulumi.set(__self__, "cloudformation_stack_arn", cloudformation_stack_arn)
        if tag_filters is not None:
            pulumi.set(__self__, "tag_filters", tag_filters)

    @property
    @pulumi.getter(name="cloudformationStackArn")
    def cloudformation_stack_arn(self) -> Optional[str]:
        """
        The Amazon Resource Name (ARN) of a AWS CloudFormation stack.
        """
        return pulumi.get(self, "cloudformation_stack_arn")

    @property
    @pulumi.getter(name="tagFilters")
    def tag_filters(self) -> Optional[Sequence['outputs.ScalingPlanApplicationSourceTagFilter']]:
        """
        A set of tags.
        """
        return pulumi.get(self, "tag_filters")


@pulumi.output_type
class ScalingPlanApplicationSourceTagFilter(dict):
    def __init__(__self__, *,
                 key: str,
                 values: Optional[Sequence[str]] = None):
        """
        :param str key: The tag key.
        :param Sequence[str] values: The tag values.
        """
        pulumi.set(__self__, "key", key)
        if values is not None:
            pulumi.set(__self__, "values", values)

    @property
    @pulumi.getter
    def key(self) -> str:
        """
        The tag key.
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def values(self) -> Optional[Sequence[str]]:
        """
        The tag values.
        """
        return pulumi.get(self, "values")


@pulumi.output_type
class ScalingPlanScalingInstruction(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "maxCapacity":
            suggest = "max_capacity"
        elif key == "minCapacity":
            suggest = "min_capacity"
        elif key == "resourceId":
            suggest = "resource_id"
        elif key == "scalableDimension":
            suggest = "scalable_dimension"
        elif key == "serviceNamespace":
            suggest = "service_namespace"
        elif key == "targetTrackingConfigurations":
            suggest = "target_tracking_configurations"
        elif key == "customizedLoadMetricSpecification":
            suggest = "customized_load_metric_specification"
        elif key == "disableDynamicScaling":
            suggest = "disable_dynamic_scaling"
        elif key == "predefinedLoadMetricSpecification":
            suggest = "predefined_load_metric_specification"
        elif key == "predictiveScalingMaxCapacityBehavior":
            suggest = "predictive_scaling_max_capacity_behavior"
        elif key == "predictiveScalingMaxCapacityBuffer":
            suggest = "predictive_scaling_max_capacity_buffer"
        elif key == "predictiveScalingMode":
            suggest = "predictive_scaling_mode"
        elif key == "scalingPolicyUpdateBehavior":
            suggest = "scaling_policy_update_behavior"
        elif key == "scheduledActionBufferTime":
            suggest = "scheduled_action_buffer_time"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstruction. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstruction.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstruction.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 max_capacity: int,
                 min_capacity: int,
                 resource_id: str,
                 scalable_dimension: str,
                 service_namespace: str,
                 target_tracking_configurations: Sequence['outputs.ScalingPlanScalingInstructionTargetTrackingConfiguration'],
                 customized_load_metric_specification: Optional['outputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecification'] = None,
                 disable_dynamic_scaling: Optional[bool] = None,
                 predefined_load_metric_specification: Optional['outputs.ScalingPlanScalingInstructionPredefinedLoadMetricSpecification'] = None,
                 predictive_scaling_max_capacity_behavior: Optional[str] = None,
                 predictive_scaling_max_capacity_buffer: Optional[int] = None,
                 predictive_scaling_mode: Optional[str] = None,
                 scaling_policy_update_behavior: Optional[str] = None,
                 scheduled_action_buffer_time: Optional[int] = None):
        """
        :param int max_capacity: The maximum capacity of the resource. The exception to this upper limit is if you specify a non-default setting for `predictive_scaling_max_capacity_behavior`.
        :param int min_capacity: The minimum capacity of the resource.
        :param str resource_id: The ID of the resource. This string consists of the resource type and unique identifier.
        :param str scalable_dimension: The scalable dimension associated with the resource. Valid values: `autoscaling:autoScalingGroup:DesiredCapacity`, `dynamodb:index:ReadCapacityUnits`, `dynamodb:index:WriteCapacityUnits`, `dynamodb:table:ReadCapacityUnits`, `dynamodb:table:WriteCapacityUnits`, `ecs:service:DesiredCount`, `ec2:spot-fleet-request:TargetCapacity`, `rds:cluster:ReadReplicaCount`.
        :param str service_namespace: The namespace of the AWS service. Valid values: `autoscaling`, `dynamodb`, `ecs`, `ec2`, `rds`.
        :param Sequence['ScalingPlanScalingInstructionTargetTrackingConfigurationArgs'] target_tracking_configurations: The structure that defines new target tracking configurations. Each of these structures includes a specific scaling metric and a target value for the metric, along with various parameters to use with dynamic scaling.
               More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_TargetTrackingConfiguration.html).
        :param 'ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs' customized_load_metric_specification: The customized load metric to use for predictive scaling. You must specify either `customized_load_metric_specification` or `predefined_load_metric_specification` when configuring predictive scaling.
               More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_CustomizedLoadMetricSpecification.html).
        :param bool disable_dynamic_scaling: Boolean controlling whether dynamic scaling by AWS Auto Scaling is disabled. Defaults to `false`.
        :param 'ScalingPlanScalingInstructionPredefinedLoadMetricSpecificationArgs' predefined_load_metric_specification: The predefined load metric to use for predictive scaling. You must specify either `predefined_load_metric_specification` or `customized_load_metric_specification` when configuring predictive scaling.
               More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_PredefinedLoadMetricSpecification.html).
        :param str predictive_scaling_max_capacity_behavior: Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity specified for the resource.
               Valid values: `SetForecastCapacityToMaxCapacity`, `SetMaxCapacityAboveForecastCapacity`, `SetMaxCapacityToForecastCapacity`.
        :param int predictive_scaling_max_capacity_buffer: The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity.
        :param str predictive_scaling_mode: The predictive scaling mode. Valid values: `ForecastAndScale`, `ForecastOnly`.
        :param str scaling_policy_update_behavior: Controls whether a resource's externally created scaling policies are kept or replaced. Valid values: `KeepExternalPolicies`, `ReplaceExternalPolicies`. Defaults to `KeepExternalPolicies`.
        :param int scheduled_action_buffer_time: The amount of time, in seconds, to buffer the run time of scheduled scaling actions when scaling out.
        """
        pulumi.set(__self__, "max_capacity", max_capacity)
        pulumi.set(__self__, "min_capacity", min_capacity)
        pulumi.set(__self__, "resource_id", resource_id)
        pulumi.set(__self__, "scalable_dimension", scalable_dimension)
        pulumi.set(__self__, "service_namespace", service_namespace)
        pulumi.set(__self__, "target_tracking_configurations", target_tracking_configurations)
        if customized_load_metric_specification is not None:
            pulumi.set(__self__, "customized_load_metric_specification", customized_load_metric_specification)
        if disable_dynamic_scaling is not None:
            pulumi.set(__self__, "disable_dynamic_scaling", disable_dynamic_scaling)
        if predefined_load_metric_specification is not None:
            pulumi.set(__self__, "predefined_load_metric_specification", predefined_load_metric_specification)
        if predictive_scaling_max_capacity_behavior is not None:
            pulumi.set(__self__, "predictive_scaling_max_capacity_behavior", predictive_scaling_max_capacity_behavior)
        if predictive_scaling_max_capacity_buffer is not None:
            pulumi.set(__self__, "predictive_scaling_max_capacity_buffer", predictive_scaling_max_capacity_buffer)
        if predictive_scaling_mode is not None:
            pulumi.set(__self__, "predictive_scaling_mode", predictive_scaling_mode)
        if scaling_policy_update_behavior is not None:
            pulumi.set(__self__, "scaling_policy_update_behavior", scaling_policy_update_behavior)
        if scheduled_action_buffer_time is not None:
            pulumi.set(__self__, "scheduled_action_buffer_time", scheduled_action_buffer_time)

    @property
    @pulumi.getter(name="maxCapacity")
    def max_capacity(self) -> int:
        """
        The maximum capacity of the resource. The exception to this upper limit is if you specify a non-default setting for `predictive_scaling_max_capacity_behavior`.
        """
        return pulumi.get(self, "max_capacity")

    @property
    @pulumi.getter(name="minCapacity")
    def min_capacity(self) -> int:
        """
        The minimum capacity of the resource.
        """
        return pulumi.get(self, "min_capacity")

    @property
    @pulumi.getter(name="resourceId")
    def resource_id(self) -> str:
        """
        The ID of the resource. This string consists of the resource type and unique identifier.
        """
        return pulumi.get(self, "resource_id")

    @property
    @pulumi.getter(name="scalableDimension")
    def scalable_dimension(self) -> str:
        """
        The scalable dimension associated with the resource. Valid values: `autoscaling:autoScalingGroup:DesiredCapacity`, `dynamodb:index:ReadCapacityUnits`, `dynamodb:index:WriteCapacityUnits`, `dynamodb:table:ReadCapacityUnits`, `dynamodb:table:WriteCapacityUnits`, `ecs:service:DesiredCount`, `ec2:spot-fleet-request:TargetCapacity`, `rds:cluster:ReadReplicaCount`.
        """
        return pulumi.get(self, "scalable_dimension")

    @property
    @pulumi.getter(name="serviceNamespace")
    def service_namespace(self) -> str:
        """
        The namespace of the AWS service. Valid values: `autoscaling`, `dynamodb`, `ecs`, `ec2`, `rds`.
        """
        return pulumi.get(self, "service_namespace")

    @property
    @pulumi.getter(name="targetTrackingConfigurations")
    def target_tracking_configurations(self) -> Sequence['outputs.ScalingPlanScalingInstructionTargetTrackingConfiguration']:
        """
        The structure that defines new target tracking configurations. Each of these structures includes a specific scaling metric and a target value for the metric, along with various parameters to use with dynamic scaling.
        More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_TargetTrackingConfiguration.html).
        """
        return pulumi.get(self, "target_tracking_configurations")

    @property
    @pulumi.getter(name="customizedLoadMetricSpecification")
    def customized_load_metric_specification(self) -> Optional['outputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecification']:
        """
        The customized load metric to use for predictive scaling. You must specify either `customized_load_metric_specification` or `predefined_load_metric_specification` when configuring predictive scaling.
        More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_CustomizedLoadMetricSpecification.html).
        """
        return pulumi.get(self, "customized_load_metric_specification")

    @property
    @pulumi.getter(name="disableDynamicScaling")
    def disable_dynamic_scaling(self) -> Optional[bool]:
        """
        Boolean controlling whether dynamic scaling by AWS Auto Scaling is disabled. Defaults to `false`.
        """
        return pulumi.get(self, "disable_dynamic_scaling")

    @property
    @pulumi.getter(name="predefinedLoadMetricSpecification")
    def predefined_load_metric_specification(self) -> Optional['outputs.ScalingPlanScalingInstructionPredefinedLoadMetricSpecification']:
        """
        The predefined load metric to use for predictive scaling. You must specify either `predefined_load_metric_specification` or `customized_load_metric_specification` when configuring predictive scaling.
        More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_PredefinedLoadMetricSpecification.html).
        """
        return pulumi.get(self, "predefined_load_metric_specification")

    @property
    @pulumi.getter(name="predictiveScalingMaxCapacityBehavior")
    def predictive_scaling_max_capacity_behavior(self) -> Optional[str]:
        """
        Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity specified for the resource.
        Valid values: `SetForecastCapacityToMaxCapacity`, `SetMaxCapacityAboveForecastCapacity`, `SetMaxCapacityToForecastCapacity`.
        """
        return pulumi.get(self, "predictive_scaling_max_capacity_behavior")

    @property
    @pulumi.getter(name="predictiveScalingMaxCapacityBuffer")
    def predictive_scaling_max_capacity_buffer(self) -> Optional[int]:
        """
        The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity.
        """
        return pulumi.get(self, "predictive_scaling_max_capacity_buffer")

    @property
    @pulumi.getter(name="predictiveScalingMode")
    def predictive_scaling_mode(self) -> Optional[str]:
        """
        The predictive scaling mode. Valid values: `ForecastAndScale`, `ForecastOnly`.
        """
        return pulumi.get(self, "predictive_scaling_mode")

    @property
    @pulumi.getter(name="scalingPolicyUpdateBehavior")
    def scaling_policy_update_behavior(self) -> Optional[str]:
        """
        Controls whether a resource's externally created scaling policies are kept or replaced. Valid values: `KeepExternalPolicies`, `ReplaceExternalPolicies`. Defaults to `KeepExternalPolicies`.
        """
        return pulumi.get(self, "scaling_policy_update_behavior")

    @property
    @pulumi.getter(name="scheduledActionBufferTime")
    def scheduled_action_buffer_time(self) -> Optional[int]:
        """
        The amount of time, in seconds, to buffer the run time of scheduled scaling actions when scaling out.
        """
        return pulumi.get(self, "scheduled_action_buffer_time")


@pulumi.output_type
class ScalingPlanScalingInstructionCustomizedLoadMetricSpecification(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "metricName":
            suggest = "metric_name"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstructionCustomizedLoadMetricSpecification. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstructionCustomizedLoadMetricSpecification.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstructionCustomizedLoadMetricSpecification.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 metric_name: str,
                 namespace: str,
                 statistic: str,
                 dimensions: Optional[Mapping[str, str]] = None,
                 unit: Optional[str] = None):
        """
        :param str metric_name: The name of the metric.
        :param str namespace: The namespace of the metric.
        :param str statistic: The statistic of the metric. Currently, the value must always be `Sum`.
        :param Mapping[str, str] dimensions: The dimensions of the metric.
        :param str unit: The unit of the metric.
        """
        pulumi.set(__self__, "metric_name", metric_name)
        pulumi.set(__self__, "namespace", namespace)
        pulumi.set(__self__, "statistic", statistic)
        if dimensions is not None:
            pulumi.set(__self__, "dimensions", dimensions)
        if unit is not None:
            pulumi.set(__self__, "unit", unit)

    @property
    @pulumi.getter(name="metricName")
    def metric_name(self) -> str:
        """
        The name of the metric.
        """
        return pulumi.get(self, "metric_name")

    @property
    @pulumi.getter
    def namespace(self) -> str:
        """
        The namespace of the metric.
        """
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter
    def statistic(self) -> str:
        """
        The statistic of the metric. Currently, the value must always be `Sum`.
        """
        return pulumi.get(self, "statistic")

    @property
    @pulumi.getter
    def dimensions(self) -> Optional[Mapping[str, str]]:
        """
        The dimensions of the metric.
        """
        return pulumi.get(self, "dimensions")

    @property
    @pulumi.getter
    def unit(self) -> Optional[str]:
        """
        The unit of the metric.
        """
        return pulumi.get(self, "unit")


@pulumi.output_type
class ScalingPlanScalingInstructionPredefinedLoadMetricSpecification(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "predefinedLoadMetricType":
            suggest = "predefined_load_metric_type"
        elif key == "resourceLabel":
            suggest = "resource_label"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstructionPredefinedLoadMetricSpecification. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstructionPredefinedLoadMetricSpecification.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstructionPredefinedLoadMetricSpecification.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 predefined_load_metric_type: str,
                 resource_label: Optional[str] = None):
        """
        :param str predefined_load_metric_type: The metric type. Valid values: `ALBTargetGroupRequestCount`, `ASGTotalCPUUtilization`, `ASGTotalNetworkIn`, `ASGTotalNetworkOut`.
        :param str resource_label: Identifies the resource associated with the metric type.
        """
        pulumi.set(__self__, "predefined_load_metric_type", predefined_load_metric_type)
        if resource_label is not None:
            pulumi.set(__self__, "resource_label", resource_label)

    @property
    @pulumi.getter(name="predefinedLoadMetricType")
    def predefined_load_metric_type(self) -> str:
        """
        The metric type. Valid values: `ALBTargetGroupRequestCount`, `ASGTotalCPUUtilization`, `ASGTotalNetworkIn`, `ASGTotalNetworkOut`.
        """
        return pulumi.get(self, "predefined_load_metric_type")

    @property
    @pulumi.getter(name="resourceLabel")
    def resource_label(self) -> Optional[str]:
        """
        Identifies the resource associated with the metric type.
        """
        return pulumi.get(self, "resource_label")


@pulumi.output_type
class ScalingPlanScalingInstructionTargetTrackingConfiguration(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "targetValue":
            suggest = "target_value"
        elif key == "customizedScalingMetricSpecification":
            suggest = "customized_scaling_metric_specification"
        elif key == "disableScaleIn":
            suggest = "disable_scale_in"
        elif key == "estimatedInstanceWarmup":
            suggest = "estimated_instance_warmup"
        elif key == "predefinedScalingMetricSpecification":
            suggest = "predefined_scaling_metric_specification"
        elif key == "scaleInCooldown":
            suggest = "scale_in_cooldown"
        elif key == "scaleOutCooldown":
            suggest = "scale_out_cooldown"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstructionTargetTrackingConfiguration. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfiguration.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfiguration.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 target_value: float,
                 customized_scaling_metric_specification: Optional['outputs.ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification'] = None,
                 disable_scale_in: Optional[bool] = None,
                 estimated_instance_warmup: Optional[int] = None,
                 predefined_scaling_metric_specification: Optional['outputs.ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification'] = None,
                 scale_in_cooldown: Optional[int] = None,
                 scale_out_cooldown: Optional[int] = None):
        """
        :param float target_value: The target value for the metric.
        :param 'ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationArgs' customized_scaling_metric_specification: A customized metric. You can specify either `customized_scaling_metric_specification` or `predefined_scaling_metric_specification`.
               More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_CustomizedScalingMetricSpecification.html).
        :param bool disable_scale_in: Boolean indicating whether scale in by the target tracking scaling policy is disabled. Defaults to `false`.
        :param int estimated_instance_warmup: The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
               This value is used only if the resource is an Auto Scaling group.
        :param 'ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationArgs' predefined_scaling_metric_specification: A predefined metric. You can specify either `predefined_scaling_metric_specification` or `customized_scaling_metric_specification`.
               More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_PredefinedScalingMetricSpecification.html).
        :param int scale_in_cooldown: The amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
               This value is not used if the scalable resource is an Auto Scaling group.
        :param int scale_out_cooldown: The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
               This value is not used if the scalable resource is an Auto Scaling group.
        """
        pulumi.set(__self__, "target_value", target_value)
        if customized_scaling_metric_specification is not None:
            pulumi.set(__self__, "customized_scaling_metric_specification", customized_scaling_metric_specification)
        if disable_scale_in is not None:
            pulumi.set(__self__, "disable_scale_in", disable_scale_in)
        if estimated_instance_warmup is not None:
            pulumi.set(__self__, "estimated_instance_warmup", estimated_instance_warmup)
        if predefined_scaling_metric_specification is not None:
            pulumi.set(__self__, "predefined_scaling_metric_specification", predefined_scaling_metric_specification)
        if scale_in_cooldown is not None:
            pulumi.set(__self__, "scale_in_cooldown", scale_in_cooldown)
        if scale_out_cooldown is not None:
            pulumi.set(__self__, "scale_out_cooldown", scale_out_cooldown)

    @property
    @pulumi.getter(name="targetValue")
    def target_value(self) -> float:
        """
        The target value for the metric.
        """
        return pulumi.get(self, "target_value")

    @property
    @pulumi.getter(name="customizedScalingMetricSpecification")
    def customized_scaling_metric_specification(self) -> Optional['outputs.ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification']:
        """
        A customized metric. You can specify either `customized_scaling_metric_specification` or `predefined_scaling_metric_specification`.
        More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_CustomizedScalingMetricSpecification.html).
        """
        return pulumi.get(self, "customized_scaling_metric_specification")

    @property
    @pulumi.getter(name="disableScaleIn")
    def disable_scale_in(self) -> Optional[bool]:
        """
        Boolean indicating whether scale in by the target tracking scaling policy is disabled. Defaults to `false`.
        """
        return pulumi.get(self, "disable_scale_in")

    @property
    @pulumi.getter(name="estimatedInstanceWarmup")
    def estimated_instance_warmup(self) -> Optional[int]:
        """
        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
        This value is used only if the resource is an Auto Scaling group.
        """
        return pulumi.get(self, "estimated_instance_warmup")

    @property
    @pulumi.getter(name="predefinedScalingMetricSpecification")
    def predefined_scaling_metric_specification(self) -> Optional['outputs.ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification']:
        """
        A predefined metric. You can specify either `predefined_scaling_metric_specification` or `customized_scaling_metric_specification`.
        More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_PredefinedScalingMetricSpecification.html).
        """
        return pulumi.get(self, "predefined_scaling_metric_specification")

    @property
    @pulumi.getter(name="scaleInCooldown")
    def scale_in_cooldown(self) -> Optional[int]:
        """
        The amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
        This value is not used if the scalable resource is an Auto Scaling group.
        """
        return pulumi.get(self, "scale_in_cooldown")

    @property
    @pulumi.getter(name="scaleOutCooldown")
    def scale_out_cooldown(self) -> Optional[int]:
        """
        The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
        This value is not used if the scalable resource is an Auto Scaling group.
        """
        return pulumi.get(self, "scale_out_cooldown")


@pulumi.output_type
class ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "metricName":
            suggest = "metric_name"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecification.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 metric_name: str,
                 namespace: str,
                 statistic: str,
                 dimensions: Optional[Mapping[str, str]] = None,
                 unit: Optional[str] = None):
        """
        :param str metric_name: The name of the metric.
        :param str namespace: The namespace of the metric.
        :param str statistic: The statistic of the metric. Valid values: `Average`, `Maximum`, `Minimum`, `SampleCount`, `Sum`.
        :param Mapping[str, str] dimensions: The dimensions of the metric.
        :param str unit: The unit of the metric.
        """
        pulumi.set(__self__, "metric_name", metric_name)
        pulumi.set(__self__, "namespace", namespace)
        pulumi.set(__self__, "statistic", statistic)
        if dimensions is not None:
            pulumi.set(__self__, "dimensions", dimensions)
        if unit is not None:
            pulumi.set(__self__, "unit", unit)

    @property
    @pulumi.getter(name="metricName")
    def metric_name(self) -> str:
        """
        The name of the metric.
        """
        return pulumi.get(self, "metric_name")

    @property
    @pulumi.getter
    def namespace(self) -> str:
        """
        The namespace of the metric.
        """
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter
    def statistic(self) -> str:
        """
        The statistic of the metric. Valid values: `Average`, `Maximum`, `Minimum`, `SampleCount`, `Sum`.
        """
        return pulumi.get(self, "statistic")

    @property
    @pulumi.getter
    def dimensions(self) -> Optional[Mapping[str, str]]:
        """
        The dimensions of the metric.
        """
        return pulumi.get(self, "dimensions")

    @property
    @pulumi.getter
    def unit(self) -> Optional[str]:
        """
        The unit of the metric.
        """
        return pulumi.get(self, "unit")


@pulumi.output_type
class ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "predefinedScalingMetricType":
            suggest = "predefined_scaling_metric_type"
        elif key == "resourceLabel":
            suggest = "resource_label"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecification.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 predefined_scaling_metric_type: str,
                 resource_label: Optional[str] = None):
        """
        :param str predefined_scaling_metric_type: The metric type. Valid values: `ALBRequestCountPerTarget`, `ASGAverageCPUUtilization`, `ASGAverageNetworkIn`, `ASGAverageNetworkOut`, `DynamoDBReadCapacityUtilization`, `DynamoDBWriteCapacityUtilization`, `ECSServiceAverageCPUUtilization`, `ECSServiceAverageMemoryUtilization`, `EC2SpotFleetRequestAverageCPUUtilization`, `EC2SpotFleetRequestAverageNetworkIn`, `EC2SpotFleetRequestAverageNetworkOut`, `RDSReaderAverageCPUUtilization`, `RDSReaderAverageDatabaseConnections`.
        :param str resource_label: Identifies the resource associated with the metric type.
        """
        pulumi.set(__self__, "predefined_scaling_metric_type", predefined_scaling_metric_type)
        if resource_label is not None:
            pulumi.set(__self__, "resource_label", resource_label)

    @property
    @pulumi.getter(name="predefinedScalingMetricType")
    def predefined_scaling_metric_type(self) -> str:
        """
        The metric type. Valid values: `ALBRequestCountPerTarget`, `ASGAverageCPUUtilization`, `ASGAverageNetworkIn`, `ASGAverageNetworkOut`, `DynamoDBReadCapacityUtilization`, `DynamoDBWriteCapacityUtilization`, `ECSServiceAverageCPUUtilization`, `ECSServiceAverageMemoryUtilization`, `EC2SpotFleetRequestAverageCPUUtilization`, `EC2SpotFleetRequestAverageNetworkIn`, `EC2SpotFleetRequestAverageNetworkOut`, `RDSReaderAverageCPUUtilization`, `RDSReaderAverageDatabaseConnections`.
        """
        return pulumi.get(self, "predefined_scaling_metric_type")

    @property
    @pulumi.getter(name="resourceLabel")
    def resource_label(self) -> Optional[str]:
        """
        Identifies the resource associated with the metric type.
        """
        return pulumi.get(self, "resource_label")


