Skip to content

Commit

Permalink
feat(client-controltower): This release adds the following support: 1…
Browse files Browse the repository at this point in the history
…. The EnableControl API can configure controls that are configurable. 2. The GetEnabledControl API shows the configured parameters on an enabled control. 3. The new UpdateEnabledControl API can change parameters on an enabled control.
  • Loading branch information
awstools committed Nov 27, 2023
1 parent 8a6764a commit 4b14e8f
Show file tree
Hide file tree
Showing 24 changed files with 833 additions and 217 deletions.
14 changes: 11 additions & 3 deletions clients/client-controltower/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

AWS SDK for JavaScript ControlTower Client for Node.js, Browser and React Native.

<p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
<i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
<p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
<i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
<p>To call these APIs, you'll need to know:</p>
<ul>
<li>
Expand All @@ -21,7 +21,7 @@ AWS SDK for JavaScript ControlTower Client for Node.js, Browser and React Native
</li>
</ul>
<p>
<b>To get the <code>controlIdentifier</code> for your AWS Control Tower
<b>To get the <code>controlIdentifier</code> for your Amazon Web Services Control Tower
control:</b>
</p>
<p>The <code>controlIdentifier</code> is an ARN that is specified for each
Expand Down Expand Up @@ -419,6 +419,14 @@ UntagResource

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/controltower/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controltower/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controltower/Interface/UntagResourceCommandOutput/)

</details>
<details>
<summary>
UpdateEnabledControl
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/controltower/command/UpdateEnabledControlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controltower/Interface/UpdateEnabledControlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-controltower/Interface/UpdateEnabledControlCommandOutput/)

</details>
<details>
<summary>
Expand Down
29 changes: 26 additions & 3 deletions clients/client-controltower/src/ControlTower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ import {
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateEnabledControlCommand,
UpdateEnabledControlCommandInput,
UpdateEnabledControlCommandOutput,
} from "./commands/UpdateEnabledControlCommand";
import {
UpdateLandingZoneCommand,
UpdateLandingZoneCommandInput,
Expand All @@ -90,6 +95,7 @@ const commands = {
ResetLandingZoneCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateEnabledControlCommand,
UpdateLandingZoneCommand,
};

Expand Down Expand Up @@ -308,6 +314,23 @@ export interface ControlTower {
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;

/**
* @see {@link UpdateEnabledControlCommand}
*/
updateEnabledControl(
args: UpdateEnabledControlCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateEnabledControlCommandOutput>;
updateEnabledControl(
args: UpdateEnabledControlCommandInput,
cb: (err: any, data?: UpdateEnabledControlCommandOutput) => void
): void;
updateEnabledControl(
args: UpdateEnabledControlCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateEnabledControlCommandOutput) => void
): void;

/**
* @see {@link UpdateLandingZoneCommand}
*/
Expand All @@ -328,8 +351,8 @@ export interface ControlTower {

/**
* @public
* <p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
* <i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
* <p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
* <i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
* <p>To call these APIs, you'll need to know:</p>
* <ul>
* <li>
Expand All @@ -343,7 +366,7 @@ export interface ControlTower {
* </li>
* </ul>
* <p>
* <b>To get the <code>controlIdentifier</code> for your AWS Control Tower
* <b>To get the <code>controlIdentifier</code> for your Amazon Web Services Control Tower
* control:</b>
* </p>
* <p>The <code>controlIdentifier</code> is an ARN that is specified for each
Expand Down
12 changes: 9 additions & 3 deletions clients/client-controltower/src/ControlTowerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ import {
import { ResetLandingZoneCommandInput, ResetLandingZoneCommandOutput } from "./commands/ResetLandingZoneCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import {
UpdateEnabledControlCommandInput,
UpdateEnabledControlCommandOutput,
} from "./commands/UpdateEnabledControlCommand";
import { UpdateLandingZoneCommandInput, UpdateLandingZoneCommandOutput } from "./commands/UpdateLandingZoneCommand";
import {
ClientInputEndpointParameters,
Expand Down Expand Up @@ -106,6 +110,7 @@ export type ServiceInputTypes =
| ResetLandingZoneCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateEnabledControlCommandInput
| UpdateLandingZoneCommandInput;

/**
Expand All @@ -126,6 +131,7 @@ export type ServiceOutputTypes =
| ResetLandingZoneCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateEnabledControlCommandOutput
| UpdateLandingZoneCommandOutput;

/**
Expand Down Expand Up @@ -300,8 +306,8 @@ export interface ControlTowerClientResolvedConfig extends ControlTowerClientReso

/**
* @public
* <p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
* <i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
* <p>These interfaces allow you to apply the Amazon Web Services library of pre-defined
* <i>controls</i> to your organizational units, programmatically. In Amazon Web Services Control Tower, the terms "control" and "guardrail" are synonyms.</p>
* <p>To call these APIs, you'll need to know:</p>
* <ul>
* <li>
Expand All @@ -315,7 +321,7 @@ export interface ControlTowerClientResolvedConfig extends ControlTowerClientReso
* </li>
* </ul>
* <p>
* <b>To get the <code>controlIdentifier</code> for your AWS Control Tower
* <b>To get the <code>controlIdentifier</code> for your Amazon Web Services Control Tower
* control:</b>
* </p>
* <p>The <code>controlIdentifier</code> is an ARN that is specified for each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface CreateLandingZoneCommandOutput extends CreateLandingZoneOutput,

/**
* @public
* <p>Creates a new landing zone. This starts an asynchronous operation that creates and configures a landing zone
* based on the parameters specified in the manifest JSON file. </p>
* <p>Creates a new landing zone. This API call starts an asynchronous operation that creates and configures a landing zone,
* based on the parameters specified in the manifest JSON file.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -71,16 +71,16 @@ export interface CreateLandingZoneCommandOutput extends CreateLandingZoneOutput,
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
* <p>Updating or deleting the resource can cause an inconsistent state.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface DeleteLandingZoneCommandOutput extends DeleteLandingZoneOutput,

/**
* @public
* <p>This decommissions a landing zone. This starts an asynchronous operation that deletes Amazon Web Services Control Tower
* resources deployed in Amazon Web Services Control Tower managed accounts. </p>
* <p>Decommissions a landing zone. This API call starts an asynchronous operation that deletes Amazon Web Services Control Tower
* resources deployed in accounts managed by Amazon Web Services Control Tower.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -66,19 +66,19 @@ export interface DeleteLandingZoneCommandOutput extends DeleteLandingZoneOutput,
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
* <p>Updating or deleting the resource can cause an inconsistent state.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ export interface DisableControlCommandOutput extends DisableControlOutput, __Met
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
* <p>Updating or deleting the resource can cause an inconsistent state.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.</p>
* <p>The request would cause a service quota to be exceeded. The limit is 10 concurrent operations.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
18 changes: 12 additions & 6 deletions clients/client-controltower/src/commands/EnableControlCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export interface EnableControlCommandOutput extends EnableControlOutput, __Metad
* tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* parameters: [ // EnabledControlParameters
* { // EnabledControlParameter
* key: "STRING_VALUE", // required
* value: "DOCUMENT_VALUE", // required
* },
* ],
* };
* const command = new EnableControlCommand(input);
* const response = await client.send(command);
Expand All @@ -74,22 +80,22 @@ export interface EnableControlCommandOutput extends EnableControlOutput, __Metad
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
* <p>Updating or deleting the resource can cause an inconsistent state.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>Request would cause a service quota to be exceeded. The limit is 10 concurrent operations.</p>
* <p>The request would cause a service quota to be exceeded. The limit is 10 concurrent operations.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ export interface GetControlOperationCommandOutput extends GetControlOperationOut
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export interface GetEnabledControlCommandOutput extends GetEnabledControlOutput,
* // driftStatusSummary: { // DriftStatusSummary
* // driftStatus: "DRIFTED" || "IN_SYNC" || "NOT_CHECKING" || "UNKNOWN",
* // },
* // parameters: [ // EnabledControlParameterSummaries
* // { // EnabledControlParameterSummary
* // key: "STRING_VALUE", // required
* // value: "DOCUMENT_VALUE", // required
* // },
* // ],
* // },
* // };
*
Expand All @@ -83,16 +89,16 @@ export interface GetEnabledControlCommandOutput extends GetEnabledControlOutput,
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface GetLandingZoneCommandOutput extends GetLandingZoneOutput, __Met

/**
* @public
* <p>Returns details about the landing zone. Displays a message in case of error. </p>
* <p>Returns details about the landing zone. Displays a message in case of error.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -74,16 +74,16 @@ export interface GetLandingZoneCommandOutput extends GetLandingZoneOutput, __Met
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface GetLandingZoneOperationCommandOutput extends GetLandingZoneOper
/**
* @public
* <p>Returns the status of the specified landing zone operation. Details for an operation are available for
* X days. </p>
* 60 days.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -72,16 +72,16 @@ export interface GetLandingZoneOperationCommandOutput extends GetLandingZoneOper
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
* <p>An unexpected error occurred during processing of a request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
* <p>The request references a resource that does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
* <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link ControlTowerServiceException}
* <p>Base exception class for all service exceptions from ControlTower service.</p>
Expand Down
Loading

0 comments on commit 4b14e8f

Please sign in to comment.