@aws-sdk/client-ecs 3.288.0 → 3.289.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist-types/commands/CreateClusterCommand.d.ts +24 -0
  2. package/dist-types/commands/CreateServiceCommand.d.ts +117 -0
  3. package/dist-types/commands/DeleteAccountSettingCommand.d.ts +41 -0
  4. package/dist-types/commands/DeleteClusterCommand.d.ts +24 -0
  5. package/dist-types/commands/DeleteServiceCommand.d.ts +11 -0
  6. package/dist-types/commands/DeregisterContainerInstanceCommand.d.ts +13 -0
  7. package/dist-types/commands/DescribeClustersCommand.d.ts +25 -0
  8. package/dist-types/commands/DescribeContainerInstancesCommand.d.ts +88 -0
  9. package/dist-types/commands/DescribeServicesCommand.d.ts +55 -0
  10. package/dist-types/commands/DescribeTaskDefinitionCommand.d.ts +58 -0
  11. package/dist-types/commands/DescribeTasksCommand.d.ts +51 -0
  12. package/dist-types/commands/GetTaskProtectionCommand.d.ts +26 -0
  13. package/dist-types/commands/ListAccountSettingsCommand.d.ts +65 -0
  14. package/dist-types/commands/ListClustersCommand.d.ts +17 -0
  15. package/dist-types/commands/ListContainerInstancesCommand.d.ts +19 -0
  16. package/dist-types/commands/ListServicesCommand.d.ts +16 -0
  17. package/dist-types/commands/ListTagsForResourceCommand.d.ts +21 -0
  18. package/dist-types/commands/ListTaskDefinitionFamiliesCommand.d.ts +38 -0
  19. package/dist-types/commands/ListTaskDefinitionsCommand.d.ts +42 -0
  20. package/dist-types/commands/ListTasksCommand.d.ts +38 -0
  21. package/dist-types/commands/PutAccountSettingCommand.d.ts +43 -0
  22. package/dist-types/commands/PutAccountSettingDefaultCommand.d.ts +21 -0
  23. package/dist-types/commands/RegisterTaskDefinitionCommand.d.ts +53 -0
  24. package/dist-types/commands/RunTaskCommand.d.ts +40 -0
  25. package/dist-types/commands/TagResourceCommand.d.ts +17 -0
  26. package/dist-types/commands/UntagResourceCommand.d.ts +14 -0
  27. package/dist-types/commands/UpdateServiceCommand.d.ts +24 -0
  28. package/dist-types/commands/UpdateTaskProtectionCommand.d.ts +81 -0
  29. package/package.json +30 -30
@@ -39,6 +39,30 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
39
39
  * @see {@link CreateClusterCommandOutput} for command's `response` shape.
40
40
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
41
41
  *
42
+ * @example To create a new cluster
43
+ * ```javascript
44
+ * // This example creates a cluster in your default region.
45
+ * const input = {
46
+ * "clusterName": "my_cluster"
47
+ * };
48
+ * const command = new CreateClusterCommand(input);
49
+ * const response = await client.send(command);
50
+ * /* response ==
51
+ * {
52
+ * "cluster": {
53
+ * "activeServicesCount": 0,
54
+ * "clusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/my_cluster",
55
+ * "clusterName": "my_cluster",
56
+ * "pendingTasksCount": 0,
57
+ * "registeredContainerInstancesCount": 0,
58
+ * "runningTasksCount": 0,
59
+ * "status": "ACTIVE"
60
+ * }
61
+ * }
62
+ * *\/
63
+ * // example id: to-create-a-new-cluster-1472514079365
64
+ * ```
65
+ *
42
66
  */
43
67
  export declare class CreateClusterCommand extends $Command<CreateClusterCommandInput, CreateClusterCommandOutput, ECSClientResolvedConfig> {
44
68
  readonly input: CreateClusterCommandInput;
@@ -105,6 +105,123 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
105
105
  * @see {@link CreateServiceCommandOutput} for command's `response` shape.
106
106
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
107
107
  *
108
+ * @example To create a new service
109
+ * ```javascript
110
+ * // This example creates a service in your default region called ``ecs-simple-service``. The service uses the ``hello_world`` task definition and it maintains 10 copies of that task.
111
+ * const input = {
112
+ * "desiredCount": 10,
113
+ * "serviceName": "ecs-simple-service",
114
+ * "taskDefinition": "hello_world"
115
+ * };
116
+ * const command = new CreateServiceCommand(input);
117
+ * const response = await client.send(command);
118
+ * /* response ==
119
+ * {
120
+ * "service": {
121
+ * "clusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/default",
122
+ * "createdAt": "2016-08-29T16:13:47.298Z",
123
+ * "deploymentConfiguration": {
124
+ * "maximumPercent": 200,
125
+ * "minimumHealthyPercent": 100
126
+ * },
127
+ * "deployments": [
128
+ * {
129
+ * "createdAt": "2016-08-29T16:13:47.298Z",
130
+ * "desiredCount": 10,
131
+ * "id": "ecs-svc/9223370564342348388",
132
+ * "pendingCount": 0,
133
+ * "runningCount": 0,
134
+ * "status": "PRIMARY",
135
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:6",
136
+ * "updatedAt": "2016-08-29T16:13:47.298Z"
137
+ * },
138
+ * {
139
+ * "createdAt": "2016-08-29T15:52:44.481Z",
140
+ * "desiredCount": 0,
141
+ * "id": "ecs-svc/9223370564343611322",
142
+ * "pendingCount": 0,
143
+ * "runningCount": 0,
144
+ * "status": "ACTIVE",
145
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:6",
146
+ * "updatedAt": "2016-08-29T16:11:38.941Z"
147
+ * }
148
+ * ],
149
+ * "desiredCount": 10,
150
+ * "events": [],
151
+ * "loadBalancers": [],
152
+ * "pendingCount": 0,
153
+ * "runningCount": 0,
154
+ * "serviceArn": "arn:aws:ecs:us-east-1:012345678910:service/ecs-simple-service",
155
+ * "serviceName": "ecs-simple-service",
156
+ * "status": "ACTIVE",
157
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:6"
158
+ * }
159
+ * }
160
+ * *\/
161
+ * // example id: to-create-a-new-service-1472512584282
162
+ * ```
163
+ *
164
+ * @example To create a new service behind a load balancer
165
+ * ```javascript
166
+ * // This example creates a service in your default region called ``ecs-simple-service-elb``. The service uses the ``ecs-demo`` task definition and it maintains 10 copies of that task. You must reference an existing load balancer in the same region by its name.
167
+ * const input = {
168
+ * "desiredCount": 10,
169
+ * "loadBalancers": [
170
+ * {
171
+ * "containerName": "simple-app",
172
+ * "containerPort": 80,
173
+ * "loadBalancerName": "EC2Contai-EcsElast-15DCDAURT3ZO2"
174
+ * }
175
+ * ],
176
+ * "role": "ecsServiceRole",
177
+ * "serviceName": "ecs-simple-service-elb",
178
+ * "taskDefinition": "console-sample-app-static"
179
+ * };
180
+ * const command = new CreateServiceCommand(input);
181
+ * const response = await client.send(command);
182
+ * /* response ==
183
+ * {
184
+ * "service": {
185
+ * "clusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/default",
186
+ * "createdAt": "2016-08-29T16:02:54.884Z",
187
+ * "deploymentConfiguration": {
188
+ * "maximumPercent": 200,
189
+ * "minimumHealthyPercent": 100
190
+ * },
191
+ * "deployments": [
192
+ * {
193
+ * "createdAt": "2016-08-29T16:02:54.884Z",
194
+ * "desiredCount": 10,
195
+ * "id": "ecs-svc/9223370564343000923",
196
+ * "pendingCount": 0,
197
+ * "runningCount": 0,
198
+ * "status": "PRIMARY",
199
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/console-sample-app-static:6",
200
+ * "updatedAt": "2016-08-29T16:02:54.884Z"
201
+ * }
202
+ * ],
203
+ * "desiredCount": 10,
204
+ * "events": [],
205
+ * "loadBalancers": [
206
+ * {
207
+ * "containerName": "simple-app",
208
+ * "containerPort": 80,
209
+ * "loadBalancerName": "EC2Contai-EcsElast-15DCDAURT3ZO2"
210
+ * }
211
+ * ],
212
+ * "pendingCount": 0,
213
+ * "roleArn": "arn:aws:iam::012345678910:role/ecsServiceRole",
214
+ * "runningCount": 0,
215
+ * "serviceArn": "arn:aws:ecs:us-east-1:012345678910:service/ecs-simple-service-elb",
216
+ * "serviceName": "ecs-simple-service-elb",
217
+ * "status": "ACTIVE",
218
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/console-sample-app-static:6"
219
+ * }
220
+ * }
221
+ * *\/
222
+ * // example id: to-create-a-new-service-behind-a-load-balancer-1472512484823
223
+ * ```
224
+ *
108
225
  */
109
226
  export declare class CreateServiceCommand extends $Command<CreateServiceCommandInput, CreateServiceCommandOutput, ECSClientResolvedConfig> {
110
227
  readonly input: CreateServiceCommandInput;
@@ -30,6 +30,47 @@ export interface DeleteAccountSettingCommandOutput extends DeleteAccountSettingR
30
30
  * @see {@link DeleteAccountSettingCommandOutput} for command's `response` shape.
31
31
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
32
32
  *
33
+ * @example To delete your account setting
34
+ * ```javascript
35
+ * // This example deletes the account setting for your user for the specified resource type.
36
+ * const input = {
37
+ * "name": "serviceLongArnFormat"
38
+ * };
39
+ * const command = new DeleteAccountSettingCommand(input);
40
+ * const response = await client.send(command);
41
+ * /* response ==
42
+ * {
43
+ * "setting": {
44
+ * "name": "serviceLongArnFormat",
45
+ * "value": "enabled",
46
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
47
+ * }
48
+ * }
49
+ * *\/
50
+ * // example id: to-delete-the-account-setting-for-your-user-account-1549524548115
51
+ * ```
52
+ *
53
+ * @example To delete the account settings for a specific IAM user or IAM role
54
+ * ```javascript
55
+ * // This example deletes the account setting for a specific IAM user or IAM role for the specified resource type. Only the root user can view or modify the account settings for another user.
56
+ * const input = {
57
+ * "name": "containerInstanceLongArnFormat",
58
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
59
+ * };
60
+ * const command = new DeleteAccountSettingCommand(input);
61
+ * const response = await client.send(command);
62
+ * /* response ==
63
+ * {
64
+ * "setting": {
65
+ * "name": "containerInstanceLongArnFormat",
66
+ * "value": "enabled",
67
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
68
+ * }
69
+ * }
70
+ * *\/
71
+ * // example id: to-delete-the-account-setting-for-a-specific-iam-user-or-iam-role-1549524612917
72
+ * ```
73
+ *
33
74
  */
34
75
  export declare class DeleteAccountSettingCommand extends $Command<DeleteAccountSettingCommandInput, DeleteAccountSettingCommandOutput, ECSClientResolvedConfig> {
35
76
  readonly input: DeleteAccountSettingCommandInput;
@@ -34,6 +34,30 @@ export interface DeleteClusterCommandOutput extends DeleteClusterResponse, __Met
34
34
  * @see {@link DeleteClusterCommandOutput} for command's `response` shape.
35
35
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
36
36
  *
37
+ * @example To delete an empty cluster
38
+ * ```javascript
39
+ * // This example deletes an empty cluster in your default region.
40
+ * const input = {
41
+ * "cluster": "my_cluster"
42
+ * };
43
+ * const command = new DeleteClusterCommand(input);
44
+ * const response = await client.send(command);
45
+ * /* response ==
46
+ * {
47
+ * "cluster": {
48
+ * "activeServicesCount": 0,
49
+ * "clusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/my_cluster",
50
+ * "clusterName": "my_cluster",
51
+ * "pendingTasksCount": 0,
52
+ * "registeredContainerInstancesCount": 0,
53
+ * "runningTasksCount": 0,
54
+ * "status": "INACTIVE"
55
+ * }
56
+ * }
57
+ * *\/
58
+ * // example id: to-delete-an-empty-cluster-1472512705352
59
+ * ```
60
+ *
37
61
  */
38
62
  export declare class DeleteClusterCommand extends $Command<DeleteClusterCommandInput, DeleteClusterCommandOutput, ECSClientResolvedConfig> {
39
63
  readonly input: DeleteClusterCommandInput;
@@ -49,6 +49,17 @@ export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __Met
49
49
  * @see {@link DeleteServiceCommandOutput} for command's `response` shape.
50
50
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
51
51
  *
52
+ * @example To delete a service
53
+ * ```javascript
54
+ * // This example deletes the my-http-service service. The service must have a desired count and running count of 0 before you can delete it.
55
+ * const input = {
56
+ * "service": "my-http-service"
57
+ * };
58
+ * const command = new DeleteServiceCommand(input);
59
+ * await client.send(command);
60
+ * // example id: e8183e38-f86e-4390-b811-f74f30a6007d
61
+ * ```
62
+ *
52
63
  */
53
64
  export declare class DeleteServiceCommand extends $Command<DeleteServiceCommandInput, DeleteServiceCommandOutput, ECSClientResolvedConfig> {
54
65
  readonly input: DeleteServiceCommandInput;
@@ -42,6 +42,19 @@ export interface DeregisterContainerInstanceCommandOutput extends DeregisterCont
42
42
  * @see {@link DeregisterContainerInstanceCommandOutput} for command's `response` shape.
43
43
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
44
44
  *
45
+ * @example To deregister a container instance from a cluster
46
+ * ```javascript
47
+ * // This example deregisters a container instance from the specified cluster in your default region. If there are still tasks running on the container instance, you must either stop those tasks before deregistering, or use the force option.
48
+ * const input = {
49
+ * "cluster": "default",
50
+ * "containerInstance": "container_instance_UUID",
51
+ * "force": true
52
+ * };
53
+ * const command = new DeregisterContainerInstanceCommand(input);
54
+ * await client.send(command);
55
+ * // example id: bf624927-cf64-4f4b-8b7e-c024a4e682f6
56
+ * ```
57
+ *
45
58
  */
46
59
  export declare class DeregisterContainerInstanceCommand extends $Command<DeregisterContainerInstanceCommandInput, DeregisterContainerInstanceCommandOutput, ECSClientResolvedConfig> {
47
60
  readonly input: DeregisterContainerInstanceCommandInput;
@@ -29,6 +29,31 @@ export interface DescribeClustersCommandOutput extends DescribeClustersResponse,
29
29
  * @see {@link DescribeClustersCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To describe a cluster
33
+ * ```javascript
34
+ * // This example provides a description of the specified cluster in your default region.
35
+ * const input = {
36
+ * "clusters": [
37
+ * "default"
38
+ * ]
39
+ * };
40
+ * const command = new DescribeClustersCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "clusters": [
45
+ * {
46
+ * "clusterArn": "arn:aws:ecs:us-east-1:aws_account_id:cluster/default",
47
+ * "clusterName": "default",
48
+ * "status": "ACTIVE"
49
+ * }
50
+ * ],
51
+ * "failures": []
52
+ * }
53
+ * *\/
54
+ * // example id: ba88d100-9672-4231-80da-a4bd210bf728
55
+ * ```
56
+ *
32
57
  */
33
58
  export declare class DescribeClustersCommand extends $Command<DescribeClustersCommandInput, DescribeClustersCommandOutput, ECSClientResolvedConfig> {
34
59
  readonly input: DescribeClustersCommandInput;
@@ -30,6 +30,94 @@ export interface DescribeContainerInstancesCommandOutput extends DescribeContain
30
30
  * @see {@link DescribeContainerInstancesCommandOutput} for command's `response` shape.
31
31
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
32
32
  *
33
+ * @example To describe container instance
34
+ * ```javascript
35
+ * // This example provides a description of the specified container instance in your default region, using the container instance UUID as an identifier.
36
+ * const input = {
37
+ * "cluster": "default",
38
+ * "containerInstances": [
39
+ * "f2756532-8f13-4d53-87c9-aed50dc94cd7"
40
+ * ]
41
+ * };
42
+ * const command = new DescribeContainerInstancesCommand(input);
43
+ * const response = await client.send(command);
44
+ * /* response ==
45
+ * {
46
+ * "containerInstances": [
47
+ * {
48
+ * "agentConnected": true,
49
+ * "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/f2756532-8f13-4d53-87c9-aed50dc94cd7",
50
+ * "ec2InstanceId": "i-807f3249",
51
+ * "pendingTasksCount": 0,
52
+ * "registeredResources": [
53
+ * {
54
+ * "name": "CPU",
55
+ * "type": "INTEGER",
56
+ * "doubleValue": 0,
57
+ * "integerValue": 2048,
58
+ * "longValue": 0
59
+ * },
60
+ * {
61
+ * "name": "MEMORY",
62
+ * "type": "INTEGER",
63
+ * "doubleValue": 0,
64
+ * "integerValue": 3768,
65
+ * "longValue": 0
66
+ * },
67
+ * {
68
+ * "name": "PORTS",
69
+ * "type": "STRINGSET",
70
+ * "doubleValue": 0,
71
+ * "integerValue": 0,
72
+ * "longValue": 0,
73
+ * "stringSetValue": [
74
+ * "2376",
75
+ * "22",
76
+ * "51678",
77
+ * "2375"
78
+ * ]
79
+ * }
80
+ * ],
81
+ * "remainingResources": [
82
+ * {
83
+ * "name": "CPU",
84
+ * "type": "INTEGER",
85
+ * "doubleValue": 0,
86
+ * "integerValue": 1948,
87
+ * "longValue": 0
88
+ * },
89
+ * {
90
+ * "name": "MEMORY",
91
+ * "type": "INTEGER",
92
+ * "doubleValue": 0,
93
+ * "integerValue": 3668,
94
+ * "longValue": 0
95
+ * },
96
+ * {
97
+ * "name": "PORTS",
98
+ * "type": "STRINGSET",
99
+ * "doubleValue": 0,
100
+ * "integerValue": 0,
101
+ * "longValue": 0,
102
+ * "stringSetValue": [
103
+ * "2376",
104
+ * "22",
105
+ * "80",
106
+ * "51678",
107
+ * "2375"
108
+ * ]
109
+ * }
110
+ * ],
111
+ * "runningTasksCount": 1,
112
+ * "status": "ACTIVE"
113
+ * }
114
+ * ],
115
+ * "failures": []
116
+ * }
117
+ * *\/
118
+ * // example id: c8f439de-eb27-4269-8ca7-2c0a7ba75ab0
119
+ * ```
120
+ *
33
121
  */
34
122
  export declare class DescribeContainerInstancesCommand extends $Command<DescribeContainerInstancesCommandInput, DescribeContainerInstancesCommandOutput, ECSClientResolvedConfig> {
35
123
  readonly input: DescribeContainerInstancesCommandInput;
@@ -29,6 +29,61 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
29
29
  * @see {@link DescribeServicesCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To describe a service
33
+ * ```javascript
34
+ * // This example provides descriptive information about the service named ``ecs-simple-service``.
35
+ * const input = {
36
+ * "services": [
37
+ * "ecs-simple-service"
38
+ * ]
39
+ * };
40
+ * const command = new DescribeServicesCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "failures": [],
45
+ * "services": [
46
+ * {
47
+ * "clusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/default",
48
+ * "createdAt": "2016-08-29T16:25:52.130Z",
49
+ * "deploymentConfiguration": {
50
+ * "maximumPercent": 200,
51
+ * "minimumHealthyPercent": 100
52
+ * },
53
+ * "deployments": [
54
+ * {
55
+ * "createdAt": "2016-08-29T16:25:52.130Z",
56
+ * "desiredCount": 1,
57
+ * "id": "ecs-svc/9223370564341623665",
58
+ * "pendingCount": 0,
59
+ * "runningCount": 0,
60
+ * "status": "PRIMARY",
61
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:6",
62
+ * "updatedAt": "2016-08-29T16:25:52.130Z"
63
+ * }
64
+ * ],
65
+ * "desiredCount": 1,
66
+ * "events": [
67
+ * {
68
+ * "createdAt": "2016-08-29T16:25:58.520Z",
69
+ * "id": "38c285e5-d335-4b68-8b15-e46dedc8e88d",
70
+ * "message": "(service ecs-simple-service) was unable to place a task because no container instance met all of its requirements. The closest matching (container-instance 3f4de1c5-ffdd-4954-af7e-75b4be0c8841) is already using a port required by your task. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide."
71
+ * }
72
+ * ],
73
+ * "loadBalancers": [],
74
+ * "pendingCount": 0,
75
+ * "runningCount": 0,
76
+ * "serviceArn": "arn:aws:ecs:us-east-1:012345678910:service/ecs-simple-service",
77
+ * "serviceName": "ecs-simple-service",
78
+ * "status": "ACTIVE",
79
+ * "taskDefinition": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:6"
80
+ * }
81
+ * ]
82
+ * }
83
+ * *\/
84
+ * // example id: to-describe-a-service-1472513256350
85
+ * ```
86
+ *
32
87
  */
33
88
  export declare class DescribeServicesCommand extends $Command<DescribeServicesCommandInput, DescribeServicesCommandOutput, ECSClientResolvedConfig> {
34
89
  readonly input: DescribeServicesCommandInput;
@@ -36,6 +36,64 @@ export interface DescribeTaskDefinitionCommandOutput extends DescribeTaskDefinit
36
36
  * @see {@link DescribeTaskDefinitionCommandOutput} for command's `response` shape.
37
37
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
38
38
  *
39
+ * @example To describe a task definition
40
+ * ```javascript
41
+ * // This example provides a description of the specified task definition.
42
+ * const input = {
43
+ * "taskDefinition": "hello_world:8"
44
+ * };
45
+ * const command = new DescribeTaskDefinitionCommand(input);
46
+ * const response = await client.send(command);
47
+ * /* response ==
48
+ * {
49
+ * "taskDefinition": {
50
+ * "containerDefinitions": [
51
+ * {
52
+ * "name": "wordpress",
53
+ * "cpu": 10,
54
+ * "environment": [],
55
+ * "essential": true,
56
+ * "image": "wordpress",
57
+ * "links": [
58
+ * "mysql"
59
+ * ],
60
+ * "memory": 500,
61
+ * "mountPoints": [],
62
+ * "portMappings": [
63
+ * {
64
+ * "containerPort": 80,
65
+ * "hostPort": 80
66
+ * }
67
+ * ],
68
+ * "volumesFrom": []
69
+ * },
70
+ * {
71
+ * "name": "mysql",
72
+ * "cpu": 10,
73
+ * "environment": [
74
+ * {
75
+ * "name": "MYSQL_ROOT_PASSWORD",
76
+ * "value": "password"
77
+ * }
78
+ * ],
79
+ * "essential": true,
80
+ * "image": "mysql",
81
+ * "memory": 500,
82
+ * "mountPoints": [],
83
+ * "portMappings": [],
84
+ * "volumesFrom": []
85
+ * }
86
+ * ],
87
+ * "family": "hello_world",
88
+ * "revision": 8,
89
+ * "taskDefinitionArn": "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/hello_world:8",
90
+ * "volumes": []
91
+ * }
92
+ * }
93
+ * *\/
94
+ * // example id: 4c21eeb1-f1da-4a08-8c44-297fc8d0ea88
95
+ * ```
96
+ *
39
97
  */
40
98
  export declare class DescribeTaskDefinitionCommand extends $Command<DescribeTaskDefinitionCommandInput, DescribeTaskDefinitionCommandOutput, ECSClientResolvedConfig> {
41
99
  readonly input: DescribeTaskDefinitionCommandInput;
@@ -30,6 +30,57 @@ export interface DescribeTasksCommandOutput extends DescribeTasksResponse, __Met
30
30
  * @see {@link DescribeTasksCommandOutput} for command's `response` shape.
31
31
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
32
32
  *
33
+ * @example To describe a task
34
+ * ```javascript
35
+ * // This example provides a description of the specified task, using the task UUID as an identifier.
36
+ * const input = {
37
+ * "tasks": [
38
+ * "c5cba4eb-5dad-405e-96db-71ef8eefe6a8"
39
+ * ]
40
+ * };
41
+ * const command = new DescribeTasksCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "failures": [],
46
+ * "tasks": [
47
+ * {
48
+ * "clusterArn": "arn:aws:ecs:<region>:<aws_account_id>:cluster/default",
49
+ * "containerInstanceArn": "arn:aws:ecs:<region>:<aws_account_id>:container-instance/18f9eda5-27d7-4c19-b133-45adc516e8fb",
50
+ * "containers": [
51
+ * {
52
+ * "name": "ecs-demo",
53
+ * "containerArn": "arn:aws:ecs:<region>:<aws_account_id>:container/7c01765b-c588-45b3-8290-4ba38bd6c5a6",
54
+ * "lastStatus": "RUNNING",
55
+ * "networkBindings": [
56
+ * {
57
+ * "bindIP": "0.0.0.0",
58
+ * "containerPort": 80,
59
+ * "hostPort": 80
60
+ * }
61
+ * ],
62
+ * "taskArn": "arn:aws:ecs:<region>:<aws_account_id>:task/c5cba4eb-5dad-405e-96db-71ef8eefe6a8"
63
+ * }
64
+ * ],
65
+ * "desiredStatus": "RUNNING",
66
+ * "lastStatus": "RUNNING",
67
+ * "overrides": {
68
+ * "containerOverrides": [
69
+ * {
70
+ * "name": "ecs-demo"
71
+ * }
72
+ * ]
73
+ * },
74
+ * "startedBy": "ecs-svc/9223370608528463088",
75
+ * "taskArn": "arn:aws:ecs:<region>:<aws_account_id>:task/c5cba4eb-5dad-405e-96db-71ef8eefe6a8",
76
+ * "taskDefinitionArn": "arn:aws:ecs:<region>:<aws_account_id>:task-definition/amazon-ecs-sample:1"
77
+ * }
78
+ * ]
79
+ * }
80
+ * *\/
81
+ * // example id: a90b0cde-f965-4946-b55e-cfd8cc54e827
82
+ * ```
83
+ *
33
84
  */
34
85
  export declare class DescribeTasksCommand extends $Command<DescribeTasksCommandInput, DescribeTasksCommandOutput, ECSClientResolvedConfig> {
35
86
  readonly input: DescribeTasksCommandInput;
@@ -29,6 +29,32 @@ export interface GetTaskProtectionCommandOutput extends GetTaskProtectionRespons
29
29
  * @see {@link GetTaskProtectionCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To get the protection status of a task
33
+ * ```javascript
34
+ * // In this example, we get the protection status for a single task.
35
+ * const input = {
36
+ * "cluster": "test-task-protection",
37
+ * "tasks": [
38
+ * "b8b1cf532d0e46ba8d44a40d1de16772"
39
+ * ]
40
+ * };
41
+ * const command = new GetTaskProtectionCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "failures": [],
46
+ * "protectedTasks": [
47
+ * {
48
+ * "expirationDate": "2022-11-02T06:56:32.553Z",
49
+ * "protectionEnabled": true,
50
+ * "taskArn": "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772"
51
+ * }
52
+ * ]
53
+ * }
54
+ * *\/
55
+ * // example id: get-the-protection-status-for-a-single-task-2022-11-02T06:56:32.553Z
56
+ * ```
57
+ *
32
58
  */
33
59
  export declare class GetTaskProtectionCommand extends $Command<GetTaskProtectionCommandInput, GetTaskProtectionCommandOutput, ECSClientResolvedConfig> {
34
60
  readonly input: GetTaskProtectionCommandInput;