List Targets For Policy
| organizations_list_targets_for_policy | R Documentation |
Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to¶
Description¶
Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to.
When calling List* operations, always check the NextToken response
parameter value, even if you receive an empty result set. These
operations can occasionally return an empty set of results even when
more results are available. Continue making requests until NextToken
returns null. A null NextToken value indicates that you have retrieved
all available results.
You can only call this operation from the management account or a member account that is a delegated administrator.
Usage¶
organizations_list_targets_for_policy(PolicyId, NextToken, MaxResults)
Arguments¶
PolicyId |
[required] ID for the policy whose attachments you want to know. The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_). |
NextToken |
The parameter for receiving additional results if you receive a
|
MaxResults |
The maximum number of items to return in the response. If more
results exist than the specified |
Value¶
A list with the following syntax:
list(
Targets = list(
list(
TargetId = "string",
Arn = "string",
Name = "string",
Type = "ACCOUNT"|"ORGANIZATIONAL_UNIT"|"ROOT"
)
),
NextToken = "string"
)
Request syntax¶
svc$list_targets_for_policy(
PolicyId = "string",
NextToken = "string",
MaxResults = 123
)
Examples¶
## Not run:
# The following example shows how to get the list of roots, OUs, and
# accounts to which the specified policy is attached:/n/n
svc$list_targets_for_policy(
PolicyId = "p-FullAWSAccess"
)
## End(Not run)