1. Packages
  2. AWS
  3. API Docs
  4. organizations
  5. getPoliciesForTarget
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.organizations.getPoliciesForTarget

Explore with Pulumi AI

AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

Data source for managing an AWS Organizations Policies For Target.

Example Usage

Using getPoliciesForTarget

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPoliciesForTarget(args: GetPoliciesForTargetArgs, opts?: InvokeOptions): Promise<GetPoliciesForTargetResult>
function getPoliciesForTargetOutput(args: GetPoliciesForTargetOutputArgs, opts?: InvokeOptions): Output<GetPoliciesForTargetResult>
Copy
def get_policies_for_target(filter: Optional[str] = None,
                            target_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPoliciesForTargetResult
def get_policies_for_target_output(filter: Optional[pulumi.Input[str]] = None,
                            target_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesForTargetResult]
Copy
func GetPoliciesForTarget(ctx *Context, args *GetPoliciesForTargetArgs, opts ...InvokeOption) (*GetPoliciesForTargetResult, error)
func GetPoliciesForTargetOutput(ctx *Context, args *GetPoliciesForTargetOutputArgs, opts ...InvokeOption) GetPoliciesForTargetResultOutput
Copy

> Note: This function is named GetPoliciesForTarget in the Go SDK.

public static class GetPoliciesForTarget 
{
    public static Task<GetPoliciesForTargetResult> InvokeAsync(GetPoliciesForTargetArgs args, InvokeOptions? opts = null)
    public static Output<GetPoliciesForTargetResult> Invoke(GetPoliciesForTargetInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPoliciesForTargetResult> getPoliciesForTarget(GetPoliciesForTargetArgs args, InvokeOptions options)
public static Output<GetPoliciesForTargetResult> getPoliciesForTarget(GetPoliciesForTargetArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:organizations/getPoliciesForTarget:getPoliciesForTarget
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filter This property is required. string
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
TargetId This property is required. string
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
Filter This property is required. string
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
TargetId This property is required. string
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
filter This property is required. String
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
targetId This property is required. String
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
filter This property is required. string
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
targetId This property is required. string
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
filter This property is required. str
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
target_id This property is required. str
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
filter This property is required. String
Must supply one of the 5 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
targetId This property is required. String
The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)

getPoliciesForTarget Result

The following output properties are available:

Filter string
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
List of all the policy ids found.
TargetId string
Filter string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
List of all the policy ids found.
TargetId string
filter String
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
List of all the policy ids found.
targetId String
filter string
id string
The provider-assigned unique ID for this managed resource.
ids string[]
List of all the policy ids found.
targetId string
filter str
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
List of all the policy ids found.
target_id str
filter String
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
List of all the policy ids found.
targetId String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi