# AWS::Organizations::Policy 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. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{
    "Type" : "AWS::Organizations::Policy",
    "Properties" : {
        "Name" : String,
        "Type" : String,
        "Content" : Map, String,
        "Description" : String,
        "TargetIds" : [ String, ... ],
        "Tags" : [ Tag, ... ],
    }
}
### YAML
Type: AWS::Organizations::Policy
Properties:
    Name: String
    Type: String
    Content: Map, String
    Description: String
    TargetIds: 
      - String
    Tags: 
      - Tag
## Properties #### Name Name of the Policy _Required_: Yes _Type_: String _Minimum Length_: 1 _Maximum Length_: 128 _Pattern_: [\s\S]* _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### 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 _Required_: Yes _Type_: String _Allowed Values_: SERVICE_CONTROL_POLICY | AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | TAG_POLICY _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### Content 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. _Required_: Yes _Type_: Map, String _Minimum Length_: 1 _Maximum Length_: 1000000 _Pattern_: [\s\S]* _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Description Human readable description of the policy _Required_: No _Type_: String _Maximum Length_: 512 _Pattern_: [\s\S]* _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### TargetIds List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to _Required_: No _Type_: List of String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Tags 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. _Required_: No _Type_: List of Tag _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) ## Return Values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Id. ### Fn::GetAtt The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values. For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). #### Id Id of the Policy #### Arn ARN of the Policy #### AwsManaged 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.