Smaws_Client_Organizations.RemoveAccountFromOrganizationRemoves the specified account from the organization.
The removed account becomes a standalone account that isn't a member of any organization. It's no longer subject to any policies and is responsible for its own bill payments. The organization's management account is no longer charged for any expenses accrued by the member account after it's removed from the organization.
You can only call this operation from the management account. Member accounts can remove themselves with LeaveOrganization instead.
When an account is removed from an organization, Organizations logs a membership event in CloudTrail. The event is an AccountDepartedOrganization event with departedMethod:Removed 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
| `AccountNotFoundException of Types.account_not_found_exception
| `AWSOrganizationsNotInUseException of
Types.aws_organizations_not_in_use_exception
| `ConcurrentModificationException of Types.concurrent_modification_exception
| `ConstraintViolationException of Types.constraint_violation_exception
| `InvalidInputException of Types.invalid_input_exception
| `MasterCannotLeaveOrganizationException of
Types.master_cannot_leave_organization_exception
| `ServiceException of Types.service_exception
| `TooManyRequestsException of Types.too_many_requests_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.remove_account_from_organization_request ->
(Smaws_Lib.Smithy_api.Types.unit_,
[> Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of Types.access_denied_exception
| `AccountNotFoundException of Types.account_not_found_exception
| `AWSOrganizationsNotInUseException of
Types.aws_organizations_not_in_use_exception
| `ConcurrentModificationException of
Types.concurrent_modification_exception
| `ConstraintViolationException of Types.constraint_violation_exception
| `InvalidInputException of Types.invalid_input_exception
| `MasterCannotLeaveOrganizationException of
Types.master_cannot_leave_organization_exception
| `ServiceException of Types.service_exception
| `TooManyRequestsException of Types.too_many_requests_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.remove_account_from_organization_request ->
(Smaws_Lib.Smithy_api.Types.unit_ Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of Types.access_denied_exception
| `AccountNotFoundException of Types.account_not_found_exception
| `AWSOrganizationsNotInUseException of
Types.aws_organizations_not_in_use_exception
| `ConcurrentModificationException of
Types.concurrent_modification_exception
| `ConstraintViolationException of Types.constraint_violation_exception
| `InvalidInputException of Types.invalid_input_exception
| `MasterCannotLeaveOrganizationException of
Types.master_cannot_leave_organization_exception
| `ServiceException of Types.service_exception
| `TooManyRequestsException of Types.too_many_requests_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result