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 GetTaskProtection operation. Retrieves the protection status of tasks in an Amazon ECS service.
Namespace: Amazon.ECS.Model
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z
public class GetTaskProtectionRequest : AmazonECSRequest IAmazonWebServiceRequest
The GetTaskProtectionRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
GetTaskProtectionRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
Cluster | System.String |
Gets and sets the property Cluster. The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in. |
![]() |
Tasks | System.Collections.Generic.List<System.String> |
Gets and sets the property Tasks. A list of up to 100 task IDs or full ARN entries. |
In this example, we get the protection status for a single task.
var client = new AmazonECSClient(); var response = client.GetTaskProtection(new GetTaskProtectionRequest { Cluster = "test-task-protection", Tasks = new List<string> { "b8b1cf532d0e46ba8d44a40d1de16772" } }); List<Failure> failures = response.Failures; List<ProtectedTask> protectedTasks = response.ProtectedTasks;
.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