CapacityProvider

Provides an ECS cluster capacity provider. More information can be found on the ECS Developer Guide.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Aws.Ecs.CapacityProvider("test", new Aws.Ecs.CapacityProviderArgs
        {
            AutoScalingGroupProvider = new Aws.Ecs.Inputs.CapacityProviderAutoScalingGroupProviderArgs
            {
                AutoScalingGroupArn = aws_autoscaling_group.Test.Arn,
                ManagedTerminationProtection = "ENABLED",
                ManagedScaling = new Aws.Ecs.Inputs.CapacityProviderAutoScalingGroupProviderManagedScalingArgs
                {
                    MaximumScalingStepSize = 1000,
                    MinimumScalingStepSize = 1,
                    Status = "ENABLED",
                    TargetCapacity = 10,
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecs.NewCapacityProvider(ctx, "test", &ecs.CapacityProviderArgs{
            AutoScalingGroupProvider: &ecs.CapacityProviderAutoScalingGroupProviderArgs{
                AutoScalingGroupArn:          pulumi.String(aws_autoscaling_group.Test.Arn),
                ManagedTerminationProtection: pulumi.String("ENABLED"),
                ManagedScaling: &ecs.CapacityProviderAutoScalingGroupProviderManagedScalingArgs{
                    MaximumScalingStepSize: pulumi.Int(1000),
                    MinimumScalingStepSize: pulumi.Int(1),
                    Status:                 pulumi.String("ENABLED"),
                    TargetCapacity:         pulumi.Int(10),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

test = aws.ecs.CapacityProvider("test", auto_scaling_group_provider={
    "autoScalingGroupArn": aws_autoscaling_group["test"]["arn"],
    "managedTerminationProtection": "ENABLED",
    "managedScaling": {
        "maximumScalingStepSize": 1000,
        "minimumScalingStepSize": 1,
        "status": "ENABLED",
        "target_capacity": 10,
    },
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.ecs.CapacityProvider("test", {autoScalingGroupProvider: {
    autoScalingGroupArn: aws_autoscaling_group.test.arn,
    managedTerminationProtection: "ENABLED",
    managedScaling: {
        maximumScalingStepSize: 1000,
        minimumScalingStepSize: 1,
        status: "ENABLED",
        targetCapacity: 10,
    },
}});

Create a CapacityProvider Resource

def CapacityProvider(resource_name, opts=None, auto_scaling_group_provider=None, name=None, tags=None, __props__=None);
name string
The unique name of the resource.
args CapacityProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CapacityProviderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CapacityProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

CapacityProvider Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The CapacityProvider resource accepts the following input properties:

AutoScalingGroupProvider CapacityProviderAutoScalingGroupProviderArgs

Nested argument defining the provider for the ECS auto scaling group. Defined below.

Name string

The name of the capacity provider.

Tags Dictionary<string, string>

Key-value map of resource tags.

AutoScalingGroupProvider CapacityProviderAutoScalingGroupProvider

Nested argument defining the provider for the ECS auto scaling group. Defined below.

Name string

The name of the capacity provider.

Tags map[string]string

Key-value map of resource tags.

autoScalingGroupProvider CapacityProviderAutoScalingGroupProvider

Nested argument defining the provider for the ECS auto scaling group. Defined below.

name string

The name of the capacity provider.

tags {[key: string]: string}

Key-value map of resource tags.

auto_scaling_group_provider Dict[CapacityProviderAutoScalingGroupProvider]

Nested argument defining the provider for the ECS auto scaling group. Defined below.

name str

The name of the capacity provider.

tags Dict[str, str]

Key-value map of resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the CapacityProvider resource produces the following output properties:

Arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

id string
The provider-assigned unique ID for this managed resource.
arn str

The Amazon Resource Name (ARN) that identifies the capacity provider.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing CapacityProvider Resource

Get an existing CapacityProvider resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CapacityProviderState, opts?: CustomResourceOptions): CapacityProvider
static get(resource_name, id, opts=None, arn=None, auto_scaling_group_provider=None, name=None, tags=None, __props__=None);
func GetCapacityProvider(ctx *Context, name string, id IDInput, state *CapacityProviderState, opts ...ResourceOption) (*CapacityProvider, error)
public static CapacityProvider Get(string name, Input<string> id, CapacityProviderState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

AutoScalingGroupProvider CapacityProviderAutoScalingGroupProviderArgs

Nested argument defining the provider for the ECS auto scaling group. Defined below.

Name string

The name of the capacity provider.

Tags Dictionary<string, string>

Key-value map of resource tags.

Arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

AutoScalingGroupProvider CapacityProviderAutoScalingGroupProvider

Nested argument defining the provider for the ECS auto scaling group. Defined below.

Name string

The name of the capacity provider.

Tags map[string]string

Key-value map of resource tags.

arn string

The Amazon Resource Name (ARN) that identifies the capacity provider.

autoScalingGroupProvider CapacityProviderAutoScalingGroupProvider

Nested argument defining the provider for the ECS auto scaling group. Defined below.

name string

The name of the capacity provider.

tags {[key: string]: string}

Key-value map of resource tags.

arn str

The Amazon Resource Name (ARN) that identifies the capacity provider.

auto_scaling_group_provider Dict[CapacityProviderAutoScalingGroupProvider]

Nested argument defining the provider for the ECS auto scaling group. Defined below.

name str

The name of the capacity provider.

tags Dict[str, str]

Key-value map of resource tags.

Supporting Types

CapacityProviderAutoScalingGroupProvider

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AutoScalingGroupArn string
  • The Amazon Resource Name (ARN) of the associated auto scaling group.
ManagedScaling CapacityProviderAutoScalingGroupProviderManagedScalingArgs
  • Nested argument defining the parameters of the auto scaling. Defined below.
ManagedTerminationProtection string
  • Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are ENABLED and DISABLED.
AutoScalingGroupArn string
  • The Amazon Resource Name (ARN) of the associated auto scaling group.
ManagedScaling CapacityProviderAutoScalingGroupProviderManagedScaling
  • Nested argument defining the parameters of the auto scaling. Defined below.
ManagedTerminationProtection string
  • Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are ENABLED and DISABLED.
autoScalingGroupArn string
  • The Amazon Resource Name (ARN) of the associated auto scaling group.
managedScaling CapacityProviderAutoScalingGroupProviderManagedScaling
  • Nested argument defining the parameters of the auto scaling. Defined below.
managedTerminationProtection string
  • Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are ENABLED and DISABLED.
autoScalingGroupArn str
  • The Amazon Resource Name (ARN) of the associated auto scaling group.
managedScaling Dict[CapacityProviderAutoScalingGroupProviderManagedScaling]
  • Nested argument defining the parameters of the auto scaling. Defined below.
managedTerminationProtection str
  • Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are ENABLED and DISABLED.

CapacityProviderAutoScalingGroupProviderManagedScaling

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MaximumScalingStepSize int

The maximum step adjustment size. A number between 1 and 10,000.

MinimumScalingStepSize int

The minimum step adjustment size. A number between 1 and 10,000.

Status string

Whether auto scaling is managed by ECS. Valid values are ENABLED and DISABLED.

TargetCapacity int

The target utilization for the capacity provider. A number between 1 and 100.

MaximumScalingStepSize int

The maximum step adjustment size. A number between 1 and 10,000.

MinimumScalingStepSize int

The minimum step adjustment size. A number between 1 and 10,000.

Status string

Whether auto scaling is managed by ECS. Valid values are ENABLED and DISABLED.

TargetCapacity int

The target utilization for the capacity provider. A number between 1 and 100.

maximumScalingStepSize number

The maximum step adjustment size. A number between 1 and 10,000.

minimumScalingStepSize number

The minimum step adjustment size. A number between 1 and 10,000.

status string

Whether auto scaling is managed by ECS. Valid values are ENABLED and DISABLED.

targetCapacity number

The target utilization for the capacity provider. A number between 1 and 100.

maximumScalingStepSize float

The maximum step adjustment size. A number between 1 and 10,000.

minimumScalingStepSize float

The minimum step adjustment size. A number between 1 and 10,000.

status str

Whether auto scaling is managed by ECS. Valid values are ENABLED and DISABLED.

target_capacity float

The target utilization for the capacity provider. A number between 1 and 100.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.