CmdID

CmdID / aws / aws ecs

aws ecs update-capacity-provider

Modifies the parameters for a capacity provider. AWS CLI reference

1 example 4 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 update the capacity provider in an ECS cluster

The following update-capacity-provider example shows how we can modify the parameters of the capacity provider in an ECS cluster.

aws ecs update-capacity-provider --name Infra-ECS-Cluster-ECS-project-update-cluster-d6bb6d5b-EC2CapacityProvider-3fIpdkLywwFt --auto-scaling-group-provider "managedScaling={status=DISABLED,targetCapacity=50,minimumScalingStepSize=2,maximumScalingStepSize=30,instanceWarmupPeriod=200},managedTerminationProtection=DISABLED,managedDraining=DISABLED"Identify
--nameThe name of the capacity provider to update.
--auto-scaling-group-providerAn object that represent the parameters to update for the Auto Scaling group capacity provider.
Its output
{
    "capacityProvider": {
        "capacityProviderArn": "arn:aws:ecs:us-west-2:123456789012:capacity-provider/Infra-ECS-Cluster-ECS-project-update-cluster-d6bb6d5b-EC2CapacityProvider-3fIpdkLywwFt",
        "name": "Infra-ECS-Cluster-ECS-project-update-cluster-d6bb6d5b-EC2CapacityProvider-3fIpdkLywwFt",
        "status": "ACTIVE",
        "autoScalingGroupProvider": {
            "autoScalingGroupArn": "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/Infra-ECS-Cluster-ECS-project-update-cluster-d6bb6d5b-ECSAutoScalingGroup-f44jrQHS2nRB",
            "managedScaling": {
                "status": "ENABLED",
                "targetCapacity": 100,
                "minimumScalingStepSize": 1,
                "maximumScalingStepSize": 10000,
                "instanceWarmupPeriod": 300
            },
            "managedTerminationProtection": "DISABLED",
            "managedDraining": "ENABLED"
        },
        "updateStatus": "UPDATE_IN_PROGRESS",
        "tags": []
    }
}

For more information on Capacity Provider, see Amazon ECS capacity providers for the EC2 launch type in the Amazon ECS Developer Guide.

Options

4 in the AWS CLI reference
--auto-scaling-group-providerAn object that represent the parameters to update for the Auto Scaling group capacity provider.
--clusterThe name of the cluster that contains the capacity provider to update.
--managed-instances-providerThe updated configuration for the Amazon ECS Managed Instances provider.
--nameThe name of the capacity provider to update.