AWS Native is in preview. AWS Classic is fully supported.
aws-native.organizations.getPolicy
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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
- 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 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
- List<Pulumi.
Aws Native. 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.
- Target
Ids 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
- 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 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
- 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 []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
- aws
Managed 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
- 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.
- target
Ids 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
- aws
Managed 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
- 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 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
- 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
- aws
Managed 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
- 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.
- target
Ids List<String> - List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
Supporting Types
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.