import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an Application AutoScaling Policy resource. * * ## Example Usage * * ### DynamoDB Table Autoscaling * * ### ECS Service Autoscaling * * ### Preserve desired count when updating an autoscaled ECS Service * * > To preserve the `desiredCount` of an autoscaled ECS Service during updates, use the [`ignoreChanges` resource option](https://www.pulumi.com/docs/concepts/options/ignorechanges/). This prevents Pulumi from resetting the count that autoscaling has set: * > ```typescript * > const ecsService = new aws.ecs.Service("ecsService", { * > name: "serviceName", * > cluster: "clusterName", * > taskDefinition: "taskDefinitionFamily:1", * > desiredCount: 2, * > }, { * > ignoreChanges: ["desiredCount"], * > }); * > ``` * * ### Aurora Read Replica Autoscaling * * ### Create target tracking scaling policy using metric math * * ### Predictive Scaling * * ### MSK / Kafka Autoscaling * * ## Import * * ### Identity Schema * * #### Required * * * `name` - (String) Name of the scaling policy. * * `resourceId` - (String) Resource type and unique identifier string for the resource associated with the scaling policy. * * `scalableDimension` - (String) Scalable dimension of the scalable target. * * `serviceNamespace` - (String) AWS service namespace of the scalable target. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Application AutoScaling Policy using the `service-namespace` , `resource-id`, `scalable-dimension` and `policy-name` separated by `/`. For example: * * ```sh * $ pulumi import aws:appautoscaling/policy:Policy test-policy service-namespace/resource-id/scalable-dimension/policy-name * ``` */ export declare class Policy extends pulumi.CustomResource { /** * Get an existing Policy 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PolicyState, opts?: pulumi.CustomResourceOptions): Policy; /** * Returns true if the given object is an instance of Policy. 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 Policy; /** * List of CloudWatch alarm ARNs associated with the scaling policy. */ readonly alarmArns: pulumi.Output; /** * ARN assigned by AWS to the scaling policy. */ readonly arn: pulumi.Output; /** * Name of the policy. Must be between 1 and 255 characters in length. */ readonly name: pulumi.Output; /** * Policy type. Valid values are `StepScaling`, `TargetTrackingScaling`, and `PredictiveScaling`. Defaults to `StepScaling`. Certain services only support only one policy type. For more information see the [Target Tracking Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html), [Step Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html), and [Predictive Scaling](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-predictive-scaling.html) documentation. */ readonly policyType: pulumi.Output; /** * Predictive scaling policy configuration, requires `policyType = "PredictiveScaling"`. See supported fields below. */ readonly predictiveScalingPolicyConfiguration: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ readonly resourceId: pulumi.Output; /** * Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ readonly scalableDimension: pulumi.Output; /** * AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ readonly serviceNamespace: pulumi.Output; /** * Step scaling policy configuration, requires `policyType = "StepScaling"` (default). See supported fields below. */ readonly stepScalingPolicyConfiguration: pulumi.Output; /** * Target tracking policy configuration, requires `policyType = "TargetTrackingScaling"`. See supported fields below. */ readonly targetTrackingScalingPolicyConfiguration: pulumi.Output; /** * Create a Policy 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: PolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Policy resources. */ export interface PolicyState { /** * List of CloudWatch alarm ARNs associated with the scaling policy. */ alarmArns?: pulumi.Input[] | undefined>; /** * ARN assigned by AWS to the scaling policy. */ arn?: pulumi.Input; /** * Name of the policy. Must be between 1 and 255 characters in length. */ name?: pulumi.Input; /** * Policy type. Valid values are `StepScaling`, `TargetTrackingScaling`, and `PredictiveScaling`. Defaults to `StepScaling`. Certain services only support only one policy type. For more information see the [Target Tracking Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html), [Step Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html), and [Predictive Scaling](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-predictive-scaling.html) documentation. */ policyType?: pulumi.Input; /** * Predictive scaling policy configuration, requires `policyType = "PredictiveScaling"`. See supported fields below. */ predictiveScalingPolicyConfiguration?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ resourceId?: pulumi.Input; /** * Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ scalableDimension?: pulumi.Input; /** * AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ serviceNamespace?: pulumi.Input; /** * Step scaling policy configuration, requires `policyType = "StepScaling"` (default). See supported fields below. */ stepScalingPolicyConfiguration?: pulumi.Input; /** * Target tracking policy configuration, requires `policyType = "TargetTrackingScaling"`. See supported fields below. */ targetTrackingScalingPolicyConfiguration?: pulumi.Input; } /** * The set of arguments for constructing a Policy resource. */ export interface PolicyArgs { /** * Name of the policy. Must be between 1 and 255 characters in length. */ name?: pulumi.Input; /** * Policy type. Valid values are `StepScaling`, `TargetTrackingScaling`, and `PredictiveScaling`. Defaults to `StepScaling`. Certain services only support only one policy type. For more information see the [Target Tracking Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html), [Step Scaling Policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html), and [Predictive Scaling](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-predictive-scaling.html) documentation. */ policyType?: pulumi.Input; /** * Predictive scaling policy configuration, requires `policyType = "PredictiveScaling"`. See supported fields below. */ predictiveScalingPolicyConfiguration?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ resourceId: pulumi.Input; /** * Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ scalableDimension: pulumi.Input; /** * AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) */ serviceNamespace: pulumi.Input; /** * Step scaling policy configuration, requires `policyType = "StepScaling"` (default). See supported fields below. */ stepScalingPolicyConfiguration?: pulumi.Input; /** * Target tracking policy configuration, requires `policyType = "TargetTrackingScaling"`. See supported fields below. */ targetTrackingScalingPolicyConfiguration?: pulumi.Input; } //# sourceMappingURL=policy.d.ts.map