Class: AWSCDK::Organizations::CfnAccountProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
organizations/cfn_account_props.rb

Overview

Properties for defining a CfnAccount.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_name:, email:, parent_ids: nil, role_name: nil, tags: nil) ⇒ CfnAccountProps

Returns a new instance of CfnAccountProps.

Parameters:

  • account_name (String)

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

  • email (String)

    The email address associated with the AWS account.

  • parent_ids (Array<String>, nil) (defaults to: nil)

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

  • role_name (String, nil) (defaults to: nil)

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

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

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



14
15
16
17
18
19
20
21
22
23
24
25
# File 'organizations/cfn_account_props.rb', line 14

def initialize(account_name:, email:, parent_ids: nil, role_name: nil, tags: nil)
  @account_name = 
  Jsii::Type.check_type(@account_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountName")
  @email = email
  Jsii::Type.check_type(@email, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "email")
  @parent_ids = parent_ids
  Jsii::Type.check_type(@parent_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "parentIds") unless @parent_ids.nil?
  @role_name = role_name
  Jsii::Type.check_type(@role_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleName") unless @role_name.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#account_nameString (readonly)

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



31
32
33
# File 'organizations/cfn_account_props.rb', line 31

def 
  @account_name
end

#emailString (readonly)

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.



38
39
40
# File 'organizations/cfn_account_props.rb', line 38

def email
  @email
end

#parent_idsArray<String>? (readonly)

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.


52
53
54
# File 'organizations/cfn_account_props.rb', line 52

def parent_ids
  @parent_ids
end

#role_nameString? (readonly)

Note:

Default: - "OrganizationAccountAccessRole"

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: =,.@-



69
70
71
# File 'organizations/cfn_account_props.rb', line 69

def role_name
  @role_name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

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.

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.



78
79
80
# File 'organizations/cfn_account_props.rb', line 78

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



80
81
82
83
84
85
86
87
88
# File 'organizations/cfn_account_props.rb', line 80

def self.jsii_properties
  {
    :account_name => "accountName",
    :email => "email",
    :parent_ids => "parentIds",
    :role_name => "roleName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



90
91
92
93
94
95
96
97
98
99
100
# File 'organizations/cfn_account_props.rb', line 90

def to_jsii
  result = {}
  result.merge!({
    "accountName" => @account_name,
    "email" => @email,
    "parentIds" => @parent_ids,
    "roleName" => @role_name,
    "tags" => @tags,
  })
  result.compact
end