amazonka-organizations-2.0: Amazon Organizations SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Organizations.CloseAccount

Description

Closes an Amazon Web Services member account within an organization. You can't close the management account with this API. This is an asynchronous request that Amazon Web Services performs in the background. Because CloseAccount operates asynchronously, it can return a successful completion message even though account closure might still be in progress. You need to wait a few minutes before the account is fully closed. To check the status of the request, do one of the following:

  • Use the AccountId that you sent in the CloseAccount request to provide as a parameter to the DescribeAccount operation.

    While the close account request is in progress, Account status will indicate PENDING_CLOSURE. When the close account request completes, the status will change to SUSPENDED.

  • Check the CloudTrail log for the CloseAccountResult event that gets published after the account closes successfully. For information on using CloudTrail with Organizations, see Logging and monitoring in Organizations in the Organizations User Guide.
  • You can only close 10% of active member accounts within a rolling 30 day period. This quota is not bound by a calendar month, but starts when you close an account. Within 30 days of that initial account closure, you can't exceed the 10% account closure limit.
  • To reinstate a closed account, contact Amazon Web Services Support within the 90-day grace period while the account is in SUSPENDED status.
  • If the Amazon Web Services account you attempt to close is linked to an Amazon Web Services GovCloud (US) account, the CloseAccount request will close both accounts. To learn important pre-closure details, see Closing an Amazon Web Services GovCloud (US) account in the Amazon Web Services GovCloud User Guide.

For more information about closing accounts, see Closing an Amazon Web Services account in the Organizations User Guide.

Synopsis

Creating a Request

data CloseAccount Source #

See: newCloseAccount smart constructor.

Constructors

CloseAccount' 

Fields

  • accountId :: Text

    Retrieves the Amazon Web Services account Id for the current CloseAccount API request.

Instances

Instances details
ToJSON CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

ToHeaders CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

ToPath CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

ToQuery CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

AWSRequest CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Associated Types

type AWSResponse CloseAccount #

Generic CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Associated Types

type Rep CloseAccount :: Type -> Type #

Read CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Show CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

NFData CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Methods

rnf :: CloseAccount -> () #

Eq CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Hashable CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

type AWSResponse CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

type Rep CloseAccount Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

type Rep CloseAccount = D1 ('MetaData "CloseAccount" "Amazonka.Organizations.CloseAccount" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "CloseAccount'" 'PrefixI 'True) (S1 ('MetaSel ('Just "accountId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCloseAccount Source #

Create a value of CloseAccount with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CloseAccount, closeAccount_accountId - Retrieves the Amazon Web Services account Id for the current CloseAccount API request.

Request Lenses

closeAccount_accountId :: Lens' CloseAccount Text Source #

Retrieves the Amazon Web Services account Id for the current CloseAccount API request.

Destructuring the Response

data CloseAccountResponse Source #

See: newCloseAccountResponse smart constructor.

Constructors

CloseAccountResponse' 

Instances

Instances details
Generic CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Associated Types

type Rep CloseAccountResponse :: Type -> Type #

Read CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Show CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

NFData CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

Methods

rnf :: CloseAccountResponse -> () #

Eq CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

type Rep CloseAccountResponse Source # 
Instance details

Defined in Amazonka.Organizations.CloseAccount

type Rep CloseAccountResponse = D1 ('MetaData "CloseAccountResponse" "Amazonka.Organizations.CloseAccount" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "CloseAccountResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newCloseAccountResponse :: CloseAccountResponse Source #

Create a value of CloseAccountResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.