Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to.
Always check the NextToken response parameter for a null value when calling a List* operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
post/#X-Amz-Target=AWSOrganizationsV20161128.ListTargetsForPolicy
Query parameters
MaxResultsstring
Pagination limit
NextTokenstring
Pagination token
Headers
X-Amz-Target'AWSOrganizationsV20161128.ListTargetsForPolicy' required
Request body
Response
Success
Example response
{
"Targets": [
{
"Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
"Name": "Root",
"TargetId": "r-examplerootid111",
"Type": "ROOT"
},
{
"Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333;",
"Name": "Developer Test Account",
"TargetId": "333333333333",
"Type": "ACCOUNT"
},
{
"Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
"Name": "Accounting",
"TargetId": "ou-examplerootid111-exampleouid111",
"Type": "ORGANIZATIONAL_UNIT"
}
]
}