Skip to content

Commit 1333cd3

Browse files
author
awstools
committed
feat(client-controlcatalog): Added support for related control mappings with new RELATED_CONTROL mapping type in ListControlMappings API.
1 parent bcf811e commit 1333cd3

File tree

4 files changed

+126
-9
lines changed

4 files changed

+126
-9
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ListControlMappingsCommandOutput extends ListControlMappingsRes
4747
* "STRING_VALUE",
4848
* ],
4949
* MappingTypes: [ // MappingTypeFilterList
50-
* "FRAMEWORK" || "COMMON_CONTROL",
50+
* "FRAMEWORK" || "COMMON_CONTROL" || "RELATED_CONTROL",
5151
* ],
5252
* },
5353
* };
@@ -57,7 +57,7 @@ export interface ListControlMappingsCommandOutput extends ListControlMappingsRes
5757
* // ControlMappings: [ // ControlMappings // required
5858
* // { // ControlMapping
5959
* // ControlArn: "STRING_VALUE", // required
60-
* // MappingType: "FRAMEWORK" || "COMMON_CONTROL", // required
60+
* // MappingType: "FRAMEWORK" || "COMMON_CONTROL" || "RELATED_CONTROL", // required
6161
* // Mapping: { // Mapping Union: only one key present
6262
* // Framework: { // FrameworkMappingDetails
6363
* // Name: "STRING_VALUE", // required
@@ -66,6 +66,10 @@ export interface ListControlMappingsCommandOutput extends ListControlMappingsRes
6666
* // CommonControl: { // CommonControlMappingDetails
6767
* // CommonControlArn: "STRING_VALUE", // required
6868
* // },
69+
* // RelatedControl: { // RelatedControlMappingDetails
70+
* // ControlArn: "STRING_VALUE",
71+
* // RelationType: "COMPLEMENTARY" || "ALTERNATIVE" || "MUTUALLY_EXCLUSIVE", // required
72+
* // },
6973
* // },
7074
* // },
7175
* // ],

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

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ export interface ListDomainsResponse {
677677
export const MappingType = {
678678
COMMON_CONTROL: "COMMON_CONTROL",
679679
FRAMEWORK: "FRAMEWORK",
680+
RELATED_CONTROL: "RELATED_CONTROL",
680681
} as const;
681682

682683
/**
@@ -749,11 +750,48 @@ export interface FrameworkMappingDetails {
749750
Item: string | undefined;
750751
}
751752

753+
/**
754+
* @public
755+
* @enum
756+
*/
757+
export const ControlRelationType = {
758+
ALTERNATIVE: "ALTERNATIVE",
759+
COMPLEMENTARY: "COMPLEMENTARY",
760+
MUTUALLY_EXCLUSIVE: "MUTUALLY_EXCLUSIVE",
761+
} as const;
762+
763+
/**
764+
* @public
765+
*/
766+
export type ControlRelationType = (typeof ControlRelationType)[keyof typeof ControlRelationType];
767+
768+
/**
769+
* <p>A structure that describes a control's relationship status with other controls.</p>
770+
* @public
771+
*/
772+
export interface RelatedControlMappingDetails {
773+
/**
774+
* <p>The unique identifier of a control.</p>
775+
* @public
776+
*/
777+
ControlArn?: string | undefined;
778+
779+
/**
780+
* <p>Returns an enumerated value that represents the relationship between two or more controls.</p>
781+
* @public
782+
*/
783+
RelationType: ControlRelationType | undefined;
784+
}
785+
752786
/**
753787
* <p>A structure that contains the details of a mapping relationship, which can be either to a framework or to a common control.</p>
754788
* @public
755789
*/
756-
export type Mapping = Mapping.CommonControlMember | Mapping.FrameworkMember | Mapping.$UnknownMember;
790+
export type Mapping =
791+
| Mapping.CommonControlMember
792+
| Mapping.FrameworkMember
793+
| Mapping.RelatedControlMember
794+
| Mapping.$UnknownMember;
757795

758796
/**
759797
* @public
@@ -766,6 +804,7 @@ export namespace Mapping {
766804
export interface FrameworkMember {
767805
Framework: FrameworkMappingDetails;
768806
CommonControl?: never;
807+
RelatedControl?: never;
769808
$unknown?: never;
770809
}
771810

@@ -776,6 +815,18 @@ export namespace Mapping {
776815
export interface CommonControlMember {
777816
Framework?: never;
778817
CommonControl: CommonControlMappingDetails;
818+
RelatedControl?: never;
819+
$unknown?: never;
820+
}
821+
822+
/**
823+
* <p>Returns information about controls that are related to the specified control.</p>
824+
* @public
825+
*/
826+
export interface RelatedControlMember {
827+
Framework?: never;
828+
CommonControl?: never;
829+
RelatedControl: RelatedControlMappingDetails;
779830
$unknown?: never;
780831
}
781832

@@ -785,6 +836,7 @@ export namespace Mapping {
785836
export interface $UnknownMember {
786837
Framework?: never;
787838
CommonControl?: never;
839+
RelatedControl?: never;
788840
$unknown: [string, any];
789841
}
790842

@@ -795,6 +847,7 @@ export namespace Mapping {
795847
export interface Visitor<T> {
796848
Framework: (value: FrameworkMappingDetails) => T;
797849
CommonControl: (value: CommonControlMappingDetails) => T;
850+
RelatedControl: (value: RelatedControlMappingDetails) => T;
798851
_: (name: string, value: any) => T;
799852
}
800853
}
@@ -811,13 +864,13 @@ export interface ControlMapping {
811864
ControlArn: string | undefined;
812865

813866
/**
814-
* <p>The type of mapping relationship between the control and other entities. Indicates whether the mapping is to a framework or common control.</p>
867+
* <p>The type of mapping relationship between the control and other entities.</p>
815868
* @public
816869
*/
817870
MappingType: MappingType | undefined;
818871

819872
/**
820-
* <p>The details of the mapping relationship, containing either framework or common control information.</p>
873+
* <p>The details of the mapping relationship, for example, containing framework, common control, or related control information.</p>
821874
* @public
822875
*/
823876
Mapping: Mapping | undefined;

clients/client-controlcatalog/src/schemas/schemas_0.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ const _OSL = "ObjectiveSummaryList";
7979
const _Ob = "Objective";
8080
const _P = "Parameters";
8181
const _RC = "RegionConfiguration";
82+
const _RCMD = "RelatedControlMappingDetails";
83+
const _RCe = "RelatedControl";
8284
const _RNFE = "ResourceNotFoundException";
85+
const _RT = "RelationType";
8386
const _S = "Severity";
8487
const _Sc = "Scope";
8588
const _T = "Type";
@@ -330,6 +333,7 @@ export var ObjectiveSummary: StaticStructureSchema = [
330333
[0, 0, 0, () => AssociatedDomainSummary, 4, 4],
331334
];
332335
export var RegionConfiguration: StaticStructureSchema = [3, n0, _RC, 0, [_Sc, _DR], [0, 64 | 0]];
336+
export var RelatedControlMappingDetails: StaticStructureSchema = [3, n0, _RCMD, 0, [_CA, _RT], [0, 0]];
333337
export var ResourceNotFoundException: StaticErrorSchema = [
334338
-3,
335339
n0,
@@ -403,8 +407,8 @@ export var Mapping: StaticStructureSchema = [
403407
n0,
404408
_Ma,
405409
0,
406-
[_Fr, _CCo],
407-
[() => FrameworkMappingDetails, () => CommonControlMappingDetails],
410+
[_Fr, _CCo, _RCe],
411+
[() => FrameworkMappingDetails, () => CommonControlMappingDetails, () => RelatedControlMappingDetails],
408412
];
409413
export var GetControl: StaticOperationSchema = [
410414
9,

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

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,14 +951,14 @@
951951
"MappingType": {
952952
"target": "com.amazonaws.controlcatalog#MappingType",
953953
"traits": {
954-
"smithy.api#documentation": "<p>The type of mapping relationship between the control and other entities. Indicates whether the mapping is to a framework or common control.</p>",
954+
"smithy.api#documentation": "<p>The type of mapping relationship between the control and other entities.</p>",
955955
"smithy.api#required": {}
956956
}
957957
},
958958
"Mapping": {
959959
"target": "com.amazonaws.controlcatalog#Mapping",
960960
"traits": {
961-
"smithy.api#documentation": "<p>The details of the mapping relationship, containing either framework or common control information.</p>",
961+
"smithy.api#documentation": "<p>The details of the mapping relationship, for example, containing framework, common control, or related control information.</p>",
962962
"smithy.api#required": {}
963963
}
964964
}
@@ -1020,6 +1020,29 @@
10201020
"target": "com.amazonaws.controlcatalog#ControlParameter"
10211021
}
10221022
},
1023+
"com.amazonaws.controlcatalog#ControlRelationType": {
1024+
"type": "enum",
1025+
"members": {
1026+
"COMPLEMENTARY": {
1027+
"target": "smithy.api#Unit",
1028+
"traits": {
1029+
"smithy.api#enumValue": "COMPLEMENTARY"
1030+
}
1031+
},
1032+
"ALTERNATIVE": {
1033+
"target": "smithy.api#Unit",
1034+
"traits": {
1035+
"smithy.api#enumValue": "ALTERNATIVE"
1036+
}
1037+
},
1038+
"MUTUALLY_EXCLUSIVE": {
1039+
"target": "smithy.api#Unit",
1040+
"traits": {
1041+
"smithy.api#enumValue": "MUTUALLY_EXCLUSIVE"
1042+
}
1043+
}
1044+
}
1045+
},
10231046
"com.amazonaws.controlcatalog#ControlResource": {
10241047
"type": "resource",
10251048
"identifiers": {
@@ -2011,6 +2034,12 @@
20112034
"traits": {
20122035
"smithy.api#documentation": "<p>The common control mapping details when the mapping type relates to a common control.</p>"
20132036
}
2037+
},
2038+
"RelatedControl": {
2039+
"target": "com.amazonaws.controlcatalog#RelatedControlMappingDetails",
2040+
"traits": {
2041+
"smithy.api#documentation": "<p>Returns information about controls that are related to the specified control.</p>"
2042+
}
20142043
}
20152044
},
20162045
"traits": {
@@ -2031,6 +2060,12 @@
20312060
"traits": {
20322061
"smithy.api#enumValue": "COMMON_CONTROL"
20332062
}
2063+
},
2064+
"RELATED_CONTROL": {
2065+
"target": "smithy.api#Unit",
2066+
"traits": {
2067+
"smithy.api#enumValue": "RELATED_CONTROL"
2068+
}
20342069
}
20352070
}
20362071
},
@@ -2248,6 +2283,27 @@
22482283
"smithy.api#documentation": "<p>Returns information about the control, including the scope of the control, if enabled, and the Regions in which the control 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> <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>"
22492284
}
22502285
},
2286+
"com.amazonaws.controlcatalog#RelatedControlMappingDetails": {
2287+
"type": "structure",
2288+
"members": {
2289+
"ControlArn": {
2290+
"target": "com.amazonaws.controlcatalog#ControlArn",
2291+
"traits": {
2292+
"smithy.api#documentation": "<p>The unique identifier of a control.</p>"
2293+
}
2294+
},
2295+
"RelationType": {
2296+
"target": "com.amazonaws.controlcatalog#ControlRelationType",
2297+
"traits": {
2298+
"smithy.api#documentation": "<p>Returns an enumerated value that represents the relationship between two or more controls.</p>",
2299+
"smithy.api#required": {}
2300+
}
2301+
}
2302+
},
2303+
"traits": {
2304+
"smithy.api#documentation": "<p>A structure that describes a control's relationship status with other controls.</p>"
2305+
}
2306+
},
22512307
"com.amazonaws.controlcatalog#ResourceNotFoundException": {
22522308
"type": "structure",
22532309
"members": {

0 commit comments

Comments
 (0)