Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates an AWS account that is automatically a member of the organization whose credentials made the request. This is an asynchronous request that AWS performs in the background. If you want to check the status of the request later, you need the OperationId
response element from this operation to provide as a parameter to the DescribeCreateAccountStatus
operation.
The user who calls the API for an invitation to join must have the organizations:CreateAccount
permission. If you enabled all features in the organization, then the user must also have the iam:CreateServiceLinkedRole
permission so that Organizations can create the required service-linked role named OrgsServiceLinkedRoleName . For more information, see AWS Organizations and Service-Linked Roles in the AWS Organizations User Guide .
The user in the master account who calls this API must also have the iam:CreateRole
permission because AWS Organizations preconfigures the new member account with a role (named OrganizationAccountAccessRole
by default) that grants users in the master account administrator permissions in the new member account. Principals in the master account can assume the role. AWS Organizations clones the company name and address information for the new account from the organization's master account.
This operation can be called only from the organization's master account.
For more information about creating accounts, see Creating an AWS Account in Your Organization in the AWS Organizations User Guide .
Important: When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required for the account to operate as a standalone account, such as a payment method and signing the End User Licence Agreement (EULA) is not automatically collected. If you must remove an account from your organization later, you can do so only after you provide the missing information. Follow the steps at To leave an organization when all required account information has not yet been provided in the AWS Organizations User Guide .
This operation can be called only from the organization's master account.
Important: If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact AWS Customer Support .
Synopsis
- createAccount :: Text -> Text -> CreateAccount
- data CreateAccount
- caIAMUserAccessToBilling :: Lens' CreateAccount (Maybe IAMUserAccessToBilling)
- caRoleName :: Lens' CreateAccount (Maybe Text)
- caEmail :: Lens' CreateAccount Text
- caAccountName :: Lens' CreateAccount Text
- createAccountResponse :: Int -> CreateAccountResponse
- data CreateAccountResponse
- carsCreateAccountStatus :: Lens' CreateAccountResponse (Maybe CreateAccountStatus)
- carsResponseStatus :: Lens' CreateAccountResponse Int
Creating a Request
Creates a value of CreateAccount
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
caIAMUserAccessToBilling
- If set toALLOW
, the new account enables IAM users to access account billing information if they have the required permissions. If set toDENY
, then 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 AWS Billing and Cost Management User Guide . If you do not 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.caRoleName
- (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. If you do not specify this parameter, the role name defaults toOrganizationAccountAccessRole
. For more information about how to use this role to access the member account, see Accessing and Administering the Member Accounts in Your Organization in the AWS Organizations User Guide , and 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 is a string of characters that can consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-caEmail
- The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You cannot access the root user of the account or remove an account that was created with an invalid email address.caAccountName
- The friendly name of the member account.
data CreateAccount Source #
See: createAccount
smart constructor.
Instances
Request Lenses
caIAMUserAccessToBilling :: Lens' CreateAccount (Maybe IAMUserAccessToBilling) Source #
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
, then 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 AWS Billing and Cost Management User Guide . If you do not 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.
caRoleName :: Lens' CreateAccount (Maybe Text) Source #
(Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. If you do not specify this parameter, the role name defaults to OrganizationAccountAccessRole
. For more information about how to use this role to access the member account, see Accessing and Administering the Member Accounts in Your Organization in the AWS Organizations User Guide , and 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 is a string of characters that can consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-
caEmail :: Lens' CreateAccount Text Source #
The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You cannot access the root user of the account or remove an account that was created with an invalid email address.
caAccountName :: Lens' CreateAccount Text Source #
The friendly name of the member account.
Destructuring the Response
createAccountResponse Source #
Creates a value of CreateAccountResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
carsCreateAccountStatus
- A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned CreateAccountStatus ID as a parameter to
to get status about the progress of the request at later times.DescribeCreateAccountStatus
carsResponseStatus
- -- | The response status code.
data CreateAccountResponse Source #
See: createAccountResponse
smart constructor.
Instances
Response Lenses
carsCreateAccountStatus :: Lens' CreateAccountResponse (Maybe CreateAccountStatus) Source #
A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned CreateAccountStatus ID as a parameter to
to get status about the progress of the request at later times.DescribeCreateAccountStatus
carsResponseStatus :: Lens' CreateAccountResponse Int Source #
- - | The response status code.