1. Packages
  2. AWS
  3. API Docs
  4. organizations
  5. getPolicy
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.organizations.getPolicy

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for managing an AWS Organizations Policy.

    Example Usage

    Using getPolicy

    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 getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>
    function getPolicyOutput(args: GetPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyResult>
    def get_policy(policy_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetPolicyResult
    def get_policy_output(policy_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetPolicyResult]
    func LookupPolicy(ctx *Context, args *LookupPolicyArgs, opts ...InvokeOption) (*LookupPolicyResult, error)
    func LookupPolicyOutput(ctx *Context, args *LookupPolicyOutputArgs, opts ...InvokeOption) LookupPolicyResultOutput

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

    public static class GetPolicy 
    {
        public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyResult> Invoke(GetPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:organizations/getPolicy:getPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PolicyId string
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.
    PolicyId string
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.
    policyId String
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.
    policyId string
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.
    policy_id str
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.
    policyId String
    The unique identifier (ID) of the policy that you want more details on. Policy id starts with a "p-" followed by 8-28 lowercase or uppercase letters, digits, and underscores.

    getPolicy Result

    The following output properties are available:

    Arn string
    The Amazon Resource Name of the policy.
    AwsManaged bool
    Indicates if a policy is an AWS managed policy.
    Content string
    The text content of the policy.
    Description string
    The description of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The friendly name of the policy.
    PolicyId string
    Type string
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY
    Arn string
    The Amazon Resource Name of the policy.
    AwsManaged bool
    Indicates if a policy is an AWS managed policy.
    Content string
    The text content of the policy.
    Description string
    The description of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The friendly name of the policy.
    PolicyId string
    Type string
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY
    arn String
    The Amazon Resource Name of the policy.
    awsManaged Boolean
    Indicates if a policy is an AWS managed policy.
    content String
    The text content of the policy.
    description String
    The description of the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The friendly name of the policy.
    policyId String
    type String
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY
    arn string
    The Amazon Resource Name of the policy.
    awsManaged boolean
    Indicates if a policy is an AWS managed policy.
    content string
    The text content of the policy.
    description string
    The description of the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The friendly name of the policy.
    policyId string
    type string
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY
    arn str
    The Amazon Resource Name of the policy.
    aws_managed bool
    Indicates if a policy is an AWS managed policy.
    content str
    The text content of the policy.
    description str
    The description of the policy.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The friendly name of the policy.
    policy_id str
    type str
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY
    arn String
    The Amazon Resource Name of the policy.
    awsManaged Boolean
    Indicates if a policy is an AWS managed policy.
    content String
    The text content of the policy.
    description String
    The description of the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The friendly name of the policy.
    policyId String
    type String
    The type of policy values can be SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi