CfnAccountProps

class aws_cdk.aws_organizations.CfnAccountProps(*, account_name, email, parent_ids=None, role_name=None, tags=None)

Bases: object

Properties for defining a CfnAccount.

Parameters:
  • account_name (str) – The account name given to the account when it was created.

  • email (str) – The email address associated with the AWS account. The regex pattern for this parameter is a string of characters that represents a standard internet email address.

  • parent_ids (Optional[Sequence[str]]) –

    The unique identifier (ID) of the root or organizational unit (OU) that you want to create the new account in. If you don’t specify this parameter, the ParentId defaults to the root ID. This parameter only accepts a string array with one string value. The regex pattern for a parent ID string requires one of the following: - Root - A string that begins with “r-” followed by from 4 to 32 lowercase letters or digits. - Organizational unit (OU) - A string that begins with “ou-” followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second “-” dash and from 8 to 32 additional lowercase letters or digits.

  • role_name (Optional[str]) –

    The name of an IAM role that AWS Organizations automatically preconfigures in the new member account. This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account. If you don’t specify this parameter, the role name defaults to OrganizationAccountAccessRole . For more information about how to use this role to access the member account, see the following links: - Accessing and Administering the Member Accounts in Your Organization in the AWS Organizations User Guide - Steps 2 and 3 in Tutorial: Delegate Access Across AWS accounts Using IAM Roles in the IAM User Guide The regex pattern that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of tags that you want to attach to the newly created account. 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. .. epigraph:: If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account, then the entire request fails and the account is not created.

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_organizations as organizations

cfn_account_props = organizations.CfnAccountProps(
    account_name="accountName",
    email="email",

    # the properties below are optional
    parent_ids=["parentIds"],
    role_name="roleName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

account_name

The account name given to the account when it was created.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-account.html#cfn-organizations-account-accountname

email

The email address associated with the AWS account.

The regex pattern for this parameter is a string of characters that represents a standard internet email address.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-account.html#cfn-organizations-account-email

parent_ids

The unique identifier (ID) of the root or organizational unit (OU) that you want to create the new account in.

If you don’t specify this parameter, the ParentId defaults to the root ID.

This parameter only accepts a string array with one string value.

The regex pattern for a parent ID string requires one of the following:

  • Root - A string that begins with “r-” followed by from 4 to 32 lowercase letters or digits.

  • Organizational unit (OU) - A string that begins with “ou-” followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second “-” dash and from 8 to 32 additional lowercase letters or digits.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-account.html#cfn-organizations-account-parentids

role_name

The name of an IAM role that AWS Organizations automatically preconfigures in the new member account.

This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account.

If you don’t specify this parameter, the role name defaults to OrganizationAccountAccessRole .

For more information about how to use this role to access the member account, see the following links:

The regex pattern that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-account.html#cfn-organizations-account-rolename

tags

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

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. .. epigraph:

If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account, then the entire request fails and the account is not created.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-organizations-account.html#cfn-organizations-account-tags