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 UpdateCluster operation. Updates the cluster.

Inheritance Hierarchy

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

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

Syntax

C#
public class UpdateClusterRequest : AmazonECSRequest
         IAmazonWebServiceRequest

The UpdateClusterRequest type exposes the following members

Constructors

NameDescription
Public Method UpdateClusterRequest()

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 Configuration Amazon.ECS.Model.ClusterConfiguration

Gets and sets the property Configuration.

The execute command configuration for the cluster.

Public Property ServiceConnectDefaults Amazon.ECS.Model.ClusterServiceConnectDefaultsRequest

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

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

Gets and sets the property Settings.

The cluster settings for your cluster.

Examples

This example turns on enhanced containerInsights in an existing cluster.

To update a cluster's observability settings.


var client = new AmazonECSClient();
var response = client.UpdateCluster(new UpdateClusterRequest 
{
    Cluster = "ECS-project-update-cluster",
    Settings = new List<ClusterSetting> {
        new ClusterSetting {
            Name = "containerInsights",
            Value = "enhanced"
        }
    }
});

Cluster cluster = response.Cluster;

            

This example sets a default Service Connect namespace.

To update a cluster's Service Connect defaults.


var client = new AmazonECSClient();
var response = client.UpdateCluster(new UpdateClusterRequest 
{
    Cluster = "ECS-project-update-cluster",
    ServiceConnectDefaults = new ClusterServiceConnectDefaultsRequest { Namespace = "test" }
});

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