CmdID

CmdID / aws / aws ecs

aws ecs create-capacity-provider

Creates a capacity provider. AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a capacity provider

The following create-capacity-provider example creates a capacity provider that uses an Auto Scaling group named MyASG, has managed scaling and managed termination protection enabled. This configuration is used for Amazon ECS cluster auto scaling.

aws ecs create-capacity-provider --name "MyCapacityProvider" --auto-scaling-group-provider "autoScalingGroupArn=arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyASG,managedScaling={status=ENABLED,targetCapacity=100},managedTerminationProtection=ENABLED"Identify
--nameThe name of the capacity provider.
--auto-scaling-group-providerThe details of the Auto Scaling group for the capacity provider.
Its output
{
    "capacityProvider": {
        "capacityProviderArn": "arn:aws:ecs:us-west-2:123456789012:capacity-provider/MyCapacityProvider",
        "name": "MyCapacityProvider",
        "status": "ACTIVE",
        "autoScalingGroupProvider": {
            "autoScalingGroupArn": "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyASG",
            "managedScaling": {
                "status": "ENABLED",
                "targetCapacity": 100,
                "minimumScalingStepSize": 1,
                "maximumScalingStepSize": 10000,
                "instanceWarmupPeriod": 300
            },
            "managedTerminationProtection": "ENABLED"
        },
        "tags": []
    }
}

For more information, see Amazon ECS cluster auto scaling in the Amazon ECS Developer Guide.

Options

5 in the AWS CLI reference
--auto-scaling-group-providerThe details of the Auto Scaling group for the capacity provider.
--clusterThe name of the cluster to associate with the capacity provider.
--managed-instances-providerThe configuration for the Amazon ECS Managed Instances provider.
--nameThe name of the capacity provider.
--tagsThe metadata that you apply to the capacity provider to categorize and organize them more conveniently.