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.
Deletes one or more custom attributes from an Amazon ECS resource.
For .NET Core this operation is only available in asynchronous form. Please refer to DeleteAttributesAsync.
Namespace: Amazon.ECS
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z
public virtual DeleteAttributesResponse DeleteAttributes( DeleteAttributesRequest request )
Container for the necessary parameters to execute the DeleteAttributes service method.
Exception | Condition |
---|---|
ClusterNotFoundException | The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific. |
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. |
TargetNotFoundException | The specified target wasn't found. You can view your available container instances with ListContainerInstances. Amazon ECS container instances are cluster-specific and Region-specific. |
This example deletes an attribute named stack from a container instance.
var client = new AmazonECSClient(); var response = client.DeleteAttributes(new DeleteAttributesRequest { Attributes = new List<Attribute> { new Attribute { Name = "stack", TargetId = "aws:ecs:us-west-2:130757420319:container-instance/1c3be8ed-df30-47b4-8f1e-6e68ebd01f34" } } }); List<Attribute> attributes = response.Attributes;
.NET Framework:
Supported in: 4.5 and newer, 3.5