Skip to content

Commit

Permalink
feat(client-controltower): Adds support for child enabled baselines w…
Browse files Browse the repository at this point in the history
…hich allow you to see the enabled baseline status for individual accounts.
  • Loading branch information
awstools committed Nov 20, 2024
1 parent 9c56b96 commit d9ff29d
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export interface GetEnabledBaselineCommandOutput extends GetEnabledBaselineOutpu
* // baselineIdentifier: "STRING_VALUE", // required
* // baselineVersion: "STRING_VALUE",
* // targetIdentifier: "STRING_VALUE", // required
* // parentIdentifier: "STRING_VALUE",
* // statusSummary: { // EnablementStatusSummary
* // status: "SUCCEEDED" || "FAILED" || "UNDER_CHANGE",
* // lastOperationIdentifier: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ export interface ListEnabledBaselinesCommandOutput extends ListEnabledBaselinesO
* baselineIdentifiers: [ // EnabledBaselineBaselineIdentifiers
* "STRING_VALUE",
* ],
* parentIdentifiers: [ // EnabledBaselineParentIdentifiers
* "STRING_VALUE",
* ],
* },
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* includeChildren: true || false,
* };
* const command = new ListEnabledBaselinesCommand(input);
* const response = await client.send(command);
Expand All @@ -58,6 +62,7 @@ export interface ListEnabledBaselinesCommandOutput extends ListEnabledBaselinesO
* // baselineIdentifier: "STRING_VALUE", // required
* // baselineVersion: "STRING_VALUE",
* // targetIdentifier: "STRING_VALUE", // required
* // parentIdentifier: "STRING_VALUE",
* // statusSummary: { // EnablementStatusSummary
* // status: "SUCCEEDED" || "FAILED" || "UNDER_CHANGE",
* // lastOperationIdentifier: "STRING_VALUE",
Expand Down
24 changes: 24 additions & 0 deletions clients/client-controltower/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,12 @@ export interface EnabledBaselineDetails {
*/
targetIdentifier: string | undefined;

/**
* <p>An ARN that represents the parent <code>EnabledBaseline</code> at the Organizational Unit (OU) level, from which the child <code>EnabledBaseline</code> inherits its configuration. The value is returned by <code>GetEnabledBaseline</code>.</p>
* @public
*/
parentIdentifier?: string | undefined;

/**
* <p>The deployment summary of an <code>EnabledControl</code> or <code>EnabledBaseline</code> resource.</p>
* @public
Expand Down Expand Up @@ -877,6 +883,12 @@ export interface EnabledBaselineFilter {
* @public
*/
baselineIdentifiers?: string[] | undefined;

/**
* <p>An optional filter that sets up a list of <code>parentIdentifiers</code> to filter the results of the <code>ListEnabledBaseline</code> output.</p>
* @public
*/
parentIdentifiers?: string[] | undefined;
}

/**
Expand All @@ -900,6 +912,12 @@ export interface ListEnabledBaselinesInput {
* @public
*/
maxResults?: number | undefined;

/**
* <p>A value that can be set to include the child enabled baselines in responses. The default value is false.</p>
* @public
*/
includeChildren?: boolean | undefined;
}

/**
Expand Down Expand Up @@ -931,6 +949,12 @@ export interface EnabledBaselineSummary {
*/
targetIdentifier: string | undefined;

/**
* <p>An ARN that represents an object returned by <code>ListEnabledBaseline</code>, to describe an enabled baseline.</p>
* @public
*/
parentIdentifier?: string | undefined;

/**
* <p>The deployment summary of an <code>EnabledControl</code> or <code>EnabledBaseline</code> resource.</p>
* @public
Expand Down
4 changes: 4 additions & 0 deletions clients/client-controltower/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ export const se_ListEnabledBaselinesCommand = async (
body = JSON.stringify(
take(input, {
filter: (_) => _json(_),
includeChildren: [],
maxResults: [],
nextToken: [],
})
Expand Down Expand Up @@ -1564,6 +1565,8 @@ const se_EnabledBaselineParameters = (input: EnabledBaselineParameter[], context
});
};

// se_EnabledBaselineParentIdentifiers omitted.

// se_EnabledBaselineTargetIdentifiers omitted.

// se_EnabledControlFilter omitted.
Expand Down Expand Up @@ -1692,6 +1695,7 @@ const de_EnabledBaselineDetails = (output: any, context: __SerdeContext): Enable
baselineIdentifier: __expectString,
baselineVersion: __expectString,
parameters: (_: any) => de_EnabledBaselineParameterSummaries(_, context),
parentIdentifier: __expectString,
statusSummary: _json,
targetIdentifier: __expectString,
}) as any;
Expand Down
37 changes: 37 additions & 0 deletions codegen/sdk-codegen/aws-models/controltower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,12 @@
"smithy.api#required": {}
}
},
"parentIdentifier": {
"target": "com.amazonaws.controltower#Arn",
"traits": {
"smithy.api#documentation": "<p>An ARN that represents the parent <code>EnabledBaseline</code> at the Organizational Unit (OU) level, from which the child <code>EnabledBaseline</code> inherits its configuration. The value is returned by <code>GetEnabledBaseline</code>.</p>"
}
},
"statusSummary": {
"target": "com.amazonaws.controltower#EnablementStatusSummary",
"traits": {
Expand Down Expand Up @@ -2040,6 +2046,12 @@
"traits": {
"smithy.api#documentation": "<p>Identifiers for the <code>Baseline</code> objects returned as part of the filter operation.</p>"
}
},
"parentIdentifiers": {
"target": "com.amazonaws.controltower#EnabledBaselineParentIdentifiers",
"traits": {
"smithy.api#documentation": "<p>An optional filter that sets up a list of <code>parentIdentifiers</code> to filter the results of the <code>ListEnabledBaseline</code> output.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2105,6 +2117,18 @@
"target": "com.amazonaws.controltower#EnabledBaselineParameter"
}
},
"com.amazonaws.controltower#EnabledBaselineParentIdentifiers": {
"type": "list",
"member": {
"target": "com.amazonaws.controltower#Arn"
},
"traits": {
"smithy.api#length": {
"min": 1,
"max": 5
}
}
},
"com.amazonaws.controltower#EnabledBaselineResource": {
"type": "resource",
"identifiers": {
Expand Down Expand Up @@ -2168,6 +2192,12 @@
"smithy.api#required": {}
}
},
"parentIdentifier": {
"target": "com.amazonaws.controltower#Arn",
"traits": {
"smithy.api#documentation": "<p>An ARN that represents an object returned by <code>ListEnabledBaseline</code>, to describe an enabled baseline.</p>"
}
},
"statusSummary": {
"target": "com.amazonaws.controltower#EnablementStatusSummary",
"traits": {
Expand Down Expand Up @@ -3544,6 +3574,13 @@
"traits": {
"smithy.api#documentation": "<p>The maximum number of results to be shown.</p>"
}
},
"includeChildren": {
"target": "smithy.api#Boolean",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>A value that can be set to include the child enabled baselines in responses. The default value is false.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit d9ff29d

Please sign in to comment.