AWS SDK Version 3 for .NET
API Reference

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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Organizations.AmazonOrganizationsRequest
      Amazon.Organizations.Model.MoveAccountRequest

Namespace: Amazon.Organizations.Model
Assembly: AWSSDK.Organizations.dll
Version: 3.x.y.z

Syntax

C#
public class MoveAccountRequest : AmazonOrganizationsRequest
         IAmazonWebServiceRequest

The MoveAccountRequest type exposes the following members

Constructors

NameDescription
Public Method MoveAccountRequest()

Properties

NameTypeDescription
Public Property 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.

Public Property 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:

  • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

Public Property 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:

  • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

Examples

The following example shows how to move a member account from the root to an OU:/n/n

To move an OU or account to another OU or the root


var client = new AmazonOrganizationsClient();
var response = client.MoveAccount(new MoveAccountRequest 
{
    AccountId = "333333333333",
    DestinationParentId = "ou-examplerootid111-exampleouid111",
    SourceParentId = "r-examplerootid111"
});


            

Version Information

.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