/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Organizations { namespace Model { /** */ class CreateAccountRequest : public OrganizationsRequest { public: AWS_ORGANIZATIONS_API CreateAccountRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateAccount"; } AWS_ORGANIZATIONS_API Aws::String SerializePayload() const override; AWS_ORGANIZATIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline const Aws::String& GetEmail() const{ return m_email; } /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline bool EmailHasBeenSet() const { return m_emailHasBeenSet; } /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline void SetEmail(const Aws::String& value) { m_emailHasBeenSet = true; m_email = value; } /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline void SetEmail(Aws::String&& value) { m_emailHasBeenSet = true; m_email = std::move(value); } /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline void SetEmail(const char* value) { m_emailHasBeenSet = true; m_email.assign(value); } /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline CreateAccountRequest& WithEmail(const Aws::String& value) { SetEmail(value); return *this;} /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline CreateAccountRequest& WithEmail(Aws::String&& value) { SetEmail(std::move(value)); return *this;} /** *

The email address of the owner to assign to the new member account. This * email address must not already be associated with another Amazon Web Services * account. You must use a valid email address to complete account creation.

*

The rules for a valid email address:

  • The address must be a * minimum of 6 and a maximum of 64 characters long.

  • All * characters must be 7-bit ASCII characters.

  • There must be one * and only one @ symbol, which separates the local name from the domain name.

    *
  • The local name can't contain any of the following characters:

    *

    whitespace, " ' ( ) < > [ ] : ; , \ | % &

  • The * local name can't begin with a dot (.)

  • The domain name can * consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)

    *
  • The domain name can't begin or end with a hyphen (-) or dot * (.)

  • The domain name must contain at least one dot

  • *

You can't access the root user of the account or remove an account that * was created with an invalid email address.

*/ inline CreateAccountRequest& WithEmail(const char* value) { SetEmail(value); return *this;} /** *

The friendly name of the member account.

*/ inline const Aws::String& GetAccountName() const{ return m_accountName; } /** *

The friendly name of the member account.

*/ inline bool AccountNameHasBeenSet() const { return m_accountNameHasBeenSet; } /** *

The friendly name of the member account.

*/ inline void SetAccountName(const Aws::String& value) { m_accountNameHasBeenSet = true; m_accountName = value; } /** *

The friendly name of the member account.

*/ inline void SetAccountName(Aws::String&& value) { m_accountNameHasBeenSet = true; m_accountName = std::move(value); } /** *

The friendly name of the member account.

*/ inline void SetAccountName(const char* value) { m_accountNameHasBeenSet = true; m_accountName.assign(value); } /** *

The friendly name of the member account.

*/ inline CreateAccountRequest& WithAccountName(const Aws::String& value) { SetAccountName(value); return *this;} /** *

The friendly name of the member account.

*/ inline CreateAccountRequest& WithAccountName(Aws::String&& value) { SetAccountName(std::move(value)); return *this;} /** *

The friendly name of the member account.

*/ inline CreateAccountRequest& WithAccountName(const char* value) { SetAccountName(value); return *this;} /** *

The name of an IAM role that 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: =,.@-

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

The name of an IAM role that 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: =,.@-

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

The name of an IAM role that 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: =,.@-

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

The name of an IAM role that 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: =,.@-

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

The name of an IAM role that 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: =,.@-

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

The name of an IAM role that 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: =,.@-

*/ inline CreateAccountRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

The name of an IAM role that 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: =,.@-

*/ inline CreateAccountRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

The name of an IAM role that 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: =,.@-

*/ inline CreateAccountRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline const IAMUserAccessToBilling& GetIamUserAccessToBilling() const{ return m_iamUserAccessToBilling; } /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline bool IamUserAccessToBillingHasBeenSet() const { return m_iamUserAccessToBillingHasBeenSet; } /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline void SetIamUserAccessToBilling(const IAMUserAccessToBilling& value) { m_iamUserAccessToBillingHasBeenSet = true; m_iamUserAccessToBilling = value; } /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline void SetIamUserAccessToBilling(IAMUserAccessToBilling&& value) { m_iamUserAccessToBillingHasBeenSet = true; m_iamUserAccessToBilling = std::move(value); } /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline CreateAccountRequest& WithIamUserAccessToBilling(const IAMUserAccessToBilling& value) { SetIamUserAccessToBilling(value); return *this;} /** *

If set to ALLOW, the new account enables IAM users to access * account billing information if they have the required permissions. If set * to DENY, only the root user of the new account can access account * billing information. For more information, see Activating * Access to the Billing and Cost Management Console in the Amazon Web * Services Billing and Cost Management User Guide.

If you don't specify * this parameter, the value defaults to ALLOW, and IAM users and * roles with the required permissions can access billing information for the new * account.

*/ inline CreateAccountRequest& WithIamUserAccessToBilling(IAMUserAccessToBilling&& value) { SetIamUserAccessToBilling(std::move(value)); return *this;} /** *

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 * Organizations resources in the 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.

*/ inline const Aws::Vector& GetTags() const{ return m_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 * Organizations resources in the 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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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 * Organizations resources in the 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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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 * Organizations resources in the 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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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 * Organizations resources in the 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.

*/ inline CreateAccountRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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 * Organizations resources in the 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.

*/ inline CreateAccountRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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 * Organizations resources in the 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.

*/ inline CreateAccountRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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 * Organizations resources in the 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.

*/ inline CreateAccountRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_email; bool m_emailHasBeenSet = false; Aws::String m_accountName; bool m_accountNameHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; IAMUserAccessToBilling m_iamUserAccessToBilling; bool m_iamUserAccessToBillingHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Organizations } // namespace Aws