1. Packages
  2. AWS Native
  3. API Docs
  4. organizations
  5. getPolicy

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.organizations.getPolicy

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Policies in AWS Organizations enable you to manage different features of the AWS accounts in your organization. You can use policies when all features are enabled in your organization.

    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(id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetPolicyResult
    def get_policy_output(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-native:organizations:getPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Id of the Policy
    Id string
    Id of the Policy
    id String
    Id of the Policy
    id string
    Id of the Policy
    id str
    Id of the Policy
    id String
    Id of the Policy

    getPolicy Result

    The following output properties are available:

    Arn string
    ARN of the Policy
    AwsManaged bool
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    Content object

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    Description string
    Human readable description of the policy
    Id string
    Id of the Policy
    Name string
    Name of the Policy
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    TargetIds List<string>
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
    Arn string
    ARN of the Policy
    AwsManaged bool
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    Content interface{}

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    Description string
    Human readable description of the policy
    Id string
    Id of the Policy
    Name string
    Name of the Policy
    Tags Tag
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    TargetIds []string
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
    arn String
    ARN of the Policy
    awsManaged Boolean
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    content Object

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    description String
    Human readable description of the policy
    id String
    Id of the Policy
    name String
    Name of the Policy
    tags List<Tag>
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    targetIds List<String>
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
    arn string
    ARN of the Policy
    awsManaged boolean
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    content any

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    description string
    Human readable description of the policy
    id string
    Id of the Policy
    name string
    Name of the Policy
    tags Tag[]
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    targetIds string[]
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
    arn str
    ARN of the Policy
    aws_managed bool
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    content Any

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    description str
    Human readable description of the policy
    id str
    Id of the Policy
    name str
    Name of the Policy
    tags Sequence[root_Tag]
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    target_ids Sequence[str]
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
    arn String
    ARN of the Policy
    awsManaged Boolean
    A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.
    content Any

    The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it.

    Search the CloudFormation User Guide for AWS::Organizations::Policy for more information about the expected schema for this property.

    description String
    Human readable description of the policy
    id String
    Id of the Policy
    name String
    Name of the Policy
    tags List<Property Map>
    A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null.
    targetIds List<String>
    List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to

    Supporting Types

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi