move_account
(**kwargs)¶Moves an account from its current source parent root or organizational unit (OU) to the specified destination parent root or OU.
This operation can be called only from the organization's management account.
See also: AWS API Documentation
Request Syntax
response = client.move_account(
AccountId='string',
SourceParentId='string',
DestinationParentId='string'
)
[REQUIRED]
The unique identifier (ID) of the account that you want to move.
The regex pattern for an account ID string requires exactly 12 digits.
[REQUIRED]
The unique identifier (ID) of the root or organizational unit that you want to move the account from.
The regex pattern for a parent ID string requires one of the following:
[REQUIRED]
The unique identifier (ID) of the root or organizational unit that you want to move the account to.
The regex pattern for a parent ID string requires one of the following:
None
Exceptions
Organizations.Client.exceptions.AccessDeniedException
Organizations.Client.exceptions.InvalidInputException
Organizations.Client.exceptions.SourceParentNotFoundException
Organizations.Client.exceptions.DestinationParentNotFoundException
Organizations.Client.exceptions.DuplicateAccountException
Organizations.Client.exceptions.AccountNotFoundException
Organizations.Client.exceptions.TooManyRequestsException
Organizations.Client.exceptions.ConcurrentModificationException
Organizations.Client.exceptions.AWSOrganizationsNotInUseException
Organizations.Client.exceptions.ServiceException
Examples
The following example shows how to move a member account from the root to an OU:/n/n
response = client.move_account(
AccountId='333333333333',
DestinationParentId='ou-examplerootid111-exampleouid111',
SourceParentId='r-examplerootid111',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}