Class CfnPolicyProps
Properties for defining a CfnPolicy
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Organizations
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPolicyProps : Object, ICfnPolicyProps
Syntax (vb)
Public Class CfnPolicyProps
Inherits Object
Implements ICfnPolicyProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Organizations;
var content;
var cfnPolicyProps = new CfnPolicyProps {
Content = content,
Name = "name",
Type = "type",
// the properties below are optional
Description = "description",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetIds = new [] { "targetIds" }
};
Synopsis
Constructors
CfnPolicyProps() |
Properties
Content | The policy text content. You can specify the policy content as a JSON object or a JSON string. |
Description | Human readable description of the policy. |
Name | Name of the policy. |
Tags | A list of tags that you want to attach to the newly created policy. |
TargetIds | List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to. |
Type | The type of policy to create. |
Constructors
CfnPolicyProps()
public CfnPolicyProps()
Properties
Content
The policy text content. You can specify the policy content as a JSON object or a JSON string.
public object Content { get; set; }
Property Value
System.Object
Remarks
When you specify the policy content as a JSON string, you can't perform drift detection on the CloudFormation stack. For this reason, we recommend specifying the policy content as a JSON object instead.
The text that you supply must adhere to the rules of the policy type you specify in the Type
parameter. The following AWS Organizations quotas are enforced for the maximum size of a policy document:
For more information about Organizations service quotas, see Quotas for AWS Organizations in the AWS Organizations User Guide .
Description
Human readable description of the policy.
public string Description { get; set; }
Property Value
System.String
Remarks
Name
Name of the policy.
public string Name { get; set; }
Property Value
System.String
Remarks
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
Tags
A list of tags that you want to attach to the newly created policy.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
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
. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
TargetIds
List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to.
public string[] TargetIds { get; set; }
Property Value
System.String[]
Remarks
You can get the ID by calling the ListRoots , ListOrganizationalUnitsForParent , or ListAccounts operations. If you don't specify this parameter, the policy is created but not attached to any organization resource.
The regex pattern for a target ID string requires one of the following:
Type
The type of policy to create.
public string Type { get; set; }
Property Value
System.String