AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the MoveAccount operation. 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.
Namespace: Amazon.Organizations.Model
Assembly: AWSSDK.Organizations.dll
Version: 3.x.y.z
public class MoveAccountRequest : AmazonOrganizationsRequest IAmazonWebServiceRequest
The MoveAccountRequest type exposes the following members
Name | Description | |
---|---|---|
MoveAccountRequest() |
Name | Type | Description | |
---|---|---|---|
AccountId | System.String |
Gets and sets the property AccountId. The unique identifier (ID) of the account that you want to move. The regex pattern for an account ID string requires exactly 12 digits. |
|
DestinationParentId | System.String |
Gets and sets the property DestinationParentId. 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:
|
|
SourceParentId | System.String |
Gets and sets the property SourceParentId. 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:
|
The following example shows how to move a member account from the root to an OU:/n/n
var client = new AmazonOrganizationsClient(); var response = client.MoveAccount(new MoveAccountRequest { AccountId = "333333333333", DestinationParentId = "ou-examplerootid111-exampleouid111", SourceParentId = "r-examplerootid111" });
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5