Skip to content

Commit d29df49

Browse files
Add CLI examples for ControTower APIs (aws#9452)
* Add CLI examples for ControTower APIs * fix control tower examples * fix enable-baseline Co-authored-by: Elysa <60367675+elysahall@users.noreply.github.com> * Update target identifier in enable-baseline example * Fix formatting in create-landing-zone.rst * Fix formatting issue in delete-landing-zone.rst * Fix formatting of disable-control.rst * Fix formatting in enable-control.rst * Fix newline at end of get-baseline-operation.rst * Fix missing newline at end of get-baseline.rst * Fix missing newline at end of get-control-operation.rst * Fix newline at end of get-enabled-baseline.rst * Fix formatting in get-enabled-control.rst * Fix formatting in get-landing-zone-operation.rst * Fix newline at end of get-landing-zone.rst * Fix formatting in list-baselines.rst * Fix formatting of the information link in documentation * Fix formatting * Fix formatting in list-enabled-controls.rst * Fix formatting of landing zone operations documentation * Fix formatting in list-landing-zones.rst * Fix formatting of list-tags-for-resource.rst * Fix missing newline at end of reset-enabled-baseline.rst * Fix missing newline at end of reset-enabled-control.rst * Fix newline at end of reset-landing-zone.rst * Fix formatting in tag-resource.rst * Fix formatting of resource untagging documentation * Fix formatting issue in update-enabled-baseline.rst * Fix missing newline at end of update-enabled-control.rst * Fix formatting in update-landing-zone.rst * Fix formatting in delete-landing-zone.rst * Fix formatting in update-landing-zone.rst * Update get-landing-zone.rst with user guide link Added a reference to the AWS Control Tower User Guide. * Update example ARN in update-enabled-control.rst * Apply suggestion from @elysahall Co-authored-by: Elysa <60367675+elysahall@users.noreply.github.com> * Fix formatting by removing extra newline Remove extra newline before the output note. * Fix typo in list-enabled-controls documentation * Fix statusMessage formatting in list-control-operations.rst * Update centralized logging account ID and KMS key ARN * Fix grammar in get-landing-zone-operation example * Update get-landing-zone-operation.rst * Fix grammatical error in get-enabled-control example * Update get-enabled-baseline.rst * Update get-control-operation.rst * Fix grammatical error in get-baseline-operation example * Clean up enable-baseline.rst content Removed redundant information and example header. * Simplify update-enabled-baseline example Removed redundant information about baseline types. * Fix grammatical error in documentation example --------- Co-authored-by: Elysa <60367675+elysahall@users.noreply.github.com>
1 parent 99acb35 commit d29df49

28 files changed

Lines changed: 661 additions & 0 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**To create a Control Tower landing zone**
2+
3+
The following ``create-landing-zone`` example creates AWS Control Tower landing zone. ::
4+
5+
aws controltower create-landing-zone \
6+
--landing-zone-version 3.3 \
7+
--manifest "file://LandingZoneManifest.json"
8+
9+
Output::
10+
11+
{
12+
"arn": "arn:aws:controltower:us-east-1:123456789012:landingzone/13CJG46WZKXXX4X5",
13+
"operationIdentifier": "55XXXXXX-e2XX-41XX-a7XX-446XXXXXXXXX"
14+
}
15+
16+
For more information, see `Getting started with AWS Control Tower <https://docs.aws.amazon.com/controltower/latest/userguide/getting-started-with-control-tower.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**To decommission a landing zone**
2+
3+
The following ``delete-landing-zone`` example decommissions the AWS Control Tower landing zone. ::
4+
5+
aws controltower delete-landing-zone \
6+
--landing-zone-identifier arn:aws:controltower:us-east-1:123456789012:landingzone/13CJG46WZKXXX4X5
7+
8+
Output::
9+
10+
{
11+
"operationIdentifier": "47XXXXXX-a6XX-82XX-c9XX-432XXXXXXXXX"
12+
}
13+
14+
For more information, see `Decommission an AWS Control Tower landing zone <https://docs.aws.amazon.com/controltower/latest/userguide/decommission-landing-zone.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**To disable a Control Tower baseline**
2+
3+
The following ``disable-baseline`` example disables an AWS Control Tower baseline. ::
4+
5+
aws controltower disable-baseline \
6+
--enabled-baseline-identifier arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XOM12BEL4YD578CQ2
7+
8+
Output::
9+
10+
{
11+
"operationIdentifier": "b33486d7-5396-4ad0-9eae-3a57969fe8cd"
12+
}
13+
14+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
**To disable a Control Tower control**
2+
3+
The following ``disable-control`` example disables an AWS Control Tower enabled control. ::
4+
5+
aws controltower disable-control \
6+
--control-identifier arn:aws:controlcatalog:::control/497wrm2xnk1wxlf4obrxxxxxx \
7+
--target-identifier arn:aws:organizations::123456789012:ou/o-s64ryxxxxx/ou-oqxx-i5wnxxxx
8+
9+
Output::
10+
11+
{
12+
"operationIdentifier": "b8f0dxxx-08xx-43xx-a2xx-568e9922xxxx"
13+
}
14+
15+
For more information, see `About controls in AWS Control Tower <https://docs.aws.amazon.com/controltower/latest/controlreference/controls.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
**Example 1: To enable a Control Tower baseline that is disabled**
2+
3+
The following ``enable-baseline`` example enables an AWS Control Tower baseline if baseline ``IdentityCenterBaseline`` is disabled. ::
4+
5+
aws controltower enable-baseline \
6+
--baseline-identifier arn:aws:controltower:us-east-1::baseline/17BSJV3IGJ2QSGA2 \
7+
--baseline-version 4.0 \
8+
--target-identifier arn:aws:organizations::123456789012:ou/o-s64ryixxxx/ou-oq9f-i5wnxxxx
9+
10+
Output::
11+
12+
{
13+
"arn": "arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XOM12BEL4YD578CQ2",
14+
"operationIdentifier": "51e190ac-8a37-4f6d-b63c-fb5104b5db38"
15+
}
16+
17+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.
18+
19+
**Example 2: To enable a Control Tower baseline that is enabled**
20+
21+
The following ``enable-baseline`` example enables an AWS Control Tower baseline if baseline ``IdentityCenterBaseline`` is enabled. ::
22+
23+
aws controltower enable-baseline \
24+
--baseline-identifier arn:aws:controltower:us-east-1::baseline/17BSJV3IGJ2QSGA2 \
25+
--baseline-version 4.0 \
26+
--target-identifier arn:aws:organizations::123456789012:ou/o-s64ryixxxx/ou-oqxx-i5wnxxxx \
27+
--parameters '[{"key":"IdentityCenterEnabledBaselineArn","value":"arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XAJNZNCBC1I386C7B"}]'
28+
29+
Output::
30+
31+
{
32+
"arn": "arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XOM12BEL4YD578CQ2",
33+
"operationIdentifier": "51e190ac-8a37-4f6d-b63c-fb5104b5db38"
34+
}
35+
36+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**To enable a Control Tower control**
2+
3+
The following ``enable-control`` example enables an AWS Control Tower control. ::
4+
5+
aws controltower enable-control \
6+
--control-identifier arn:aws:controlcatalog:::control/497wrm2xnk1wxlf4obrxxxxxx \
7+
--target-identifier arn:aws:organizations::123456789012:ou/o-s64ryxxxxx/ou-oqxx-i5wnxxxx
8+
9+
Output::
10+
11+
{
12+
"arn": "arn:aws:controltower:us-east-1:123456789012:enabledcontrol/18J5KBJ3W3VTIRLV",
13+
"operationIdentifier": "7691fc5a-de87-4540-8c95-b0aabd56382c"
14+
}
15+
16+
For more information, see `About controls in AWS Control Tower <https://docs.aws.amazon.com/controltower/latest/controlreference/controls.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**To get a Control Tower baseline operation**
2+
3+
The following ``get-baseline-operation`` example gets details of an AWS Control Tower baseline operation. ::
4+
5+
aws controltower get-baseline-operation \
6+
--operation-identifier "51e190ac-8a37-4f6d-b63c-fb5104b5db38"
7+
8+
Output::
9+
10+
{
11+
"baselineOperation": {
12+
"endTime": "2025-04-17T23:48:46+00:00",
13+
"operationIdentifier": "51e190ac-8a37-4f6d-b63c-fb5104b5db38",
14+
"operationType": "ENABLE_BASELINE",
15+
"startTime": "2025-04-17T23:46:37+00:00",
16+
"status": "SUCCEEDED",
17+
"statusMessage": "AWS Control Tower completed the baseline operation successfully."
18+
}
19+
}
20+
21+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**To get a Control Tower baseline**
2+
3+
The following ``get-baseline`` example gets details of an AWS Control Tower baseline. ::
4+
5+
aws controltower get-baseline \
6+
--baseline-identifier arn:aws:controltower:us-east-1::baseline/LN25R72TTG6IGPTQ
7+
8+
Output::
9+
10+
{
11+
"arn": "arn:aws:controltower:us-east-1::baseline/LN25R72TTG6IGPTQ",
12+
"description": "Sets up shared resources for AWS Identity Center, which prepares the AWSControlTowerBaseline to set up Identity Center access for accounts.",
13+
"name": "IdentityCenterBaseline"
14+
}
15+
16+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
**To get Control Tower control operations**
2+
3+
The following ``get-control-operation`` example gets details of an AWS Control Tower control operation. ::
4+
5+
aws controltower get-control-operation \
6+
--operation-identifier "7691fc5a-de87-4540-8c95-b0aabd56382c"
7+
8+
Output::
9+
10+
{
11+
"controlOperation": {
12+
"controlIdentifier": "arn:aws:controlcatalog:::control/497wrm2xnk1wxlf4obrdo7mej",
13+
"enabledControlIdentifier": "arn:aws:controltower:us-east-1:123456789012:enabledcontrol/18J5KBJ3W3VTIRLV",
14+
"endTime": "2025-04-17T03:08:55+00:00",
15+
"operationIdentifier": "7691fc5a-de87-4540-8c95-b0aabd56382c",
16+
"operationType": "ENABLE_CONTROL",
17+
"startTime": "2025-04-17T03:07:52+00:00",
18+
"status": "SUCCEEDED",
19+
"statusMessage": "Operation was successful.",
20+
"targetIdentifier": "arn:aws:organizations::123456789012:ou/o-s64ryixxxx/ou-oqxx-i5wnxxxx"
21+
}
22+
}
23+
24+
For more information, see `About controls in AWS Control Tower <https://docs.aws.amazon.com/controltower/latest/controlreference/controls.html>`__ in the *AWS Control Tower User Guide*.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
**To get a Control Tower enabled baseline**
2+
3+
The following ``get-enabled-baseline`` example gets details of an AWS Control Tower enabled baseline. ::
4+
5+
aws controltower get-enabled-baseline \
6+
--enabled-baseline-identifier arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XOM12BEL4YD578CQ2
7+
8+
Output::
9+
10+
{
11+
"enabledBaselineDetails": {
12+
"arn": "arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XOM12BEL4YD578CQ2",
13+
"baselineIdentifier": "arn:aws:controltower:us-east-1::baseline/17BSJV3IGJ2QSGA2",
14+
"baselineVersion": "4.0",
15+
"parameters": [
16+
{
17+
"key": "IdentityCenterEnabledBaselineArn",
18+
"value": "arn:aws:controltower:us-east-1:123456789012:enabledbaseline/XAJNZNCBC1I386C7B"
19+
}
20+
],
21+
"statusSummary": {
22+
"lastOperationIdentifier": "51e190ac-8a37-4f6d-b63c-fb5104b5db38",
23+
"status": "SUCCEEDED"
24+
},
25+
"targetIdentifier": "arn:aws:organizations::123456789012:ou/o-3onqfufxxx/ou-g8xx-5kluxxxx"
26+
}
27+
}
28+
29+
For more information, see `Types of baselines <https://docs.aws.amazon.com/controltower/latest/userguide/types-of-baselines.html>`__ in the *AWS Control Tower User Guide*.

0 commit comments

Comments
 (0)