@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
132 lines (131 loc) • 8.13 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.
*/
export declare class ScalingPolicy extends pulumi.CustomResource {
/**
* Get an existing ScalingPolicy resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ScalingPolicy;
/**
* Returns true if the given object is an instance of ScalingPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ScalingPolicy;
/**
* Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
*/
readonly adjustmentType: pulumi.Output<string | undefined>;
/**
* The ARN of the AutoScaling scaling policy
*/
readonly arn: pulumi.Output<string>;
/**
* The name of the Auto Scaling group.
*/
readonly autoScalingGroupName: pulumi.Output<string>;
/**
* The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.
*/
readonly cooldown: pulumi.Output<string | undefined>;
/**
* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.
*/
readonly estimatedInstanceWarmup: pulumi.Output<number | undefined>;
/**
* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.
*/
readonly metricAggregationType: pulumi.Output<string | undefined>;
/**
* The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
*/
readonly minAdjustmentMagnitude: pulumi.Output<number | undefined>;
/**
* Returns the name of a scaling policy.
*/
readonly policyName: pulumi.Output<string>;
/**
* One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
*/
readonly policyType: pulumi.Output<string | undefined>;
/**
* A predictive scaling policy. Includes support for predefined metrics only.
*/
readonly predictiveScalingConfiguration: pulumi.Output<outputs.autoscaling.ScalingPolicyPredictiveScalingConfiguration | undefined>;
/**
* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)
*/
readonly scalingAdjustment: pulumi.Output<number | undefined>;
/**
* A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)
*/
readonly stepAdjustments: pulumi.Output<outputs.autoscaling.ScalingPolicyStepAdjustment[] | undefined>;
/**
* A target tracking scaling policy. Includes support for predefined or customized metrics.
*/
readonly targetTrackingConfiguration: pulumi.Output<outputs.autoscaling.ScalingPolicyTargetTrackingConfiguration | undefined>;
/**
* Create a ScalingPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ScalingPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a ScalingPolicy resource.
*/
export interface ScalingPolicyArgs {
/**
* Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
*/
adjustmentType?: pulumi.Input<string>;
/**
* The name of the Auto Scaling group.
*/
autoScalingGroupName: pulumi.Input<string>;
/**
* The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.
*/
cooldown?: pulumi.Input<string>;
/**
* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.
*/
estimatedInstanceWarmup?: pulumi.Input<number>;
/**
* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.
*/
metricAggregationType?: pulumi.Input<string>;
/**
* The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
*/
minAdjustmentMagnitude?: pulumi.Input<number>;
/**
* One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
*/
policyType?: pulumi.Input<string>;
/**
* A predictive scaling policy. Includes support for predefined metrics only.
*/
predictiveScalingConfiguration?: pulumi.Input<inputs.autoscaling.ScalingPolicyPredictiveScalingConfigurationArgs>;
/**
* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)
*/
scalingAdjustment?: pulumi.Input<number>;
/**
* A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)
*/
stepAdjustments?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingPolicyStepAdjustmentArgs>[]>;
/**
* A target tracking scaling policy. Includes support for predefined or customized metrics.
*/
targetTrackingConfiguration?: pulumi.Input<inputs.autoscaling.ScalingPolicyTargetTrackingConfigurationArgs>;
}