@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines (151 loc) • 6.67 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides an ECS cluster capacity provider. More information can be found on the [ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html).
*
* > **NOTE:** Associating an ECS Capacity Provider to an Auto Scaling Group will automatically add the `AmazonECSManaged` tag to the Auto Scaling Group. This tag should be included in the `aws.autoscaling.Group` resource configuration to prevent the provider from removing it in subsequent executions as well as ensuring the `AmazonECSManaged` tag is propagated to all EC2 Instances in the Auto Scaling Group if `minSize` is above 0 on creation. Any EC2 Instances in the Auto Scaling Group without this tag must be manually be updated, otherwise they may cause unexpected scaling behavior and metrics.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.autoscaling.Group("example", {tags: [{
* key: "AmazonECSManaged",
* value: "true",
* propagateAtLaunch: true,
* }]});
* const exampleCapacityProvider = new aws.ecs.CapacityProvider("example", {
* name: "example",
* autoScalingGroupProvider: {
* autoScalingGroupArn: example.arn,
* managedTerminationProtection: "ENABLED",
* managedScaling: {
* maximumScalingStepSize: 1000,
* minimumScalingStepSize: 1,
* status: "ENABLED",
* targetCapacity: 10,
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import ECS Capacity Providers using the `arn`. For example:
*
* ```sh
* $ pulumi import aws:ecs/capacityProvider:CapacityProvider example arn:aws:ecs:us-west-2:123456789012:capacity-provider/example
* ```
*/
export declare class CapacityProvider extends pulumi.CustomResource {
/**
* Get an existing CapacityProvider 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<pulumi.ID>, state?: CapacityProviderState, opts?: pulumi.CustomResourceOptions): CapacityProvider;
/**
* Returns true if the given object is an instance of CapacityProvider. 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 CapacityProvider;
/**
* ARN that identifies the capacity provider.
*/
readonly arn: pulumi.Output<string>;
/**
* Configuration block for the provider for the ECS auto scaling group. Detailed below.
*/
readonly autoScalingGroupProvider: pulumi.Output<outputs.ecs.CapacityProviderAutoScalingGroupProvider>;
/**
* Name of the capacity provider.
*/
readonly name: pulumi.Output<string>;
/**
* 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<string>;
/**
* Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* Create a CapacityProvider 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: CapacityProviderArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CapacityProvider resources.
*/
export interface CapacityProviderState {
/**
* ARN that identifies the capacity provider.
*/
arn?: pulumi.Input<string>;
/**
* Configuration block for the provider for the ECS auto scaling group. Detailed below.
*/
autoScalingGroupProvider?: pulumi.Input<inputs.ecs.CapacityProviderAutoScalingGroupProvider>;
/**
* Name of the capacity provider.
*/
name?: pulumi.Input<string>;
/**
* 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<string>;
/**
* Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a CapacityProvider resource.
*/
export interface CapacityProviderArgs {
/**
* Configuration block for the provider for the ECS auto scaling group. Detailed below.
*/
autoScalingGroupProvider: pulumi.Input<inputs.ecs.CapacityProviderAutoScalingGroupProvider>;
/**
* Name of the capacity provider.
*/
name?: pulumi.Input<string>;
/**
* 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<string>;
/**
* Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}