@aws-sdk/client-controltower 3.445.0 → 3.450.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.
- package/README.md +30 -3
- package/dist-cjs/ControlTower.js +6 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
- package/dist-cjs/commands/TagResourceCommand.js +51 -0
- package/dist-cjs/commands/UntagResourceCommand.js +51 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/protocols/Aws_restJson1.js +178 -1
- package/dist-es/ControlTower.js +6 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
- package/dist-es/commands/TagResourceCommand.js +47 -0
- package/dist-es/commands/UntagResourceCommand.js +47 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +172 -1
- package/dist-types/ControlTower.d.ts +39 -15
- package/dist-types/ControlTowerClient.d.ts +23 -17
- package/dist-types/commands/DisableControlCommand.d.ts +2 -2
- package/dist-types/commands/EnableControlCommand.d.ts +7 -4
- package/dist-types/commands/GetControlOperationCommand.d.ts +3 -4
- package/dist-types/commands/GetEnabledControlCommand.d.ts +1 -16
- package/dist-types/commands/ListEnabledControlsCommand.d.ts +2 -3
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +86 -0
- package/dist-types/commands/TagResourceCommand.d.ts +85 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +85 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +18 -15
- package/dist-types/models/models_0.d.ts +106 -66
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/dist-types/ts3.4/ControlTower.d.ts +51 -0
- package/dist-types/ts3.4/ControlTowerClient.d.ts +20 -2
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +18 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { ControlTowerServiceException as __BaseException } from "../models/ControlTowerServiceException";
|
|
4
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
5
|
export const se_DisableControlCommand = async (input, context) => {
|
|
@@ -32,6 +32,7 @@ export const se_EnableControlCommand = async (input, context) => {
|
|
|
32
32
|
let body;
|
|
33
33
|
body = JSON.stringify(take(input, {
|
|
34
34
|
controlIdentifier: [],
|
|
35
|
+
tags: (_) => _json(_),
|
|
35
36
|
targetIdentifier: [],
|
|
36
37
|
}));
|
|
37
38
|
return new __HttpRequest({
|
|
@@ -106,6 +107,66 @@ export const se_ListEnabledControlsCommand = async (input, context) => {
|
|
|
106
107
|
body,
|
|
107
108
|
});
|
|
108
109
|
};
|
|
110
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
111
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
112
|
+
const headers = {};
|
|
113
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
114
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
115
|
+
let body;
|
|
116
|
+
return new __HttpRequest({
|
|
117
|
+
protocol,
|
|
118
|
+
hostname,
|
|
119
|
+
port,
|
|
120
|
+
method: "GET",
|
|
121
|
+
headers,
|
|
122
|
+
path: resolvedPath,
|
|
123
|
+
body,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
127
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
|
+
const headers = {
|
|
129
|
+
"content-type": "application/json",
|
|
130
|
+
};
|
|
131
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
132
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
133
|
+
let body;
|
|
134
|
+
body = JSON.stringify(take(input, {
|
|
135
|
+
tags: (_) => _json(_),
|
|
136
|
+
}));
|
|
137
|
+
return new __HttpRequest({
|
|
138
|
+
protocol,
|
|
139
|
+
hostname,
|
|
140
|
+
port,
|
|
141
|
+
method: "POST",
|
|
142
|
+
headers,
|
|
143
|
+
path: resolvedPath,
|
|
144
|
+
body,
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
148
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
|
+
const headers = {};
|
|
150
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
151
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
152
|
+
const query = map({
|
|
153
|
+
tagKeys: [
|
|
154
|
+
__expectNonNull(input.tagKeys, `tagKeys`) != null,
|
|
155
|
+
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
156
|
+
],
|
|
157
|
+
});
|
|
158
|
+
let body;
|
|
159
|
+
return new __HttpRequest({
|
|
160
|
+
protocol,
|
|
161
|
+
hostname,
|
|
162
|
+
port,
|
|
163
|
+
method: "DELETE",
|
|
164
|
+
headers,
|
|
165
|
+
path: resolvedPath,
|
|
166
|
+
query,
|
|
167
|
+
body,
|
|
168
|
+
});
|
|
169
|
+
};
|
|
109
170
|
export const de_DisableControlCommand = async (output, context) => {
|
|
110
171
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
111
172
|
return de_DisableControlCommandError(output, context);
|
|
@@ -166,6 +227,7 @@ export const de_EnableControlCommand = async (output, context) => {
|
|
|
166
227
|
});
|
|
167
228
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
168
229
|
const doc = take(data, {
|
|
230
|
+
arn: __expectString,
|
|
169
231
|
operationIdentifier: __expectString,
|
|
170
232
|
});
|
|
171
233
|
Object.assign(contents, doc);
|
|
@@ -344,6 +406,115 @@ const de_ListEnabledControlsCommandError = async (output, context) => {
|
|
|
344
406
|
});
|
|
345
407
|
}
|
|
346
408
|
};
|
|
409
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
410
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
411
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
412
|
+
}
|
|
413
|
+
const contents = map({
|
|
414
|
+
$metadata: deserializeMetadata(output),
|
|
415
|
+
});
|
|
416
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
417
|
+
const doc = take(data, {
|
|
418
|
+
tags: _json,
|
|
419
|
+
});
|
|
420
|
+
Object.assign(contents, doc);
|
|
421
|
+
return contents;
|
|
422
|
+
};
|
|
423
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
424
|
+
const parsedOutput = {
|
|
425
|
+
...output,
|
|
426
|
+
body: await parseErrorBody(output.body, context),
|
|
427
|
+
};
|
|
428
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
429
|
+
switch (errorCode) {
|
|
430
|
+
case "InternalServerException":
|
|
431
|
+
case "com.amazonaws.controltower#InternalServerException":
|
|
432
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
433
|
+
case "ResourceNotFoundException":
|
|
434
|
+
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
435
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
436
|
+
case "ValidationException":
|
|
437
|
+
case "com.amazonaws.controltower#ValidationException":
|
|
438
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
439
|
+
default:
|
|
440
|
+
const parsedBody = parsedOutput.body;
|
|
441
|
+
return throwDefaultError({
|
|
442
|
+
output,
|
|
443
|
+
parsedBody,
|
|
444
|
+
errorCode,
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
449
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
450
|
+
return de_TagResourceCommandError(output, context);
|
|
451
|
+
}
|
|
452
|
+
const contents = map({
|
|
453
|
+
$metadata: deserializeMetadata(output),
|
|
454
|
+
});
|
|
455
|
+
await collectBody(output.body, context);
|
|
456
|
+
return contents;
|
|
457
|
+
};
|
|
458
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
459
|
+
const parsedOutput = {
|
|
460
|
+
...output,
|
|
461
|
+
body: await parseErrorBody(output.body, context),
|
|
462
|
+
};
|
|
463
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
464
|
+
switch (errorCode) {
|
|
465
|
+
case "InternalServerException":
|
|
466
|
+
case "com.amazonaws.controltower#InternalServerException":
|
|
467
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
468
|
+
case "ResourceNotFoundException":
|
|
469
|
+
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
470
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
471
|
+
case "ValidationException":
|
|
472
|
+
case "com.amazonaws.controltower#ValidationException":
|
|
473
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
474
|
+
default:
|
|
475
|
+
const parsedBody = parsedOutput.body;
|
|
476
|
+
return throwDefaultError({
|
|
477
|
+
output,
|
|
478
|
+
parsedBody,
|
|
479
|
+
errorCode,
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
484
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
485
|
+
return de_UntagResourceCommandError(output, context);
|
|
486
|
+
}
|
|
487
|
+
const contents = map({
|
|
488
|
+
$metadata: deserializeMetadata(output),
|
|
489
|
+
});
|
|
490
|
+
await collectBody(output.body, context);
|
|
491
|
+
return contents;
|
|
492
|
+
};
|
|
493
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
494
|
+
const parsedOutput = {
|
|
495
|
+
...output,
|
|
496
|
+
body: await parseErrorBody(output.body, context),
|
|
497
|
+
};
|
|
498
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
499
|
+
switch (errorCode) {
|
|
500
|
+
case "InternalServerException":
|
|
501
|
+
case "com.amazonaws.controltower#InternalServerException":
|
|
502
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
503
|
+
case "ResourceNotFoundException":
|
|
504
|
+
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
505
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
506
|
+
case "ValidationException":
|
|
507
|
+
case "com.amazonaws.controltower#ValidationException":
|
|
508
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
509
|
+
default:
|
|
510
|
+
const parsedBody = parsedOutput.body;
|
|
511
|
+
return throwDefaultError({
|
|
512
|
+
output,
|
|
513
|
+
parsedBody,
|
|
514
|
+
errorCode,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
};
|
|
347
518
|
const throwDefaultError = withBaseException(__BaseException);
|
|
348
519
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
349
520
|
const contents = map({});
|
|
@@ -4,6 +4,9 @@ import { EnableControlCommandInput, EnableControlCommandOutput } from "./command
|
|
|
4
4
|
import { GetControlOperationCommandInput, GetControlOperationCommandOutput } from "./commands/GetControlOperationCommand";
|
|
5
5
|
import { GetEnabledControlCommandInput, GetEnabledControlCommandOutput } from "./commands/GetEnabledControlCommand";
|
|
6
6
|
import { ListEnabledControlsCommandInput, ListEnabledControlsCommandOutput } from "./commands/ListEnabledControlsCommand";
|
|
7
|
+
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
8
|
+
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
9
|
+
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
7
10
|
import { ControlTowerClient } from "./ControlTowerClient";
|
|
8
11
|
export interface ControlTower {
|
|
9
12
|
/**
|
|
@@ -36,11 +39,29 @@ export interface ControlTower {
|
|
|
36
39
|
listEnabledControls(args: ListEnabledControlsCommandInput, options?: __HttpHandlerOptions): Promise<ListEnabledControlsCommandOutput>;
|
|
37
40
|
listEnabledControls(args: ListEnabledControlsCommandInput, cb: (err: any, data?: ListEnabledControlsCommandOutput) => void): void;
|
|
38
41
|
listEnabledControls(args: ListEnabledControlsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListEnabledControlsCommandOutput) => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* @see {@link ListTagsForResourceCommand}
|
|
44
|
+
*/
|
|
45
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
|
|
46
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
47
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* @see {@link TagResourceCommand}
|
|
50
|
+
*/
|
|
51
|
+
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
|
|
52
|
+
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
53
|
+
tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* @see {@link UntagResourceCommand}
|
|
56
|
+
*/
|
|
57
|
+
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
|
|
58
|
+
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
59
|
+
untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
39
60
|
}
|
|
40
61
|
/**
|
|
41
62
|
* @public
|
|
42
63
|
* <p>These interfaces allow you to apply the AWS library of pre-defined
|
|
43
|
-
*
|
|
64
|
+
* <i>controls</i> to your organizational units, programmatically. In AWS Control Tower, the terms "control" and "guardrail" are synonyms.</p>
|
|
44
65
|
* <p>To call these APIs, you'll need to know:</p>
|
|
45
66
|
* <ul>
|
|
46
67
|
* <li>
|
|
@@ -49,21 +70,24 @@ export interface ControlTower {
|
|
|
49
70
|
* <li>
|
|
50
71
|
* <p>the ARN associated with the target organizational unit (OU), which we call the <code>targetIdentifier</code>.</p>
|
|
51
72
|
* </li>
|
|
73
|
+
* <li>
|
|
74
|
+
* <p>the ARN associated with a resource that you wish to tag or untag.</p>
|
|
75
|
+
* </li>
|
|
52
76
|
* </ul>
|
|
53
77
|
* <p>
|
|
54
78
|
* <b>To get the <code>controlIdentifier</code> for your AWS Control Tower
|
|
55
|
-
*
|
|
79
|
+
* control:</b>
|
|
56
80
|
* </p>
|
|
57
81
|
* <p>The <code>controlIdentifier</code> is an ARN that is specified for each
|
|
58
|
-
*
|
|
82
|
+
* control. You can view the <code>controlIdentifier</code> in the console on the <b>Control details</b> page, as well as in the documentation.</p>
|
|
59
83
|
* <p>The <code>controlIdentifier</code> is unique in each AWS Region for each control. You can
|
|
60
|
-
*
|
|
84
|
+
* find the <code>controlIdentifier</code> for each Region and control in the <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-metadata-tables.html">Tables of control metadata</a> in the <i>AWS Control Tower User Guide.</i>
|
|
61
85
|
* </p>
|
|
62
86
|
* <p>A quick-reference list of control identifers for the AWS Control Tower legacy <i>Strongly recommended</i> and
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
87
|
+
* <i>Elective</i> controls is given in <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html.html">Resource identifiers for
|
|
88
|
+
* APIs and controls</a> in the <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html">Controls reference guide section</a>
|
|
89
|
+
* of the <i>AWS Control Tower User Guide</i>. Remember that <i>Mandatory</i> controls
|
|
90
|
+
* cannot be added or removed.</p>
|
|
67
91
|
* <note>
|
|
68
92
|
* <p>
|
|
69
93
|
* <b>ARN format:</b>
|
|
@@ -135,13 +159,13 @@ export interface ControlTower {
|
|
|
135
159
|
* <b>Recording API Requests</b>
|
|
136
160
|
* </p>
|
|
137
161
|
* <p>AWS Control Tower supports AWS CloudTrail, a service that records AWS API calls for your
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
162
|
+
* AWS account and delivers log files to an Amazon S3 bucket. By using information collected by
|
|
163
|
+
* CloudTrail, you can determine which requests the AWS Control Tower service received, who made
|
|
164
|
+
* the request and when, and so on. For more about AWS Control Tower and its support for
|
|
165
|
+
* CloudTrail, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/logging-using-cloudtrail.html">Logging AWS Control Tower
|
|
166
|
+
* Actions with AWS CloudTrail</a> in the AWS Control Tower User Guide. To learn more about
|
|
167
|
+
* CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User
|
|
168
|
+
* Guide.</p>
|
|
145
169
|
*/
|
|
146
170
|
export declare class ControlTower extends ControlTowerClient implements ControlTower {
|
|
147
171
|
}
|
|
@@ -13,17 +13,20 @@ import { EnableControlCommandInput, EnableControlCommandOutput } from "./command
|
|
|
13
13
|
import { GetControlOperationCommandInput, GetControlOperationCommandOutput } from "./commands/GetControlOperationCommand";
|
|
14
14
|
import { GetEnabledControlCommandInput, GetEnabledControlCommandOutput } from "./commands/GetEnabledControlCommand";
|
|
15
15
|
import { ListEnabledControlsCommandInput, ListEnabledControlsCommandOutput } from "./commands/ListEnabledControlsCommand";
|
|
16
|
+
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
17
|
+
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
18
|
+
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
16
19
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
17
20
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
18
21
|
export { __Client };
|
|
19
22
|
/**
|
|
20
23
|
* @public
|
|
21
24
|
*/
|
|
22
|
-
export type ServiceInputTypes = DisableControlCommandInput | EnableControlCommandInput | GetControlOperationCommandInput | GetEnabledControlCommandInput | ListEnabledControlsCommandInput;
|
|
25
|
+
export type ServiceInputTypes = DisableControlCommandInput | EnableControlCommandInput | GetControlOperationCommandInput | GetEnabledControlCommandInput | ListEnabledControlsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
|
|
23
26
|
/**
|
|
24
27
|
* @public
|
|
25
28
|
*/
|
|
26
|
-
export type ServiceOutputTypes = DisableControlCommandOutput | EnableControlCommandOutput | GetControlOperationCommandOutput | GetEnabledControlCommandOutput | ListEnabledControlsCommandOutput;
|
|
29
|
+
export type ServiceOutputTypes = DisableControlCommandOutput | EnableControlCommandOutput | GetControlOperationCommandOutput | GetEnabledControlCommandOutput | ListEnabledControlsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
|
|
27
30
|
/**
|
|
28
31
|
* @public
|
|
29
32
|
*/
|
|
@@ -158,7 +161,7 @@ export interface ControlTowerClientResolvedConfig extends ControlTowerClientReso
|
|
|
158
161
|
/**
|
|
159
162
|
* @public
|
|
160
163
|
* <p>These interfaces allow you to apply the AWS library of pre-defined
|
|
161
|
-
*
|
|
164
|
+
* <i>controls</i> to your organizational units, programmatically. In AWS Control Tower, the terms "control" and "guardrail" are synonyms.</p>
|
|
162
165
|
* <p>To call these APIs, you'll need to know:</p>
|
|
163
166
|
* <ul>
|
|
164
167
|
* <li>
|
|
@@ -167,21 +170,24 @@ export interface ControlTowerClientResolvedConfig extends ControlTowerClientReso
|
|
|
167
170
|
* <li>
|
|
168
171
|
* <p>the ARN associated with the target organizational unit (OU), which we call the <code>targetIdentifier</code>.</p>
|
|
169
172
|
* </li>
|
|
173
|
+
* <li>
|
|
174
|
+
* <p>the ARN associated with a resource that you wish to tag or untag.</p>
|
|
175
|
+
* </li>
|
|
170
176
|
* </ul>
|
|
171
177
|
* <p>
|
|
172
178
|
* <b>To get the <code>controlIdentifier</code> for your AWS Control Tower
|
|
173
|
-
*
|
|
179
|
+
* control:</b>
|
|
174
180
|
* </p>
|
|
175
181
|
* <p>The <code>controlIdentifier</code> is an ARN that is specified for each
|
|
176
|
-
*
|
|
182
|
+
* control. You can view the <code>controlIdentifier</code> in the console on the <b>Control details</b> page, as well as in the documentation.</p>
|
|
177
183
|
* <p>The <code>controlIdentifier</code> is unique in each AWS Region for each control. You can
|
|
178
|
-
*
|
|
184
|
+
* find the <code>controlIdentifier</code> for each Region and control in the <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-metadata-tables.html">Tables of control metadata</a> in the <i>AWS Control Tower User Guide.</i>
|
|
179
185
|
* </p>
|
|
180
186
|
* <p>A quick-reference list of control identifers for the AWS Control Tower legacy <i>Strongly recommended</i> and
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
187
|
+
* <i>Elective</i> controls is given in <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html.html">Resource identifiers for
|
|
188
|
+
* APIs and controls</a> in the <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-identifiers.html">Controls reference guide section</a>
|
|
189
|
+
* of the <i>AWS Control Tower User Guide</i>. Remember that <i>Mandatory</i> controls
|
|
190
|
+
* cannot be added or removed.</p>
|
|
185
191
|
* <note>
|
|
186
192
|
* <p>
|
|
187
193
|
* <b>ARN format:</b>
|
|
@@ -253,13 +259,13 @@ export interface ControlTowerClientResolvedConfig extends ControlTowerClientReso
|
|
|
253
259
|
* <b>Recording API Requests</b>
|
|
254
260
|
* </p>
|
|
255
261
|
* <p>AWS Control Tower supports AWS CloudTrail, a service that records AWS API calls for your
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
262
|
+
* AWS account and delivers log files to an Amazon S3 bucket. By using information collected by
|
|
263
|
+
* CloudTrail, you can determine which requests the AWS Control Tower service received, who made
|
|
264
|
+
* the request and when, and so on. For more about AWS Control Tower and its support for
|
|
265
|
+
* CloudTrail, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/logging-using-cloudtrail.html">Logging AWS Control Tower
|
|
266
|
+
* Actions with AWS CloudTrail</a> in the AWS Control Tower User Guide. To learn more about
|
|
267
|
+
* CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User
|
|
268
|
+
* Guide.</p>
|
|
263
269
|
*/
|
|
264
270
|
export declare class ControlTowerClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, ControlTowerClientResolvedConfig> {
|
|
265
271
|
/**
|
|
@@ -24,8 +24,8 @@ export interface DisableControlCommandOutput extends DisableControlOutput, __Met
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>This API call turns off a control. It starts an asynchronous operation that deletes AWS
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* resources on the specified organizational unit and the accounts it contains. The resources
|
|
28
|
+
* will vary according to the control that you specify. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
29
29
|
* <i>the AWS Control Tower User Guide</i>
|
|
30
30
|
* </a>.</p>
|
|
31
31
|
* @example
|
|
@@ -24,11 +24,10 @@ export interface EnableControlCommandOutput extends EnableControlOutput, __Metad
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>This API call activates a control. It starts an asynchronous operation that creates AWS
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* resources on the specified organizational unit and the accounts it contains. The resources
|
|
28
|
+
* created will vary according to the control that you specify. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
29
29
|
* <i>the AWS Control Tower User Guide</i>
|
|
30
|
-
* </a>
|
|
31
|
-
* </p>
|
|
30
|
+
* </a>.</p>
|
|
32
31
|
* @example
|
|
33
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
33
|
* ```javascript
|
|
@@ -38,11 +37,15 @@ export interface EnableControlCommandOutput extends EnableControlOutput, __Metad
|
|
|
38
37
|
* const input = { // EnableControlInput
|
|
39
38
|
* controlIdentifier: "STRING_VALUE", // required
|
|
40
39
|
* targetIdentifier: "STRING_VALUE", // required
|
|
40
|
+
* tags: { // TagMap
|
|
41
|
+
* "<keys>": "STRING_VALUE",
|
|
42
|
+
* },
|
|
41
43
|
* };
|
|
42
44
|
* const command = new EnableControlCommand(input);
|
|
43
45
|
* const response = await client.send(command);
|
|
44
46
|
* // { // EnableControlOutput
|
|
45
47
|
* // operationIdentifier: "STRING_VALUE", // required
|
|
48
|
+
* // arn: "STRING_VALUE",
|
|
46
49
|
* // };
|
|
47
50
|
*
|
|
48
51
|
* ```
|
|
@@ -24,11 +24,10 @@ export interface GetControlOperationCommandOutput extends GetControlOperationOut
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>Returns the status of a particular <code>EnableControl</code> or
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* <code>DisableControl</code> operation. Displays a message in case of error. Details for an
|
|
28
|
+
* operation are available for 90 days. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
29
29
|
* <i>the AWS Control Tower User Guide</i>
|
|
30
|
-
* </a>
|
|
31
|
-
* </p>
|
|
30
|
+
* </a>.</p>
|
|
32
31
|
* @example
|
|
33
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
33
|
* ```javascript
|
|
@@ -23,24 +23,9 @@ export interface GetEnabledControlCommandOutput extends GetEnabledControlOutput,
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>
|
|
27
|
-
* Provides details about the enabled control. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
26
|
+
* <p>Retrieves details about an enabled control. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
28
27
|
* <i>the AWS Control Tower User Guide</i>
|
|
29
28
|
* </a>.</p>
|
|
30
|
-
* <p class="title">
|
|
31
|
-
* <b>Returned values</b>
|
|
32
|
-
* </p>
|
|
33
|
-
* <ul>
|
|
34
|
-
* <li>
|
|
35
|
-
* <p>TargetRegions: Shows target AWS Regions where the enabled control is available to be deployed.</p>
|
|
36
|
-
* </li>
|
|
37
|
-
* <li>
|
|
38
|
-
* <p>StatusSummary: Provides a detailed summary of the deployment status.</p>
|
|
39
|
-
* </li>
|
|
40
|
-
* <li>
|
|
41
|
-
* <p>DriftSummary: Provides a detailed summary of the drifted status.</p>
|
|
42
|
-
* </li>
|
|
43
|
-
* </ul>
|
|
44
29
|
* @example
|
|
45
30
|
* Use a bare-bones client and the command you need to make an API call.
|
|
46
31
|
* ```javascript
|
|
@@ -24,10 +24,9 @@ export interface ListEnabledControlsCommandOutput extends ListEnabledControlsOut
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>Lists the controls enabled by AWS Control Tower on the specified organizational unit and
|
|
27
|
-
*
|
|
27
|
+
* the accounts it contains. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
28
28
|
* <i>the AWS Control Tower User Guide</i>
|
|
29
|
-
* </a>
|
|
30
|
-
* </p>
|
|
29
|
+
* </a>.</p>
|
|
31
30
|
* @example
|
|
32
31
|
* Use a bare-bones client and the command you need to make an API call.
|
|
33
32
|
* ```javascript
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { ControlTowerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ControlTowerClient";
|
|
5
|
+
import { ListTagsForResourceInput, ListTagsForResourceOutput } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListTagsForResourceCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListTagsForResourceCommandInput extends ListTagsForResourceInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListTagsForResourceCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListTagsForResourceCommandOutput extends ListTagsForResourceOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Returns a list of tags associated with the resource. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/control-api-examples-short.html">
|
|
27
|
+
* <i>the AWS Control Tower User Guide</i>
|
|
28
|
+
* </a>.</p>
|
|
29
|
+
* @example
|
|
30
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
31
|
+
* ```javascript
|
|
32
|
+
* import { ControlTowerClient, ListTagsForResourceCommand } from "@aws-sdk/client-controltower"; // ES Modules import
|
|
33
|
+
* // const { ControlTowerClient, ListTagsForResourceCommand } = require("@aws-sdk/client-controltower"); // CommonJS import
|
|
34
|
+
* const client = new ControlTowerClient(config);
|
|
35
|
+
* const input = { // ListTagsForResourceInput
|
|
36
|
+
* resourceArn: "STRING_VALUE", // required
|
|
37
|
+
* };
|
|
38
|
+
* const command = new ListTagsForResourceCommand(input);
|
|
39
|
+
* const response = await client.send(command);
|
|
40
|
+
* // { // ListTagsForResourceOutput
|
|
41
|
+
* // tags: { // TagMap // required
|
|
42
|
+
* // "<keys>": "STRING_VALUE",
|
|
43
|
+
* // },
|
|
44
|
+
* // };
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput}
|
|
49
|
+
* @returns {@link ListTagsForResourceCommandOutput}
|
|
50
|
+
* @see {@link ListTagsForResourceCommandInput} for command's `input` shape.
|
|
51
|
+
* @see {@link ListTagsForResourceCommandOutput} for command's `response` shape.
|
|
52
|
+
* @see {@link ControlTowerClientResolvedConfig | config} for ControlTowerClient's `config` shape.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link InternalServerException} (server fault)
|
|
55
|
+
* <p>Unexpected error during processing of request.</p>
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
58
|
+
* <p>Request references a resource which does not exist.</p>
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ValidationException} (client fault)
|
|
61
|
+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link ControlTowerServiceException}
|
|
64
|
+
* <p>Base exception class for all service exceptions from ControlTower service.</p>
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class ListTagsForResourceCommand extends $Command<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, ControlTowerClientResolvedConfig> {
|
|
68
|
+
readonly input: ListTagsForResourceCommandInput;
|
|
69
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
constructor(input: ListTagsForResourceCommandInput);
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ControlTowerClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput>;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
private serialize;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
private deserialize;
|
|
86
|
+
}
|