UpdateClusterSettings
Modifies the settings to use for a cluster.
Request Syntax
{
"cluster": "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
- settings
-
The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the
containerInsights
value set with PutAccountSetting or PutAccountSettingDefault.Important
Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.
Type: Array of ClusterSetting objects
Required: Yes
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.
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 thePROVISIONING
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
- 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 Amazon SDKs, see the following: