AWS AWSEC2 documentation change
Summary
Updated documentation for retrieving organization/OU ARNs with corrected CLI references, added PowerShell examples, and clarified required permissions
Security assessment
Added 'Required permissions' section emphasizes IAM access requirements, but there's no evidence of addressing a specific vulnerability. The change improves security documentation by clarifying permission requirements for ARN retrieval operations.
Diff
diff --git a/AWSEC2/latest/UserGuide/get-org-ou-ARN.md b/AWSEC2/latest/UserGuide/get-org-ou-ARN.md index e6b5193c0..e6c1a42ac 100644 --- a//AWSEC2/latest/UserGuide/get-org-ou-ARN.md +++ b//AWSEC2/latest/UserGuide/get-org-ou-ARN.md @@ -7 +7,3 @@ -The organization and the organizational unit ARNs contain the 12-digit management account number. If you don't know the management account number, you can describe the organization and the organizational unit to get the ARN for each. In the following examples, `123456789012` is the management account number. +The organization and the organizational unit ARNs contain the 12-digit management account number. If you don't know the management account number, you can describe the organization and the organizational unit to get the ARN for each. In the following examples, `123456789012` is the account ID of the management account. + +###### Required permissions @@ -24,0 +27,3 @@ Before you can get the ARNs, you must have the permission to describe organizati +AWS CLI + + @@ -27 +32 @@ Before you can get the ARNs, you must have the permission to describe organizati -Use the [describe-organization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-organization.html) command and the `--query` parameter set to `'Organization.Arn'` to return only the organization ARN. +Use the [describe-organization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-organization.html) command. Add the `--query` option to return only the organization ARN. @@ -32 +37,30 @@ Use the [describe-organization](https://awscli.amazonaws.com/v2/documentation/ap -Example response +The following is example output. + + + "arn:aws:organizations::123456789012:organization/o-1234567abc" + +###### To get the ARN of an organizational unit + +Use the [describe-organizational-unit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-organizational-unit.html) command. Use the `--query` parameter to return only the organizational unit ARN. + + + aws organizations describe-organizational-unit \ + --organizational-unit-id ou-a123-b4567890 \ + --query 'OrganizationalUnit.Arn' + +The following is example output. + + + "arn:aws:organizations::123456789012:ou/o-1234567abc/ou-a123-b4567890" + +PowerShell + + +###### To get the ARN of an organization + +Use the [Get-ORGOrganization](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-ORGOrganization.html) cmdlet. + + + (Get-ORGOrganization).Arn + +The following is example output. @@ -35 +69 @@ Example response - "arn:aws:organizations::123456789012:organization/o-123example" + arn:aws:organizations::123456789012:organization/o-1234567abc @@ -39 +73 @@ Example response -Use the [describe-organizational-unit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-organizational-unit.html) command, specify the OU ID, and set the `--query` parameter to `'OrganizationalUnit.Arn'` to return only the organizational unit ARN. +Use the [Get-ORGOrganizationalUnit](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-ORGOrganizationalUnit.html) cmdlet. @@ -42 +76 @@ Use the [describe-organizational-unit](https://awscli.amazonaws.com/v2/documenta - aws organizations describe-organizational-unit --organizational-unit-id ou-1234-5example --query 'OrganizationalUnit.Arn' + (Get-ORGOrganizationalUnit -OrganizationalUnitId "ou-a123-b4567890").Arn @@ -44 +78 @@ Use the [describe-organizational-unit](https://awscli.amazonaws.com/v2/documenta -The following is an example response. +The following is example output. @@ -47 +81 @@ The following is an example response. - "arn:aws:organizations::123456789012:ou/o-123example/ou-1234-5example" + arn:aws:organizations::123456789012:ou/o-1234567abc/ou-a123-b4567890