Skip to content

Commit 43e848f

Browse files
author
awstools
committed
feat(client-controlcatalog): AWS Control Catalog GetControl public API returns additional data in output, including Implementation and Parameters
1 parent a0824b3 commit 43e848f

File tree

4 files changed

+180
-5
lines changed

4 files changed

+180
-5
lines changed

clients/client-controlcatalog/src/commands/GetControlCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ export interface GetControlCommandOutput extends GetControlResponse, __MetadataB
5252
* // "STRING_VALUE",
5353
* // ],
5454
* // },
55+
* // Implementation: { // ImplementationDetails
56+
* // Type: "STRING_VALUE", // required
57+
* // },
58+
* // Parameters: [ // ControlParameters
59+
* // { // ControlParameter
60+
* // Name: "STRING_VALUE", // required
61+
* // },
62+
* // ],
5563
* // };
5664
*
5765
* ```

clients/client-controlcatalog/src/models/models_0.ts

+104-3
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,94 @@ export interface GetControlRequest {
289289
ControlArn: string | undefined;
290290
}
291291

292+
/**
293+
* <p>An object that describes the implementation type for a control.</p>
294+
* <p>Our <code>ImplementationDetails</code>
295+
* <code>Type</code> format has three required segments:</p>
296+
* <ul>
297+
* <li>
298+
* <p>
299+
* <code>SERVICE-PROVIDER::SERVICE-NAME::RESOURCE-NAME</code>
300+
* </p>
301+
* </li>
302+
* </ul>
303+
* <p>For example, <code>AWS::Config::ConfigRule</code>
304+
* <b>or</b>
305+
* <code>AWS::SecurityHub::SecurityControl</code> resources have the format with three required segments.</p>
306+
* <p>Our <code>ImplementationDetails</code>
307+
* <code>Type</code> format has an optional fourth segment, which is present for applicable
308+
* implementation types. The format is as follows: </p>
309+
* <ul>
310+
* <li>
311+
* <p>
312+
* <code>SERVICE-PROVIDER::SERVICE-NAME::RESOURCE-NAME::RESOURCE-TYPE-DESCRIPTION</code>
313+
* </p>
314+
* </li>
315+
* </ul>
316+
* <p>For example, <code>AWS::Organizations::Policy::SERVICE_CONTROL_POLICY</code>
317+
* <b>or</b>
318+
* <code>AWS::CloudFormation::Type::HOOK</code> have the format with four segments.</p>
319+
* <p>Although the format is similar, the values for the <code>Type</code> field do not match any Amazon Web Services CloudFormation values, and we do not use CloudFormation to implement these controls.</p>
320+
* @public
321+
*/
322+
export interface ImplementationDetails {
323+
/**
324+
* <p>A string that describes a control's implementation type.</p>
325+
* @public
326+
*/
327+
Type: string | undefined;
328+
}
329+
330+
/**
331+
* <p>Four types of control parameters are supported.</p>
332+
* <ul>
333+
* <li>
334+
* <p>
335+
* <b>AllowedRegions</b>: List of Amazon Web Services Regions exempted from the
336+
* control. Each string is expected to be an Amazon Web Services Region code. This parameter is mandatory for the <b>OU Region deny</b> control, <b>CT.MULTISERVICE.PV.1</b>.</p>
337+
* <p>Example: <code>["us-east-1","us-west-2"]</code>
338+
* </p>
339+
* </li>
340+
* <li>
341+
* <p>
342+
* <b>ExemptedActions</b>: List of Amazon Web Services IAM actions exempted
343+
* from the control. Each string is expected to be an IAM action.</p>
344+
* <p>Example:
345+
* <code>["logs:DescribeLogGroups","logs:StartQuery","logs:GetQueryResults"]</code>
346+
* </p>
347+
* </li>
348+
* <li>
349+
* <p>
350+
* <b>ExemptedPrincipalArns</b>: List of Amazon Web Services IAM principal ARNs
351+
* exempted from the control. Each string is expected to be an IAM principal that follows
352+
* the pattern <code>^arn:(aws|aws-us-gov):(iam|sts)::.+:.+$</code>
353+
* </p>
354+
* <p>Example:
355+
* <code>["arn:aws:iam::*:role/ReadOnly","arn:aws:sts::*:assumed-role/ReadOnly/*"]</code>
356+
* </p>
357+
* </li>
358+
* <li>
359+
* <p>
360+
* <b>ExemptedResourceArns</b>: List of resource ARNs exempted
361+
* from the control. Each string is expected to be a resource ARN.</p>
362+
* <p>Example: <code>["arn:aws:s3:::my-bucket-name"]</code>
363+
* </p>
364+
* </li>
365+
* </ul>
366+
* @public
367+
*/
368+
export interface ControlParameter {
369+
/**
370+
* <p>The parameter name. This name is the parameter <code>key</code> when you call <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/API_EnableControl.html">
371+
* <code>EnableControl</code>
372+
* </a> or <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/API_UpdateEnabledControl.html">
373+
* <code>UpdateEnabledControl</code>
374+
* </a>.</p>
375+
* @public
376+
*/
377+
Name: string | undefined;
378+
}
379+
292380
/**
293381
* @public
294382
* @enum
@@ -304,7 +392,7 @@ export const ControlScope = {
304392
export type ControlScope = (typeof ControlScope)[keyof typeof ControlScope];
305393

306394
/**
307-
* <p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment.</p>
395+
* <p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment. For more information about scope, see <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html">Global services</a>.</p>
308396
* <p>If you are applying controls through an Amazon Web Services Control Tower landing zone environment, remember that the values returned in the <code>RegionConfiguration</code> API operation are not related to the governed Regions in your landing zone. For example, if you are governing Regions <code>A</code>,<code>B</code>,and <code>C</code> while the control is available in Regions <code>A</code>, <code>B</code>, C<code>,</code> and <code>D</code>, you'd see a response with <code>DeployableRegions</code> of <code>A</code>, <code>B</code>, <code>C</code>, and <code>D</code> for a control with <code>REGIONAL</code> scope, even though you may not intend to deploy the control in Region <code>D</code>, because you do not govern it through your landing zone.</p>
309397
* @public
310398
*/
@@ -345,18 +433,31 @@ export interface GetControlResponse {
345433
Description: string | undefined;
346434

347435
/**
348-
* <p>A term that identifies the control's functional behavior. One of <code>Preventive</code>, <code>Deteictive</code>, <code>Proactive</code>
436+
* <p>A term that identifies the control's functional behavior. One of <code>Preventive</code>, <code>Detective</code>, <code>Proactive</code>
349437
* </p>
350438
* @public
351439
*/
352440
Behavior: ControlBehavior | undefined;
353441

354442
/**
355-
* <p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment.</p>
443+
* <p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment. For more information about scope, see <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html">Global services</a>.</p>
356444
* <p>If you are applying controls through an Amazon Web Services Control Tower landing zone environment, remember that the values returned in the <code>RegionConfiguration</code> API operation are not related to the governed Regions in your landing zone. For example, if you are governing Regions <code>A</code>,<code>B</code>,and <code>C</code> while the control is available in Regions <code>A</code>, <code>B</code>, C<code>,</code> and <code>D</code>, you'd see a response with <code>DeployableRegions</code> of <code>A</code>, <code>B</code>, <code>C</code>, and <code>D</code> for a control with <code>REGIONAL</code> scope, even though you may not intend to deploy the control in Region <code>D</code>, because you do not govern it through your landing zone.</p>
357445
* @public
358446
*/
359447
RegionConfiguration: RegionConfiguration | undefined;
448+
449+
/**
450+
* <p>Returns information about the control, as an <code>ImplementationDetails</code> object that shows the underlying implementation type for a control.</p>
451+
* @public
452+
*/
453+
Implementation?: ImplementationDetails;
454+
455+
/**
456+
* <p>Returns an array of <code>ControlParameter</code> objects that specify the parameters a control supports. An empty list is returned for controls that don’t support parameters.
457+
* </p>
458+
* @public
459+
*/
460+
Parameters?: ControlParameter[];
360461
}
361462

362463
/**

clients/client-controlcatalog/src/protocols/Aws_restJson1.ts

+8
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ export const de_GetControlCommand = async (
173173
Arn: __expectString,
174174
Behavior: __expectString,
175175
Description: __expectString,
176+
Implementation: _json,
176177
Name: __expectString,
178+
Parameters: _json,
177179
RegionConfiguration: _json,
178180
});
179181
Object.assign(contents, doc);
@@ -441,6 +443,10 @@ const de_CommonControlSummaryList = (output: any, context: __SerdeContext): Comm
441443
return retVal;
442444
};
443445

446+
// de_ControlParameter omitted.
447+
448+
// de_ControlParameters omitted.
449+
444450
// de_Controls omitted.
445451

446452
// de_ControlSummary omitted.
@@ -472,6 +478,8 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma
472478
return retVal;
473479
};
474480

481+
// de_ImplementationDetails omitted.
482+
475483
/**
476484
* deserializeAws_restJson1ObjectiveSummary
477485
*/

codegen/sdk-codegen/aws-models/controlcatalog.json

+60-2
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,27 @@
912912
}
913913
}
914914
},
915+
"com.amazonaws.controlcatalog#ControlParameter": {
916+
"type": "structure",
917+
"members": {
918+
"Name": {
919+
"target": "smithy.api#String",
920+
"traits": {
921+
"smithy.api#documentation": "<p>The parameter name. This name is the parameter <code>key</code> when you call <a href=\"https://docs.aws.amazon.com/controltower/latest/APIReference/API_EnableControl.html\">\n <code>EnableControl</code>\n </a> or <a href=\"https://docs.aws.amazon.com/controltower/latest/APIReference/API_UpdateEnabledControl.html\">\n <code>UpdateEnabledControl</code>\n </a>.</p>",
922+
"smithy.api#required": {}
923+
}
924+
}
925+
},
926+
"traits": {
927+
"smithy.api#documentation": "<p>Four types of control parameters are supported.</p>\n <ul>\n <li>\n <p>\n <b>AllowedRegions</b>: List of Amazon Web Services Regions exempted from the\n control. Each string is expected to be an Amazon Web Services Region code. This parameter is mandatory for the <b>OU Region deny</b> control, <b>CT.MULTISERVICE.PV.1</b>.</p>\n <p>Example: <code>[\"us-east-1\",\"us-west-2\"]</code>\n </p>\n </li>\n <li>\n <p>\n <b>ExemptedActions</b>: List of Amazon Web Services IAM actions exempted\n from the control. Each string is expected to be an IAM action.</p>\n <p>Example:\n <code>[\"logs:DescribeLogGroups\",\"logs:StartQuery\",\"logs:GetQueryResults\"]</code>\n </p>\n </li>\n <li>\n <p>\n <b>ExemptedPrincipalArns</b>: List of Amazon Web Services IAM principal ARNs\n exempted from the control. Each string is expected to be an IAM principal that follows\n the pattern <code>^arn:(aws|aws-us-gov):(iam|sts)::.+:.+$</code>\n </p>\n <p>Example:\n <code>[\"arn:aws:iam::*:role/ReadOnly\",\"arn:aws:sts::*:assumed-role/ReadOnly/*\"]</code>\n </p>\n </li>\n <li>\n <p>\n <b>ExemptedResourceArns</b>: List of resource ARNs exempted\n from the control. Each string is expected to be a resource ARN.</p>\n <p>Example: <code>[\"arn:aws:s3:::my-bucket-name\"]</code>\n </p>\n </li>\n </ul>"
928+
}
929+
},
930+
"com.amazonaws.controlcatalog#ControlParameters": {
931+
"type": "list",
932+
"member": {
933+
"target": "com.amazonaws.controlcatalog#ControlParameter"
934+
}
935+
},
915936
"com.amazonaws.controlcatalog#ControlResource": {
916937
"type": "resource",
917938
"identifiers": {
@@ -1172,7 +1193,7 @@
11721193
"Behavior": {
11731194
"target": "com.amazonaws.controlcatalog#ControlBehavior",
11741195
"traits": {
1175-
"smithy.api#documentation": "<p>A term that identifies the control's functional behavior. One of <code>Preventive</code>, <code>Deteictive</code>, <code>Proactive</code>\n </p>",
1196+
"smithy.api#documentation": "<p>A term that identifies the control's functional behavior. One of <code>Preventive</code>, <code>Detective</code>, <code>Proactive</code>\n </p>",
11761197
"smithy.api#required": {}
11771198
}
11781199
},
@@ -1181,12 +1202,49 @@
11811202
"traits": {
11821203
"smithy.api#required": {}
11831204
}
1205+
},
1206+
"Implementation": {
1207+
"target": "com.amazonaws.controlcatalog#ImplementationDetails",
1208+
"traits": {
1209+
"smithy.api#documentation": "<p>Returns information about the control, as an <code>ImplementationDetails</code> object that shows the underlying implementation type for a control.</p>"
1210+
}
1211+
},
1212+
"Parameters": {
1213+
"target": "com.amazonaws.controlcatalog#ControlParameters",
1214+
"traits": {
1215+
"smithy.api#documentation": "<p>Returns an array of <code>ControlParameter</code> objects that specify the parameters a control supports. An empty list is returned for controls that don’t support parameters.\n </p>"
1216+
}
11841217
}
11851218
},
11861219
"traits": {
11871220
"smithy.api#output": {}
11881221
}
11891222
},
1223+
"com.amazonaws.controlcatalog#ImplementationDetails": {
1224+
"type": "structure",
1225+
"members": {
1226+
"Type": {
1227+
"target": "com.amazonaws.controlcatalog#ImplementationType",
1228+
"traits": {
1229+
"smithy.api#documentation": "<p>A string that describes a control's implementation type.</p>",
1230+
"smithy.api#required": {}
1231+
}
1232+
}
1233+
},
1234+
"traits": {
1235+
"smithy.api#documentation": "<p>An object that describes the implementation type for a control.</p>\n <p>Our <code>ImplementationDetails</code>\n <code>Type</code> format has three required segments:</p>\n <ul>\n <li>\n <p>\n <code>SERVICE-PROVIDER::SERVICE-NAME::RESOURCE-NAME</code>\n </p>\n </li>\n </ul>\n <p>For example, <code>AWS::Config::ConfigRule</code>\n <b>or</b>\n <code>AWS::SecurityHub::SecurityControl</code> resources have the format with three required segments.</p>\n <p>Our <code>ImplementationDetails</code>\n <code>Type</code> format has an optional fourth segment, which is present for applicable \n implementation types. The format is as follows: </p>\n <ul>\n <li>\n <p>\n <code>SERVICE-PROVIDER::SERVICE-NAME::RESOURCE-NAME::RESOURCE-TYPE-DESCRIPTION</code>\n </p>\n </li>\n </ul>\n <p>For example, <code>AWS::Organizations::Policy::SERVICE_CONTROL_POLICY</code>\n <b>or</b>\n <code>AWS::CloudFormation::Type::HOOK</code> have the format with four segments.</p>\n <p>Although the format is similar, the values for the <code>Type</code> field do not match any Amazon Web Services CloudFormation values, and we do not use CloudFormation to implement these controls.</p>"
1236+
}
1237+
},
1238+
"com.amazonaws.controlcatalog#ImplementationType": {
1239+
"type": "string",
1240+
"traits": {
1241+
"smithy.api#length": {
1242+
"min": 7,
1243+
"max": 2048
1244+
},
1245+
"smithy.api#pattern": "^[A-Za-z0-9]+(::[A-Za-z0-9_]+){2,3}$"
1246+
}
1247+
},
11901248
"com.amazonaws.controlcatalog#InternalServerException": {
11911249
"type": "structure",
11921250
"members": {
@@ -1727,7 +1785,7 @@
17271785
}
17281786
},
17291787
"traits": {
1730-
"smithy.api#documentation": "<p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment.</p>\n <p>If you are applying controls through an Amazon Web Services Control Tower landing zone environment, remember that the values returned in the <code>RegionConfiguration</code> API operation are not related to the governed Regions in your landing zone. For example, if you are governing Regions <code>A</code>,<code>B</code>,and <code>C</code> while the control is available in Regions <code>A</code>, <code>B</code>, C<code>,</code> and <code>D</code>, you'd see a response with <code>DeployableRegions</code> of <code>A</code>, <code>B</code>, <code>C</code>, and <code>D</code> for a control with <code>REGIONAL</code> scope, even though you may not intend to deploy the control in Region <code>D</code>, because you do not govern it through your landing zone.</p>"
1788+
"smithy.api#documentation": "<p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control currently is available for deployment. For more information about scope, see <a href=\"https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html\">Global services</a>.</p>\n <p>If you are applying controls through an Amazon Web Services Control Tower landing zone environment, remember that the values returned in the <code>RegionConfiguration</code> API operation are not related to the governed Regions in your landing zone. For example, if you are governing Regions <code>A</code>,<code>B</code>,and <code>C</code> while the control is available in Regions <code>A</code>, <code>B</code>, C<code>,</code> and <code>D</code>, you'd see a response with <code>DeployableRegions</code> of <code>A</code>, <code>B</code>, <code>C</code>, and <code>D</code> for a control with <code>REGIONAL</code> scope, even though you may not intend to deploy the control in Region <code>D</code>, because you do not govern it through your landing zone.</p>"
17311789
}
17321790
},
17331791
"com.amazonaws.controlcatalog#ResourceNotFoundException": {

0 commit comments

Comments
 (0)