Skip to content

Commit 253585c

Browse files
author
awstools
committed
feat(client-controlcatalog): The GetControl API now surfaces a control's Severity, CreateTime, and Identifier for a control's Implementation. The ListControls API now surfaces a control's Behavior, Severity, CreateTime, and Identifier for a control's Implementation.
1 parent 5816308 commit 253585c

File tree

5 files changed

+219
-3
lines changed

5 files changed

+219
-3
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface GetControlCommandOutput extends GetControlResponse, __MetadataB
4646
* // Name: "STRING_VALUE", // required
4747
* // Description: "STRING_VALUE", // required
4848
* // Behavior: "PREVENTIVE" || "PROACTIVE" || "DETECTIVE", // required
49+
* // Severity: "LOW" || "MEDIUM" || "HIGH" || "CRITICAL",
4950
* // RegionConfiguration: { // RegionConfiguration
5051
* // Scope: "GLOBAL" || "REGIONAL", // required
5152
* // DeployableRegions: [ // DeployableRegions
@@ -54,12 +55,14 @@ export interface GetControlCommandOutput extends GetControlResponse, __MetadataB
5455
* // },
5556
* // Implementation: { // ImplementationDetails
5657
* // Type: "STRING_VALUE", // required
58+
* // Identifier: "STRING_VALUE",
5759
* // },
5860
* // Parameters: [ // ControlParameters
5961
* // { // ControlParameter
6062
* // Name: "STRING_VALUE", // required
6163
* // },
6264
* // ],
65+
* // CreateTime: new Date("TIMESTAMP"),
6366
* // };
6467
*
6568
* ```

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

+7
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ export interface ListControlsCommandOutput extends ListControlsResponse, __Metad
4747
* // Arn: "STRING_VALUE", // required
4848
* // Name: "STRING_VALUE", // required
4949
* // Description: "STRING_VALUE", // required
50+
* // Behavior: "PREVENTIVE" || "PROACTIVE" || "DETECTIVE",
51+
* // Severity: "LOW" || "MEDIUM" || "HIGH" || "CRITICAL",
52+
* // Implementation: { // ImplementationSummary
53+
* // Type: "STRING_VALUE", // required
54+
* // Identifier: "STRING_VALUE",
55+
* // },
56+
* // CreateTime: new Date("TIMESTAMP"),
5057
* // },
5158
* // ],
5259
* // NextToken: "STRING_VALUE",

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

+76
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,12 @@ export interface ImplementationDetails {
325325
* @public
326326
*/
327327
Type: string | undefined;
328+
329+
/**
330+
* <p>A service-specific identifier for the control, assigned by the service that implemented the control. For example, this identifier could be an Amazon Web Services Config Rule ID or a Security Hub Control ID.</p>
331+
* @public
332+
*/
333+
Identifier?: string | undefined;
328334
}
329335

330336
/**
@@ -437,6 +443,22 @@ export interface RegionConfiguration {
437443
DeployableRegions?: string[] | undefined;
438444
}
439445

446+
/**
447+
* @public
448+
* @enum
449+
*/
450+
export const ControlSeverity = {
451+
CRITICAL: "CRITICAL",
452+
HIGH: "HIGH",
453+
LOW: "LOW",
454+
MEDIUM: "MEDIUM",
455+
} as const;
456+
457+
/**
458+
* @public
459+
*/
460+
export type ControlSeverity = (typeof ControlSeverity)[keyof typeof ControlSeverity];
461+
440462
/**
441463
* @public
442464
*/
@@ -466,6 +488,12 @@ export interface GetControlResponse {
466488
*/
467489
Behavior: ControlBehavior | undefined;
468490

491+
/**
492+
* <p>An enumerated type, with the following possible values:</p>
493+
* @public
494+
*/
495+
Severity?: ControlSeverity | undefined;
496+
469497
/**
470498
* <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>
471499
* <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>
@@ -485,6 +513,12 @@ export interface GetControlResponse {
485513
* @public
486514
*/
487515
Parameters?: ControlParameter[] | undefined;
516+
517+
/**
518+
* <p>A timestamp that notes the time when the control was released (start of its life) as a governance capability in Amazon Web Services.</p>
519+
* @public
520+
*/
521+
CreateTime?: Date | undefined;
488522
}
489523

490524
/**
@@ -526,6 +560,24 @@ export interface ListControlsRequest {
526560
MaxResults?: number | undefined;
527561
}
528562

563+
/**
564+
* <p>A summary of how the control is implemented, including the Amazon Web Services service that enforces the control and its service-specific identifier. For example, the value of this field could indicate that the control is implemented as an Amazon Web Services Config Rule or an Amazon Web Services Security Hub control.</p>
565+
* @public
566+
*/
567+
export interface ImplementationSummary {
568+
/**
569+
* <p>A string that represents the Amazon Web Services service that implements this control. For example, a value of <code>AWS::Config::ConfigRule</code> indicates that the control is implemented by Amazon Web Services Config, and <code>AWS::SecurityHub::SecurityControl</code> indicates implementation by Amazon Web Services Security Hub.</p>
570+
* @public
571+
*/
572+
Type: string | undefined;
573+
574+
/**
575+
* <p>The identifier originally assigned by the Amazon Web Services service that implements the control. For example, <code>CODEPIPELINE_DEPLOYMENT_COUNT_CHECK</code>.</p>
576+
* @public
577+
*/
578+
Identifier?: string | undefined;
579+
}
580+
529581
/**
530582
* <p>Overview of information about a control.</p>
531583
* @public
@@ -548,6 +600,30 @@ export interface ControlSummary {
548600
* @public
549601
*/
550602
Description: string | undefined;
603+
604+
/**
605+
* <p>An enumerated type, with the following possible values:</p>
606+
* @public
607+
*/
608+
Behavior?: ControlBehavior | undefined;
609+
610+
/**
611+
* <p>An enumerated type, with the following possible values:</p>
612+
* @public
613+
*/
614+
Severity?: ControlSeverity | undefined;
615+
616+
/**
617+
* <p>An object of type <code>ImplementationSummary</code> that describes how the control is implemented.</p>
618+
* @public
619+
*/
620+
Implementation?: ImplementationSummary | undefined;
621+
622+
/**
623+
* <p>A timestamp that notes the time when the control was released (start of its life) as a governance capability in Amazon Web Services.</p>
624+
* @public
625+
*/
626+
CreateTime?: Date | undefined;
551627
}
552628

553629
/**

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

+31-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
AccessDeniedException,
3333
CommonControlFilter,
3434
CommonControlSummary,
35+
ControlSummary,
3536
DomainResourceFilter,
3637
DomainSummary,
3738
InternalServerException,
@@ -172,11 +173,13 @@ export const de_GetControlCommand = async (
172173
const doc = take(data, {
173174
Arn: __expectString,
174175
Behavior: __expectString,
176+
CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
175177
Description: __expectString,
176178
Implementation: _json,
177179
Name: __expectString,
178180
Parameters: _json,
179181
RegionConfiguration: _json,
182+
Severity: __expectString,
180183
});
181184
Object.assign(contents, doc);
182185
return contents;
@@ -219,7 +222,7 @@ export const de_ListControlsCommand = async (
219222
});
220223
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
221224
const doc = take(data, {
222-
Controls: _json,
225+
Controls: (_) => de_Controls(_, context),
223226
NextToken: __expectString,
224227
});
225228
Object.assign(contents, doc);
@@ -447,9 +450,32 @@ const de_CommonControlSummaryList = (output: any, context: __SerdeContext): Comm
447450

448451
// de_ControlParameters omitted.
449452

450-
// de_Controls omitted.
453+
/**
454+
* deserializeAws_restJson1Controls
455+
*/
456+
const de_Controls = (output: any, context: __SerdeContext): ControlSummary[] => {
457+
const retVal = (output || [])
458+
.filter((e: any) => e != null)
459+
.map((entry: any) => {
460+
return de_ControlSummary(entry, context);
461+
});
462+
return retVal;
463+
};
451464

452-
// de_ControlSummary omitted.
465+
/**
466+
* deserializeAws_restJson1ControlSummary
467+
*/
468+
const de_ControlSummary = (output: any, context: __SerdeContext): ControlSummary => {
469+
return take(output, {
470+
Arn: __expectString,
471+
Behavior: __expectString,
472+
CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
473+
Description: __expectString,
474+
Implementation: _json,
475+
Name: __expectString,
476+
Severity: __expectString,
477+
}) as any;
478+
};
453479

454480
// de_DeployableRegions omitted.
455481

@@ -480,6 +506,8 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma
480506

481507
// de_ImplementationDetails omitted.
482508

509+
// de_ImplementationSummary omitted.
510+
483511
/**
484512
* deserializeAws_restJson1ObjectiveSummary
485513
*/

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

+102
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,35 @@
974974
}
975975
}
976976
},
977+
"com.amazonaws.controlcatalog#ControlSeverity": {
978+
"type": "enum",
979+
"members": {
980+
"LOW": {
981+
"target": "smithy.api#Unit",
982+
"traits": {
983+
"smithy.api#enumValue": "LOW"
984+
}
985+
},
986+
"MEDIUM": {
987+
"target": "smithy.api#Unit",
988+
"traits": {
989+
"smithy.api#enumValue": "MEDIUM"
990+
}
991+
},
992+
"HIGH": {
993+
"target": "smithy.api#Unit",
994+
"traits": {
995+
"smithy.api#enumValue": "HIGH"
996+
}
997+
},
998+
"CRITICAL": {
999+
"target": "smithy.api#Unit",
1000+
"traits": {
1001+
"smithy.api#enumValue": "CRITICAL"
1002+
}
1003+
}
1004+
}
1005+
},
9771006
"com.amazonaws.controlcatalog#ControlSummary": {
9781007
"type": "structure",
9791008
"members": {
@@ -997,6 +1026,30 @@
9971026
"smithy.api#documentation": "<p>A description of the control, as it may appear in the console. Describes the functionality of the control.</p>",
9981027
"smithy.api#required": {}
9991028
}
1029+
},
1030+
"Behavior": {
1031+
"target": "com.amazonaws.controlcatalog#ControlBehavior",
1032+
"traits": {
1033+
"smithy.api#documentation": "<p>An enumerated type, with the following possible values:</p>"
1034+
}
1035+
},
1036+
"Severity": {
1037+
"target": "com.amazonaws.controlcatalog#ControlSeverity",
1038+
"traits": {
1039+
"smithy.api#documentation": "<p>An enumerated type, with the following possible values:</p>"
1040+
}
1041+
},
1042+
"Implementation": {
1043+
"target": "com.amazonaws.controlcatalog#ImplementationSummary",
1044+
"traits": {
1045+
"smithy.api#documentation": "<p>An object of type <code>ImplementationSummary</code> that describes how the control is implemented.</p>"
1046+
}
1047+
},
1048+
"CreateTime": {
1049+
"target": "smithy.api#Timestamp",
1050+
"traits": {
1051+
"smithy.api#documentation": "<p>A timestamp that notes the time when the control was released (start of its life) as a governance capability in Amazon Web Services.</p>"
1052+
}
10001053
}
10011054
},
10021055
"traits": {
@@ -1197,6 +1250,12 @@
11971250
"smithy.api#required": {}
11981251
}
11991252
},
1253+
"Severity": {
1254+
"target": "com.amazonaws.controlcatalog#ControlSeverity",
1255+
"traits": {
1256+
"smithy.api#documentation": "<p>An enumerated type, with the following possible values:</p>"
1257+
}
1258+
},
12001259
"RegionConfiguration": {
12011260
"target": "com.amazonaws.controlcatalog#RegionConfiguration",
12021261
"traits": {
@@ -1214,6 +1273,12 @@
12141273
"traits": {
12151274
"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>"
12161275
}
1276+
},
1277+
"CreateTime": {
1278+
"target": "smithy.api#Timestamp",
1279+
"traits": {
1280+
"smithy.api#documentation": "<p>A timestamp that notes the time when the control was released (start of its life) as a governance capability in Amazon Web Services.</p>"
1281+
}
12171282
}
12181283
},
12191284
"traits": {
@@ -1229,12 +1294,49 @@
12291294
"smithy.api#documentation": "<p>A string that describes a control's implementation type.</p>",
12301295
"smithy.api#required": {}
12311296
}
1297+
},
1298+
"Identifier": {
1299+
"target": "com.amazonaws.controlcatalog#ImplementationIdentifier",
1300+
"traits": {
1301+
"smithy.api#documentation": "<p>A service-specific identifier for the control, assigned by the service that implemented the control. For example, this identifier could be an Amazon Web Services Config Rule ID or a Security Hub Control ID.</p>"
1302+
}
12321303
}
12331304
},
12341305
"traits": {
12351306
"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.</p>"
12361307
}
12371308
},
1309+
"com.amazonaws.controlcatalog#ImplementationIdentifier": {
1310+
"type": "string",
1311+
"traits": {
1312+
"smithy.api#length": {
1313+
"min": 1,
1314+
"max": 256
1315+
},
1316+
"smithy.api#pattern": "^[a-z0-9-]+$"
1317+
}
1318+
},
1319+
"com.amazonaws.controlcatalog#ImplementationSummary": {
1320+
"type": "structure",
1321+
"members": {
1322+
"Type": {
1323+
"target": "com.amazonaws.controlcatalog#ImplementationType",
1324+
"traits": {
1325+
"smithy.api#documentation": "<p>A string that represents the Amazon Web Services service that implements this control. For example, a value of <code>AWS::Config::ConfigRule</code> indicates that the control is implemented by Amazon Web Services Config, and <code>AWS::SecurityHub::SecurityControl</code> indicates implementation by Amazon Web Services Security Hub.</p>",
1326+
"smithy.api#required": {}
1327+
}
1328+
},
1329+
"Identifier": {
1330+
"target": "com.amazonaws.controlcatalog#ImplementationIdentifier",
1331+
"traits": {
1332+
"smithy.api#documentation": "<p>The identifier originally assigned by the Amazon Web Services service that implements the control. For example, <code>CODEPIPELINE_DEPLOYMENT_COUNT_CHECK</code>.</p>"
1333+
}
1334+
}
1335+
},
1336+
"traits": {
1337+
"smithy.api#documentation": "<p>A summary of how the control is implemented, including the Amazon Web Services service that enforces the control and its service-specific identifier. For example, the value of this field could indicate that the control is implemented as an Amazon Web Services Config Rule or an Amazon Web Services Security Hub control.</p>"
1338+
}
1339+
},
12381340
"com.amazonaws.controlcatalog#ImplementationType": {
12391341
"type": "string",
12401342
"traits": {

0 commit comments

Comments
 (0)