amazonka-organizations-1.6.1: Amazon Organizations SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Organizations.CreateAccount

Contents

Description

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

Creating a Request

createAccount Source #

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 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 - (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 - 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
Eq CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Data CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateAccount -> c CreateAccount #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateAccount #

toConstr :: CreateAccount -> Constr #

dataTypeOf :: CreateAccount -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateAccount) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateAccount) #

gmapT :: (forall b. Data b => b -> b) -> CreateAccount -> CreateAccount #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateAccount -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateAccount -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateAccount -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateAccount -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateAccount -> m CreateAccount #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateAccount -> m CreateAccount #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateAccount -> m CreateAccount #

Show CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Generic CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Associated Types

type Rep CreateAccount :: Type -> Type #

Hashable CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

ToJSON CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

AWSRequest CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Associated Types

type Rs CreateAccount :: Type #

ToHeaders CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

ToPath CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

ToQuery CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

NFData CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Methods

rnf :: CreateAccount -> () #

type Rep CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

type Rep CreateAccount = D1 (MetaData "CreateAccount" "Network.AWS.Organizations.CreateAccount" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "CreateAccount'" PrefixI True) ((S1 (MetaSel (Just "_caIAMUserAccessToBilling") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe IAMUserAccessToBilling)) :*: S1 (MetaSel (Just "_caRoleName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_caEmail") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Sensitive Text)) :*: S1 (MetaSel (Just "_caAccountName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Sensitive Text)))))
type Rs CreateAccount Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

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 DescribeCreateAccountStatus to get status about the progress of the request at later times.
  • carsResponseStatus - -- | The response status code.

data CreateAccountResponse Source #

See: createAccountResponse smart constructor.

Instances
Eq CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Data CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateAccountResponse -> c CreateAccountResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateAccountResponse #

toConstr :: CreateAccountResponse -> Constr #

dataTypeOf :: CreateAccountResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateAccountResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateAccountResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateAccountResponse -> CreateAccountResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateAccountResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateAccountResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateAccountResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateAccountResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateAccountResponse -> m CreateAccountResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateAccountResponse -> m CreateAccountResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateAccountResponse -> m CreateAccountResponse #

Show CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Generic CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Associated Types

type Rep CreateAccountResponse :: Type -> Type #

NFData CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

Methods

rnf :: CreateAccountResponse -> () #

type Rep CreateAccountResponse Source # 
Instance details

Defined in Network.AWS.Organizations.CreateAccount

type Rep CreateAccountResponse = D1 (MetaData "CreateAccountResponse" "Network.AWS.Organizations.CreateAccount" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "CreateAccountResponse'" PrefixI True) (S1 (MetaSel (Just "_carsCreateAccountStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CreateAccountStatus)) :*: S1 (MetaSel (Just "_carsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

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 DescribeCreateAccountStatus to get status about the progress of the request at later times.

carsResponseStatus :: Lens' CreateAccountResponse Int Source #

  • - | The response status code.