@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
@@ -29,6 +29,71 @@ export interface ListAccountSettingsCommandOutput extends ListAccountSettingsRes
29
29
  * @see {@link ListAccountSettingsCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To view your effective account settings
33
+ * ```javascript
34
+ * // This example displays the effective account settings for your account.
35
+ * const input = {
36
+ * "effectiveSettings": true
37
+ * };
38
+ * const command = new ListAccountSettingsCommand(input);
39
+ * const response = await client.send(command);
40
+ * /* response ==
41
+ * {
42
+ * "settings": [
43
+ * {
44
+ * "name": "containerInstanceLongArnFormat",
45
+ * "value": "disabled",
46
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
47
+ * },
48
+ * {
49
+ * "name": "serviceLongArnFormat",
50
+ * "value": "enabled",
51
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
52
+ * },
53
+ * {
54
+ * "name": "taskLongArnFormat",
55
+ * "value": "disabled",
56
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
57
+ * }
58
+ * ]
59
+ * }
60
+ * *\/
61
+ * // example id: to-view-your-account-settings-1549524118170
62
+ * ```
63
+ *
64
+ * @example To view the effective account settings for a specific IAM user or IAM role
65
+ * ```javascript
66
+ * // This example displays the effective account settings for the specified user or role.
67
+ * const input = {
68
+ * "effectiveSettings": true,
69
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
70
+ * };
71
+ * const command = new ListAccountSettingsCommand(input);
72
+ * const response = await client.send(command);
73
+ * /* response ==
74
+ * {
75
+ * "settings": [
76
+ * {
77
+ * "name": "containerInstanceLongArnFormat",
78
+ * "value": "disabled",
79
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
80
+ * },
81
+ * {
82
+ * "name": "serviceLongArnFormat",
83
+ * "value": "enabled",
84
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
85
+ * },
86
+ * {
87
+ * "name": "taskLongArnFormat",
88
+ * "value": "disabled",
89
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
90
+ * }
91
+ * ]
92
+ * }
93
+ * *\/
94
+ * // example id: to-view-the-account-settings-for-a-specific-iam-user-or-iam-role-1549524237932
95
+ * ```
96
+ *
32
97
  */
33
98
  export declare class ListAccountSettingsCommand extends $Command<ListAccountSettingsCommandInput, ListAccountSettingsCommandOutput, ECSClientResolvedConfig> {
34
99
  readonly input: ListAccountSettingsCommandInput;
@@ -29,6 +29,23 @@ export interface ListClustersCommandOutput extends ListClustersResponse, __Metad
29
29
  * @see {@link ListClustersCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To list your available clusters
33
+ * ```javascript
34
+ * // This example lists all of your available clusters in your default region.
35
+ * const input = {};
36
+ * const command = new ListClustersCommand(input);
37
+ * const response = await client.send(command);
38
+ * /* response ==
39
+ * {
40
+ * "clusterArns": [
41
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:cluster/test",
42
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:cluster/default"
43
+ * ]
44
+ * }
45
+ * *\/
46
+ * // example id: e337d059-134f-4125-ba8e-4f499139facf
47
+ * ```
48
+ *
32
49
  */
33
50
  export declare class ListClustersCommand extends $Command<ListClustersCommandInput, ListClustersCommandOutput, ECSClientResolvedConfig> {
34
51
  readonly input: ListClustersCommandInput;
@@ -31,6 +31,25 @@ export interface ListContainerInstancesCommandOutput extends ListContainerInstan
31
31
  * @see {@link ListContainerInstancesCommandOutput} for command's `response` shape.
32
32
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
33
33
  *
34
+ * @example To list your available container instances in a cluster
35
+ * ```javascript
36
+ * // This example lists all of your available container instances in the specified cluster in your default region.
37
+ * const input = {
38
+ * "cluster": "default"
39
+ * };
40
+ * const command = new ListContainerInstancesCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "containerInstanceArns": [
45
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:container-instance/f6bbb147-5370-4ace-8c73-c7181ded911f",
46
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:container-instance/ffe3d344-77e2-476c-a4d0-bf560ad50acb"
47
+ * ]
48
+ * }
49
+ * *\/
50
+ * // example id: 62a82a94-713c-4e18-8420-1d2b2ba9d484
51
+ * ```
52
+ *
34
53
  */
35
54
  export declare class ListContainerInstancesCommand extends $Command<ListContainerInstancesCommandInput, ListContainerInstancesCommandOutput, ECSClientResolvedConfig> {
36
55
  readonly input: ListContainerInstancesCommandInput;
@@ -30,6 +30,22 @@ export interface ListServicesCommandOutput extends ListServicesResponse, __Metad
30
30
  * @see {@link ListServicesCommandOutput} for command's `response` shape.
31
31
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
32
32
  *
33
+ * @example To list the services in a cluster
34
+ * ```javascript
35
+ * // This example lists the services running in the default cluster for an account.
36
+ * const input = {};
37
+ * const command = new ListServicesCommand(input);
38
+ * const response = await client.send(command);
39
+ * /* response ==
40
+ * {
41
+ * "serviceArns": [
42
+ * "arn:aws:ecs:us-east-1:012345678910:service/my-http-service"
43
+ * ]
44
+ * }
45
+ * *\/
46
+ * // example id: 1d9a8037-4e0e-4234-a528-609656809a3a
47
+ * ```
48
+ *
33
49
  */
34
50
  export declare class ListServicesCommand extends $Command<ListServicesCommandInput, ListServicesCommandOutput, ECSClientResolvedConfig> {
35
51
  readonly input: ListServicesCommandInput;
@@ -29,6 +29,27 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes
29
29
  * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To list the tags for a cluster.
33
+ * ```javascript
34
+ * // This example lists the tags for the 'dev' cluster.
35
+ * const input = {
36
+ * "resourceArn": "arn:aws:ecs:region:aws_account_id:cluster/dev"
37
+ * };
38
+ * const command = new ListTagsForResourceCommand(input);
39
+ * const response = await client.send(command);
40
+ * /* response ==
41
+ * {
42
+ * "tags": [
43
+ * {
44
+ * "key": "team",
45
+ * "value": "dev"
46
+ * }
47
+ * ]
48
+ * }
49
+ * *\/
50
+ * // example id: to-list-the-tags-for-a-cluster-1540582700259
51
+ * ```
52
+ *
32
53
  */
33
54
  export declare class ListTagsForResourceCommand extends $Command<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, ECSClientResolvedConfig> {
34
55
  readonly input: ListTagsForResourceCommandInput;
@@ -35,6 +35,44 @@ export interface ListTaskDefinitionFamiliesCommandOutput extends ListTaskDefinit
35
35
  * @see {@link ListTaskDefinitionFamiliesCommandOutput} for command's `response` shape.
36
36
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
37
37
  *
38
+ * @example To list your registered task definition families
39
+ * ```javascript
40
+ * // This example lists all of your registered task definition families.
41
+ * const input = {};
42
+ * const command = new ListTaskDefinitionFamiliesCommand(input);
43
+ * const response = await client.send(command);
44
+ * /* response ==
45
+ * {
46
+ * "families": [
47
+ * "node-js-app",
48
+ * "web-timer",
49
+ * "hpcc",
50
+ * "hpcc-c4-8xlarge"
51
+ * ]
52
+ * }
53
+ * *\/
54
+ * // example id: b5c89769-1d94-4ca2-a79e-8069103c7f75
55
+ * ```
56
+ *
57
+ * @example To filter your registered task definition families
58
+ * ```javascript
59
+ * // This example lists the task definition revisions that start with "hpcc".
60
+ * const input = {
61
+ * "familyPrefix": "hpcc"
62
+ * };
63
+ * const command = new ListTaskDefinitionFamiliesCommand(input);
64
+ * const response = await client.send(command);
65
+ * /* response ==
66
+ * {
67
+ * "families": [
68
+ * "hpcc",
69
+ * "hpcc-c4-8xlarge"
70
+ * ]
71
+ * }
72
+ * *\/
73
+ * // example id: 8a4cf9a6-42c1-4fe3-852d-99ac8968e11b
74
+ * ```
75
+ *
38
76
  */
39
77
  export declare class ListTaskDefinitionFamiliesCommand extends $Command<ListTaskDefinitionFamiliesCommandInput, ListTaskDefinitionFamiliesCommandOutput, ECSClientResolvedConfig> {
40
78
  readonly input: ListTaskDefinitionFamiliesCommandInput;
@@ -31,6 +31,48 @@ export interface ListTaskDefinitionsCommandOutput extends ListTaskDefinitionsRes
31
31
  * @see {@link ListTaskDefinitionsCommandOutput} for command's `response` shape.
32
32
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
33
33
  *
34
+ * @example To list your registered task definitions
35
+ * ```javascript
36
+ * // This example lists all of your registered task definitions.
37
+ * const input = {};
38
+ * const command = new ListTaskDefinitionsCommand(input);
39
+ * const response = await client.send(command);
40
+ * /* response ==
41
+ * {
42
+ * "taskDefinitionArns": [
43
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/sleep300:2",
44
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/sleep360:1",
45
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:3",
46
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:4",
47
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:5",
48
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:6"
49
+ * ]
50
+ * }
51
+ * *\/
52
+ * // example id: b381ebaf-7eba-4d60-b99b-7f6ae49d3d60
53
+ * ```
54
+ *
55
+ * @example To list the registered task definitions in a family
56
+ * ```javascript
57
+ * // This example lists the task definition revisions of a specified family.
58
+ * const input = {
59
+ * "familyPrefix": "wordpress"
60
+ * };
61
+ * const command = new ListTaskDefinitionsCommand(input);
62
+ * const response = await client.send(command);
63
+ * /* response ==
64
+ * {
65
+ * "taskDefinitionArns": [
66
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:3",
67
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:4",
68
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:5",
69
+ * "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/wordpress:6"
70
+ * ]
71
+ * }
72
+ * *\/
73
+ * // example id: 734e7afd-753a-4bc2-85d0-badddce10910
74
+ * ```
75
+ *
34
76
  */
35
77
  export declare class ListTaskDefinitionsCommand extends $Command<ListTaskDefinitionsCommandInput, ListTaskDefinitionsCommandOutput, ECSClientResolvedConfig> {
36
78
  readonly input: ListTaskDefinitionsCommandInput;
@@ -33,6 +33,44 @@ export interface ListTasksCommandOutput extends ListTasksResponse, __MetadataBea
33
33
  * @see {@link ListTasksCommandOutput} for command's `response` shape.
34
34
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
35
35
  *
36
+ * @example To list the tasks in a cluster
37
+ * ```javascript
38
+ * // This example lists all of the tasks in a cluster.
39
+ * const input = {
40
+ * "cluster": "default"
41
+ * };
42
+ * const command = new ListTasksCommand(input);
43
+ * const response = await client.send(command);
44
+ * /* response ==
45
+ * {
46
+ * "taskArns": [
47
+ * "arn:aws:ecs:us-east-1:012345678910:task/0cc43cdb-3bee-4407-9c26-c0e6ea5bee84",
48
+ * "arn:aws:ecs:us-east-1:012345678910:task/6b809ef6-c67e-4467-921f-ee261c15a0a1"
49
+ * ]
50
+ * }
51
+ * *\/
52
+ * // example id: 9a6ec707-1a77-45d0-b2eb-516b5dd9e924
53
+ * ```
54
+ *
55
+ * @example To list the tasks on a particular container instance
56
+ * ```javascript
57
+ * // This example lists the tasks of a specified container instance. Specifying a ``containerInstance`` value limits the results to tasks that belong to that container instance.
58
+ * const input = {
59
+ * "cluster": "default",
60
+ * "containerInstance": "f6bbb147-5370-4ace-8c73-c7181ded911f"
61
+ * };
62
+ * const command = new ListTasksCommand(input);
63
+ * const response = await client.send(command);
64
+ * /* response ==
65
+ * {
66
+ * "taskArns": [
67
+ * "arn:aws:ecs:us-east-1:012345678910:task/0cc43cdb-3bee-4407-9c26-c0e6ea5bee84"
68
+ * ]
69
+ * }
70
+ * *\/
71
+ * // example id: 024bf3b7-9cbb-44e3-848f-9d074e1fecce
72
+ * ```
73
+ *
36
74
  */
37
75
  export declare class ListTasksCommand extends $Command<ListTasksCommandInput, ListTasksCommandOutput, ECSClientResolvedConfig> {
38
76
  readonly input: ListTasksCommandInput;
@@ -52,6 +52,49 @@ export interface PutAccountSettingCommandOutput extends PutAccountSettingRespons
52
52
  * @see {@link PutAccountSettingCommandOutput} for command's `response` shape.
53
53
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
54
54
  *
55
+ * @example To modify your account settings
56
+ * ```javascript
57
+ * // This example modifies your account settings to opt in to the new ARN and resource ID format for Amazon ECS services. If you’re using this command as the root user, then changes apply to the entire AWS account, unless an IAM user or role explicitly overrides these settings for themselves.
58
+ * const input = {
59
+ * "name": "serviceLongArnFormat",
60
+ * "value": "enabled"
61
+ * };
62
+ * const command = new PutAccountSettingCommand(input);
63
+ * const response = await client.send(command);
64
+ * /* response ==
65
+ * {
66
+ * "setting": {
67
+ * "name": "serviceLongArnFormat",
68
+ * "value": "enabled",
69
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
70
+ * }
71
+ * }
72
+ * *\/
73
+ * // example id: to-modify-the-account-settings-for-your-iam-user-account-1549523130939
74
+ * ```
75
+ *
76
+ * @example To modify the account settings for a specific IAM user or IAM role
77
+ * ```javascript
78
+ * // This example modifies the account setting for a specific IAM user or IAM role to opt in to the new ARN and resource ID format for Amazon ECS container instances. If you’re using this command as the root user, then changes apply to the entire AWS account, unless an IAM user or role explicitly overrides these settings for themselves.
79
+ * const input = {
80
+ * "name": "containerInstanceLongArnFormat",
81
+ * "value": "enabled",
82
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
83
+ * };
84
+ * const command = new PutAccountSettingCommand(input);
85
+ * const response = await client.send(command);
86
+ * /* response ==
87
+ * {
88
+ * "setting": {
89
+ * "name": "containerInstanceLongArnFormat",
90
+ * "value": "enabled",
91
+ * "principalArn": "arn:aws:iam::<aws_account_id>:user/principalName"
92
+ * }
93
+ * }
94
+ * *\/
95
+ * // example id: to-modify-the-account-settings-for-a-specific-iam-user-or-iam-role-1549523518390
96
+ * ```
97
+ *
55
98
  */
56
99
  export declare class PutAccountSettingCommand extends $Command<PutAccountSettingCommandInput, PutAccountSettingCommandOutput, ECSClientResolvedConfig> {
57
100
  readonly input: PutAccountSettingCommandInput;
@@ -31,6 +31,27 @@ export interface PutAccountSettingDefaultCommandOutput extends PutAccountSetting
31
31
  * @see {@link PutAccountSettingDefaultCommandOutput} for command's `response` shape.
32
32
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
33
33
  *
34
+ * @example To modify the default account settings for all IAM users or roles on an account
35
+ * ```javascript
36
+ * // This example modifies the default account setting for the specified resource for all IAM users or roles on an account. These changes apply to the entire AWS account, unless an IAM user or role explicitly overrides these settings for themselves.
37
+ * const input = {
38
+ * "name": "serviceLongArnFormat",
39
+ * "value": "enabled"
40
+ * };
41
+ * const command = new PutAccountSettingDefaultCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "setting": {
46
+ * "name": "serviceLongArnFormat",
47
+ * "value": "enabled",
48
+ * "principalArn": "arn:aws:iam::<aws_account_id>:root"
49
+ * }
50
+ * }
51
+ * *\/
52
+ * // example id: to-modify-the-default-account-settings-for-all-iam-users-or-roles-on-your-account-1549523794603
53
+ * ```
54
+ *
34
55
  */
35
56
  export declare class PutAccountSettingDefaultCommand extends $Command<PutAccountSettingDefaultCommandInput, PutAccountSettingDefaultCommandOutput, ECSClientResolvedConfig> {
36
57
  readonly input: PutAccountSettingDefaultCommandInput;
@@ -46,6 +46,59 @@ export interface RegisterTaskDefinitionCommandOutput extends RegisterTaskDefinit
46
46
  * @see {@link RegisterTaskDefinitionCommandOutput} for command's `response` shape.
47
47
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
48
48
  *
49
+ * @example To register a task definition
50
+ * ```javascript
51
+ * // This example registers a task definition to the specified family.
52
+ * const input = {
53
+ * "containerDefinitions": [
54
+ * {
55
+ * "name": "sleep",
56
+ * "command": [
57
+ * "sleep",
58
+ * "360"
59
+ * ],
60
+ * "cpu": 10,
61
+ * "essential": true,
62
+ * "image": "busybox",
63
+ * "memory": 10
64
+ * }
65
+ * ],
66
+ * "family": "sleep360",
67
+ * "taskRoleArn": "",
68
+ * "volumes": []
69
+ * };
70
+ * const command = new RegisterTaskDefinitionCommand(input);
71
+ * const response = await client.send(command);
72
+ * /* response ==
73
+ * {
74
+ * "taskDefinition": {
75
+ * "containerDefinitions": [
76
+ * {
77
+ * "name": "sleep",
78
+ * "command": [
79
+ * "sleep",
80
+ * "360"
81
+ * ],
82
+ * "cpu": 10,
83
+ * "environment": [],
84
+ * "essential": true,
85
+ * "image": "busybox",
86
+ * "memory": 10,
87
+ * "mountPoints": [],
88
+ * "portMappings": [],
89
+ * "volumesFrom": []
90
+ * }
91
+ * ],
92
+ * "family": "sleep360",
93
+ * "revision": 1,
94
+ * "taskDefinitionArn": "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/sleep360:19",
95
+ * "volumes": []
96
+ * }
97
+ * }
98
+ * *\/
99
+ * // example id: to-register-a-task-definition-1470764550877
100
+ * ```
101
+ *
49
102
  */
50
103
  export declare class RegisterTaskDefinitionCommand extends $Command<RegisterTaskDefinitionCommandInput, RegisterTaskDefinitionCommandOutput, ECSClientResolvedConfig> {
51
104
  readonly input: RegisterTaskDefinitionCommandInput;
@@ -56,6 +56,46 @@ export interface RunTaskCommandOutput extends RunTaskResponse, __MetadataBearer
56
56
  * @see {@link RunTaskCommandOutput} for command's `response` shape.
57
57
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
58
58
  *
59
+ * @example To run a task on your default cluster
60
+ * ```javascript
61
+ * // This example runs the specified task definition on your default cluster.
62
+ * const input = {
63
+ * "cluster": "default",
64
+ * "taskDefinition": "sleep360:1"
65
+ * };
66
+ * const command = new RunTaskCommand(input);
67
+ * const response = await client.send(command);
68
+ * /* response ==
69
+ * {
70
+ * "tasks": [
71
+ * {
72
+ * "containerInstanceArn": "arn:aws:ecs:us-east-1:<aws_account_id>:container-instance/ffe3d344-77e2-476c-a4d0-bf560ad50acb",
73
+ * "containers": [
74
+ * {
75
+ * "name": "sleep",
76
+ * "containerArn": "arn:aws:ecs:us-east-1:<aws_account_id>:container/58591c8e-be29-4ddf-95aa-ee459d4c59fd",
77
+ * "lastStatus": "PENDING",
78
+ * "taskArn": "arn:aws:ecs:us-east-1:<aws_account_id>:task/a9f21ea7-c9f5-44b1-b8e6-b31f50ed33c0"
79
+ * }
80
+ * ],
81
+ * "desiredStatus": "RUNNING",
82
+ * "lastStatus": "PENDING",
83
+ * "overrides": {
84
+ * "containerOverrides": [
85
+ * {
86
+ * "name": "sleep"
87
+ * }
88
+ * ]
89
+ * },
90
+ * "taskArn": "arn:aws:ecs:us-east-1:<aws_account_id>:task/a9f21ea7-c9f5-44b1-b8e6-b31f50ed33c0",
91
+ * "taskDefinitionArn": "arn:aws:ecs:us-east-1:<aws_account_id>:task-definition/sleep360:1"
92
+ * }
93
+ * ]
94
+ * }
95
+ * *\/
96
+ * // example id: 6f238c83-a133-42cd-ab3d-abeca0560445
97
+ * ```
98
+ *
59
99
  */
60
100
  export declare class RunTaskCommand extends $Command<RunTaskCommandInput, RunTaskCommandOutput, ECSClientResolvedConfig> {
61
101
  readonly input: RunTaskCommandInput;
@@ -32,6 +32,23 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
32
32
  * @see {@link TagResourceCommandOutput} for command's `response` shape.
33
33
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
34
34
  *
35
+ * @example To tag a cluster.
36
+ * ```javascript
37
+ * // This example tags the 'dev' cluster with key 'team' and value 'dev'.
38
+ * const input = {
39
+ * "resourceArn": "arn:aws:ecs:region:aws_account_id:cluster/dev",
40
+ * "tags": [
41
+ * {
42
+ * "key": "team",
43
+ * "value": "dev"
44
+ * }
45
+ * ]
46
+ * };
47
+ * const command = new TagResourceCommand(input);
48
+ * await client.send(command);
49
+ * // example id: to-tag-a-cluster-1540581863751
50
+ * ```
51
+ *
35
52
  */
36
53
  export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, ECSClientResolvedConfig> {
37
54
  readonly input: TagResourceCommandInput;
@@ -29,6 +29,20 @@ export interface UntagResourceCommandOutput extends UntagResourceResponse, __Met
29
29
  * @see {@link UntagResourceCommandOutput} for command's `response` shape.
30
30
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
31
31
  *
32
+ * @example To untag a cluster.
33
+ * ```javascript
34
+ * // This example deletes the 'team' tag from the 'dev' cluster.
35
+ * const input = {
36
+ * "resourceArn": "arn:aws:ecs:region:aws_account_id:cluster/dev",
37
+ * "tagKeys": [
38
+ * "team"
39
+ * ]
40
+ * };
41
+ * const command = new UntagResourceCommand(input);
42
+ * await client.send(command);
43
+ * // example id: to-untag-a-cluster-1540582546056
44
+ * ```
45
+ *
32
46
  */
33
47
  export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, ECSClientResolvedConfig> {
34
48
  readonly input: UntagResourceCommandInput;
@@ -151,6 +151,30 @@ export interface UpdateServiceCommandOutput extends UpdateServiceResponse, __Met
151
151
  * @see {@link UpdateServiceCommandOutput} for command's `response` shape.
152
152
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
153
153
  *
154
+ * @example To change the task definition used in a service
155
+ * ```javascript
156
+ * // This example updates the my-http-service service to use the amazon-ecs-sample task definition.
157
+ * const input = {
158
+ * "service": "my-http-service",
159
+ * "taskDefinition": "amazon-ecs-sample"
160
+ * };
161
+ * const command = new UpdateServiceCommand(input);
162
+ * await client.send(command);
163
+ * // example id: cc9e8900-0cc2-44d2-8491-64d1d3d37887
164
+ * ```
165
+ *
166
+ * @example To change the number of tasks in a service
167
+ * ```javascript
168
+ * // This example updates the desired count of the my-http-service service to 10.
169
+ * const input = {
170
+ * "desiredCount": 10,
171
+ * "service": "my-http-service"
172
+ * };
173
+ * const command = new UpdateServiceCommand(input);
174
+ * await client.send(command);
175
+ * // example id: 9581d6c5-02e3-4140-8cc1-5a4301586633
176
+ * ```
177
+ *
154
178
  */
155
179
  export declare class UpdateServiceCommand extends $Command<UpdateServiceCommandInput, UpdateServiceCommandOutput, ECSClientResolvedConfig> {
156
180
  readonly input: UpdateServiceCommandInput;
@@ -55,6 +55,87 @@ export interface UpdateTaskProtectionCommandOutput extends UpdateTaskProtectionR
55
55
  * @see {@link UpdateTaskProtectionCommandOutput} for command's `response` shape.
56
56
  * @see {@link ECSClientResolvedConfig | config} for ECSClient's `config` shape.
57
57
  *
58
+ * @example To set task scale-in protection for a task for 60 minutes
59
+ * ```javascript
60
+ * // This example enables scale-in protection for a task for 60 minutes.
61
+ * const input = {
62
+ * "cluster": "test-task-protection",
63
+ * "expiresInMinutes": 60,
64
+ * "protectionEnabled": true,
65
+ * "tasks": [
66
+ * "b8b1cf532d0e46ba8d44a40d1de16772"
67
+ * ]
68
+ * };
69
+ * const command = new UpdateTaskProtectionCommand(input);
70
+ * const response = await client.send(command);
71
+ * /* response ==
72
+ * {
73
+ * "failures": [],
74
+ * "protectedTasks": [
75
+ * {
76
+ * "expirationDate": "2022-11-02T06:56:32.553Z",
77
+ * "protectionEnabled": true,
78
+ * "taskArn": "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772"
79
+ * }
80
+ * ]
81
+ * }
82
+ * *\/
83
+ * // example id: enable-the-protection-status-for-a-single-task-for-60-minutes-2022-11-02T06:56:32.553Z
84
+ * ```
85
+ *
86
+ * @example To set task scale-in protection for the default time period in minutes
87
+ * ```javascript
88
+ * // This example enables task scale-in protection for a task, without specifying the expiresInMinutes parameter, for the default protection period of 120 minutes.
89
+ * const input = {
90
+ * "cluster": "test-task-protection",
91
+ * "protectionEnabled": true,
92
+ * "tasks": [
93
+ * "b8b1cf532d0e46ba8d44a40d1de16772"
94
+ * ]
95
+ * };
96
+ * const command = new UpdateTaskProtectionCommand(input);
97
+ * const response = await client.send(command);
98
+ * /* response ==
99
+ * {
100
+ * "failures": [],
101
+ * "protectedTasks": [
102
+ * {
103
+ * "expirationDate": "2022-11-02T06:56:32.553Z",
104
+ * "protectionEnabled": true,
105
+ * "taskArn": "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772"
106
+ * }
107
+ * ]
108
+ * }
109
+ * *\/
110
+ * // example id: enable-the-protection-status-for-a-single-task-with-default-expiresinminutes-2022-11-02T06:56:32.553Z
111
+ * ```
112
+ *
113
+ * @example To remove task scale-in protection
114
+ * ```javascript
115
+ * // This example removes scale-in protection for a task.
116
+ * const input = {
117
+ * "cluster": "test-task-protection",
118
+ * "protectionEnabled": false,
119
+ * "tasks": [
120
+ * "b8b1cf532d0e46ba8d44a40d1de16772"
121
+ * ]
122
+ * };
123
+ * const command = new UpdateTaskProtectionCommand(input);
124
+ * const response = await client.send(command);
125
+ * /* response ==
126
+ * {
127
+ * "failures": [],
128
+ * "protectedTasks": [
129
+ * {
130
+ * "protectionEnabled": false,
131
+ * "taskArn": "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772"
132
+ * }
133
+ * ]
134
+ * }
135
+ * *\/
136
+ * // example id: disable-scale-in-protection-on-a-single-task
137
+ * ```
138
+ *
58
139
  */
59
140
  export declare class UpdateTaskProtectionCommand extends $Command<UpdateTaskProtectionCommandInput, UpdateTaskProtectionCommandOutput, ECSClientResolvedConfig> {
60
141
  readonly input: UpdateTaskProtectionCommandInput;