Interface ICfnPolicyProps
Properties for defining a CfnPolicy
.
Namespace: Amazon.CDK.AWS.Organizations
Assembly: Amazon.CDK.AWS.Organizations.dll
Syntax (csharp)
public interface ICfnPolicyProps
Syntax (vb)
Public Interface ICfnPolicyProps
Remarks
Link: 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
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. |
Properties
Content
The policy text content. You can specify the policy content as a JSON object or a JSON string.
object Content { get; }
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.
virtual string Description { get; }
Property Value
System.String
Remarks
Name
Name of the policy.
string Name { get; }
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.
virtual ICfnTag[] Tags { get; }
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.
virtual string[] TargetIds { get; }
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.
string Type { get; }
Property Value
System.String