AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the UpdateClusterSettings operation. Modifies the settings to use for a cluster.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ECS.AmazonECSRequest
      Amazon.ECS.Model.UpdateClusterSettingsRequest

Namespace: Amazon.ECS.Model
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z

Syntax

C#
public class UpdateClusterSettingsRequest : AmazonECSRequest
         IAmazonWebServiceRequest

The UpdateClusterSettingsRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Cluster System.String

Gets and sets the property Cluster.

The name of the cluster to modify the settings for.

Public Property Settings System.Collections.Generic.List<Amazon.ECS.Model.ClusterSetting>

Gets and sets the property 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.

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.

Examples

This example enables CloudWatch Container Insights for the default cluster.

To update a cluster's settings


var client = new AmazonECSClient();
var response = client.UpdateClusterSettings(new UpdateClusterSettingsRequest 
{
    Cluster = "default",
    Settings = new List<ClusterSetting> {
        new ClusterSetting {
            Name = "containerInsights",
            Value = "enabled"
        }
    }
});

Cluster cluster = response.Cluster;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5