Show / Hide Table of Contents

Class CfnPolicy

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnPolicy
Implements
IInspectable
ITaggable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.Organizations
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPolicy : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnPolicy Inherits CfnResource Implements IInspectable, ITaggable
Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

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 cfnPolicy = new CfnPolicy(this, "MyCfnPolicy", 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

CfnPolicy(Construct, string, ICfnPolicyProps)

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

Properties

AttrArn

Returns the Amazon Resource Name (ARN) of the policy.

AttrAwsManaged

Returns a boolean value that indicates whether the specified policy is an AWS managed policy.

AttrId

Returns the unique identifier (ID) of the policy.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

Content

The policy text content.

Description

Human readable description of the policy.

Name

Name of the policy.

Tags

Tag Manager which manages the tags for this resource.

TagsRaw

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.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

Constructors

CfnPolicy(Construct, string, ICfnPolicyProps)

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

public CfnPolicy(Construct scope, string id, ICfnPolicyProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnPolicyProps

Resource properties.

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Properties

AttrArn

Returns the Amazon Resource Name (ARN) of the policy.

public virtual string AttrArn { get; }
Property Value

string

Remarks

For example: arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111 .

CloudformationAttribute: Arn

AttrAwsManaged

Returns a boolean value that indicates whether the specified policy is an AWS managed policy.

public virtual IResolvable AttrAwsManaged { get; }
Property Value

IResolvable

Remarks

If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it. For example: true | false .

CloudformationAttribute: AwsManaged

AttrId

Returns the unique identifier (ID) of the policy.

public virtual string AttrId { get; }
Property Value

string

Remarks

For example: p-examplepolicyid111 .

CloudformationAttribute: Id

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

CfnProperties

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Content

The policy text content.

public virtual object Content { get; set; }
Property Value

object

Remarks

You can specify the policy content as a JSON object or a JSON string.

Description

Human readable description of the policy.

public virtual string? Description { get; set; }
Property Value

string

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Name

Name of the policy.

public virtual string Name { get; set; }
Property Value

string

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Tags

Tag Manager which manages the tags for this resource.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

TagsRaw

A list of tags that you want to attach to the newly created policy.

public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value

ICfnTag[]

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

TargetIds

List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to.

public virtual string[]? TargetIds { get; set; }
Property Value

string[]

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Type

The type of policy to create.

public virtual string Type { get; set; }
Property Value

string

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

For more information about policies and their use, see Managing AWS Organizations policies .

If the request includes tags, then the requester must have the organizations:TagResource permission.

This operation can be called only from the organization's management account or a member account designated as a delegated administrator.

Before you can create a policy of a given type, you must first <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html">enable that policy type</a> in your organization.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-policy.html

CloudformationResource: AWS::Organizations::Policy

ExampleMetadata: fixture=_generated

Implements

IInspectable
ITaggable
Back to top Generated by DocFX