Class CfnOrganizationalUnit
A CloudFormation AWS::Organizations::OrganizationalUnit
.
Inherited Members
Namespace: Amazon.CDK.AWS.Organizations
Assembly: Amazon.CDK.AWS.Organizations.dll
Syntax (csharp)
public class CfnOrganizationalUnit : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnOrganizationalUnit
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Creates an organizational unit (OU) within a root or parent OU. An OU is a container for accounts that enables you to organize your accounts to apply policies according to your business requirements. The number of levels deep that you can nest OUs is dependent upon the policy types enabled for that root. For service control policies, the limit is five.
For more information about OUs, see Managing Organizational Units in the AWS Organizations User Guide.
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.
CloudformationResource: AWS::Organizations::OrganizationalUnit
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 cfnOrganizationalUnit = new CfnOrganizationalUnit(this, "MyCfnOrganizationalUnit", new CfnOrganizationalUnitProps {
Name = "name",
ParentId = "parentId",
// the properties below are optional
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnOrganizationalUnit(Construct, String, ICfnOrganizationalUnitProps) | Create a new |
CfnOrganizationalUnit(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnOrganizationalUnit(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of this OU. |
AttrId | The unique identifier (ID) associated with this OU. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Name | The friendly name of this OU. |
ParentId | The unique identifier (ID) of the parent root or OU that you want to create the new OU in. |
Tags | A list of tags that you want to attach to the newly created OU. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnOrganizationalUnit(Construct, String, ICfnOrganizationalUnitProps)
Create a new AWS::Organizations::OrganizationalUnit
.
public CfnOrganizationalUnit(Construct scope, string id, ICfnOrganizationalUnitProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnOrganizationalUnitProps
- resource properties.
CfnOrganizationalUnit(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnOrganizationalUnit(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnOrganizationalUnit(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnOrganizationalUnit(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of this OU.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
For example: arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111
.
CloudformationAttribute: Arn
AttrId
The unique identifier (ID) associated with this OU.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
For example: ou-examplerootid111-exampleouid111
.
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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Name
The friendly name of this OU.
public virtual 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.
ParentId
The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
public virtual string ParentId { get; set; }
Property Value
System.String
Remarks
To update the ParentId
parameter value, you must first remove all accounts attached to the organizational unit (OU). OUs can't be moved within the organization with accounts still attached.
The regex pattern for a parent ID string requires one of the following:
Tags
A list of tags that you want to attach to the newly created OU.
public virtual TagManager Tags { get; }
Property Value
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 an OU, then the entire request fails and the OU is not created.
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>