UpdateCapacityProvider - Amazon Elastic Container Service

UpdateCapacityProvider

Modifies the parameters for a capacity provider.

These changes only apply to new Amazon ECS Managed Instances, or EC2 instances, not existing ones.

Request Syntax

{ "autoScalingGroupProvider": { "managedDraining": "string", "managedScaling": { "instanceWarmupPeriod": number, "maximumScalingStepSize": number, "minimumScalingStepSize": number, "status": "string", "targetCapacity": number }, "managedTerminationProtection": "string" }, "cluster": "string", "managedInstancesProvider": { "infrastructureRoleArn": "string", "instanceLaunchTemplate": { "ec2InstanceProfileArn": "string", "instanceRequirements": { "acceleratorCount": { "max": number, "min": number }, "acceleratorManufacturers": [ "string" ], "acceleratorNames": [ "string" ], "acceleratorTotalMemoryMiB": { "max": number, "min": number }, "acceleratorTypes": [ "string" ], "allowedInstanceTypes": [ "string" ], "bareMetal": "string", "baselineEbsBandwidthMbps": { "max": number, "min": number }, "burstablePerformance": "string", "cpuManufacturers": [ "string" ], "excludedInstanceTypes": [ "string" ], "instanceGenerations": [ "string" ], "localStorage": "string", "localStorageTypes": [ "string" ], "maxSpotPriceAsPercentageOfOptimalOnDemandPrice": number, "memoryGiBPerVCpu": { "max": number, "min": number }, "memoryMiB": { "max": number, "min": number }, "networkBandwidthGbps": { "max": number, "min": number }, "networkInterfaceCount": { "max": number, "min": number }, "onDemandMaxPricePercentageOverLowestPrice": number, "requireHibernateSupport": boolean, "spotMaxPricePercentageOverLowestPrice": number, "totalLocalStorageGB": { "max": number, "min": number }, "vCpuCount": { "max": number, "min": number } }, "monitoring": "string", "networkConfiguration": { "securityGroups": [ "string" ], "subnets": [ "string" ] }, "storageConfiguration": { "storageSizeGiB": number } }, "propagateTags": "string" }, "name": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

autoScalingGroupProvider

An object that represent the parameters to update for the Auto Scaling group capacity provider.

Type: AutoScalingGroupProviderUpdate object

Required: No

cluster

The name of the cluster that contains the capacity provider to update. Managed instances capacity providers are cluster-scoped and can only be updated within their associated cluster.

Type: String

Required: No

managedInstancesProvider

The updated configuration for the Amazon ECS Managed Instances provider. You can modify the infrastructure role, instance launch template, and tag propagation settings. Changes take effect for new instances launched after the update.

Type: UpdateManagedInstancesProviderConfiguration object

Required: No

name

The name of the capacity provider to update.

Type: String

Required: Yes

Response Syntax

{ "capacityProvider": { "autoScalingGroupProvider": { "autoScalingGroupArn": "string", "managedDraining": "string", "managedScaling": { "instanceWarmupPeriod": number, "maximumScalingStepSize": number, "minimumScalingStepSize": number, "status": "string", "targetCapacity": number }, "managedTerminationProtection": "string" }, "capacityProviderArn": "string", "cluster": "string", "managedInstancesProvider": { "infrastructureRoleArn": "string", "instanceLaunchTemplate": { "ec2InstanceProfileArn": "string", "instanceRequirements": { "acceleratorCount": { "max": number, "min": number }, "acceleratorManufacturers": [ "string" ], "acceleratorNames": [ "string" ], "acceleratorTotalMemoryMiB": { "max": number, "min": number }, "acceleratorTypes": [ "string" ], "allowedInstanceTypes": [ "string" ], "bareMetal": "string", "baselineEbsBandwidthMbps": { "max": number, "min": number }, "burstablePerformance": "string", "cpuManufacturers": [ "string" ], "excludedInstanceTypes": [ "string" ], "instanceGenerations": [ "string" ], "localStorage": "string", "localStorageTypes": [ "string" ], "maxSpotPriceAsPercentageOfOptimalOnDemandPrice": number, "memoryGiBPerVCpu": { "max": number, "min": number }, "memoryMiB": { "max": number, "min": number }, "networkBandwidthGbps": { "max": number, "min": number }, "networkInterfaceCount": { "max": number, "min": number }, "onDemandMaxPricePercentageOverLowestPrice": number, "requireHibernateSupport": boolean, "spotMaxPricePercentageOverLowestPrice": number, "totalLocalStorageGB": { "max": number, "min": number }, "vCpuCount": { "max": number, "min": number } }, "monitoring": "string", "networkConfiguration": { "securityGroups": [ "string" ], "subnets": [ "string" ] }, "storageConfiguration": { "storageSizeGiB": number } }, "propagateTags": "string" }, "name": "string", "status": "string", "tags": [ { "key": "string", "value": "string" } ], "type": "string", "updateStatus": "string", "updateStatusReason": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

capacityProvider

Details about the capacity provider.

Type: CapacityProvider object

Errors

For information about the errors that are common to all actions, see Common Errors.

ClientException

These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ClusterNotFoundException

The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.

HTTP Status Code: 400

InvalidParameterException

The specified parameter isn't valid. Review the available parameters for the API request.

For more information about service event errors, see Amazon ECS service event messages.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

message

Message that describes the cause of the exception.

HTTP Status Code: 500

UnsupportedFeatureException

The specified task isn't supported in this Region.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: