UpdateCluster - Amazon Elastic Container Service

UpdateCluster

Updates the cluster.

Request Syntax

{ "cluster": "string", "configuration": { "executeCommandConfiguration": { "kmsKeyId": "string", "logConfiguration": { "cloudWatchEncryptionEnabled": boolean, "cloudWatchLogGroupName": "string", "s3BucketName": "string", "s3EncryptionEnabled": boolean, "s3KeyPrefix": "string" }, "logging": "string" }, "managedStorageConfiguration": { "fargateEphemeralStorageKmsKeyId": "string", "kmsKeyId": "string" } }, "serviceConnectDefaults": { "namespace": "string" }, "settings": [ { "name": "string", "value": "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.

cluster

The name of the cluster to modify the settings for.

Type: String

Required: Yes

configuration

The execute command configuration for the cluster.

Type: ClusterConfiguration object

Required: No

serviceConnectDefaults

Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

Type: ClusterServiceConnectDefaultsRequest object

Required: No

settings

The cluster settings for your cluster.

Type: Array of ClusterSetting objects

Required: No

Response Syntax

{ "cluster": { "activeServicesCount": number, "attachments": [ { "details": [ { "name": "string", "value": "string" } ], "id": "string", "status": "string", "type": "string" } ], "attachmentsStatus": "string", "capacityProviders": [ "string" ], "clusterArn": "string", "clusterName": "string", "configuration": { "executeCommandConfiguration": { "kmsKeyId": "string", "logConfiguration": { "cloudWatchEncryptionEnabled": boolean, "cloudWatchLogGroupName": "string", "s3BucketName": "string", "s3EncryptionEnabled": boolean, "s3KeyPrefix": "string" }, "logging": "string" }, "managedStorageConfiguration": { "fargateEphemeralStorageKmsKeyId": "string", "kmsKeyId": "string" } }, "defaultCapacityProviderStrategy": [ { "base": number, "capacityProvider": "string", "weight": number } ], "pendingTasksCount": number, "registeredContainerInstancesCount": number, "runningTasksCount": number, "serviceConnectDefaults": { "namespace": "string" }, "settings": [ { "name": "string", "value": "string" } ], "statistics": [ { "name": "string", "value": "string" } ], "status": "string", "tags": [ { "key": "string", "value": "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.

cluster

Details about the cluster.

Type: Cluster 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.

The following list includes additional causes for the error:

  • The RunTask could not be processed because you use managed scaling and there is a capacity error because the quota of tasks in the PROVISIONING per cluster has been reached. For information about the service quotas, see Amazon ECS service quotas.

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.

HTTP Status Code: 400

NamespaceNotFoundException

The specified namespace wasn't found.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

HTTP Status Code: 500

See Also

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