We recommend new projects start with resources from the AWS provider.
aws-native.organizations.Policy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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.
Create Policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);@overload
def Policy(resource_name: str,
           args: PolicyArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           content: Optional[Any] = None,
           type: Optional[PolicyType] = None,
           description: Optional[str] = None,
           name: Optional[str] = None,
           tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
           target_ids: Optional[Sequence[str]] = None)func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: aws-native:organizations:Policy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Policy resource accepts the following input properties:
- 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::Policyfor more information about the expected schema for this property.
- Type
Pulumi.Aws Native. Organizations. Policy Type 
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- Description string
- Human readable description of the policy
- Name string
- Name of the Policy
- 
List<Pulumi.Aws Native. Inputs. 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
- 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::Policyfor more information about the expected schema for this property.
- Type
PolicyType 
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- Description string
- Human readable description of the policy
- Name string
- Name of the Policy
- 
TagArgs 
- 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
- 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::Policyfor more information about the expected schema for this property.
- type
PolicyType 
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- description String
- Human readable description 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.
- targetIds List<String>
- List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
- 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::Policyfor more information about the expected schema for this property.
- type
PolicyType 
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- description string
- Human readable description 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.
- targetIds string[]
- List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
- 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::Policyfor more information about the expected schema for this property.
- type
PolicyType 
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- description str
- Human readable description of the policy
- name str
- Name of the Policy
- 
Sequence[TagArgs] 
- 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
- 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::Policyfor more information about the expected schema for this property.
- type "SERVICE_CONTROL_POLICY" | "AISERVICES_OPT_OUT_POLICY" | "BACKUP_POLICY" | "TAG_POLICY" | "CHATBOT_POLICY" | "RESOURCE_CONTROL_POLICY" | "DECLARATIVE_POLICY_EC2"
- The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY, CHATBOT_POLICY, RESOURCE_CONTROL_POLICY,DECLARATIVE_POLICY_EC2
- description String
- Human readable description 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.
- targetIds List<String>
- List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- Arn string
- ARN of the Policy
- AwsId string
- Id 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- Arn string
- ARN of the Policy
- AwsId string
- Id 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- arn String
- ARN of the Policy
- awsId String
- Id 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.
- id String
- The provider-assigned unique ID for this managed resource.
- arn string
- ARN of the Policy
- awsId string
- Id 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.
- id string
- The provider-assigned unique ID for this managed resource.
- arn str
- ARN of the Policy
- aws_id str
- Id 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.
- id str
- The provider-assigned unique ID for this managed resource.
- arn String
- ARN of the Policy
- awsId String
- Id 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.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
PolicyType, PolicyTypeArgs    
- ServiceControl Policy 
- SERVICE_CONTROL_POLICY
- AiservicesOpt Out Policy 
- AISERVICES_OPT_OUT_POLICY
- BackupPolicy 
- BACKUP_POLICY
- TagPolicy 
- TAG_POLICY
- ChatbotPolicy 
- CHATBOT_POLICY
- ResourceControl Policy 
- RESOURCE_CONTROL_POLICY
- DeclarativePolicy Ec2 
- DECLARATIVE_POLICY_EC2
- PolicyType Service Control Policy 
- SERVICE_CONTROL_POLICY
- PolicyType Aiservices Opt Out Policy 
- AISERVICES_OPT_OUT_POLICY
- PolicyType Backup Policy 
- BACKUP_POLICY
- PolicyType Tag Policy 
- TAG_POLICY
- PolicyType Chatbot Policy 
- CHATBOT_POLICY
- PolicyType Resource Control Policy 
- RESOURCE_CONTROL_POLICY
- PolicyType Declarative Policy Ec2 
- DECLARATIVE_POLICY_EC2
- ServiceControl Policy 
- SERVICE_CONTROL_POLICY
- AiservicesOpt Out Policy 
- AISERVICES_OPT_OUT_POLICY
- BackupPolicy 
- BACKUP_POLICY
- TagPolicy 
- TAG_POLICY
- ChatbotPolicy 
- CHATBOT_POLICY
- ResourceControl Policy 
- RESOURCE_CONTROL_POLICY
- DeclarativePolicy Ec2 
- DECLARATIVE_POLICY_EC2
- ServiceControl Policy 
- SERVICE_CONTROL_POLICY
- AiservicesOpt Out Policy 
- AISERVICES_OPT_OUT_POLICY
- BackupPolicy 
- BACKUP_POLICY
- TagPolicy 
- TAG_POLICY
- ChatbotPolicy 
- CHATBOT_POLICY
- ResourceControl Policy 
- RESOURCE_CONTROL_POLICY
- DeclarativePolicy Ec2 
- DECLARATIVE_POLICY_EC2
- SERVICE_CONTROL_POLICY
- SERVICE_CONTROL_POLICY
- AISERVICES_OPT_OUT_POLICY
- AISERVICES_OPT_OUT_POLICY
- BACKUP_POLICY
- BACKUP_POLICY
- TAG_POLICY
- TAG_POLICY
- CHATBOT_POLICY
- CHATBOT_POLICY
- RESOURCE_CONTROL_POLICY
- RESOURCE_CONTROL_POLICY
- DECLARATIVE_POLICY_EC2
- DECLARATIVE_POLICY_EC2
- "SERVICE_CONTROL_POLICY"
- SERVICE_CONTROL_POLICY
- "AISERVICES_OPT_OUT_POLICY"
- AISERVICES_OPT_OUT_POLICY
- "BACKUP_POLICY"
- BACKUP_POLICY
- "TAG_POLICY"
- TAG_POLICY
- "CHATBOT_POLICY"
- CHATBOT_POLICY
- "RESOURCE_CONTROL_POLICY"
- RESOURCE_CONTROL_POLICY
- "DECLARATIVE_POLICY_EC2"
- DECLARATIVE_POLICY_EC2
Tag, TagArgs  
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.