leave_organization
()¶Removes a member account from its parent organization. This version of the operation is performed by the account that wants to leave. To remove a member account as a user in the management account, use RemoveAccountFromOrganization instead.
This operation can be called only from a member account in the organization.
Warning
LeaveOrganization
and leaving the organization.Amazon Web Services uses the payment method to charge for any billable (not free tier) Amazon Web Services activity that occurs while the account isn't attached to an organization. Follow the steps at To leave an organization when all required account information has not yet been provided in the Organizations User Guide.
See also: AWS API Documentation
Request Syntax
response = client.leave_organization()
Exceptions
Organizations.Client.exceptions.AccessDeniedException
Organizations.Client.exceptions.AccountNotFoundException
Organizations.Client.exceptions.AWSOrganizationsNotInUseException
Organizations.Client.exceptions.ConcurrentModificationException
Organizations.Client.exceptions.ConstraintViolationException
Organizations.Client.exceptions.InvalidInputException
Organizations.Client.exceptions.MasterCannotLeaveOrganizationException
Organizations.Client.exceptions.ServiceException
Organizations.Client.exceptions.TooManyRequestsException
Examples
TThe following example shows how to remove your member account from an organization:
response = client.leave_organization(
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}