Module Smaws_Client_Organizations.CloseAccount

Closes an Amazon Web Services member account within an organization. You can close an account when all features are enabled. 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:

After the permanent termination of the account after the 90-day waiting period, Organizations logs a membership event in CloudTrail. The event is an AccountDepartedOrganization event with departedMethod:Cleaned and departedTime. This event is available only in the management account's event history.

val error_to_string : [ Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AccountAlreadyClosedException of Types.account_already_closed_exception | `AccountNotFoundException of Types.account_not_found_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConflictException of Types.conflict_exception | `ConstraintViolationException of Types.constraint_violation_exception | `InvalidInputException of Types.invalid_input_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.close_account_request -> (Smaws_Lib.Smithy_api.Types.unit_, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AccountAlreadyClosedException of Types.account_already_closed_exception | `AccountNotFoundException of Types.account_not_found_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConflictException of Types.conflict_exception | `ConstraintViolationException of Types.constraint_violation_exception | `InvalidInputException of Types.invalid_input_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.close_account_request -> (Smaws_Lib.Smithy_api.Types.unit_ Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AccountAlreadyClosedException of Types.account_already_closed_exception | `AccountNotFoundException of Types.account_not_found_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConflictException of Types.conflict_exception | `ConstraintViolationException of Types.constraint_violation_exception | `InvalidInputException of Types.invalid_input_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ] * Smaws_Lib.Response.metadata) Stdlib.result