aws.organizations.list_targets_for_policy
Example SQL Queries
SELECT * FROMaws.organizations.list_targets_for_policyWHERE"policy_id" = 'VALUE';Description
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.
Table Definition
| Column Name | Column Data Type |
|---|---|
| policy_id Required Input Column The unique identifier (ID) of 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 (_). | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| arn The Amazon Resource Name (ARN) of the policy target. For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the Amazon Web Services Service Authorization Reference. | VARCHAR |
| name The friendly name of the policy target. The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range. | VARCHAR |
| target_id The unique identifier (ID) of the policy target. The regex pattern for a target ID string requires one of the following:
| VARCHAR |
| type The type of the policy target. | VARCHAR |