

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [AcceptHandshake](API_AcceptHandshake.md) 
+  [AttachPolicy](API_AttachPolicy.md) 
+  [CancelHandshake](API_CancelHandshake.md) 
+  [CloseAccount](API_CloseAccount.md) 
+  [CreateAccount](API_CreateAccount.md) 
+  [CreateGovCloudAccount](API_CreateGovCloudAccount.md) 
+  [CreateOrganization](API_CreateOrganization.md) 
+  [CreateOrganizationalUnit](API_CreateOrganizationalUnit.md) 
+  [CreatePolicy](API_CreatePolicy.md) 
+  [DeclineHandshake](API_DeclineHandshake.md) 
+  [DeleteOrganization](API_DeleteOrganization.md) 
+  [DeleteOrganizationalUnit](API_DeleteOrganizationalUnit.md) 
+  [DeletePolicy](API_DeletePolicy.md) 
+  [DeleteResourcePolicy](API_DeleteResourcePolicy.md) 
+  [DeregisterDelegatedAdministrator](API_DeregisterDelegatedAdministrator.md) 
+  [DescribeAccount](API_DescribeAccount.md) 
+  [DescribeCreateAccountStatus](API_DescribeCreateAccountStatus.md) 
+  [DescribeEffectivePolicy](API_DescribeEffectivePolicy.md) 
+  [DescribeHandshake](API_DescribeHandshake.md) 
+  [DescribeOrganization](API_DescribeOrganization.md) 
+  [DescribeOrganizationalUnit](API_DescribeOrganizationalUnit.md) 
+  [DescribePolicy](API_DescribePolicy.md) 
+  [DescribeResourcePolicy](API_DescribeResourcePolicy.md) 
+  [DescribeResponsibilityTransfer](API_DescribeResponsibilityTransfer.md) 
+  [DetachPolicy](API_DetachPolicy.md) 
+  [DisableAWSServiceAccess](API_DisableAWSServiceAccess.md) 
+  [DisablePolicyType](API_DisablePolicyType.md) 
+  [EnableAllFeatures](API_EnableAllFeatures.md) 
+  [EnableAWSServiceAccess](API_EnableAWSServiceAccess.md) 
+  [EnablePolicyType](API_EnablePolicyType.md) 
+  [InviteAccountToOrganization](API_InviteAccountToOrganization.md) 
+  [InviteOrganizationToTransferResponsibility](API_InviteOrganizationToTransferResponsibility.md) 
+  [LeaveOrganization](API_LeaveOrganization.md) 
+  [ListAccounts](API_ListAccounts.md) 
+  [ListAccountsForParent](API_ListAccountsForParent.md) 
+  [ListAccountsWithInvalidEffectivePolicy](API_ListAccountsWithInvalidEffectivePolicy.md) 
+  [ListAWSServiceAccessForOrganization](API_ListAWSServiceAccessForOrganization.md) 
+  [ListChildren](API_ListChildren.md) 
+  [ListCreateAccountStatus](API_ListCreateAccountStatus.md) 
+  [ListDelegatedAdministrators](API_ListDelegatedAdministrators.md) 
+  [ListDelegatedServicesForAccount](API_ListDelegatedServicesForAccount.md) 
+  [ListEffectivePolicyValidationErrors](API_ListEffectivePolicyValidationErrors.md) 
+  [ListHandshakesForAccount](API_ListHandshakesForAccount.md) 
+  [ListHandshakesForOrganization](API_ListHandshakesForOrganization.md) 
+  [ListInboundResponsibilityTransfers](API_ListInboundResponsibilityTransfers.md) 
+  [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md) 
+  [ListOutboundResponsibilityTransfers](API_ListOutboundResponsibilityTransfers.md) 
+  [ListParents](API_ListParents.md) 
+  [ListPolicies](API_ListPolicies.md) 
+  [ListPoliciesForTarget](API_ListPoliciesForTarget.md) 
+  [ListRoots](API_ListRoots.md) 
+  [ListTagsForResource](API_ListTagsForResource.md) 
+  [ListTargetsForPolicy](API_ListTargetsForPolicy.md) 
+  [MoveAccount](API_MoveAccount.md) 
+  [PutResourcePolicy](API_PutResourcePolicy.md) 
+  [RegisterDelegatedAdministrator](API_RegisterDelegatedAdministrator.md) 
+  [RemoveAccountFromOrganization](API_RemoveAccountFromOrganization.md) 
+  [TagResource](API_TagResource.md) 
+  [TerminateResponsibilityTransfer](API_TerminateResponsibilityTransfer.md) 
+  [UntagResource](API_UntagResource.md) 
+  [UpdateOrganizationalUnit](API_UpdateOrganizationalUnit.md) 
+  [UpdatePolicy](API_UpdatePolicy.md) 
+  [UpdateResponsibilityTransfer](API_UpdateResponsibilityTransfer.md) 

# AcceptHandshake
<a name="API_AcceptHandshake"></a>

Accepts a handshake by sending an `ACCEPTED` response to the sender. You can view accepted handshakes in API responses for 30 days before they are deleted.

 **Only the management account can accept the following handshakes**:
+ Enable all features final confirmation (`APPROVE_ALL_FEATURES`)
+ Billing transfer (`TRANSFER_RESPONSIBILITY`)

For more information, see [Enabling all features](https://docs.aws.amazon.com/organizations/latest/userguide/manage-begin-all-features-standard-migration.html#manage-approve-all-features-invite) and [Responding to a billing transfer invitation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_transfer_billing-respond-invitation.html) in the * AWS Organizations User Guide*.

 **Only a member account can accept the following handshakes**:
+ Invitation to join (`INVITE`)
+ Approve all features request (`ENABLE_ALL_FEATURES`)

For more information, see [Responding to invitations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_accept-decline-invite.html) and [Enabling all features](https://docs.aws.amazon.com/organizations/latest/userguide/manage-begin-all-features-standard-migration.html#manage-approve-all-features-invite) in the * AWS Organizations User Guide*.

## Request Syntax
<a name="API_AcceptHandshake_RequestSyntax"></a>

```
{
   "HandshakeId": "string"
}
```

## Request Parameters
<a name="API_AcceptHandshake_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [HandshakeId](#API_AcceptHandshake_RequestSyntax) **   <a name="organizations-AcceptHandshake-request-HandshakeId"></a>
ID for the handshake that you want to accept.  
The [regex pattern](http://wikipedia.org/wiki/regex) for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^h-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_AcceptHandshake_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_AcceptHandshake_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_AcceptHandshake_ResponseSyntax) **   <a name="organizations-AcceptHandshake-response-Handshake"></a>
A `Handshake` object. Contains details for the handshake.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_AcceptHandshake_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccessDeniedForDependencyException **   
The operation that you attempted requires you to have the `iam:CreateServiceLinkedRole` for `organizations.amazonaws.com` permission so that AWS Organizations can create the required service-linked role. You don't have that permission.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** HandshakeAlreadyInStateException **   
The specified handshake is already in the requested state. For example, you can't accept a handshake that was already accepted.  
HTTP Status Code: 400

 ** HandshakeConstraintViolationException **   
The requested operation would violate the constraint identified in the reason code.  
Some of the reasons in the following list might not be applicable to this specific API or operation:
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. Note that deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception immediately after creating the organization, wait one hour and try again. If after an hour it continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALREADY\$1IN\$1AN\$1ORGANIZATION: The handshake request is invalid because the invited account is already a member of an organization.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVITE\$1DISABLED\$1DURING\$1ENABLE\$1ALL\$1FEATURES: You can't issue new invitations to join an organization while it's in the process of enabling all features. You can resume inviting accounts after you finalize the process when all accounts have agreed to the change.
+ LEGACY\$1PERMISSIONS\$1STILL\$1IN\$1USE: Your organization must migrate to use the new IAM fine-grained actions for billing, cost management, and accounts.
+ ORGANIZATION\$1ALREADY\$1HAS\$1ALL\$1FEATURES: The handshake request is invalid because the organization has already enabled all features.
+ ORGANIZATION\$1FROM\$1DIFFERENT\$1SELLER\$1OF\$1RECORD: The request failed because the account is from a different marketplace than the accounts in the organization.
+ ORGANIZATION\$1IS\$1ALREADY\$1PENDING\$1ALL\$1FEATURES\$1MIGRATION: The handshake request is invalid because the organization has already started the process to enable all features.
+ ORGANIZATION\$1MEMBERSHIP\$1CHANGE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to change the membership of an account too quickly after its previous change.
+ PAYMENT\$1INSTRUMENT\$1REQUIRED: You can't complete the operation with an account that doesn't have a payment instrument, such as a credit card, associated with it.
+ RESPONSIBILITY\$1TRANSFER\$1ALREADY\$1EXISTS: You cannot perform this operation with the current transfer.
+ SOURCE\$1AND\$1TARGET\$1CANNOT\$1MATCH: An account can't accept a transfer invitation if it is both the sender and recipient of the invitation.
+ UNUSED\$1PREPAYMENT\$1BALANCE: Your organization has an outstanding pre-payment balance.
HTTP Status Code: 400

 ** HandshakeNotFoundException **   
We can't find a handshake with the `HandshakeId` that you specified.  
HTTP Status Code: 400

 ** InvalidHandshakeTransitionException **   
You can't perform the operation on the handshake in its current state. For example, you can't cancel a handshake that was already accepted or accept a handshake that was already declined.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** MasterCannotLeaveOrganizationException **   
You can't remove a management account from an organization. If you want the management account to become a member account in another organization, you must first delete the current organization of the management account.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_AcceptHandshake_Examples"></a>

### Example
<a name="API_AcceptHandshake_Example_1"></a>

Diego, the owner of an organization, has previously invited Juan's account to join his organization. The following example shows Juan's account accepting the handshake and thus agreeing to the invitation.

#### Sample Request
<a name="API_AcceptHandshake_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.AcceptHandshake

{"HandshakeId": "h-examplehandshakeid111"}
```

#### Sample Response
<a name="API_AcceptHandshake_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Handshake": {
    "Action": "INVITE",
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
    "RequestedTimestamp": 1481656459.257,
    "ExpirationTimestamp": 1482952459.257,
    "Id": "h-examplehandshakeid111",
    "Parties": [
      {
        "Id": "o-exampleorgid",
        "Type": "ORGANIZATION"
      },
      {
        "Id": "juan@example.com",
        "Type": "EMAIL"
      }
    ],
    "Resources": [
      {
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Org management account"
          },
          {
            "Type": "ORGANIZATION_FEATURE_SET",
            "Value": "ALL"
          }
        ],
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid"
      },
      {
        "Type": "EMAIL",
        "Value": "juan@example.com"
      }
    ],
    "State": "ACCEPTED"
  }
}
```

## See Also
<a name="API_AcceptHandshake_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/AcceptHandshake) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/AcceptHandshake) 

# AttachPolicy
<a name="API_AttachPolicy"></a>

Attaches a policy to a root, an organizational unit (OU), or an individual account. How the policy affects accounts depends on the type of policy. Refer to the * AWS Organizations User Guide* for information about each policy type:
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_AttachPolicy_RequestSyntax"></a>

```
{
   "PolicyId": "string",
   "TargetId": "string"
}
```

## Request Parameters
<a name="API_AttachPolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyId](#API_AttachPolicy_RequestSyntax) **   <a name="organizations-AttachPolicy-request-PolicyId"></a>
ID for the policy that you want to attach to the target. You can get the ID for the policy by calling the [ListPolicies](API_ListPolicies.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

 ** [TargetId](#API_AttachPolicy_RequestSyntax) **   <a name="organizations-AttachPolicy-request-TargetId"></a>
ID for the root, OU, or account that you want to attach the policy to. You can get the ID by calling the [ListRoots](API_ListRoots.md), [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md), or [ListAccounts](API_ListAccounts.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a target ID string requires one of the following:  
+  **Root** - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
+  **Account** - A string that consists of exactly 12 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Elements
<a name="API_AttachPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_AttachPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicatePolicyAttachmentException **   
The selected policy is already attached to the specified target.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyChangesInProgressException **   
Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.   
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** PolicyTypeNotEnabledException **   
The specified policy type isn't currently enabled in this root. You can't attach policies of the specified type to entities in a root until you enable that type in the root. For more information, see [Enabling all features in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_AttachPolicy_Examples"></a>

### Example 1
<a name="API_AttachPolicy_Example_1"></a>

The following example shows how to attach a policy to an OU.

#### Sample Request
<a name="API_AttachPolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.AttachPolicy

{ "TargetId": "ou-examplerootid111-exampleouid111", "PolicyId": "p-examplepolicyid111" }
```

#### Sample Response
<a name="API_AttachPolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

### Example 2
<a name="API_AttachPolicy_Example_2"></a>

The following example shows how to attach a policy directly to an account.

#### Sample Request
<a name="API_AttachPolicy_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.AttachPolicy

{ "TargetId": "333333333333", "PolicyId": "p-examplepolicyid111" }
```

#### Sample Response
<a name="API_AttachPolicy_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_AttachPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/AttachPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/AttachPolicy) 

# CancelHandshake
<a name="API_CancelHandshake"></a>

Cancels a [Handshake](API_Handshake.md).

Only the account that sent a handshake can call this operation. The recipient of the handshake can't cancel it, but can use [DeclineHandshake](API_DeclineHandshake.md) to decline. After a handshake is canceled, the recipient can no longer respond to the handshake.

You can view canceled handshakes in API responses for 30 days before they are deleted.

## Request Syntax
<a name="API_CancelHandshake_RequestSyntax"></a>

```
{
   "HandshakeId": "string"
}
```

## Request Parameters
<a name="API_CancelHandshake_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [HandshakeId](#API_CancelHandshake_RequestSyntax) **   <a name="organizations-CancelHandshake-request-HandshakeId"></a>
ID for the handshake that you want to cancel. You can get the ID from the [ListHandshakesForOrganization](API_ListHandshakesForOrganization.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^h-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_CancelHandshake_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_CancelHandshake_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_CancelHandshake_ResponseSyntax) **   <a name="organizations-CancelHandshake-response-Handshake"></a>
A `Handshake` object. Contains for the handshake that you canceled.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_CancelHandshake_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** HandshakeAlreadyInStateException **   
The specified handshake is already in the requested state. For example, you can't accept a handshake that was already accepted.  
HTTP Status Code: 400

 ** HandshakeNotFoundException **   
We can't find a handshake with the `HandshakeId` that you specified.  
HTTP Status Code: 400

 ** InvalidHandshakeTransitionException **   
You can't perform the operation on the handshake in its current state. For example, you can't cancel a handshake that was already accepted or accept a handshake that was already declined.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_CancelHandshake_Examples"></a>

Diego, the admin of an organization, previously sent an invitation to Anaya's account to join the organization. Diego later changes his mind and decides to cancel the invitation before Anaya accepts it. The following example shows Diego canceling the handshake (and the invitation it represents). The output includes a handshake object that shows that the state is now `CANCELED`.

### Example
<a name="API_CancelHandshake_Example_1"></a>

This example illustrates one usage of CancelHandshake.

#### Sample Request
<a name="API_CancelHandshake_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CancelHandshake

{ "HandshakeId": "h-examplehandshakeid111" }
```

#### Sample Response
<a name="API_CancelHandshake_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Handshake": {
    "Id": "h-examplehandshakeid111",
    "State":"CANCELED",
    "Action": "INVITE",
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
    "Parties": [ 
      {
        "Id": "o-exampleorgid",
        "Type": "ORGANIZATION"
      },
      {
        "Id": "anaya@example.com",
        "Type": "EMAIL"
      }
    ],
    "Resources": [
      {
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid",
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Management account"
          },
          {
            "Type": "ORGANIZATION_FEATURE_SET",
            "Value": "CONSOLIDATED_BILLING"
          }
        ]
      },
      {
        "Type": "EMAIL",
        "Value": "anika@example.com"
      },
      {
        "Type": "NOTES",
        "Value": "This is a request for Anaya's account to join Diego's organization."
      }
    ],
    "RequestedTimestamp": 1.47008383521E9,
    "ExpirationTimestamp": 1.47137983521E9
  }
}
```

## See Also
<a name="API_CancelHandshake_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CancelHandshake) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CancelHandshake) 

# CloseAccount
<a name="API_CloseAccount"></a>

Closes an AWS member account within an organization. You can close an account when [all features are enabled ](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html). You can't close the management account with this API. This is an asynchronous request that AWS performs in the background. Because `CloseAccount` operates asynchronously, it can return a successful completion message even though account closure might still be in progress. You need to wait a few minutes before the account is fully closed. To check the status of the request, do one of the following:
+ Use the `AccountId` that you sent in the `CloseAccount` request to provide as a parameter to the [DescribeAccount](API_DescribeAccount.md) operation. 

  While the close account request is in progress, Account status will indicate PENDING\$1CLOSURE. When the close account request completes, the status will change to SUSPENDED. 
+ Check the CloudTrail log for the `CloseAccountResult` event that gets published after the account closes successfully. For information on using CloudTrail with AWS Organizations, see [Logging and monitoring in AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration) in the * AWS Organizations User Guide*.

**Note**  
Resources remaining within the account after closing will be automatically deleted after 90 days. During this 90-day period, the resources won't be available unless you contact AWS Support to reopen the account. After 90 days, you can't reopen an account. You might still receive a [bill after account closure](https://repost.aws/knowledge-center/closed-account-bill). 
Within a rolling 30 day period you can close the higher of either 250 or 20% of the member accounts in your organization, up to a maximum of 1,000. This quota is not bound by a calendar month, but starts when you close an account. After you reach this limit, you can't close additional accounts. For more information, see [Closing a member account in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) and [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*. 
To reinstate a closed account, contact AWS Support within the 90-day grace period while the account is in SUSPENDED status. 
If the AWS account you attempt to close is linked to an AWS GovCloud (US) account, the `CloseAccount` request will close both accounts. To learn important pre-closure details, see [ Closing an AWS GovCloud (US) account](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/Closing-govcloud-account.html) in the * AWS GovCloud User Guide*.

## Request Syntax
<a name="API_CloseAccount_RequestSyntax"></a>

```
{
   "AccountId": "string"
}
```

## Request Parameters
<a name="API_CloseAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_CloseAccount_RequestSyntax) **   <a name="organizations-CloseAccount-request-AccountId"></a>
Retrieves the AWS account Id for the current `CloseAccount` API request.   
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

## Response Elements
<a name="API_CloseAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_CloseAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountAlreadyClosedException **   
You attempted to close an account that is already closed.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConflictException **   
The request failed because it conflicts with the current state of the specified resource.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_CloseAccount_Examples"></a>

### Example
<a name="API_CloseAccount_Example_1"></a>

The following example shows how to close a member account 555555555555. The response does not return an object, only HTTP status.

#### Sample Request
<a name="API_CloseAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CloseAccount

{ "AccountId": "555555555555" }
```

#### Sample Response
<a name="API_CloseAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_CloseAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CloseAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CloseAccount) 

# CreateAccount
<a name="API_CreateAccount"></a>

Creates an AWS account that is automatically a member of the organization whose credentials made the request. This is an asynchronous request that AWS performs in the background. Because `CreateAccount` operates asynchronously, it can return a successful completion message even though account initialization might still be in progress. You might need to wait a few minutes before you can successfully access the account. To check the status of the request, do one of the following:
+ Use the `Id` value of the `CreateAccountStatus` response element from this operation to provide as a parameter to the [DescribeCreateAccountStatus](API_DescribeCreateAccountStatus.md) operation.
+ Check the CloudTrail log for the `CreateAccountResult` event. For information on using CloudTrail with AWS Organizations, see [Logging and monitoring in AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration) in the * AWS Organizations User Guide*.

The user who calls the API to create an account must have the `organizations:CreateAccount` permission. If you enabled all features in the organization, AWS Organizations creates the required service-linked role named `AWSServiceRoleForOrganizations`. For more information, see [AWS Organizations and service-linked roles](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs) in the * AWS Organizations User Guide*.

If the request includes tags, then the requester must have the `organizations:TagResource` permission.

 AWS Organizations preconfigures the new member account with a role (named `OrganizationAccountAccessRole` by default) that grants users in the management account administrator permissions in the new member account. Principals in the management account can assume the role. AWS Organizations clones the company name and address information for the new account from the organization's management account.

You can only call this operation from the management account.

For more information about creating accounts, see [Creating a member account in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) in the * AWS Organizations User Guide*.

**Important**  
When you create an account in an organization using the AWS Organizations console, API, or AWS CLI commands, the information required for the account to operate as a standalone account, such as a payment method is *not* automatically collected. If you must remove an account from your organization later, you can do so only after you provide the missing information. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
If you get an exception that indicates that you exceeded your account limits for the organization, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
If you get an exception that indicates that the operation failed because your organization is still initializing, wait one hour and then try again. If the error persists, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
It isn't recommended to use `CreateAccount` to create multiple temporary accounts, and using the `CreateAccount` API to close accounts is subject to a 30-day usage quota. For information on the requirements and process for closing an account, see [Closing a member account in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) in the * AWS Organizations User Guide*.

**Note**  
When you create a member account with this operation, you can choose whether to create the account with the **IAM User and Role Access to Billing Information** switch enabled. If you enable it, IAM users and roles that have appropriate permissions can view billing information for the account. If you disable it, only the account root user can access billing information. For information about how to disable this switch for an account, see [Granting access to your billing information and tools](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/control-access-billing.html#grantaccess).

## Request Syntax
<a name="API_CreateAccount_RequestSyntax"></a>

```
{
   "AccountName": "string",
   "Email": "string",
   "IamUserAccessToBilling": "string",
   "RoleName": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_CreateAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountName](#API_CreateAccount_RequestSyntax) **   <a name="organizations-CreateAccount-request-AccountName"></a>
The friendly name of the member account.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 50.  
Pattern: `[\u0020-\u007E]+`   
Required: Yes

 ** [Email](#API_CreateAccount_RequestSyntax) **   <a name="organizations-CreateAccount-request-Email"></a>
The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation.  
The rules for a valid email address:  
+ The address must be a minimum of 6 and a maximum of 64 characters long.
+ All characters must be 7-bit ASCII characters.
+ There must be one and only one @ symbol, which separates the local name from the domain name.
+ The local name can't contain any of the following characters:

  whitespace, " ' ( ) < > [ ] : ; , \$1 \$1 % &
+ The local name can't begin with a dot (.)
+ The domain name can consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)
+ The domain name can't begin or end with a hyphen (-) or dot (.)
+ The domain name must contain at least one dot
You can't access the root user of the account or remove an account that was created with an invalid email address.  
Type: String  
Length Constraints: Minimum length of 6. Maximum length of 64.  
Pattern: `See rules in parameter description`   
Required: Yes

 ** [IamUserAccessToBilling](#API_CreateAccount_RequestSyntax) **   <a name="organizations-CreateAccount-request-IamUserAccessToBilling"></a>
If set to `ALLOW`, the new account enables IAM users to access account billing information *if* they have the required permissions. If set to `DENY`, only the root user of the new account can access account billing information. For more information, see [About IAM access to the Billing and Cost Management console](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) in the * AWS Billing and Cost Management User Guide*.  
If you don't specify this parameter, the value defaults to `ALLOW`, and IAM users and roles with the required permissions can access billing information for the new account.  
Type: String  
Valid Values: `ALLOW | DENY`   
Required: No

 ** [RoleName](#API_CreateAccount_RequestSyntax) **   <a name="organizations-CreateAccount-request-RoleName"></a>
The name of an IAM role that AWS Organizations automatically preconfigures in the new member account. This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account.  
If you don't specify this parameter, the role name defaults to `OrganizationAccountAccessRole`.  
For more information about how to use this role to access the member account, see the following links:  
+  [Creating the OrganizationAccountAccessRole in an invited member account](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) in the * AWS Organizations User Guide* 
+ Steps 2 and 3 in [IAM Tutorial: Delegate access across AWS accounts using IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) in the *IAM User Guide* 
The [regex pattern](http://wikipedia.org/wiki/regex) that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-  
Type: String  
Length Constraints: Maximum length of 64.  
Pattern: `[\w+=,.@-]{1,64}`   
Required: No

 ** [Tags](#API_CreateAccount_RequestSyntax) **   <a name="organizations-CreateAccount-request-Tags"></a>
A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account, then the entire request fails and the account is not created.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_CreateAccount_ResponseSyntax"></a>

```
{
   "CreateAccountStatus": { 
      "AccountId": "string",
      "AccountName": "string",
      "CompletedTimestamp": number,
      "FailureReason": "string",
      "GovCloudAccountId": "string",
      "Id": "string",
      "RequestedTimestamp": number,
      "State": "string"
   }
}
```

## Response Elements
<a name="API_CreateAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CreateAccountStatus](#API_CreateAccount_ResponseSyntax) **   <a name="organizations-CreateAccount-response-CreateAccountStatus"></a>
A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned `CreateAccountStatus` ID as a parameter to [DescribeCreateAccountStatus](API_DescribeCreateAccountStatus.md) to get status about the progress of the request at later times. You can also check the CloudTrail log for the `CreateAccountResult` event. For more information, see [Logging and monitoring in AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html) in the * AWS Organizations User Guide*.  
Type: [CreateAccountStatus](API_CreateAccountStatus.md) object

## Errors
<a name="API_CreateAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** FinalizingOrganizationException **   
 AWS Organizations couldn't perform the operation because your organization hasn't finished initializing. This can take up to an hour. Try again later. If after one hour you continue to receive this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_CreateAccount_Examples"></a>

### Example
<a name="API_CreateAccount_Example_1"></a>

The following example shows how to create a member account in an organization. The member account is configured with the name `Production Account` and the email address of `anaya@example.com`. AWS Organizations automatically creates an IAM role using the default name of `OrganizationAccountAccessRole` because the `roleName` parameter isn't specified. Also, the setting that allows IAM users or roles with sufficient permissions to access account billing data is set to the default value of `ALLOW` because the `IamUserAccessToBilling` parameter isn't specified. AWS Organizations automatically sends Anaya a "Welcome to AWS" email.

#### Sample Request
<a name="API_CreateAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreateAccount

{ "Email": "anaya@example.com", "AccountName": "Production Account" }
```

#### Sample Response
<a name="API_CreateAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "CreateAccountStatus": {
    "State": "IN_PROGRESS",
    "Id": "car-examplecreateaccountrequestid111"
  }
}
```

## See Also
<a name="API_CreateAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CreateAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CreateAccount) 

# CreateGovCloudAccount
<a name="API_CreateGovCloudAccount"></a>

This action is available if all of the following are true:
+ You're authorized to create accounts in the AWS GovCloud (US) Region. For more information on the AWS GovCloud (US) Region, see the [* AWS GovCloud User Guide*.](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html) 
+ You already have an account in the AWS GovCloud (US) Region that is paired with a management account of an organization in the commercial Region.
+ You call this action from the management account of your organization in the commercial Region.
+ You have the `organizations:CreateGovCloudAccount` permission. 

 AWS Organizations automatically creates the required service-linked role named `AWSServiceRoleForOrganizations`. For more information, see [AWS Organizations and service-linked roles](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs) in the * AWS Organizations User Guide*.

 AWS automatically enables CloudTrail for AWS GovCloud (US) accounts, but you should also do the following:
+ Verify that CloudTrail is enabled to store logs.
+ Create an Amazon S3 bucket for CloudTrail log storage.

  For more information, see [Verifying CloudTrail Is Enabled](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html) in the * AWS GovCloud User Guide*. 

If the request includes tags, then the requester must have the `organizations:TagResource` permission. The tags are attached to the commercial account associated with the GovCloud account, rather than the GovCloud account itself. To add tags to the GovCloud account, call the [TagResource](API_TagResource.md) operation in the GovCloud Region after the new GovCloud account exists.

You call this action from the management account of your organization in the commercial Region to create a standalone AWS account in the AWS GovCloud (US) Region. After the account is created, the management account of an organization in the AWS GovCloud (US) Region can invite it to that organization. For more information on inviting standalone accounts in the AWS GovCloud (US) to join an organization, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.

Calling `CreateGovCloudAccount` is an asynchronous request that AWS performs in the background. Because `CreateGovCloudAccount` operates asynchronously, it can return a successful completion message even though account initialization might still be in progress. You might need to wait a few minutes before you can successfully access the account. To check the status of the request, do one of the following:
+ Use the `OperationId` response element from this operation to provide as a parameter to the [DescribeCreateAccountStatus](API_DescribeCreateAccountStatus.md) operation.
+ Check the CloudTrail log for the `CreateAccountResult` event. For information on using CloudTrail with Organizations, see [Logging and monitoring in AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html) in the * AWS Organizations User Guide*.



When you call the `CreateGovCloudAccount` action, you create two accounts: a standalone account in the AWS GovCloud (US) Region and an associated account in the commercial Region for billing and support purposes. The account in the commercial Region is automatically a member of the organization whose credentials made the request. Both accounts are associated with the same email address.

A role is created in the new account in the commercial Region that allows the management account in the organization in the commercial Region to assume it. An AWS GovCloud (US) account is then created and associated with the commercial account that you just created. A role is also created in the new AWS GovCloud (US) account that can be assumed by the AWS GovCloud (US) account that is associated with the management account of the commercial organization. For more information and to view a diagram that explains how account access works, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.

For more information about creating accounts, see [Creating a member account in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) in the * AWS Organizations User Guide*.

**Important**  
When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required for the account to operate as a standalone account is *not* automatically collected. This includes a payment method and signing the end user license agreement (EULA). If you must remove an account from your organization later, you can do so only after you provide the missing information. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
If you get an exception that indicates that you exceeded your account limits for the organization, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
If you get an exception that indicates that the operation failed because your organization is still initializing, wait one hour and then try again. If the error persists, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
Using `CreateGovCloudAccount` to create multiple temporary accounts isn't recommended. You can only close an account from the AWS Billing and Cost Management console, and you must be signed in as the root user. For information on the requirements and process for closing an account, see [Closing a member account in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) in the * AWS Organizations User Guide*.

**Note**  
When you create a member account with this operation, you can choose whether to create the account with the **IAM User and Role Access to Billing Information** switch enabled. If you enable it, IAM users and roles that have appropriate permissions can view billing information for the account. If you disable it, only the account root user can access billing information. For information about how to disable this switch for an account, see [Granting access to your billing information and tools](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).

## Request Syntax
<a name="API_CreateGovCloudAccount_RequestSyntax"></a>

```
{
   "AccountName": "string",
   "Email": "string",
   "IamUserAccessToBilling": "string",
   "RoleName": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_CreateGovCloudAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountName](#API_CreateGovCloudAccount_RequestSyntax) **   <a name="organizations-CreateGovCloudAccount-request-AccountName"></a>
The friendly name of the member account.   
The account name can consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.) You can't separate characters with a dash (–).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 50.  
Pattern: `[\u0020-\u007E]+`   
Required: Yes

 ** [Email](#API_CreateGovCloudAccount_RequestSyntax) **   <a name="organizations-CreateGovCloudAccount-request-Email"></a>
Specifies the email address of the owner to assign to the new member account in the commercial Region. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation.  
The rules for a valid email address:  
+ The address must be a minimum of 6 and a maximum of 64 characters long.
+ All characters must be 7-bit ASCII characters.
+ There must be one and only one @ symbol, which separates the local name from the domain name.
+ The local name can't contain any of the following characters:

  whitespace, " ' ( ) < > [ ] : ; , \$1 \$1 % &
+ The local name can't begin with a dot (.)
+ The domain name can consist of only the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.)
+ The domain name can't begin or end with a hyphen (-) or dot (.)
+ The domain name must contain at least one dot
You can't access the root user of the account or remove an account that was created with an invalid email address. Like all request parameters for `CreateGovCloudAccount`, the request for the email address for the AWS GovCloud (US) account originates from the commercial Region, not from the AWS GovCloud (US) Region.  
Type: String  
Length Constraints: Minimum length of 6. Maximum length of 64.  
Pattern: `See rules in parameter description`   
Required: Yes

 ** [IamUserAccessToBilling](#API_CreateGovCloudAccount_RequestSyntax) **   <a name="organizations-CreateGovCloudAccount-request-IamUserAccessToBilling"></a>
If set to `ALLOW`, the new linked account in the commercial Region enables IAM users to access account billing information *if* they have the required permissions. If set to `DENY`, only the root user of the new account can access account billing information. For more information, see [About IAM access to the Billing and Cost Management console](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) in the * AWS Billing and Cost Management User Guide*.  
If you don't specify this parameter, the value defaults to `ALLOW`, and IAM users and roles with the required permissions can access billing information for the new account.  
Type: String  
Valid Values: `ALLOW | DENY`   
Required: No

 ** [RoleName](#API_CreateGovCloudAccount_RequestSyntax) **   <a name="organizations-CreateGovCloudAccount-request-RoleName"></a>
(Optional)  
The name of an IAM role that AWS Organizations automatically preconfigures in the new member accounts in both the AWS GovCloud (US) Region and in the commercial Region. This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account.  
If you don't specify this parameter, the role name defaults to `OrganizationAccountAccessRole`.  
For more information about how to use this role to access the member account, see the following links:  
+  [Creating the OrganizationAccountAccessRole in an invited member account](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) in the * AWS Organizations User Guide* 
+ Steps 2 and 3 in [IAM Tutorial: Delegate access across AWS accounts using IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) in the *IAM User Guide* 
The [regex pattern](http://wikipedia.org/wiki/regex) that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-  
Type: String  
Length Constraints: Maximum length of 64.  
Pattern: `[\w+=,.@-]{1,64}`   
Required: No

 ** [Tags](#API_CreateGovCloudAccount_RequestSyntax) **   <a name="organizations-CreateGovCloudAccount-request-Tags"></a>
A list of tags that you want to attach to the newly created account. These tags are attached to the commercial account associated with the GovCloud account, and not to the GovCloud account itself. To add tags to the actual GovCloud account, call the [TagResource](API_TagResource.md) operation in the GovCloud region after the new GovCloud account exists.  
For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account, then the entire request fails and the account is not created.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_CreateGovCloudAccount_ResponseSyntax"></a>

```
{
   "CreateAccountStatus": { 
      "AccountId": "string",
      "AccountName": "string",
      "CompletedTimestamp": number,
      "FailureReason": "string",
      "GovCloudAccountId": "string",
      "Id": "string",
      "RequestedTimestamp": number,
      "State": "string"
   }
}
```

## Response Elements
<a name="API_CreateGovCloudAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CreateAccountStatus](#API_CreateGovCloudAccount_ResponseSyntax) **   <a name="organizations-CreateGovCloudAccount-response-CreateAccountStatus"></a>
Contains the status about a [CreateAccount](API_CreateAccount.md) or [CreateGovCloudAccount](#API_CreateGovCloudAccount) request to create an AWS account or an AWS GovCloud (US) account in an organization.  
Type: [CreateAccountStatus](API_CreateAccountStatus.md) object

## Errors
<a name="API_CreateGovCloudAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** FinalizingOrganizationException **   
 AWS Organizations couldn't perform the operation because your organization hasn't finished initializing. This can take up to an hour. Try again later. If after one hour you continue to receive this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_CreateGovCloudAccount_Examples"></a>

### Example
<a name="API_CreateGovCloudAccount_Example_1"></a>

The following example shows how to create a member account in the AWS GovCloud (US) Region in an organization. The commercial account is configured with the name `Production Account` and the email address of `anaya@example.com`. AWS Organizations automatically creates an IAM role using the default name of `OrganizationAccountAccessRole` because the `roleName` parameter isn't specified. Also, the setting that allows IAM users or roles with sufficient permissions to access account billing data in the account in the commercial Region is set to the default value of `ALLOW` because the `IamUserAccessToBilling` parameter isn't specified. AWS Organizations automatically sends Anaya a "Welcome to AWS" email.

#### Sample Request
<a name="API_CreateGovCloudAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreateGovCloudAccount

{ "Email": "anaya@example.com", "AccountName": "Production Account" }
```

#### Sample Response
<a name="API_CreateGovCloudAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "CreateAccountStatus": {
    "State": "IN_PROGRESS",
    "Id": "car-examplecreateaccountrequestid111"
  }
}
```

## See Also
<a name="API_CreateGovCloudAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CreateGovCloudAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CreateGovCloudAccount) 

# CreateOrganization
<a name="API_CreateOrganization"></a>

Creates an AWS organization. The account whose user is calling the `CreateOrganization` operation automatically becomes the [management account](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account) of the new organization.

This operation must be called using credentials from the account that is to become the new organization's management account. The principal must also have the relevant IAM permissions.

By default (or if you set the `FeatureSet` parameter to `ALL`), the new organization is created with all features enabled and service control policies automatically enabled in the root. If you instead choose to create the organization supporting only the consolidated billing features by setting the `FeatureSet` parameter to `CONSOLIDATED_BILLING`, no policy types are enabled by default and you can't use organization policies.

## Request Syntax
<a name="API_CreateOrganization_RequestSyntax"></a>

```
{
   "FeatureSet": "string"
}
```

## Request Parameters
<a name="API_CreateOrganization_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [FeatureSet](#API_CreateOrganization_RequestSyntax) **   <a name="organizations-CreateOrganization-request-FeatureSet"></a>
Specifies the feature set supported by the new organization. Each feature set supports different levels of functionality.  
+  `CONSOLIDATED_BILLING`: All member accounts have their bills consolidated to and paid by the management account. For more information, see [Consolidated billing](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) in the * AWS Organizations User Guide*.

   The consolidated billing feature subset isn't available for organizations in the AWS GovCloud (US) Region.
+  `ALL`: In addition to all the features supported by the consolidated billing feature set, the management account can also apply any policy type to any member account in the organization. For more information, see [All features](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all) in the * AWS Organizations User Guide*.
Type: String  
Valid Values: `ALL | CONSOLIDATED_BILLING`   
Required: No

## Response Syntax
<a name="API_CreateOrganization_ResponseSyntax"></a>

```
{
   "Organization": { 
      "Arn": "string",
      "AvailablePolicyTypes": [ 
         { 
            "Status": "string",
            "Type": "string"
         }
      ],
      "FeatureSet": "string",
      "Id": "string",
      "MasterAccountArn": "string",
      "MasterAccountEmail": "string",
      "MasterAccountId": "string"
   }
}
```

## Response Elements
<a name="API_CreateOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Organization](#API_CreateOrganization_ResponseSyntax) **   <a name="organizations-CreateOrganization-response-Organization"></a>
A structure that contains details about the newly created organization.  
Type: [Organization](API_Organization.md) object

## Errors
<a name="API_CreateOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccessDeniedForDependencyException **   
The operation that you attempted requires you to have the `iam:CreateServiceLinkedRole` for `organizations.amazonaws.com` permission so that AWS Organizations can create the required service-linked role. You don't have that permission.  
HTTP Status Code: 400

 ** AlreadyInOrganizationException **   
This account is already a member of an organization. An account can belong to only one organization at a time.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_CreateOrganization_Examples"></a>

### Example
<a name="API_CreateOrganization_Example_1"></a>

Diego wants to create an organization using credentials from account 111111111111. The following example shows that the account becomes the management account in the new organization. Because he doesn't specify a features set, the new organization defaults to all features enabled and service control policies are enabled on the root.

The output includes an organization structure that contains details about the new organization.

#### Sample Request
<a name="API_CreateOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreateOrganization

{}
```

#### Sample Response
<a name="API_CreateOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Organization": {
    "AvailablePolicyTypes": [
      {
        "Status": "ENABLED",
        "Type": "SERVICE_CONTROL_POLICY"
      }
    ],
    "MasterAccountId": "111111111111",
    "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
    "MasterAccountEmail": "diego@example.com",
    "FeatureSet": "ALL",
    "Id": "o-exampleorgid",
    "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid"
  }
}
```

### Example
<a name="API_CreateOrganization_Example_2"></a>

The following example creates an organization that supports only the consolidated billing features.

#### Sample Request
<a name="API_CreateOrganization_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreateOrganization

{ "FeatureSet": "CONSOLIDATED_BILLING" }
```

#### Sample Response
<a name="API_CreateOrganization_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Organization": {
    "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
    "AvailablePolicyTypes": [],
    "Id": "o-exampleorgid",
    "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
    "MasterAccountEmail": "diego@example.com",
    "MasterAccountId": "111111111111",
    "FeatureSet": "CONSOLIDATED_BILLING"
  }
}
```

## See Also
<a name="API_CreateOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CreateOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CreateOrganization) 

# CreateOrganizationalUnit
<a name="API_CreateOrganizationalUnit"></a>

Creates an organizational unit (OU) within a root or parent OU. An OU is a container for accounts that enables you to organize your accounts to apply policies according to your business requirements. The number of levels deep that you can nest OUs is dependent upon the policy types enabled for that root. For service control policies, the limit is five.

For more information about OUs, see [Managing organizational units (OUs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html) in the * AWS Organizations User Guide*.

If the request includes tags, then the requester must have the `organizations:TagResource` permission.

You can only call this operation from the management account.

## Request Syntax
<a name="API_CreateOrganizationalUnit_RequestSyntax"></a>

```
{
   "Name": "string",
   "ParentId": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_CreateOrganizationalUnit_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Name](#API_CreateOrganizationalUnit_RequestSyntax) **   <a name="organizations-CreateOrganizationalUnit-request-Name"></a>
The friendly name to assign to the new OU.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [ParentId](#API_CreateOrganizationalUnit_RequestSyntax) **   <a name="organizations-CreateOrganizationalUnit-request-ParentId"></a>
ID for the parent root or OU that you want to create the new OU in.  
The [regex pattern](http://wikipedia.org/wiki/regex) 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

 ** [Tags](#API_CreateOrganizationalUnit_RequestSyntax) **   <a name="organizations-CreateOrganizationalUnit-request-Tags"></a>
A list of tags that you want to attach to the newly created OU. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
If any one of the tags is not valid or if you exceed the allowed number of tags for an OU, then the entire request fails and the OU is not created.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_CreateOrganizationalUnit_ResponseSyntax"></a>

```
{
   "OrganizationalUnit": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "Path": "string"
   }
}
```

## Response Elements
<a name="API_CreateOrganizationalUnit_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [OrganizationalUnit](#API_CreateOrganizationalUnit_ResponseSyntax) **   <a name="organizations-CreateOrganizationalUnit-response-OrganizationalUnit"></a>
A structure that contains details about the newly created OU.  
Type: [OrganizationalUnit](API_OrganizationalUnit.md) object

## Errors
<a name="API_CreateOrganizationalUnit_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicateOrganizationalUnitException **   
An OU with the same name already exists.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ParentNotFoundException **   
We can't find a root or OU with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_CreateOrganizationalUnit_Examples"></a>

### Example
<a name="API_CreateOrganizationalUnit_Example_1"></a>

The following example shows how to create an OU that is named `AccountingOU`.

#### Sample Request
<a name="API_CreateOrganizationalUnit_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreateOrganizationalUnit

{ "ParentId": "r-examplerootid111", "Name": "AccountingOU" }
```

#### Sample Response
<a name="API_CreateOrganizationalUnit_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "OrganizationalUnit": {
    "Id": "ou-examplerootid111-exampleouid111",
    "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
    "Name": "AccountingOU",
    "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
  }
}
```

## See Also
<a name="API_CreateOrganizationalUnit_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CreateOrganizationalUnit) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CreateOrganizationalUnit) 

# CreatePolicy
<a name="API_CreatePolicy"></a>

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account.

For more information about policies and their use, see [Managing AWS Organizations policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html).

If the request includes tags, then the requester must have the `organizations:TagResource` permission.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_CreatePolicy_RequestSyntax"></a>

```
{
   "Content": "string",
   "Description": "string",
   "Name": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "Type": "string"
}
```

## Request Parameters
<a name="API_CreatePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Content](#API_CreatePolicy_RequestSyntax) **   <a name="organizations-CreatePolicy-request-Content"></a>
The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in the `Type` parameter.   
The maximum size of a policy document depends on the policy's type. For more information, see [Maximum and minimum values](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values) in the * AWS Organizations User Guide*.  
Type: String  
Length Constraints: Minimum length of 1.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [Description](#API_CreatePolicy_RequestSyntax) **   <a name="organizations-CreatePolicy-request-Description"></a>
An optional description to assign to the policy.  
Type: String  
Length Constraints: Maximum length of 512.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [Name](#API_CreatePolicy_RequestSyntax) **   <a name="organizations-CreatePolicy-request-Name"></a>
The friendly name to assign to the policy.  
The [regex pattern](http://wikipedia.org/wiki/regex) that is used to validate this parameter is a string of any of the characters in the ASCII character range.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [Tags](#API_CreatePolicy_RequestSyntax) **   <a name="organizations-CreatePolicy-request-Tags"></a>
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

 ** [Type](#API_CreatePolicy_RequestSyntax) **   <a name="organizations-CreatePolicy-request-Type"></a>
The type of policy to create. You can specify one of the following values:  
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

## Response Syntax
<a name="API_CreatePolicy_ResponseSyntax"></a>

```
{
   "Policy": { 
      "Content": "string",
      "PolicySummary": { 
         "Arn": "string",
         "AwsManaged": boolean,
         "Description": "string",
         "Id": "string",
         "Name": "string",
         "Type": "string"
      }
   }
}
```

## Response Elements
<a name="API_CreatePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_CreatePolicy_ResponseSyntax) **   <a name="organizations-CreatePolicy-response-Policy"></a>
A structure that contains details about the newly created policy.  
Type: [Policy](API_Policy.md) object

## Errors
<a name="API_CreatePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicatePolicyException **   
A policy with the same name already exists.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** MalformedPolicyDocumentException **   
The provided policy document doesn't meet the requirements of the specified policy type. For example, the syntax might be incorrect. For details about service control policy syntax, see [SCP syntax](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** PolicyTypeNotAvailableForOrganizationException **   
You can't use the specified policy type with the feature set currently enabled for this organization. For example, you can enable SCPs only after you enable all features in the organization. For more information, see [Managing AWS Organizations policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_CreatePolicy_Examples"></a>

### Example
<a name="API_CreatePolicy_Example_1"></a>

The following example shows how to create a service control policy (SCP) that is named `AllowAllS3Actions`. The JSON string in the `content` parameter specifies the content in the policy. The parameter string is escaped with backslashes. This helps ensure that the embedded double quotation marks in the JSON policy are treated as literals in the parameter, which itself is surrounded by double quotation marks.

#### Sample Request
<a name="API_CreatePolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreatePolicy

{ "Content": "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}}", 
  "Type": "SERVICE_CONTROL_POLICY", 
  "Description": "Enables admins of attached accounts to delegate all S3 permissions", 
  "Name": "AllowAllS3Actions" }
```

#### Sample Response
<a name="API_CreatePolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Policy": {
    "Content": "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}}",
    "PolicySummary": {
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
      "Description": "Allows delegation of all S3 actions",
      "Name": "AllowAllS3Actions",
      "Type":"SERVICE_CONTROL_POLICY"
    }
  }
}
```

### Example
<a name="API_CreatePolicy_Example_2"></a>

The following example shows how to create a resource control policy (RCP) that is named `EnforceSSL`. The JSON string in the `content` parameter specifies the content in the policy. The parameter string is escaped with backslashes. This helps ensure that the embedded double quotation marks in the JSON policy are treated as literals in the parameter, which itself is surrounded by double quotation marks.

#### Sample Request
<a name="API_CreatePolicy_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.CreatePolicy

{  "Content": " {\"Version\":\"2012-10-
17\",\"Statement\":{\"Effect\":\"Deny\",\"Principal\":\"*\","Action\":\"*\",\"Resource\":
\"*\,"Condition\":{\"BoolIfExists\":{\"aws:SecureTransport\":\"false\"}}",
 "Description": "Requires that access to all resources are sent using SSL",
 "Name": "EnforceSSL",
 "Type": "RESOURCE_CONTROL_POLICY"
}
```

#### Sample Response
<a name="API_CreatePolicy_Example_2_Response"></a>

```
"HTTP/1.1 200 OK
Content-Type":"application/json"{
   "Policy":{
      "Content":" {\"Version\":\"2012-10-
17\",\"Statement\":{\"Effect\":\"Deny\",\"Principal\":\"*\",""Action\\"":\"*\",\"Resource\":
\"*\\,""Condition\\"":{\"BoolIfExists\":{\"aws:SecureTransport\":\"false\"}}",
      "PolicySummary":{
         "Arn":"arn:aws:organizations::111111111111:policy/oexampleorgid/resource_control_policy/p-examplepolicyid111",
         "Description":"Requires that access to all resources are sent using SSL",
         "Name":"EnforceSSL",
         "Type":"RESOURCE_CONTROL_POLICY"
      }
   }
}
```

## See Also
<a name="API_CreatePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/CreatePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/CreatePolicy) 

# DeclineHandshake
<a name="API_DeclineHandshake"></a>

Declines a [Handshake](API_Handshake.md).

Only the account that receives a handshake can call this operation. The sender of the handshake can use [CancelHandshake](API_CancelHandshake.md) to cancel if the handshake hasn't yet been responded to.

You can view canceled handshakes in API responses for 30 days before they are deleted.

## Request Syntax
<a name="API_DeclineHandshake_RequestSyntax"></a>

```
{
   "HandshakeId": "string"
}
```

## Request Parameters
<a name="API_DeclineHandshake_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [HandshakeId](#API_DeclineHandshake_RequestSyntax) **   <a name="organizations-DeclineHandshake-request-HandshakeId"></a>
ID for the handshake that you want to decline. You can get the ID from the [ListHandshakesForAccount](API_ListHandshakesForAccount.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^h-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_DeclineHandshake_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_DeclineHandshake_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_DeclineHandshake_ResponseSyntax) **   <a name="organizations-DeclineHandshake-response-Handshake"></a>
A `Handshake` object. Contains details for the declined handshake.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_DeclineHandshake_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** HandshakeAlreadyInStateException **   
The specified handshake is already in the requested state. For example, you can't accept a handshake that was already accepted.  
HTTP Status Code: 400

 ** HandshakeNotFoundException **   
We can't find a handshake with the `HandshakeId` that you specified.  
HTTP Status Code: 400

 ** InvalidHandshakeTransitionException **   
You can't perform the operation on the handshake in its current state. For example, you can't cancel a handshake that was already accepted or accept a handshake that was already declined.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DeclineHandshake_Examples"></a>

### Example
<a name="API_DeclineHandshake_Example_1"></a>

The following example shows Anaya declining an invitation to join Diego's organization. The `DeclineHandshake` operation returns a handshake object, showing that the state is now `DECLINED`.

#### Sample Request
<a name="API_DeclineHandshake_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DeclineHandshake

{ "HandshakeId": "h-examplehandshakeid111" }
```

#### Sample Response
<a name="API_DeclineHandshake_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Handshake": {
    "Id": "h-examplehandshakeid111",
    "State": "DECLINED",
    "Resources": [
      {
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid",
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Management account"
          }
        ]
      },
      {
        "Type": "EMAIL",
        "Value": "anaya@example.com"
      },
      {
        "Type": "NOTES",
        "Value": "This is an invitation to Anaya's account to join the Diego's organization."
      }
    ],
    "Parties": [
      {
        "Type": "EMAIL",
        "Id": "anaya@example.com"
      },
      {
        "Type": "ORGANIZATION",
        "Id": "o-exampleorgid"
      }
    ],
    "Action": "INVITE",
    "RequestedTimestamp": 1470684478.687,
    "ExpirationTimestamp": 1471980478.687,
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111"
  }
}
```

## See Also
<a name="API_DeclineHandshake_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeclineHandshake) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeclineHandshake) 

# DeleteOrganization
<a name="API_DeleteOrganization"></a>

Deletes the organization. You can delete an organization only by using credentials from the management account. The organization must be empty of member accounts.

## Response Elements
<a name="API_DeleteOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeleteOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** OrganizationNotEmptyException **   
The organization isn't empty. To delete an organization, you must first remove all accounts except the management account.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteOrganization_Examples"></a>

### Example
<a name="API_DeleteOrganization_Example_1"></a>

The following example shows how to delete an organization. To perform this operation, you must be an admin of the management account in the organization. The example assumes that you previously removed all the member accounts, OUs, and policies from the organization.

#### Sample Request
<a name="API_DeleteOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DeleteOrganization

{}
```

#### Sample Response
<a name="API_DeleteOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DeleteOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeleteOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeleteOrganization) 

# DeleteOrganizationalUnit
<a name="API_DeleteOrganizationalUnit"></a>

Deletes an organizational unit (OU) from a root or another OU. You must first remove all accounts and child OUs from the OU that you want to delete.

You can only call this operation from the management account.

## Request Syntax
<a name="API_DeleteOrganizationalUnit_RequestSyntax"></a>

```
{
   "OrganizationalUnitId": "string"
}
```

## Request Parameters
<a name="API_DeleteOrganizationalUnit_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [OrganizationalUnitId](#API_DeleteOrganizationalUnit_RequestSyntax) **   <a name="organizations-DeleteOrganizationalUnit-request-OrganizationalUnitId"></a>
ID for the organizational unit that you want to delete. You can get the ID from the [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 68.  
Pattern: `^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$`   
Required: Yes

## Response Elements
<a name="API_DeleteOrganizationalUnit_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeleteOrganizationalUnit_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** OrganizationalUnitNotEmptyException **   
The specified OU is not empty. Move all accounts to another root or to other OUs, remove all child OUs, and try the operation again.  
HTTP Status Code: 400

 ** OrganizationalUnitNotFoundException **   
We can't find an OU with the `OrganizationalUnitId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteOrganizationalUnit_Examples"></a>

### Example
<a name="API_DeleteOrganizationalUnit_Example_1"></a>

The following example shows how to delete an OU. The example assumes that you previously removed all accounts and other OUs from the OU.

#### Sample Request
<a name="API_DeleteOrganizationalUnit_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DeleteOrganizationalUnit

{ "OrganizationalUnitId": "ou-examplerootid111-exampleouid111" }
```

#### Sample Response
<a name="API_DeleteOrganizationalUnit_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DeleteOrganizationalUnit_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeleteOrganizationalUnit) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeleteOrganizationalUnit) 

# DeletePolicy
<a name="API_DeletePolicy"></a>

Deletes the specified policy from your organization. Before you perform this operation, you must first detach the policy from all organizational units (OUs), roots, and accounts.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DeletePolicy_RequestSyntax"></a>

```
{
   "PolicyId": "string"
}
```

## Request Parameters
<a name="API_DeletePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyId](#API_DeletePolicy_RequestSyntax) **   <a name="organizations-DeletePolicy-request-PolicyId"></a>
ID for the policy that you want to delete. You can get the ID from the [ListPolicies](API_ListPolicies.md) or [ListPoliciesForTarget](API_ListPoliciesForTarget.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

## Response Elements
<a name="API_DeletePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeletePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyInUseException **   
The policy is attached to one or more entities. You must detach it from all roots, OUs, and accounts before performing this operation.  
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DeletePolicy_Examples"></a>

### Example
<a name="API_DeletePolicy_Example_1"></a>

The following example shows how to delete a policy from an organization. The example assumes that you previously detached the policy from all entities.

#### Sample Request
<a name="API_DeletePolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DeletePolicy

{ "PolicyId": "p-examplepolicyid111" }
```

#### Sample Response
<a name="API_DeletePolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DeletePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeletePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeletePolicy) 

# DeleteResourcePolicy
<a name="API_DeleteResourcePolicy"></a>

Deletes the resource policy from your organization.

You can only call this operation from the management account.

## Response Elements
<a name="API_DeleteResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeleteResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** ResourcePolicyNotFoundException **   
We can't find a resource policy request with the parameter that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeleteResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeleteResourcePolicy) 

# DeregisterDelegatedAdministrator
<a name="API_DeregisterDelegatedAdministrator"></a>

Removes the specified member AWS account as a delegated administrator for the specified AWS service.

**Important**  
Deregistering a delegated administrator can have unintended impacts on the functionality of the enabled AWS service. See the documentation for the enabled service before you deregister a delegated administrator so that you understand any potential impacts.

You can run this action only for AWS services that support this feature. For a current list of services that support it, see the column *Supports Delegated Administrator* in the table at [AWS Services that you can use with AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) in the * AWS Organizations User Guide.* 

You can only call this operation from the management account.

## Request Syntax
<a name="API_DeregisterDelegatedAdministrator_RequestSyntax"></a>

```
{
   "AccountId": "string",
   "ServicePrincipal": "string"
}
```

## Request Parameters
<a name="API_DeregisterDelegatedAdministrator_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_DeregisterDelegatedAdministrator_RequestSyntax) **   <a name="organizations-DeregisterDelegatedAdministrator-request-AccountId"></a>
The account ID number of the member account in the organization that you want to deregister as a delegated administrator.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

 ** [ServicePrincipal](#API_DeregisterDelegatedAdministrator_RequestSyntax) **   <a name="organizations-DeregisterDelegatedAdministrator-request-ServicePrincipal"></a>
The service principal name of an AWS service for which the account is a delegated administrator.  
Delegated administrator privileges are revoked for only the specified AWS service from the member account. If the specified service is the only service for which the member account is a delegated administrator, the operation also revokes Organizations read action permissions.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+=,.@-]*`   
Required: Yes

## Response Elements
<a name="API_DeregisterDelegatedAdministrator_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeregisterDelegatedAdministrator_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AccountNotRegisteredException **   
The specified account is not a delegated administrator for this AWS service.   
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DeregisterDelegatedAdministrator_Examples"></a>

### Example
<a name="API_DeregisterDelegatedAdministrator_Example_1"></a>

This example illustrates one usage of DeregisterDelegatedAdministrator.

#### Sample Request
<a name="API_DeregisterDelegatedAdministrator_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DeregisterDelegatedAdministrator

{ "AccountId": "555555555555", "ServicePrincipal": "example.amazonaws.com" }
```

#### Sample Response
<a name="API_DeregisterDelegatedAdministrator_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DeregisterDelegatedAdministrator_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DeregisterDelegatedAdministrator) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DeregisterDelegatedAdministrator) 

# DescribeAccount
<a name="API_DescribeAccount"></a>

Retrieves AWS Organizations-related information about the specified account.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DescribeAccount_RequestSyntax"></a>

```
{
   "AccountId": "string"
}
```

## Request Parameters
<a name="API_DescribeAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_DescribeAccount_RequestSyntax) **   <a name="organizations-DescribeAccount-request-AccountId"></a>
The unique identifier (ID) of the AWS account that you want information about. You can get the ID from the [ListAccounts](API_ListAccounts.md) or [ListAccountsForParent](API_ListAccountsForParent.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an account ID string requires exactly 12 digits.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

## Response Syntax
<a name="API_DescribeAccount_ResponseSyntax"></a>

```
{
   "Account": { 
      "Arn": "string",
      "Email": "string",
      "Id": "string",
      "JoinedMethod": "string",
      "JoinedTimestamp": number,
      "Name": "string",
      "Paths": [ "string" ],
      "State": "string",
      "Status": "string"
   }
}
```

## Response Elements
<a name="API_DescribeAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Account](#API_DescribeAccount_ResponseSyntax) **   <a name="organizations-DescribeAccount-response-Account"></a>
A structure that contains information about the requested account.  
The `Status` parameter in the API response will be retired on September 9, 2026. Although both the account `State` and account `Status` parameters are currently available in the AWS Organizations APIs (`DescribeAccount`, `ListAccounts`, `ListAccountsForParent`), we recommend that you update your scripts or other code to use the `State` parameter instead of `Status` before September 9, 2026.
Type: [Account](API_Account.md) object

## Errors
<a name="API_DescribeAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeAccount_Examples"></a>

### Example
<a name="API_DescribeAccount_Example_1"></a>

The following example shows how to request information about member account 555555555555.

#### Sample Request
<a name="API_DescribeAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeAccount

{ "AccountId": "555555555555" }
```

#### Sample Response
<a name="API_DescribeAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Account": {
    "Id": "555555555555",
    "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/555555555555",
    "Name": "Beta account",
    "Email": "anika@example.com",
    "JoinedMethod": "INVITED",
    "JoinedTimeStamp": 1481756563.134,
    "State": "ACTIVE",
    "Status": "ACTIVE",
    "Paths": [
      "o-exampleorgid/r-examplerootid111/555555555555/"
    ]
  }
}
```

## See Also
<a name="API_DescribeAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeAccount) 

# DescribeCreateAccountStatus
<a name="API_DescribeCreateAccountStatus"></a>

Retrieves the current status of an asynchronous request to create an account.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DescribeCreateAccountStatus_RequestSyntax"></a>

```
{
   "CreateAccountRequestId": "string"
}
```

## Request Parameters
<a name="API_DescribeCreateAccountStatus_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [CreateAccountRequestId](#API_DescribeCreateAccountStatus_RequestSyntax) **   <a name="organizations-DescribeCreateAccountStatus-request-CreateAccountRequestId"></a>
Specifies the `Id` value that uniquely identifies the `CreateAccount` request. You can get the value from the `CreateAccountStatus.Id` response in an earlier [CreateAccount](API_CreateAccount.md) request, or from the [ListCreateAccountStatus](API_ListCreateAccountStatus.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a create account request ID string requires "car-" followed by from 8 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 36.  
Pattern: `^car-[a-z0-9]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_DescribeCreateAccountStatus_ResponseSyntax"></a>

```
{
   "CreateAccountStatus": { 
      "AccountId": "string",
      "AccountName": "string",
      "CompletedTimestamp": number,
      "FailureReason": "string",
      "GovCloudAccountId": "string",
      "Id": "string",
      "RequestedTimestamp": number,
      "State": "string"
   }
}
```

## Response Elements
<a name="API_DescribeCreateAccountStatus_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CreateAccountStatus](#API_DescribeCreateAccountStatus_ResponseSyntax) **   <a name="organizations-DescribeCreateAccountStatus-response-CreateAccountStatus"></a>
A structure that contains the current status of an account creation request.  
Type: [CreateAccountStatus](API_CreateAccountStatus.md) object

## Errors
<a name="API_DescribeCreateAccountStatus_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** CreateAccountStatusNotFoundException **   
We can't find an create account request with the `CreateAccountRequestId` that you specified.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeCreateAccountStatus_Examples"></a>

### Example
<a name="API_DescribeCreateAccountStatus_Example_1"></a>

The following example shows how to request the latest status for a previous request to create an account in an organization. The specified `CreateAccountRequestId` comes from the response of the original call to [CreateAccount](API_CreateAccount.md). The account creation request shows by the `status` field that AWS Organizations successfully completed the creation of the account.

#### Sample Request
<a name="API_DescribeCreateAccountStatus_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeCreateAccountStatus

{ "CreateAccountRequestId": "car-examplecreateaccountrequestid111" }
```

#### Sample Response
<a name="API_DescribeCreateAccountStatus_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "CreateAccountStatusRequest": {
    "State": "SUCCEEDED",
    "AccountId": "555555555555",
    "AccountName": "Beta account",
    "RequestedTimestamp": 1470684478.687,
    "CompletedTimestamp": 1470684532.472,
    "Id": "car-examplecreateaccountrequestid111"
  }
}
```

## See Also
<a name="API_DescribeCreateAccountStatus_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeCreateAccountStatus) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeCreateAccountStatus) 

# DescribeEffectivePolicy
<a name="API_DescribeEffectivePolicy"></a>

Returns the contents of the effective policy for specified policy type and account. The effective policy is the aggregation of any policies of the specified type that the account inherits, plus any policy of that type that is directly attached to the account.

This operation applies only to management policies. It does not apply to authorization policies: service control policies (SCPs) and resource control policies (RCPs).

For more information about policy inheritance, see [Understanding management policy inheritance](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html) in the * AWS Organizations User Guide*.

You can call this operation from any account in a organization.

## Request Syntax
<a name="API_DescribeEffectivePolicy_RequestSyntax"></a>

```
{
   "PolicyType": "string",
   "TargetId": "string"
}
```

## Request Parameters
<a name="API_DescribeEffectivePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyType](#API_DescribeEffectivePolicy_RequestSyntax) **   <a name="organizations-DescribeEffectivePolicy-request-PolicyType"></a>
The type of policy that you want information about. You can specify one of the following values:  
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

 ** [TargetId](#API_DescribeEffectivePolicy_RequestSyntax) **   <a name="organizations-DescribeEffectivePolicy-request-TargetId"></a>
When you're signed in as the management account, specify the ID of the account that you want details about. Specifying an organization root or organizational unit (OU) as the target is not supported.  
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: No

## Response Syntax
<a name="API_DescribeEffectivePolicy_ResponseSyntax"></a>

```
{
   "EffectivePolicy": { 
      "LastUpdatedTimestamp": number,
      "PolicyContent": "string",
      "PolicyType": "string",
      "TargetId": "string"
   }
}
```

## Response Elements
<a name="API_DescribeEffectivePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [EffectivePolicy](#API_DescribeEffectivePolicy_ResponseSyntax) **   <a name="organizations-DescribeEffectivePolicy-response-EffectivePolicy"></a>
The contents of the effective policy.  
Type: [EffectivePolicy](API_EffectivePolicy.md) object

## Errors
<a name="API_DescribeEffectivePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** EffectivePolicyNotFoundException **   
If you ran this action on the management account, this policy type is not enabled. If you ran the action on a member account, the account doesn't have an effective policy of this type. Contact the administrator of your organization about attaching a policy of this type to the account.   
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## See Also
<a name="API_DescribeEffectivePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeEffectivePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeEffectivePolicy) 

# DescribeHandshake
<a name="API_DescribeHandshake"></a>

Returns details for a handshake. A handshake is the secure exchange of information between two AWS accounts: a sender and a recipient.

You can view `ACCEPTED`, `DECLINED`, or `CANCELED` handshakes in API Responses for 30 days before they are deleted.

You can call this operation from any account in a organization.

## Request Syntax
<a name="API_DescribeHandshake_RequestSyntax"></a>

```
{
   "HandshakeId": "string"
}
```

## Request Parameters
<a name="API_DescribeHandshake_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [HandshakeId](#API_DescribeHandshake_RequestSyntax) **   <a name="organizations-DescribeHandshake-request-HandshakeId"></a>
ID for the handshake that you want information about.  
The [regex pattern](http://wikipedia.org/wiki/regex) for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^h-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_DescribeHandshake_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_DescribeHandshake_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_DescribeHandshake_ResponseSyntax) **   <a name="organizations-DescribeHandshake-response-Handshake"></a>
A `Handshake` object. Contains details for the handshake.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_DescribeHandshake_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** HandshakeNotFoundException **   
We can't find a handshake with the `HandshakeId` that you specified.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeHandshake_Examples"></a>

### Example
<a name="API_DescribeHandshake_Example_1"></a>

The following example shows how to request details about a handshake.

#### Sample Request
<a name="API_DescribeHandshake_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeHandshake

{ "HandshakeId": "h-examplehandshakeid111" }
```

#### Sample Response
<a name="API_DescribeHandshake_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Handshake": {
    "Id": "h-examplehandshakeid111",
    "State": "OPEN",
    "Resources": [
      {
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid",
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Management account"
          }
        ]
      },
      {
        "Type": "EMAIL",
        "Value": "anika@example.com"
      }
    ],
    "Parties": [
      {
        "Type": "ORGANIZATION",
        "Id": "o-exampleorgid"
      },
      {
        "Type": "EMAIL",
        "Id": "anika@example.com"
      }
    ],
    "Action": "INVITE",
    "RequestedTimestamp": 1470158698.046,
    "ExpirationTimestamp": 1471454698.046, 
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111"
  }
}
```

## See Also
<a name="API_DescribeHandshake_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeHandshake) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeHandshake) 

# DescribeOrganization
<a name="API_DescribeOrganization"></a>

Retrieves information about the organization that the user's account belongs to.

You can call this operation from any account in a organization.

**Note**  
Even if a policy type is shown as available in the organization, you can disable it separately at the root level with [DisablePolicyType](API_DisablePolicyType.md). Use [ListRoots](API_ListRoots.md) to see the status of policy types for a specified root.

## Response Syntax
<a name="API_DescribeOrganization_ResponseSyntax"></a>

```
{
   "Organization": { 
      "Arn": "string",
      "AvailablePolicyTypes": [ 
         { 
            "Status": "string",
            "Type": "string"
         }
      ],
      "FeatureSet": "string",
      "Id": "string",
      "MasterAccountArn": "string",
      "MasterAccountEmail": "string",
      "MasterAccountId": "string"
   }
}
```

## Response Elements
<a name="API_DescribeOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Organization](#API_DescribeOrganization_ResponseSyntax) **   <a name="organizations-DescribeOrganization-response-Organization"></a>
A structure that contains information about the organization.  
The `AvailablePolicyTypes` part of the response is deprecated, and you shouldn't use it in your apps. It doesn't include any policy type supported by Organizations other than SCPs. In the China (Ningxia) Region, no policy type is included. To determine which policy types are enabled in your organization, use the ` ListRoots ` operation.
Type: [Organization](API_Organization.md) object

## Errors
<a name="API_DescribeOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeOrganization_Examples"></a>

### Example
<a name="API_DescribeOrganization_Example_1"></a>

The following example shows how to request information about the current user's organization.

#### Sample Request
<a name="API_DescribeOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeOrganization

{}
```

#### Sample Response
<a name="API_DescribeOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Organization": {
    "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
    "MasterAccountEmail": "diego@example.com",
    "MasterAccountId": "111111111111",
    "Id": "o-exampleorgid",
    "FeatureSet": "ALL",
    "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
    "AvailablePolicyTypes": [ ...DEPRECATED – DO NOT USE... ]
    ]
  }
}
```

## See Also
<a name="API_DescribeOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeOrganization) 

# DescribeOrganizationalUnit
<a name="API_DescribeOrganizationalUnit"></a>

Retrieves information about an organizational unit (OU).

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DescribeOrganizationalUnit_RequestSyntax"></a>

```
{
   "OrganizationalUnitId": "string"
}
```

## Request Parameters
<a name="API_DescribeOrganizationalUnit_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [OrganizationalUnitId](#API_DescribeOrganizationalUnit_RequestSyntax) **   <a name="organizations-DescribeOrganizationalUnit-request-OrganizationalUnitId"></a>
ID for the organizational unit that you want details about. You can get the ID from the [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 68.  
Pattern: `^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_DescribeOrganizationalUnit_ResponseSyntax"></a>

```
{
   "OrganizationalUnit": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "Path": "string"
   }
}
```

## Response Elements
<a name="API_DescribeOrganizationalUnit_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [OrganizationalUnit](#API_DescribeOrganizationalUnit_ResponseSyntax) **   <a name="organizations-DescribeOrganizationalUnit-response-OrganizationalUnit"></a>
A structure that contains details about the specified OU.  
Type: [OrganizationalUnit](API_OrganizationalUnit.md) object

## Errors
<a name="API_DescribeOrganizationalUnit_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** OrganizationalUnitNotFoundException **   
We can't find an OU with the `OrganizationalUnitId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeOrganizationalUnit_Examples"></a>

### Example
<a name="API_DescribeOrganizationalUnit_Example_1"></a>

The following example shows how to request details about an OU.

#### Sample Request
<a name="API_DescribeOrganizationalUnit_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeOrganizationalUnit

{ "OrganizationalUnitId": "ou-examplerootid111-exampleouid111" }
```

#### Sample Response
<a name="API_DescribeOrganizationalUnit_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "OrganizationalUnit": {
    "Name": "Accounting Group",
    "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
    "Id": "ou-examplerootid111-exampleouid111",
    "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
  }
}
```

## See Also
<a name="API_DescribeOrganizationalUnit_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeOrganizationalUnit) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeOrganizationalUnit) 

# DescribePolicy
<a name="API_DescribePolicy"></a>

Retrieves information about a policy.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DescribePolicy_RequestSyntax"></a>

```
{
   "PolicyId": "string"
}
```

## Request Parameters
<a name="API_DescribePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyId](#API_DescribePolicy_RequestSyntax) **   <a name="organizations-DescribePolicy-request-PolicyId"></a>
ID for the policy that you want details about. You can get the ID from the [ListPolicies](API_ListPolicies.md) or [ListPoliciesForTarget](API_ListPoliciesForTarget.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

## Response Syntax
<a name="API_DescribePolicy_ResponseSyntax"></a>

```
{
   "Policy": { 
      "Content": "string",
      "PolicySummary": { 
         "Arn": "string",
         "AwsManaged": boolean,
         "Description": "string",
         "Id": "string",
         "Name": "string",
         "Type": "string"
      }
   }
}
```

## Response Elements
<a name="API_DescribePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_DescribePolicy_ResponseSyntax) **   <a name="organizations-DescribePolicy-response-Policy"></a>
A structure that contains details about the specified policy.  
Type: [Policy](API_Policy.md) object

## Errors
<a name="API_DescribePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DescribePolicy_Examples"></a>

### Example
<a name="API_DescribePolicy_Example_1"></a>

The following example shows how to request information about a policy.

#### Sample Request
<a name="API_DescribePolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribePolicy

{ "PolicyId": "p-examplepolicyid111" }
```

#### Sample Response
<a name="API_DescribePolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Policy": {
    "Content": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\"\n    }\n  ]\n}",
    "PolicySummary": {
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
      "Type": "SERVICE_CONTROL_POLICY",
      "Id": "p-examplepolicyid111",
      "AwsManaged": false,
      "Name": "AllowAllS3Actions",
      "Description": "Enables admins to delegate S3 permissions"
    }
  }
}
```

## See Also
<a name="API_DescribePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribePolicy) 

# DescribeResourcePolicy
<a name="API_DescribeResourcePolicy"></a>

Retrieves information about a resource policy.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Response Syntax
<a name="API_DescribeResourcePolicy_ResponseSyntax"></a>

```
{
   "ResourcePolicy": { 
      "Content": "string",
      "ResourcePolicySummary": { 
         "Arn": "string",
         "Id": "string"
      }
   }
}
```

## Response Elements
<a name="API_DescribeResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResourcePolicy](#API_DescribeResourcePolicy_ResponseSyntax) **   <a name="organizations-DescribeResourcePolicy-response-ResourcePolicy"></a>
A structure that contains details about the resource policy.  
Type: [ResourcePolicy](API_ResourcePolicy.md) object

## Errors
<a name="API_DescribeResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** ResourcePolicyNotFoundException **   
We can't find a resource policy request with the parameter that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## See Also
<a name="API_DescribeResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeResourcePolicy) 

# DescribeResponsibilityTransfer
<a name="API_DescribeResponsibilityTransfer"></a>

Returns details for a transfer. A *transfer* is an arrangement between two management accounts where one account designates the other with specified responsibilities for their organization.

## Request Syntax
<a name="API_DescribeResponsibilityTransfer_RequestSyntax"></a>

```
{
   "Id": "string"
}
```

## Request Parameters
<a name="API_DescribeResponsibilityTransfer_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Id](#API_DescribeResponsibilityTransfer_RequestSyntax) **   <a name="organizations-DescribeResponsibilityTransfer-request-Id"></a>
ID for the transfer.  
Type: String  
Pattern: `^rt-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_DescribeResponsibilityTransfer_ResponseSyntax"></a>

```
{
   "ResponsibilityTransfer": { 
      "ActiveHandshakeId": "string",
      "Arn": "string",
      "EndTimestamp": number,
      "Id": "string",
      "Name": "string",
      "Source": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "StartTimestamp": number,
      "Status": "string",
      "Target": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "Type": "string"
   }
}
```

## Response Elements
<a name="API_DescribeResponsibilityTransfer_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResponsibilityTransfer](#API_DescribeResponsibilityTransfer_ResponseSyntax) **   <a name="organizations-DescribeResponsibilityTransfer-response-ResponsibilityTransfer"></a>
A `ResponsibilityTransfer` object. Contains details for a transfer.  
Type: [ResponsibilityTransfer](API_ResponsibilityTransfer.md) object

## Errors
<a name="API_DescribeResponsibilityTransfer_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ResponsibilityTransferNotFoundException **   
We can't find a transfer that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeResponsibilityTransfer_Examples"></a>

### Example
<a name="API_DescribeResponsibilityTransfer_Example_1"></a>

The following example shows how to request information about a transfer.

#### Sample Request
<a name="API_DescribeResponsibilityTransfer_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DescribeResponsibilityTransfer

{ "Id": "rt-exampletransferid222" }
```

#### Sample Response
<a name="API_DescribeResponsibilityTransfer_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ResponsibilityTransfer": {
    "Arn": "arn:aws:organizations::222222222222:transfer/o-exampleorgid222/billing/outbound/rt-exampletransferid222",
    "EndTimestamp": "1769903999000",
    "Id": "rt-exampletransferid222",
    "Name": "sample transfer",
    "Source": {
        "ManagementAccountEmail": "alice@example.com",
        "ManagementAccountId": "222222222222"
    },
    "StartTimestamp": "1767225600000",
    "Status": "WITHDRAWN",
    "Target": {
        "ManagementAccountEmail": "juan@example.com",
        "ManagementAccountId": "333333333333"
    },
    "Type": "BILLING"
  }
}
```

## See Also
<a name="API_DescribeResponsibilityTransfer_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DescribeResponsibilityTransfer) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DescribeResponsibilityTransfer) 

# DetachPolicy
<a name="API_DetachPolicy"></a>

Detaches a policy from a target root, organizational unit (OU), or account.

**Important**  
If the policy being detached is a service control policy (SCP), the changes to permissions for AWS Identity and Access Management (IAM) users and roles in affected accounts are immediate.

Every root, OU, and account must have at least one SCP attached. If you want to replace the default `FullAWSAccess` policy with an SCP that limits the permissions that can be delegated, you must attach the replacement SCP before you can remove the default SCP. This is the authorization strategy of an "[allow list](https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist)". If you instead attach a second SCP and leave the `FullAWSAccess` SCP still attached, and specify `"Effect": "Deny"` in the second SCP to override the `"Effect": "Allow"` in the `FullAWSAccess` policy (or any other attached SCP), you're using the authorization strategy of a "[deny list](https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist)".

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_DetachPolicy_RequestSyntax"></a>

```
{
   "PolicyId": "string",
   "TargetId": "string"
}
```

## Request Parameters
<a name="API_DetachPolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyId](#API_DetachPolicy_RequestSyntax) **   <a name="organizations-DetachPolicy-request-PolicyId"></a>
ID for the policy you want to detach. You can get the ID from the [ListPolicies](API_ListPolicies.md) or [ListPoliciesForTarget](API_ListPoliciesForTarget.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

 ** [TargetId](#API_DetachPolicy_RequestSyntax) **   <a name="organizations-DetachPolicy-request-TargetId"></a>
ID for the root, OU, or account that you want to detach the policy from. You can get the ID from the [ListRoots](API_ListRoots.md), [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md), or [ListAccounts](API_ListAccounts.md) operations.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a target ID string requires one of the following:  
+  **Root** - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
+  **Account** - A string that consists of exactly 12 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Elements
<a name="API_DetachPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DetachPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyChangesInProgressException **   
Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.   
HTTP Status Code: 400

 ** PolicyNotAttachedException **   
The policy isn't attached to the specified target in the specified root.  
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DetachPolicy_Examples"></a>

### Example
<a name="API_DetachPolicy_Example_1"></a>

The following example shows how to detach a policy from an OU.

#### Sample Request
<a name="API_DetachPolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DetachPolicy

{ "TargetId": "ou-examplerootid111-exampleouid111", "PolicyId": "p-examplepolicyid111" }
```

#### Sample Response
<a name="API_DetachPolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DetachPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DetachPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DetachPolicy) 

# DisableAWSServiceAccess
<a name="API_DisableAWSServiceAccess"></a>

Disables the integration of an AWS service (the service that is specified by `ServicePrincipal`) with AWS Organizations. When you disable integration, the specified service no longer can create a [service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) in *new* accounts in your organization. This means the service can't perform operations on your behalf on any new accounts in your organization. The service can still perform operations in older accounts until the service completes its clean-up from AWS Organizations.

**Important**  
We ** *strongly recommend* ** that you don't use this command to disable integration between AWS Organizations and the specified AWS service. Instead, use the console or commands that are provided by the specified service. This lets the trusted service perform any required initialization when enabling trusted access, such as creating any required resources and any required clean up of resources when disabling trusted access.   
For information about how to disable trusted service access to your organization using the trusted service, see the **Learn more** link under the **Supports Trusted Access** column at [AWS services that you can use with AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html). on this page.  
If you disable access by using this command, it causes the following actions to occur:  
The service can no longer create a service-linked role in the accounts in your organization. This means that the service can't perform operations on your behalf on any new accounts in your organization. The service can still perform operations in older accounts until the service completes its clean-up from AWS Organizations. 
The service can no longer perform tasks in the member accounts in the organization, unless those operations are explicitly permitted by the IAM policies that are attached to your roles. This includes any data aggregation from the member accounts to the management account, or to a delegated administrator account, where relevant.
Some services detect this and clean up any remaining data or resources related to the integration, while other services stop accessing the organization but leave any historical data and configuration in place to support a possible re-enabling of the integration.
Using the other service's console or commands to disable the integration ensures that the other service is aware that it can clean up any resources that are required only for the integration. How the service cleans up its resources in the organization's accounts depends on that service. For more information, see the documentation for the other AWS service. 

After you perform the `DisableAWSServiceAccess` operation, the specified service can no longer perform operations in your organization's accounts 

For more information about integrating other services with AWS Organizations, including the list of services that work with Organizations, see [Using AWS Organizations with other AWS services](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) in the * AWS Organizations User Guide*.

You can only call this operation from the management account.

## Request Syntax
<a name="API_DisableAWSServiceAccess_RequestSyntax"></a>

```
{
   "ServicePrincipal": "string"
}
```

## Request Parameters
<a name="API_DisableAWSServiceAccess_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ServicePrincipal](#API_DisableAWSServiceAccess_RequestSyntax) **   <a name="organizations-DisableAWSServiceAccess-request-ServicePrincipal"></a>
The service principal name of the AWS service for which you want to disable integration with your organization. This is typically in the form of a URL, such as ` service-abbreviation.amazonaws.com`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+=,.@-]*`   
Required: Yes

## Response Elements
<a name="API_DisableAWSServiceAccess_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DisableAWSServiceAccess_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DisableAWSServiceAccess_Examples"></a>

### Example
<a name="API_DisableAWSServiceAccess_Example_1"></a>

The following example shows how to disable integration with an AWS service.

#### Sample Request
<a name="API_DisableAWSServiceAccess_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DisableAWSServiceAccess

{"ServicePrincipal": "anAwsService.amazonaws.com"}
```

#### Sample Response
<a name="API_DisableAWSServiceAccess_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_DisableAWSServiceAccess_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DisableAWSServiceAccess) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DisableAWSServiceAccess) 

# DisablePolicyType
<a name="API_DisablePolicyType"></a>

Disables an organizational policy type in a root. A policy of a certain type can be attached to entities in a root only if that type is enabled in the root. After you perform this operation, you no longer can attach policies of the specified type to that root or to any organizational unit (OU) or account in that root. You can undo this by using the [EnablePolicyType](API_EnablePolicyType.md) operation.

This is an asynchronous request that AWS performs in the background. If you disable a policy type for a root, it still appears enabled for the organization if [all features](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) are enabled for the organization. AWS recommends that you first use [ListRoots](API_ListRoots.md) to see the status of policy types for a specified root, and then use this operation.

You can only call this operation from the management account or a member account that is a delegated administrator.

 To view the status of available policy types in the organization, use [ListRoots](API_ListRoots.md).

## Request Syntax
<a name="API_DisablePolicyType_RequestSyntax"></a>

```
{
   "PolicyType": "string",
   "RootId": "string"
}
```

## Request Parameters
<a name="API_DisablePolicyType_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyType](#API_DisablePolicyType_RequestSyntax) **   <a name="organizations-DisablePolicyType-request-PolicyType"></a>
The policy type that you want to disable in this root. You can specify one of the following values:  
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

 ** [RootId](#API_DisablePolicyType_RequestSyntax) **   <a name="organizations-DisablePolicyType-request-RootId"></a>
ID for the root in which you want to disable a policy type. You can get the ID from the [ListRoots](API_ListRoots.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^r-[0-9a-z]{4,32}$`   
Required: Yes

## Response Syntax
<a name="API_DisablePolicyType_ResponseSyntax"></a>

```
{
   "Root": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "PolicyTypes": [ 
         { 
            "Status": "string",
            "Type": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_DisablePolicyType_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Root](#API_DisablePolicyType_ResponseSyntax) **   <a name="organizations-DisablePolicyType-response-Root"></a>
A structure that shows the root with the updated list of enabled policy types.  
Type: [Root](API_Root.md) object

## Errors
<a name="API_DisablePolicyType_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyChangesInProgressException **   
Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.   
HTTP Status Code: 400

 ** PolicyTypeNotEnabledException **   
The specified policy type isn't currently enabled in this root. You can't attach policies of the specified type to entities in a root until you enable that type in the root. For more information, see [Enabling all features in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** RootNotFoundException **   
We can't find a root with the `RootId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_DisablePolicyType_Examples"></a>

The following example shows how to disable the service control policy (SCP) policy type in a root. The response shows that the `PolicyTypes` response element no longer includes `SERVICE_CONTROL_POLICY`.

### Example
<a name="API_DisablePolicyType_Example_1"></a>

This example illustrates one usage of DisablePolicyType.

#### Sample Request
<a name="API_DisablePolicyType_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.DisablePolicyType

{ "RootId": "r-examplerootid111", "PolicyType": "SERVICE_CONTROL_POLICY" }
```

#### Sample Response
<a name="API_DisablePolicyType_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Root": {
    "PolicyTypes": [
      {
        "Status": "ENABLED",
        "Type": "AISERVICES_OPT_OUT_POLICY"
      },
      {
        "Status": "ENABLED",
        "Type": "BACKUP_POLICY"
      },
      {
        "Status": "ENABLED",
        "Type": "TAG_POLICY"
      },
      {
        "Status": "ENABLED",
        "Type": "RESOURCE_CONTROL_POLICY"
      }
    ],
    "Name": "Root",
    "Id": "r-examplerootid111",
    "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111"
  }
}
```

## See Also
<a name="API_DisablePolicyType_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/DisablePolicyType) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/DisablePolicyType) 

# EnableAllFeatures
<a name="API_EnableAllFeatures"></a>

Enables all features in an organization. This enables the use of organization policies that can restrict the services and actions that can be called in each account. Until you enable all features, you have access only to consolidated billing, and you can't use any of the advanced account administration features that AWS Organizations supports. For more information, see [Enabling all features in your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) in the * AWS Organizations User Guide*.

**Important**  
This operation is required only for organizations that were created explicitly with only the consolidated billing features enabled. Calling this operation sends a handshake to every invited account in the organization. The feature set change can be finalized and the additional features enabled only after all administrators in the invited accounts approve the change by accepting the handshake.

After you enable all features, you can separately enable or disable individual policy types in a root using [EnablePolicyType](API_EnablePolicyType.md) and [DisablePolicyType](API_DisablePolicyType.md). To see the status of policy types in a root, use [ListRoots](API_ListRoots.md).

After all invited member accounts accept the handshake, you finalize the feature set change by accepting the handshake that contains `"Action": "ENABLE_ALL_FEATURES"`. This completes the change.

After you enable all features in your organization, the management account in the organization can apply policies on all member accounts. These policies can restrict what users and even administrators in those accounts can do. The management account can apply policies that prevent accounts from leaving the organization. Ensure that your account administrators are aware of this.

You can only call this operation from the management account.

## Response Syntax
<a name="API_EnableAllFeatures_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_EnableAllFeatures_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_EnableAllFeatures_ResponseSyntax) **   <a name="organizations-EnableAllFeatures-response-Handshake"></a>
A structure that contains details about the handshake created to support this request to enable all features in the organization.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_EnableAllFeatures_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** HandshakeConstraintViolationException **   
The requested operation would violate the constraint identified in the reason code.  
Some of the reasons in the following list might not be applicable to this specific API or operation:
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. Note that deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception immediately after creating the organization, wait one hour and try again. If after an hour it continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALREADY\$1IN\$1AN\$1ORGANIZATION: The handshake request is invalid because the invited account is already a member of an organization.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVITE\$1DISABLED\$1DURING\$1ENABLE\$1ALL\$1FEATURES: You can't issue new invitations to join an organization while it's in the process of enabling all features. You can resume inviting accounts after you finalize the process when all accounts have agreed to the change.
+ LEGACY\$1PERMISSIONS\$1STILL\$1IN\$1USE: Your organization must migrate to use the new IAM fine-grained actions for billing, cost management, and accounts.
+ ORGANIZATION\$1ALREADY\$1HAS\$1ALL\$1FEATURES: The handshake request is invalid because the organization has already enabled all features.
+ ORGANIZATION\$1FROM\$1DIFFERENT\$1SELLER\$1OF\$1RECORD: The request failed because the account is from a different marketplace than the accounts in the organization.
+ ORGANIZATION\$1IS\$1ALREADY\$1PENDING\$1ALL\$1FEATURES\$1MIGRATION: The handshake request is invalid because the organization has already started the process to enable all features.
+ ORGANIZATION\$1MEMBERSHIP\$1CHANGE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to change the membership of an account too quickly after its previous change.
+ PAYMENT\$1INSTRUMENT\$1REQUIRED: You can't complete the operation with an account that doesn't have a payment instrument, such as a credit card, associated with it.
+ RESPONSIBILITY\$1TRANSFER\$1ALREADY\$1EXISTS: You cannot perform this operation with the current transfer.
+ SOURCE\$1AND\$1TARGET\$1CANNOT\$1MATCH: An account can't accept a transfer invitation if it is both the sender and recipient of the invitation.
+ UNUSED\$1PREPAYMENT\$1BALANCE: Your organization has an outstanding pre-payment balance.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_EnableAllFeatures_Examples"></a>

This example shows the administrator asking all the invited accounts in the organization to approve enabled all features in the organization. AWS Organizations sends an email to the address that is registered with every invited member account. The email asks the owner to approve the change to all features by accepting the handshake that is sent. After all invited member accounts accept the handshake, the organization administrator can finalize the change to all features. After that, those with appropriate permissions can create policies and apply them to roots, organizational units (OUs), and accounts.

### Example
<a name="API_EnableAllFeatures_Example_1"></a>

This example illustrates one usage of EnableAllFeatures.

#### Sample Request
<a name="API_EnableAllFeatures_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.EnableAllFeatures

{}
```

### Example
<a name="API_EnableAllFeatures_Example_2"></a>

This example illustrates one usage of EnableAllFeatures.

#### Sample Response
<a name="API_EnableAllFeatures_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Handshake": {
    "Action": "ENABLE_ALL_FEATURES",
    "Arn":"arn:aws:organizations::111111111111:handshake/o-exampleorgid/enable_all_features/h-examplehandshakeid111",
    "ExpirationTimestamp":1.483127868609E9,
    "Id":"h-examplehandshakeid111",
    "Parties": [
      {
        "id":"o-exampleorgid",
        "type":"ORGANIZATION"
      }
    ],
    "requestedTimestamp":1.481831868609E9,
    "resources": [
      {
        "type":"ORGANIZATION",
        "value":"o-exampleorgid"
      }
    ],
    "state":"REQUESTED"
  }
}
```

## See Also
<a name="API_EnableAllFeatures_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/EnableAllFeatures) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/EnableAllFeatures) 

# EnableAWSServiceAccess
<a name="API_EnableAWSServiceAccess"></a>

Provides an AWS service (the service that is specified by `ServicePrincipal`) with permissions to view the structure of an organization, create a [service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) in all the accounts in the organization, and allow the service to perform operations on behalf of the organization and its accounts. Establishing these permissions can be a first step in enabling the integration of an AWS service with AWS Organizations.

**Important**  
We recommend that you enable integration between AWS Organizations and the specified AWS service by using the console or commands that are provided by the specified service. Doing so ensures that the service is aware that it can create the resources that are required for the integration. How the service creates those resources in the organization's accounts depends on that service. For more information, see the documentation for the other AWS service.

For more information about enabling services to integrate with AWS Organizations, see [Using AWS Organizations with other AWS services](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) in the * AWS Organizations User Guide*.

You can only call this operation from the management account.

## Request Syntax
<a name="API_EnableAWSServiceAccess_RequestSyntax"></a>

```
{
   "ServicePrincipal": "string"
}
```

## Request Parameters
<a name="API_EnableAWSServiceAccess_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ServicePrincipal](#API_EnableAWSServiceAccess_RequestSyntax) **   <a name="organizations-EnableAWSServiceAccess-request-ServicePrincipal"></a>
The service principal name of the AWS service for which you want to enable integration with your organization. This is typically in the form of a URL, such as ` service-abbreviation.amazonaws.com`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+=,.@-]*`   
Required: Yes

## Response Elements
<a name="API_EnableAWSServiceAccess_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_EnableAWSServiceAccess_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_EnableAWSServiceAccess_Examples"></a>

### Example
<a name="API_EnableAWSServiceAccess_Example_1"></a>

The following example shows how to enable integration with another AWS service.

#### Sample Request
<a name="API_EnableAWSServiceAccess_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.EnableAWSServiceAccess

{"ServicePrincipal": "anAwsService.amazonaws.com"}
```

#### Sample Response
<a name="API_EnableAWSServiceAccess_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_EnableAWSServiceAccess_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/EnableAWSServiceAccess) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/EnableAWSServiceAccess) 

# EnablePolicyType
<a name="API_EnablePolicyType"></a>

Enables a policy type in a root. After you enable a policy type in a root, you can attach policies of that type to the root, any organizational unit (OU), or account in that root. You can undo this by using the [DisablePolicyType](API_DisablePolicyType.md) operation.

This is an asynchronous request that AWS performs in the background. AWS recommends that you first use [ListRoots](API_ListRoots.md) to see the status of policy types for a specified root, and then use this operation.

You can only call this operation from the management account or a member account that is a delegated administrator.

You can enable a policy type in a root only if that policy type is available in the organization. To view the status of available policy types in the organization, use [ListRoots](API_ListRoots.md).

## Request Syntax
<a name="API_EnablePolicyType_RequestSyntax"></a>

```
{
   "PolicyType": "string",
   "RootId": "string"
}
```

## Request Parameters
<a name="API_EnablePolicyType_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [PolicyType](#API_EnablePolicyType_RequestSyntax) **   <a name="organizations-EnablePolicyType-request-PolicyType"></a>
The policy type that you want to enable. You can specify one of the following values:  
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

 ** [RootId](#API_EnablePolicyType_RequestSyntax) **   <a name="organizations-EnablePolicyType-request-RootId"></a>
ID for the root in which you want to enable a policy type. You can get the ID from the [ListRoots](API_ListRoots.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^r-[0-9a-z]{4,32}$`   
Required: Yes

## Response Syntax
<a name="API_EnablePolicyType_ResponseSyntax"></a>

```
{
   "Root": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "PolicyTypes": [ 
         { 
            "Status": "string",
            "Type": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_EnablePolicyType_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Root](#API_EnablePolicyType_ResponseSyntax) **   <a name="organizations-EnablePolicyType-response-Root"></a>
A structure that shows the root with the updated list of enabled policy types.  
Type: [Root](API_Root.md) object

## Errors
<a name="API_EnablePolicyType_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyChangesInProgressException **   
Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.   
HTTP Status Code: 400

 ** PolicyTypeAlreadyEnabledException **   
The specified policy type is already enabled in the specified root.  
HTTP Status Code: 400

 ** PolicyTypeNotAvailableForOrganizationException **   
You can't use the specified policy type with the feature set currently enabled for this organization. For example, you can enable SCPs only after you enable all features in the organization. For more information, see [Managing AWS Organizations policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** RootNotFoundException **   
We can't find a root with the `RootId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_EnablePolicyType_Examples"></a>

The following example shows how to enable the tag policy type in a root. The output shows a root object with a `policyTypes` response element showing that tag policiess are now enabled.

### Example
<a name="API_EnablePolicyType_Example_1"></a>

This example illustrates one usage of EnablePolicyType.

#### Sample Request
<a name="API_EnablePolicyType_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.EnablePolicyType

{ "RootId": "r-examplerootid111", "PolicyType": "TAG_POLICY" }
```

#### Sample Response
<a name="API_EnablePolicyType_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Root": {
    "PolicyTypes": [
      {
        "Status":"ENABLED",
        "Type":"TAG_POLICY"
      }
    ],
    "Id": "r-examplerootid111",
    "Name": "Root",
    "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111"
  }
}
```

## See Also
<a name="API_EnablePolicyType_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/EnablePolicyType) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/EnablePolicyType) 

# InviteAccountToOrganization
<a name="API_InviteAccountToOrganization"></a>

Sends an invitation to another account to join your organization as a member account. AWS Organizations sends email on your behalf to the email address that is associated with the other account's owner. The invitation is implemented as a [Handshake](API_Handshake.md) whose details are in the response.

**Important**  
If you receive an exception that indicates that you exceeded your account limits for the organization or that the operation failed because your organization is still initializing, wait one hour and then try again. If the error persists after an hour, contact [AWS Support](https://console.aws.amazon.com/support/home#/).

If the request includes tags, then the requester must have the `organizations:TagResource` permission.

You can only call this operation from the management account.

## Request Syntax
<a name="API_InviteAccountToOrganization_RequestSyntax"></a>

```
{
   "Notes": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "Target": { 
      "Id": "string",
      "Type": "string"
   }
}
```

## Request Parameters
<a name="API_InviteAccountToOrganization_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Notes](#API_InviteAccountToOrganization_RequestSyntax) **   <a name="organizations-InviteAccountToOrganization-request-Notes"></a>
Additional information that you want to include in the generated email to the recipient account owner.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `[\s\S]*`   
Required: No

 ** [Tags](#API_InviteAccountToOrganization_RequestSyntax) **   <a name="organizations-InviteAccountToOrganization-request-Tags"></a>
A list of tags that you want to attach to the account when it becomes a member of the organization. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
Any tags in the request are checked for compliance with any applicable tag policies when the request is made. The request is rejected if the tags in the request don't match the requirements of the policy at that time. Tag policy compliance is * **not** * checked again when the invitation is accepted and the tags are actually attached to the account. That means that if the tag policy changes between the invitation and the acceptance, then that tags could potentially be non-compliant.
If any one of the tags is not valid or if you exceed the allowed number of tags for an account, then the entire request fails and invitations are not sent.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

 ** [Target](#API_InviteAccountToOrganization_RequestSyntax) **   <a name="organizations-InviteAccountToOrganization-request-Target"></a>
The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object that contains the following elements:  
 `{ "Type": "ACCOUNT", "Id": "< account id number >" }`   
If you use the AWS CLI, you can submit this as a single string, similar to the following example:  
 `--target Id=123456789012,Type=ACCOUNT`   
If you specify `"Type": "ACCOUNT"`, you must provide the AWS account ID number as the `Id`. If you specify `"Type": "EMAIL"`, you must specify the email address that is associated with the account.  
 `--target Id=diego@example.com,Type=EMAIL`   
Type: [HandshakeParty](API_HandshakeParty.md) object  
Required: Yes

## Response Syntax
<a name="API_InviteAccountToOrganization_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_InviteAccountToOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_InviteAccountToOrganization_ResponseSyntax) **   <a name="organizations-InviteAccountToOrganization-response-Handshake"></a>
A structure that contains details about the handshake that is created to support this invitation request.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_InviteAccountToOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountOwnerNotVerifiedException **   
You can't invite an existing account to your organization until you verify that you own the email address associated with the management account. For more information, see [Email address verification](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicateHandshakeException **   
A handshake with the same action and target already exists. For example, if you invited an account to join your organization, the invited account might already have a pending invitation from this organization. If you intend to resend an invitation to an account, ensure that existing handshakes that might be considered duplicates are canceled or declined.  
HTTP Status Code: 400

 ** FinalizingOrganizationException **   
 AWS Organizations couldn't perform the operation because your organization hasn't finished initializing. This can take up to an hour. Try again later. If after one hour you continue to receive this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).  
HTTP Status Code: 400

 ** HandshakeConstraintViolationException **   
The requested operation would violate the constraint identified in the reason code.  
Some of the reasons in the following list might not be applicable to this specific API or operation:
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. Note that deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception immediately after creating the organization, wait one hour and try again. If after an hour it continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALREADY\$1IN\$1AN\$1ORGANIZATION: The handshake request is invalid because the invited account is already a member of an organization.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVITE\$1DISABLED\$1DURING\$1ENABLE\$1ALL\$1FEATURES: You can't issue new invitations to join an organization while it's in the process of enabling all features. You can resume inviting accounts after you finalize the process when all accounts have agreed to the change.
+ LEGACY\$1PERMISSIONS\$1STILL\$1IN\$1USE: Your organization must migrate to use the new IAM fine-grained actions for billing, cost management, and accounts.
+ ORGANIZATION\$1ALREADY\$1HAS\$1ALL\$1FEATURES: The handshake request is invalid because the organization has already enabled all features.
+ ORGANIZATION\$1FROM\$1DIFFERENT\$1SELLER\$1OF\$1RECORD: The request failed because the account is from a different marketplace than the accounts in the organization.
+ ORGANIZATION\$1IS\$1ALREADY\$1PENDING\$1ALL\$1FEATURES\$1MIGRATION: The handshake request is invalid because the organization has already started the process to enable all features.
+ ORGANIZATION\$1MEMBERSHIP\$1CHANGE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to change the membership of an account too quickly after its previous change.
+ PAYMENT\$1INSTRUMENT\$1REQUIRED: You can't complete the operation with an account that doesn't have a payment instrument, such as a credit card, associated with it.
+ RESPONSIBILITY\$1TRANSFER\$1ALREADY\$1EXISTS: You cannot perform this operation with the current transfer.
+ SOURCE\$1AND\$1TARGET\$1CANNOT\$1MATCH: An account can't accept a transfer invitation if it is both the sender and recipient of the invitation.
+ UNUSED\$1PREPAYMENT\$1BALANCE: Your organization has an outstanding pre-payment balance.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_InviteAccountToOrganization_Examples"></a>

### Example
<a name="API_InviteAccountToOrganization_Example_1"></a>

The following example shows the management account owned by diego@example.com inviting the account owned by juan@example.com to join an organization.

#### Sample Request
<a name="API_InviteAccountToOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.InviteAccountToOrganization

{ "Notes": "This is a request for Juan's account to join Diego's organization", "Target": {"Type": "EMAIL", "Id": "juan@example.com"} }
```

#### Sample Response
<a name="API_InviteAccountToOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Handshake": {
    "Action": "INVITE",
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
    "ExpirationTimestamp": 1482952459.257,
    "Id": "h-examplehandshakeid111",
    "Parties": [
      {
        "Id": "o-exampleorgid",
        "Type": "ORGANIZATION"
      },
      {
        "Id": "juan@example.com",
        "Type": "EMAIL"
      }
    ],
    "RequestedTimestamp": 1481656459.257,
    "Resources": [
      {
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Org management account"
          },
          {
            "Type": "ORGANIZATION_FEATURE_SET",
            "Value": "FULL"
          }
        ],
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid"
      },
      {
        "Type": "EMAIL",
        "Value": "juan@example.com"
      }
    ],
    "State": "OPEN"
  }
}
```

## See Also
<a name="API_InviteAccountToOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/InviteAccountToOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/InviteAccountToOrganization) 

# InviteOrganizationToTransferResponsibility
<a name="API_InviteOrganizationToTransferResponsibility"></a>

Sends an invitation to another organization's management account to designate your account with the specified responsibilities for their organization. The invitation is implemented as a [Handshake](API_Handshake.md) whose details are in the response.

You can only call this operation from the management account.

## Request Syntax
<a name="API_InviteOrganizationToTransferResponsibility_RequestSyntax"></a>

```
{
   "Notes": "string",
   "SourceName": "string",
   "StartTimestamp": number,
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "Target": { 
      "Id": "string",
      "Type": "string"
   },
   "Type": "string"
}
```

## Request Parameters
<a name="API_InviteOrganizationToTransferResponsibility_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Notes](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-Notes"></a>
Additional information that you want to include in the invitation.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `[\s\S]*`   
Required: No

 ** [SourceName](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-SourceName"></a>
Name you want to assign to the transfer.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^[ -~]+$`   
Required: Yes

 ** [StartTimestamp](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-StartTimestamp"></a>
Timestamp when the recipient will begin managing the specified responsibilities.  
Type: Timestamp  
Required: Yes

 ** [Tags](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-Tags"></a>
A list of tags that you want to attach to the transfer. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
Any tags in the request are checked for compliance with any applicable tag policies when the request is made. The request is rejected if the tags in the request don't match the requirements of the policy at that time. Tag policy compliance is * **not** * checked again when the invitation is accepted and the tags are actually attached to the transfer. That means that if the tag policy changes between the invitation and the acceptance, then that tags could potentially be non-compliant.
If any one of the tags is not valid or if you exceed the allowed number of tags for a transfer, then the entire request fails and invitations are not sent.
Type: Array of [Tag](API_Tag.md) objects  
Required: No

 ** [Target](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-Target"></a>
A `HandshakeParty` object. Contains details for the account you want to invite. Currently, only `ACCOUNT` and `EMAIL` are supported.  
Type: [HandshakeParty](API_HandshakeParty.md) object  
Required: Yes

 ** [Type](#API_InviteOrganizationToTransferResponsibility_RequestSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-request-Type"></a>
The type of responsibility you want to designate to your organization. Currently, only `BILLING` is supported.  
Type: String  
Valid Values: `BILLING`   
Required: Yes

## Response Syntax
<a name="API_InviteOrganizationToTransferResponsibility_ResponseSyntax"></a>

```
{
   "Handshake": { 
      "Action": "string",
      "Arn": "string",
      "ExpirationTimestamp": number,
      "Id": "string",
      "Parties": [ 
         { 
            "Id": "string",
            "Type": "string"
         }
      ],
      "RequestedTimestamp": number,
      "Resources": [ 
         { 
            "Resources": [ 
               "HandshakeResource"
            ],
            "Type": "string",
            "Value": "string"
         }
      ],
      "State": "string"
   }
}
```

## Response Elements
<a name="API_InviteOrganizationToTransferResponsibility_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshake](#API_InviteOrganizationToTransferResponsibility_ResponseSyntax) **   <a name="organizations-InviteOrganizationToTransferResponsibility-response-Handshake"></a>
Contains details for a handshake. A handshake is the secure exchange of information between two AWS accounts: a sender and a recipient.  
 **Note:** Handshakes that are `CANCELED`, `ACCEPTED`, `DECLINED`, or `EXPIRED` show up in lists for only 30 days after entering that state After that they are deleted.  
Type: [Handshake](API_Handshake.md) object

## Errors
<a name="API_InviteOrganizationToTransferResponsibility_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicateHandshakeException **   
A handshake with the same action and target already exists. For example, if you invited an account to join your organization, the invited account might already have a pending invitation from this organization. If you intend to resend an invitation to an account, ensure that existing handshakes that might be considered duplicates are canceled or declined.  
HTTP Status Code: 400

 ** HandshakeConstraintViolationException **   
The requested operation would violate the constraint identified in the reason code.  
Some of the reasons in the following list might not be applicable to this specific API or operation:
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. Note that deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception immediately after creating the organization, wait one hour and try again. If after an hour it continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALREADY\$1IN\$1AN\$1ORGANIZATION: The handshake request is invalid because the invited account is already a member of an organization.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVITE\$1DISABLED\$1DURING\$1ENABLE\$1ALL\$1FEATURES: You can't issue new invitations to join an organization while it's in the process of enabling all features. You can resume inviting accounts after you finalize the process when all accounts have agreed to the change.
+ LEGACY\$1PERMISSIONS\$1STILL\$1IN\$1USE: Your organization must migrate to use the new IAM fine-grained actions for billing, cost management, and accounts.
+ ORGANIZATION\$1ALREADY\$1HAS\$1ALL\$1FEATURES: The handshake request is invalid because the organization has already enabled all features.
+ ORGANIZATION\$1FROM\$1DIFFERENT\$1SELLER\$1OF\$1RECORD: The request failed because the account is from a different marketplace than the accounts in the organization.
+ ORGANIZATION\$1IS\$1ALREADY\$1PENDING\$1ALL\$1FEATURES\$1MIGRATION: The handshake request is invalid because the organization has already started the process to enable all features.
+ ORGANIZATION\$1MEMBERSHIP\$1CHANGE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to change the membership of an account too quickly after its previous change.
+ PAYMENT\$1INSTRUMENT\$1REQUIRED: You can't complete the operation with an account that doesn't have a payment instrument, such as a credit card, associated with it.
+ RESPONSIBILITY\$1TRANSFER\$1ALREADY\$1EXISTS: You cannot perform this operation with the current transfer.
+ SOURCE\$1AND\$1TARGET\$1CANNOT\$1MATCH: An account can't accept a transfer invitation if it is both the sender and recipient of the invitation.
+ UNUSED\$1PREPAYMENT\$1BALANCE: Your organization has an outstanding pre-payment balance.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_InviteOrganizationToTransferResponsibility_Examples"></a>

### Example
<a name="API_InviteOrganizationToTransferResponsibility_Example_1"></a>

The following example shows the management account owned by diego@example.com inviting the management account owned by juan@example.com to transfer responsibility.

#### Sample Request
<a name="API_InviteOrganizationToTransferResponsibility_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.InviteOrganizationToTransferResponsibility

{ "Notes": "transfer notes", "SourceName": "transfer name", "StartTimestamp": "1767225600", "Target": {"Type": "EMAIL", "Id": "juan@example.com"}, "Type": "BILLING"}
```

#### Sample Response
<a name="API_InviteOrganizationToTransferResponsibility_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Handshake": {
    "Action": "TRANSFER_RESPONSIBILITY",
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/transfer_responsibility/h-examplehandshakeid111",
    "ExpirationTimestamp": "1767139200000",
    "Id": "h-examplehandshakeid111",
    "Parties": [
      {
        "Id": "o-exampleorgid",
        "Type": "ORGANIZATION"
      },
      {
        "Id": "juan@example.com",
        "Type": "EMAIL"
      }
    ],
    "RequestedTimestamp": "1763507300000",
    "Resources": [
      {
        "Resources": [
          {
            "Type": "TRANSFER_START_TIMESTAMP",
            "Value": "1767225600"
          },
          {
            "Type": "TRANSFER_TYPE",
            "Value": "BILLING"
          }
        ],
        "Type": "RESPONSIBILITY_TRANSFER",
        "Value": "rt-exampletransferid111"
      },
      {
        "Resources": [
          {
            "Type": "MANAGEMENT_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MANAGEMENT_NAME",
            "Value": "Org management account"
          },
          {
            "Type": "MANAGEMENT_ACCOUNT",
            "Value": "333333333333"
          }
        ],
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid"
      },
      {
        "Type": "EMAIL",
        "Value": "juan@example.com"
      }
    ],
    "State": "REQUESTED"
  }
}
```

## See Also
<a name="API_InviteOrganizationToTransferResponsibility_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/InviteOrganizationToTransferResponsibility) 

# LeaveOrganization
<a name="API_LeaveOrganization"></a>

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](API_RemoveAccountFromOrganization.md) instead.

You can only call from operation from a member account.

**Important**  
The management account in an organization with all features enabled can set service control policies (SCPs) that can restrict what administrators of member accounts can do. This includes preventing them from successfully calling `LeaveOrganization` and leaving the organization.
You can leave an organization as a member account only if the account is configured with the information required to operate as a standalone account. When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required of standalone accounts is *not* automatically collected. For each account that you want to make standalone, you must perform the following steps. If any of the steps are already completed for this account, that step doesn't appear.  
Choose a support plan
Provide and verify the required contact information
Provide a current payment method
 AWS uses the payment method to charge for any billable (not free tier) AWS activity that occurs while the account isn't attached to an organization. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
The account that you want to leave must not be a delegated administrator account for any AWS service enabled for your organization. If the account is a delegated administrator, you must first change the delegated administrator account to another account that is remaining in the organization.
After the account leaves the organization, all tags that were attached to the account object in the organization are deleted. AWS accounts outside of an organization do not support tags.
A newly created account has a waiting period before it can be removed from its organization. You must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
If you are using an organization principal to call `LeaveOrganization` across multiple accounts, you can only do this up to 5 accounts per second in a single organization.

## Response Elements
<a name="API_LeaveOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_LeaveOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** MasterCannotLeaveOrganizationException **   
You can't remove a management account from an organization. If you want the management account to become a member account in another organization, you must first delete the current organization of the management account.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_LeaveOrganization_Examples"></a>

### Example
<a name="API_LeaveOrganization_Example_1"></a>

The following example shows how to remove your member account from an organization.

#### Sample Request
<a name="API_LeaveOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.LeaveOrganization

{}
```

#### Sample Response
<a name="API_LeaveOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_LeaveOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/LeaveOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/LeaveOrganization) 

# ListAccounts
<a name="API_ListAccounts"></a>

Lists all the accounts in the organization. To request only the accounts in a specified root or organizational unit (OU), use the [ListAccountsForParent](API_ListAccountsForParent.md) operation instead.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListAccounts_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListAccounts_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListAccounts_RequestSyntax) **   <a name="organizations-ListAccounts-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListAccounts_RequestSyntax) **   <a name="organizations-ListAccounts-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListAccounts_ResponseSyntax"></a>

```
{
   "Accounts": [ 
      { 
         "Arn": "string",
         "Email": "string",
         "Id": "string",
         "JoinedMethod": "string",
         "JoinedTimestamp": number,
         "Name": "string",
         "Paths": [ "string" ],
         "State": "string",
         "Status": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListAccounts_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Accounts](#API_ListAccounts_ResponseSyntax) **   <a name="organizations-ListAccounts-response-Accounts"></a>
A list of objects in the organization.  
The `Status` parameter in the API response will be retired on September 9, 2026. Although both the account `State` and account `Status` parameters are currently available in the AWS Organizations APIs (`DescribeAccount`, `ListAccounts`, `ListAccountsForParent`), we recommend that you update your scripts or other code to use the `State` parameter instead of `Status` before September 9, 2026.
Type: Array of [Account](API_Account.md) objects

 ** [NextToken](#API_ListAccounts_ResponseSyntax) **   <a name="organizations-ListAccounts-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListAccounts_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListAccounts_Examples"></a>

### Example
<a name="API_ListAccounts_Example_1"></a>

The following example shows how to request a list of all the accounts in an organization.

#### Sample Request
<a name="API_ListAccounts_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListAccounts

{}
```

#### Sample Response
<a name="API_ListAccounts_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Accounts": [
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
      "JoinedMethod": "INVITED",
      "JoinedTimestamp": 1481830215.45,
      "Id": "111111111111",
      "Name": "Management account",
      "Email": "diego@example.com",
      "State": "ACTIVE",
      "Status": "ACTIVE",
      "Paths": [
        "o-exampleorgid/r-examplerootid111/111111111111/"
      ]
    },
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/222222222222",
      "JoinedMethod": "INVITED",
      "JoinedTimestamp": 1481835741.044,
      "Id": "222222222222",
      "Name": "Production Account",
      "Email": "alice@example.com",
      "State": "ACTIVE",
      "Status": "ACTIVE",
      "Paths": [
        "o-exampleorgid/r-examplerootid111/222222222222/"
      ]
    },
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
      "JoinedMethod": "INVITED",
      "JoinedTimestamp": 1481835795.536,
      "Id": "333333333333",
      "Name": "Development Account",
      "Email": "juan@example.com",
      "State": "ACTIVE",
      "Status": "ACTIVE",
      "Paths": [
        "o-exampleorgid/r-examplerootid111/333333333333/"
      ]
    },
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
      "JoinedMethod": "INVITED",
      "JoinedTimestamp": 1481835812.143,
      "Id": "444444444444",
      "Name": "Test Account",
      "Email": "anika@example.com",
      "State": "ACTIVE",
      "Status": "ACTIVE",
      "Paths": [
        "o-exampleorgid/r-examplerootid111/444444444444/"
      ]
    }
  ]
}
```

## See Also
<a name="API_ListAccounts_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListAccounts) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListAccounts) 

# ListAccountsForParent
<a name="API_ListAccountsForParent"></a>

Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU). If you specify the root, you get a list of all the accounts that aren't in any OU. If you specify an OU, you get a list of all the accounts in only that OU and not in any child OUs. To get a list of all accounts in the organization, use the [ListAccounts](API_ListAccounts.md) operation.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListAccountsForParent_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "ParentId": "string"
}
```

## Request Parameters
<a name="API_ListAccountsForParent_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListAccountsForParent_RequestSyntax) **   <a name="organizations-ListAccountsForParent-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListAccountsForParent_RequestSyntax) **   <a name="organizations-ListAccountsForParent-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [ParentId](#API_ListAccountsForParent_RequestSyntax) **   <a name="organizations-ListAccountsForParent-request-ParentId"></a>
The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.  
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Syntax
<a name="API_ListAccountsForParent_ResponseSyntax"></a>

```
{
   "Accounts": [ 
      { 
         "Arn": "string",
         "Email": "string",
         "Id": "string",
         "JoinedMethod": "string",
         "JoinedTimestamp": number,
         "Name": "string",
         "Paths": [ "string" ],
         "State": "string",
         "Status": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListAccountsForParent_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Accounts](#API_ListAccountsForParent_ResponseSyntax) **   <a name="organizations-ListAccountsForParent-response-Accounts"></a>
A list of the accounts in the specified root or OU.  
The `Status` parameter in the API response will be retired on September 9, 2026. Although both the account `State` and account `Status` parameters are currently available in the AWS Organizations APIs (`DescribeAccount`, `ListAccounts`, `ListAccountsForParent`), we recommend that you update your scripts or other code to use the `State` parameter instead of `Status` before September 9, 2026.
Type: Array of [Account](API_Account.md) objects

 ** [NextToken](#API_ListAccountsForParent_ResponseSyntax) **   <a name="organizations-ListAccountsForParent-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListAccountsForParent_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ParentNotFoundException **   
We can't find a root or OU with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListAccountsForParent_Examples"></a>

### Example
<a name="API_ListAccountsForParent_Example_1"></a>

The following example shows how to request a list of the accounts in an OU.

#### Sample Request
<a name="API_ListAccountsForParent_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListAccountsForParent

{ "ParentId": "ou-examplerootid111-exampleouid111" }
```

#### Sample Response
<a name="API_ListAccountsForParent_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "Accounts": [
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
      "JoinedMethod": "INVITED",
      "JoinedTimestamp": 1481835795.536,
      "Id": "333333333333",
      "Name": "Development Account",
      "Email": "juan@example.com",
      "State": "ACTIVE",
      "Status": "ACTIVE",
      "Paths": [
        "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/333333333333/"
      ]
    },
    {
       "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
       "JoinedMethod": "INVITED",
       "JoinedTimestamp": 1481835812.143,
       "Id": "444444444444",
       "Name": "Test Account",
       "Email": "anika@example.com",
       "State": "ACTIVE",
       "Status": "ACTIVE",
       "Paths": [
         "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/444444444444/"
       ]
    }
  ]
}
```

## See Also
<a name="API_ListAccountsForParent_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListAccountsForParent) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListAccountsForParent) 

# ListAccountsWithInvalidEffectivePolicy
<a name="API_ListAccountsWithInvalidEffectivePolicy"></a>

Lists all the accounts in an organization that have invalid effective policies. An *invalid effective policy* is an [effective policy](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html) that fails validation checks, resulting in the effective policy not being fully enforced on all the intended accounts within an organization.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListAccountsWithInvalidEffectivePolicy_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "PolicyType": "string"
}
```

## Request Parameters
<a name="API_ListAccountsWithInvalidEffectivePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListAccountsWithInvalidEffectivePolicy_RequestSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListAccountsWithInvalidEffectivePolicy_RequestSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [PolicyType](#API_ListAccountsWithInvalidEffectivePolicy_RequestSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-request-PolicyType"></a>
The type of policy that you want information about. You can specify one of the following values:  
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

## Response Syntax
<a name="API_ListAccountsWithInvalidEffectivePolicy_ResponseSyntax"></a>

```
{
   "Accounts": [ 
      { 
         "Arn": "string",
         "Email": "string",
         "Id": "string",
         "JoinedMethod": "string",
         "JoinedTimestamp": number,
         "Name": "string",
         "Paths": [ "string" ],
         "State": "string",
         "Status": "string"
      }
   ],
   "NextToken": "string",
   "PolicyType": "string"
}
```

## Response Elements
<a name="API_ListAccountsWithInvalidEffectivePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Accounts](#API_ListAccountsWithInvalidEffectivePolicy_ResponseSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-response-Accounts"></a>
The accounts in the organization which have an invalid effective policy for the specified policy type.  
Type: Array of [Account](API_Account.md) objects

 ** [NextToken](#API_ListAccountsWithInvalidEffectivePolicy_ResponseSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [PolicyType](#API_ListAccountsWithInvalidEffectivePolicy_ResponseSyntax) **   <a name="organizations-ListAccountsWithInvalidEffectivePolicy-response-PolicyType"></a>
The specified policy type. One of the following values:  
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY` 

## Errors
<a name="API_ListAccountsWithInvalidEffectivePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** EffectivePolicyNotFoundException **   
If you ran this action on the management account, this policy type is not enabled. If you ran the action on a member account, the account doesn't have an effective policy of this type. Contact the administrator of your organization about attaching a policy of this type to the account.   
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListAccountsWithInvalidEffectivePolicy_Examples"></a>

### Example
<a name="API_ListAccountsWithInvalidEffectivePolicy_Example_1"></a>

The following example shows you how to request a list of the accounts in an organization having invalid effective policy for a policy type:

#### Sample Request
<a name="API_ListAccountsWithInvalidEffectivePolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
                    X-Amz-Target: AWSOrganizationsV20161128.ListAccountsWithInvalidEffectivePolicy
 
                    {
                        "PolicyType": "BACKUP_POLICY"
                    }
```

#### Sample Response
<a name="API_ListAccountsWithInvalidEffectivePolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
                    Content-Type: application/json
 
                    {
                        "Accounts": [
                            {
                                "Id": "111111111111",
                                "Name": "Management Account",
                                "Email": "bill@example.com"
                            },
                            {
                                "Id": "222222222222",
                                "Name": "Developer Account",
                                "Email": "alice@example.com"
                            },
                            {
                                "Id": "333333333333",
                                "Name": "Test Account",
                                "Email": "juan@example.com"
                            },
                            {
                                "Id": "444444444444",
                                "Name": "Production Account",
                                "Email": "anika@example.com"
                            }
                        ]
                    }
```

## See Also
<a name="API_ListAccountsWithInvalidEffectivePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListAccountsWithInvalidEffectivePolicy) 

# ListAWSServiceAccessForOrganization
<a name="API_ListAWSServiceAccessForOrganization"></a>

Returns a list of the AWS services that you enabled to integrate with your organization. After a service on this list creates the resources that it requires for the integration, it can perform operations on your organization and its accounts.

For more information about integrating other services with AWS Organizations, including the list of services that currently work with Organizations, see [Using AWS Organizations with other AWS services](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) in the * AWS Organizations User Guide*.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListAWSServiceAccessForOrganization_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListAWSServiceAccessForOrganization_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListAWSServiceAccessForOrganization_RequestSyntax) **   <a name="organizations-ListAWSServiceAccessForOrganization-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListAWSServiceAccessForOrganization_RequestSyntax) **   <a name="organizations-ListAWSServiceAccessForOrganization-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListAWSServiceAccessForOrganization_ResponseSyntax"></a>

```
{
   "EnabledServicePrincipals": [ 
      { 
         "DateEnabled": number,
         "ServicePrincipal": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListAWSServiceAccessForOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [EnabledServicePrincipals](#API_ListAWSServiceAccessForOrganization_ResponseSyntax) **   <a name="organizations-ListAWSServiceAccessForOrganization-response-EnabledServicePrincipals"></a>
A list of the service principals for the services that are enabled to integrate with your organization. Each principal is a structure that includes the name and the date that it was enabled for integration with AWS Organizations.  
Type: Array of [EnabledServicePrincipal](API_EnabledServicePrincipal.md) objects

 ** [NextToken](#API_ListAWSServiceAccessForOrganization_ResponseSyntax) **   <a name="organizations-ListAWSServiceAccessForOrganization-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListAWSServiceAccessForOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListAWSServiceAccessForOrganization_Examples"></a>

### Example
<a name="API_ListAWSServiceAccessForOrganization_Example_1"></a>

The following example shows how to get the list of services for which integration with AWS Organizations is enabled.

#### Sample Request
<a name="API_ListAWSServiceAccessForOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListAWSServiceAccessForOrganization

{}
```

#### Sample Response
<a name="API_ListAWSServiceAccessForOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{"ServiceList":["awsservice1.amazonaws.com","awsservice2.amazonaws.com"]}
```

## See Also
<a name="API_ListAWSServiceAccessForOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListAWSServiceAccessForOrganization) 

# ListChildren
<a name="API_ListChildren"></a>

Lists all of the organizational units (OUs) or accounts that are contained in the specified parent OU or root. This operation, along with [ListParents](API_ListParents.md) enables you to traverse the tree structure that makes up this root.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListChildren_RequestSyntax"></a>

```
{
   "ChildType": "string",
   "MaxResults": number,
   "NextToken": "string",
   "ParentId": "string"
}
```

## Request Parameters
<a name="API_ListChildren_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ChildType](#API_ListChildren_RequestSyntax) **   <a name="organizations-ListChildren-request-ChildType"></a>
Filters the output to include only the specified child type.  
Type: String  
Valid Values: `ACCOUNT | ORGANIZATIONAL_UNIT`   
Required: Yes

 ** [MaxResults](#API_ListChildren_RequestSyntax) **   <a name="organizations-ListChildren-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListChildren_RequestSyntax) **   <a name="organizations-ListChildren-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [ParentId](#API_ListChildren_RequestSyntax) **   <a name="organizations-ListChildren-request-ParentId"></a>
The unique identifier (ID) for the parent root or OU whose children you want to list.  
The [regex pattern](http://wikipedia.org/wiki/regex) 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Syntax
<a name="API_ListChildren_ResponseSyntax"></a>

```
{
   "Children": [ 
      { 
         "Id": "string",
         "Type": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListChildren_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Children](#API_ListChildren_ResponseSyntax) **   <a name="organizations-ListChildren-response-Children"></a>
The list of children of the specified parent container.  
Type: Array of [Child](API_Child.md) objects

 ** [NextToken](#API_ListChildren_ResponseSyntax) **   <a name="organizations-ListChildren-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListChildren_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ParentNotFoundException **   
We can't find a root or OU with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListChildren_Examples"></a>

### Example
<a name="API_ListChildren_Example_1"></a>

The following example shows how to request a list of all of the child OUs in a parent root or OU.

#### Sample Request
<a name="API_ListChildren_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListChildren

{
  "ChildType": "ORGANIZATIONAL_UNIT",
  "ParentId": "ou-examplerootid111-exampleouid111"
}
```

#### Sample Response
<a name="API_ListChildren_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json


{
  "Children": [
    { 
      "Id": "ou-examplerootid111-exampleouid111",
      "Type":"ORGANIZATIONAL_UNIT"
    },
    {
      "Id":"ou-examplerootid111-exampleouid222",
      "Type":"ORGANIZATIONAL_UNIT"
    }
  ]
}
```

## See Also
<a name="API_ListChildren_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListChildren) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListChildren) 

# ListCreateAccountStatus
<a name="API_ListCreateAccountStatus"></a>

Lists the account creation requests that match the specified status that is currently being tracked for the organization.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListCreateAccountStatus_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "States": [ "string" ]
}
```

## Request Parameters
<a name="API_ListCreateAccountStatus_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListCreateAccountStatus_RequestSyntax) **   <a name="organizations-ListCreateAccountStatus-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListCreateAccountStatus_RequestSyntax) **   <a name="organizations-ListCreateAccountStatus-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [States](#API_ListCreateAccountStatus_RequestSyntax) **   <a name="organizations-ListCreateAccountStatus-request-States"></a>
A list of one or more states that you want included in the response. If this parameter isn't present, all requests are included in the response.  
Type: Array of strings  
Valid Values: `IN_PROGRESS | SUCCEEDED | FAILED`   
Required: No

## Response Syntax
<a name="API_ListCreateAccountStatus_ResponseSyntax"></a>

```
{
   "CreateAccountStatuses": [ 
      { 
         "AccountId": "string",
         "AccountName": "string",
         "CompletedTimestamp": number,
         "FailureReason": "string",
         "GovCloudAccountId": "string",
         "Id": "string",
         "RequestedTimestamp": number,
         "State": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListCreateAccountStatus_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CreateAccountStatuses](#API_ListCreateAccountStatus_ResponseSyntax) **   <a name="organizations-ListCreateAccountStatus-response-CreateAccountStatuses"></a>
A list of objects with details about the requests. Certain elements, such as the accountId number, are present in the output only after the account has been successfully created.  
Type: Array of [CreateAccountStatus](API_CreateAccountStatus.md) objects

 ** [NextToken](#API_ListCreateAccountStatus_ResponseSyntax) **   <a name="organizations-ListCreateAccountStatus-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListCreateAccountStatus_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListCreateAccountStatus_Examples"></a>

### Example
<a name="API_ListCreateAccountStatus_Example_1"></a>

The following example shows how to request a list of account creation requests for an organization that have completed successfully.

#### Sample Request
<a name="API_ListCreateAccountStatus_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListCreateAccountStatus
  
{ "States": "SUCCEEDED" }
```

#### Sample Response
<a name="API_ListCreateAccountStatus_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "CreateAccountStatuses": [
    {
      "AccountId": "444444444444",
      "AccountName": "Developer Test Account",
      "CompletedTimeStamp": 1481835812.143,
      "Id": "car-examplecreateaccountrequestid111",
      "RequestedTimeStamp": 1481829432.531,
      "State": "SUCCEEDED"
    }
  ]
}
```

### Example
<a name="API_ListCreateAccountStatus_Example_2"></a>

The following example gets a list of in-progress account creation requests for an organization.

#### Sample Request
<a name="API_ListCreateAccountStatus_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListCreateAccountStatus
  
{ "States": "IN_PROGRESS" }
```

#### Sample Response
<a name="API_ListCreateAccountStatus_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "CreateAccountStatuses": [
    {
      "State": "IN_PROGRESS",
      "Id": "car-examplecreateaccountrequestid111",
      "RequestedTimeStamp": 1481829432.531,
      "AccountName": "Production Account"
    }
  ]
}
```

## See Also
<a name="API_ListCreateAccountStatus_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListCreateAccountStatus) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListCreateAccountStatus) 

# ListDelegatedAdministrators
<a name="API_ListDelegatedAdministrators"></a>

Lists the AWS accounts that are designated as delegated administrators in this organization.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListDelegatedAdministrators_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "ServicePrincipal": "string"
}
```

## Request Parameters
<a name="API_ListDelegatedAdministrators_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListDelegatedAdministrators_RequestSyntax) **   <a name="organizations-ListDelegatedAdministrators-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListDelegatedAdministrators_RequestSyntax) **   <a name="organizations-ListDelegatedAdministrators-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [ServicePrincipal](#API_ListDelegatedAdministrators_RequestSyntax) **   <a name="organizations-ListDelegatedAdministrators-request-ServicePrincipal"></a>
Specifies a service principal name. If specified, then the operation lists the delegated administrators only for the specified service.  
If you don't specify a service principal, the operation lists all delegated administrators for all services in your organization.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+=,.@-]*`   
Required: No

## Response Syntax
<a name="API_ListDelegatedAdministrators_ResponseSyntax"></a>

```
{
   "DelegatedAdministrators": [ 
      { 
         "Arn": "string",
         "DelegationEnabledDate": number,
         "Email": "string",
         "Id": "string",
         "JoinedMethod": "string",
         "JoinedTimestamp": number,
         "Name": "string",
         "State": "string",
         "Status": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListDelegatedAdministrators_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DelegatedAdministrators](#API_ListDelegatedAdministrators_ResponseSyntax) **   <a name="organizations-ListDelegatedAdministrators-response-DelegatedAdministrators"></a>
The list of delegated administrators in your organization.  
Type: Array of [DelegatedAdministrator](API_DelegatedAdministrator.md) objects

 ** [NextToken](#API_ListDelegatedAdministrators_ResponseSyntax) **   <a name="organizations-ListDelegatedAdministrators-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListDelegatedAdministrators_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListDelegatedAdministrators_Examples"></a>

### Example
<a name="API_ListDelegatedAdministrators_Example_1"></a>

This example illustrates one usage of ListDelegatedAdministrators.

#### Sample Request
<a name="API_ListDelegatedAdministrators_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListDelegatedAdministrators

{}
```

#### Sample Response
<a name="API_ListDelegatedAdministrators_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
    "DelegatedAdministrators": [
        {
            "Id": "111111111111",
            "Arn": "arn:aws:organizations::222222222222:account/o-exampleorgid/111111111111",
            "Email": "anika@example.com",
            "Name": "test1",
            "State": "ACTIVE",
            "Status": "ACTIVE",
            "JoinedMethod": "CREATED",
            "JoinedTimestamp": 1470684478.687,
            "DelegationEnabledDate": 1470684478.687
        },
        {
            "Id": "333333333333",
            "Arn": "arn:aws:organizations::444444444444:account/o-exampleorgid/333333333333",
            "Email": "anika@example.com",
            "Name": "test2",
            "State": "ACTIVE",
            "Status": "ACTIVE",
            "JoinedMethod": "INVITED",
            "JoinedTimestamp": 1470684478.687,
            "DelegationEnabledDate": 1470684478.687
        }
    ]
}
```

## See Also
<a name="API_ListDelegatedAdministrators_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListDelegatedAdministrators) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListDelegatedAdministrators) 

# ListDelegatedServicesForAccount
<a name="API_ListDelegatedServicesForAccount"></a>

List the AWS services for which the specified account is a delegated administrator.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListDelegatedServicesForAccount_RequestSyntax"></a>

```
{
   "AccountId": "string",
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListDelegatedServicesForAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_ListDelegatedServicesForAccount_RequestSyntax) **   <a name="organizations-ListDelegatedServicesForAccount-request-AccountId"></a>
The account ID number of a delegated administrator account in the organization.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

 ** [MaxResults](#API_ListDelegatedServicesForAccount_RequestSyntax) **   <a name="organizations-ListDelegatedServicesForAccount-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListDelegatedServicesForAccount_RequestSyntax) **   <a name="organizations-ListDelegatedServicesForAccount-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListDelegatedServicesForAccount_ResponseSyntax"></a>

```
{
   "DelegatedServices": [ 
      { 
         "DelegationEnabledDate": number,
         "ServicePrincipal": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListDelegatedServicesForAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DelegatedServices](#API_ListDelegatedServicesForAccount_ResponseSyntax) **   <a name="organizations-ListDelegatedServicesForAccount-response-DelegatedServices"></a>
The services for which the account is a delegated administrator.  
Type: Array of [DelegatedService](API_DelegatedService.md) objects

 ** [NextToken](#API_ListDelegatedServicesForAccount_ResponseSyntax) **   <a name="organizations-ListDelegatedServicesForAccount-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListDelegatedServicesForAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AccountNotRegisteredException **   
The specified account is not a delegated administrator for this AWS service.   
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListDelegatedServicesForAccount_Examples"></a>

### Example
<a name="API_ListDelegatedServicesForAccount_Example_1"></a>

This example illustrates one usage of ListDelegatedServicesForAccount.

#### Sample Request
<a name="API_ListDelegatedServicesForAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListDelegatedServicesForAccount

{ "AccountId": "111111111111" }
```

#### Sample Response
<a name="API_ListDelegatedServicesForAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
    "DelegatedServices": [
        {
            "ServicePrincipal": "example.amazonaws.com",
            "DelegationEnabledDate": 1470684478.687
        }
    ]
}
```

## See Also
<a name="API_ListDelegatedServicesForAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListDelegatedServicesForAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListDelegatedServicesForAccount) 

# ListEffectivePolicyValidationErrors
<a name="API_ListEffectivePolicyValidationErrors"></a>

Lists all the validation errors on an [effective policy](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html) for a specified account and policy type.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListEffectivePolicyValidationErrors_RequestSyntax"></a>

```
{
   "AccountId": "string",
   "MaxResults": number,
   "NextToken": "string",
   "PolicyType": "string"
}
```

## Request Parameters
<a name="API_ListEffectivePolicyValidationErrors_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_ListEffectivePolicyValidationErrors_RequestSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-request-AccountId"></a>
The ID of the account that you want details about. Specifying an organization root or organizational unit (OU) as the target is not supported.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

 ** [MaxResults](#API_ListEffectivePolicyValidationErrors_RequestSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListEffectivePolicyValidationErrors_RequestSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [PolicyType](#API_ListEffectivePolicyValidationErrors_RequestSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-request-PolicyType"></a>
The type of policy that you want information about. You can specify one of the following values:  
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

## Response Syntax
<a name="API_ListEffectivePolicyValidationErrors_ResponseSyntax"></a>

```
{
   "AccountId": "string",
   "EffectivePolicyValidationErrors": [ 
      { 
         "ContributingPolicies": [ "string" ],
         "ErrorCode": "string",
         "ErrorMessage": "string",
         "PathToError": "string"
      }
   ],
   "EvaluationTimestamp": number,
   "NextToken": "string",
   "Path": "string",
   "PolicyType": "string"
}
```

## Response Elements
<a name="API_ListEffectivePolicyValidationErrors_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [AccountId](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-AccountId"></a>
The ID of the specified account.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$` 

 ** [EffectivePolicyValidationErrors](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-EffectivePolicyValidationErrors"></a>
The `EffectivePolicyValidationError` object contains details about the validation errors that occurred when generating or enforcing an effective policy, such as which policies contributed to the error and location of the error.  
Type: Array of [EffectivePolicyValidationError](API_EffectivePolicyValidationError.md) objects

 ** [EvaluationTimestamp](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-EvaluationTimestamp"></a>
The time when the latest effective policy was generated for the specified account.  
Type: Timestamp

 ** [NextToken](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Path](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-Path"></a>
The path in the organization where the specified account exists.  
Type: String  
Pattern: `^(o-[a-z0-9]{10,32}\/r-[0-9a-z]{4,32}(\/ou\-[0-9a-z]{4,32}-[a-z0-9]{8,32})*(\/\d{12})*)\/` 

 ** [PolicyType](#API_ListEffectivePolicyValidationErrors_ResponseSyntax) **   <a name="organizations-ListEffectivePolicyValidationErrors-response-PolicyType"></a>
The specified policy type. One of the following values:  
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY` 

## Errors
<a name="API_ListEffectivePolicyValidationErrors_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** EffectivePolicyNotFoundException **   
If you ran this action on the management account, this policy type is not enabled. If you ran the action on a member account, the account doesn't have an effective policy of this type. Contact the administrator of your organization about attaching a policy of this type to the account.   
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListEffectivePolicyValidationErrors_Examples"></a>

### Example
<a name="API_ListEffectivePolicyValidationErrors_Example_1"></a>

The following example shows you how to request a list of effective policy validation errors for an account and policy type:

#### Sample Request
<a name="API_ListEffectivePolicyValidationErrors_Example_1_Request"></a>

```
POST / HTTP/1.1
                    X-Amz-Target: AWSOrganizationsV20161128.ListEffectivePolicyValidationErrors
 
                    {
                        "AccountId": "111111111111",
                        "PolicyType": "BACKUP_POLICY"
                    }
```

#### Sample Response
<a name="API_ListEffectivePolicyValidationErrors_Example_1_Response"></a>

```
HTTP/1.1 200 OK
                    Content-Type: application/json
 
                    {
                        "AccountId": "111111111111",
                        "PolicyType": "BACKUP_POLICY",
                        "Path": "o-exampleorgid/r-examplerootid111/111111111111/",
                        "EvaluationTimestamp": "2024-03-04T19:39:38.376000+00:00",
                        "EffectivePolicyValidationErrors": [
                            {
                                "ErrorCode": "ELEMENTS_TOO_FEW",
                                "ErrorMessage": "tag_value is less than the allowed minimum limit 1",
                                "PathToError": "plans/backup_daily/selections/tags/dailydatatype/tag_value",
                                "ContributingPolicies": ["p-examplepolicyid111"]
                            },
                            {
                                "ErrorCode": "ELEMENTS_TOO_MANY",
                                "ErrorMessage": "rules exceeds the allowed maximum limit 10",
                                "PathToError": "plans/backup_daily/rules",
                                "ContributingPolicies": ["p-examplepolicyid111", "p-examplepolicyid222"]
                            }
                        ]
                    }
```

## See Also
<a name="API_ListEffectivePolicyValidationErrors_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListEffectivePolicyValidationErrors) 

# ListHandshakesForAccount
<a name="API_ListHandshakesForAccount"></a>

Lists the recent handshakes that you have received.

You can view `CANCELED`, `ACCEPTED`, `DECLINED`, or `EXPIRED` handshakes in API responses for 30 days before they are deleted.

You can call this operation from any account in a organization.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

## Request Syntax
<a name="API_ListHandshakesForAccount_RequestSyntax"></a>

```
{
   "Filter": { 
      "ActionType": "string",
      "ParentHandshakeId": "string"
   },
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListHandshakesForAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filter](#API_ListHandshakesForAccount_RequestSyntax) **   <a name="organizations-ListHandshakesForAccount-request-Filter"></a>
A `HandshakeFilter` object. Contains the filer used to select the handshakes for an operation.  
Type: [HandshakeFilter](API_HandshakeFilter.md) object  
Required: No

 ** [MaxResults](#API_ListHandshakesForAccount_RequestSyntax) **   <a name="organizations-ListHandshakesForAccount-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListHandshakesForAccount_RequestSyntax) **   <a name="organizations-ListHandshakesForAccount-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListHandshakesForAccount_ResponseSyntax"></a>

```
{
   "Handshakes": [ 
      { 
         "Action": "string",
         "Arn": "string",
         "ExpirationTimestamp": number,
         "Id": "string",
         "Parties": [ 
            { 
               "Id": "string",
               "Type": "string"
            }
         ],
         "RequestedTimestamp": number,
         "Resources": [ 
            { 
               "Resources": [ 
                  "HandshakeResource"
               ],
               "Type": "string",
               "Value": "string"
            }
         ],
         "State": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListHandshakesForAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshakes](#API_ListHandshakesForAccount_ResponseSyntax) **   <a name="organizations-ListHandshakesForAccount-response-Handshakes"></a>
An array of `Handshake`objects. Contains details for a handshake.  
Type: Array of [Handshake](API_Handshake.md) objects

 ** [NextToken](#API_ListHandshakesForAccount_ResponseSyntax) **   <a name="organizations-ListHandshakesForAccount-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListHandshakesForAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListHandshakesForAccount_Examples"></a>

### Example
<a name="API_ListHandshakesForAccount_Example_1"></a>

The following example shows how to get a list of all handshakes that are associated with the account of the credentials that were used to call the operation.

#### Sample Request
<a name="API_ListHandshakesForAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListHandshakesForAccount

{}
```

#### Sample Response
<a name="API_ListHandshakesForAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Handshake": {
    "Action": "INVITE",
    "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
    "ExpirationTimestamp": 1482952459.257,
    "Id": "h-examplehandshakeid111",
    "Parties": [
      {
        "Id": "o-exampleorgid",
        "Type": "ORGANIZATION"
      },
      {
        "Id": "juan@example.com",
        "Type": "EMAIL"
      }
    ],
    "RequestedTimestamp": 1481656459.257,
    "Resources": [
      {
        "Resources": [
          {
            "Type": "MASTER_EMAIL",
            "Value": "diego@example.com"
          },
          {
            "Type": "MASTER_NAME",
            "Value": "Org management account"
          },
          {
            "Type": "ORGANIZATION_FEATURE_SET",
            "Value": "FULL"
          }
        ],
        "Type": "ORGANIZATION",
        "Value": "o-exampleorgid"
      },
      {
        "Type": "EMAIL",
        "Value": "juan@example.com"
      }
    ],
    "State": "OPEN"
  }
}
```

## See Also
<a name="API_ListHandshakesForAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListHandshakesForAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListHandshakesForAccount) 

# ListHandshakesForOrganization
<a name="API_ListHandshakesForOrganization"></a>

Lists the recent handshakes that you have sent.

You can view `CANCELED`, `ACCEPTED`, `DECLINED`, or `EXPIRED` handshakes in API responses for 30 days before they are deleted.

You can only call this operation from the management account or a member account that is a delegated administrator.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

## Request Syntax
<a name="API_ListHandshakesForOrganization_RequestSyntax"></a>

```
{
   "Filter": { 
      "ActionType": "string",
      "ParentHandshakeId": "string"
   },
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListHandshakesForOrganization_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filter](#API_ListHandshakesForOrganization_RequestSyntax) **   <a name="organizations-ListHandshakesForOrganization-request-Filter"></a>
A `HandshakeFilter` object. Contains the filer used to select the handshakes for an operation.  
Type: [HandshakeFilter](API_HandshakeFilter.md) object  
Required: No

 ** [MaxResults](#API_ListHandshakesForOrganization_RequestSyntax) **   <a name="organizations-ListHandshakesForOrganization-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListHandshakesForOrganization_RequestSyntax) **   <a name="organizations-ListHandshakesForOrganization-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListHandshakesForOrganization_ResponseSyntax"></a>

```
{
   "Handshakes": [ 
      { 
         "Action": "string",
         "Arn": "string",
         "ExpirationTimestamp": number,
         "Id": "string",
         "Parties": [ 
            { 
               "Id": "string",
               "Type": "string"
            }
         ],
         "RequestedTimestamp": number,
         "Resources": [ 
            { 
               "Resources": [ 
                  "HandshakeResource"
               ],
               "Type": "string",
               "Value": "string"
            }
         ],
         "State": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListHandshakesForOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Handshakes](#API_ListHandshakesForOrganization_ResponseSyntax) **   <a name="organizations-ListHandshakesForOrganization-response-Handshakes"></a>
An array of `Handshake`objects. Contains details for a handshake.  
Type: Array of [Handshake](API_Handshake.md) objects

 ** [NextToken](#API_ListHandshakesForOrganization_ResponseSyntax) **   <a name="organizations-ListHandshakesForOrganization-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListHandshakesForOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListHandshakesForOrganization_Examples"></a>

### Example
<a name="API_ListHandshakesForOrganization_Example_1"></a>

The following example shows how to get a list of handshakes that are associated with the current organization. The example response shows two handshakes. The first one is an invitation to Juan's account and shows a state of `OPEN`. The second is an invitation to Anika's account and shows a state of `ACCEPTED`.

#### Sample Request
<a name="API_ListHandshakesForOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListHandshakesForOrganization

{}
```

#### Sample Response
<a name="API_ListHandshakesForOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Handshakes": [ 
    {
      "Action": "INVITE",
      "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
      "ExpirationTimestamp": 1482952459.257,
      "Id": "h-examplehandshakeid111",
      "Parties": [
        {
          "Id": "o-exampleorgid",
          "Type": "ORGANIZATION"
        },
        {
          "Id": "juan@example.com",
          "Type": "EMAIL"
        }
      ],
      "RequestedTimestamp": 1481656459.257,
      "Resources": [
        {
          "Resources": [
            {
              "Type": "MASTER_EMAIL",
              "Value": "diego@example.com"
            },
            {
              "Type": "MASTER_NAME",
              "Value": "Org Management account"
            },
            {
              "Type": "ORGANIZATION_FEATURE_SET",
              "Value": "FULL"
            }
          ],
          "Type": "ORGANIZATION",
          "Value": "o-exampleorgid"
        },
        {
          "Type": "EMAIL",
          "Value": "juan@example.com"
        },
        {
          "Type":"NOTES",
          "Value":"This is an invitation to Juan's account to join Diego's organization."
        }
      ],
      "State": "OPEN"
    },
    {
      "Action": "INVITE",
      "State":"ACCEPTED",
      "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
      "ExpirationTimestamp": 1.471797437427E9,
      "Id": "h-examplehandshakeid222",
      "Parties": [
        {
          "Id": "o-exampleorgid",
          "Type": "ORGANIZATION"
        },
        {
          "Id": "anika@example.com",
          "Type": "EMAIL"
        }
      ],
      "RequestedTimestamp": 1.469205437427E9,
      "Resources": [
        {
          "Resources": [
            {
              "Type":"MASTER_EMAIL",
              "Value":"diego@example.com"
            },
            {
              "Type":"MASTER_NAME",
              "Value":"Management account"
            }
          ],
          "Type":"ORGANIZATION",
          "Value":"o-exampleorgid"
        },
        {
          "Type":"EMAIL",
          "Value":"anika@example.com"
        },
        {
          "Type":"NOTES",
          "Value":"This is an invitation to Anika's account to join Diego's organization."
        }
      ]
    }
  ]
}
```

## See Also
<a name="API_ListHandshakesForOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListHandshakesForOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListHandshakesForOrganization) 

# ListInboundResponsibilityTransfers
<a name="API_ListInboundResponsibilityTransfers"></a>

Lists transfers that allow you to manage the specified responsibilities for another organization. This operation returns both transfer invitations and transfers.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

## Request Syntax
<a name="API_ListInboundResponsibilityTransfers_RequestSyntax"></a>

```
{
   "Id": "string",
   "MaxResults": number,
   "NextToken": "string",
   "Type": "string"
}
```

## Request Parameters
<a name="API_ListInboundResponsibilityTransfers_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Id](#API_ListInboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-request-Id"></a>
ID for the transfer.  
Type: String  
Pattern: `^rt-[0-9a-z]{8,32}$`   
Required: No

 ** [MaxResults](#API_ListInboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListInboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [Type](#API_ListInboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-request-Type"></a>
The type of responsibility. Currently, only `BILLING` is supported.  
Type: String  
Valid Values: `BILLING`   
Required: Yes

## Response Syntax
<a name="API_ListInboundResponsibilityTransfers_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "ResponsibilityTransfers": [ 
      { 
         "ActiveHandshakeId": "string",
         "Arn": "string",
         "EndTimestamp": number,
         "Id": "string",
         "Name": "string",
         "Source": { 
            "ManagementAccountEmail": "string",
            "ManagementAccountId": "string"
         },
         "StartTimestamp": number,
         "Status": "string",
         "Target": { 
            "ManagementAccountEmail": "string",
            "ManagementAccountId": "string"
         },
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListInboundResponsibilityTransfers_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListInboundResponsibilityTransfers_ResponseSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [ResponsibilityTransfers](#API_ListInboundResponsibilityTransfers_ResponseSyntax) **   <a name="organizations-ListInboundResponsibilityTransfers-response-ResponsibilityTransfers"></a>
A `ResponsibilityTransfers` object. Contains details for a transfer.  
Type: Array of [ResponsibilityTransfer](API_ResponsibilityTransfer.md) objects

## Errors
<a name="API_ListInboundResponsibilityTransfers_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ResponsibilityTransferNotFoundException **   
We can't find a transfer that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListInboundResponsibilityTransfers_Examples"></a>

### Example
<a name="API_ListInboundResponsibilityTransfers_Example_1"></a>

The following example shows how to get a list of all inbound responsibility transfers that are associated with the account of the credentials that were used to call the operation

#### Sample Request
<a name="API_ListInboundResponsibilityTransfers_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListInboundResponsibilityTransfers

{ "Type": "BILLING" }
```

#### Sample Response
<a name="API_ListInboundResponsibilityTransfers_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ResponsibilityTransfers": [
    {
      "Arn": "arn:aws:organizations::222222222222:transfer/o-exampleorgid/billing/inbound/rt-exampletransferid222",
      "EndTimestamp": "1769903999000",
      "Id": "rt-exampletransferid222",
      "Name": "transfer name",
      "Source": {
        "ManagementAccountId": "222222222222"
      },
      "StartTimestamp": "1767225600000",
      "Status": "WITHDRAWN",
      "Target": {
        "ManagementAccountId": "333333333333"
      },
      "Type": "BILLING"
    }
  ]
}
```

## See Also
<a name="API_ListInboundResponsibilityTransfers_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListInboundResponsibilityTransfers) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListInboundResponsibilityTransfers) 

# ListOrganizationalUnitsForParent
<a name="API_ListOrganizationalUnitsForParent"></a>

Lists the organizational units (OUs) in a parent organizational unit or root.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListOrganizationalUnitsForParent_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "ParentId": "string"
}
```

## Request Parameters
<a name="API_ListOrganizationalUnitsForParent_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListOrganizationalUnitsForParent_RequestSyntax) **   <a name="organizations-ListOrganizationalUnitsForParent-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListOrganizationalUnitsForParent_RequestSyntax) **   <a name="organizations-ListOrganizationalUnitsForParent-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [ParentId](#API_ListOrganizationalUnitsForParent_RequestSyntax) **   <a name="organizations-ListOrganizationalUnitsForParent-request-ParentId"></a>
ID for the root or OU whose child OUs you want to list.  
The [regex pattern](http://wikipedia.org/wiki/regex) 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Syntax
<a name="API_ListOrganizationalUnitsForParent_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "OrganizationalUnits": [ 
      { 
         "Arn": "string",
         "Id": "string",
         "Name": "string",
         "Path": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListOrganizationalUnitsForParent_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListOrganizationalUnitsForParent_ResponseSyntax) **   <a name="organizations-ListOrganizationalUnitsForParent-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [OrganizationalUnits](#API_ListOrganizationalUnitsForParent_ResponseSyntax) **   <a name="organizations-ListOrganizationalUnitsForParent-response-OrganizationalUnits"></a>
A list of the OUs in the specified root or parent OU.  
Type: Array of [OrganizationalUnit](API_OrganizationalUnit.md) objects

## Errors
<a name="API_ListOrganizationalUnitsForParent_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ParentNotFoundException **   
We can't find a root or OU with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListOrganizationalUnitsForParent_Examples"></a>

### Example
<a name="API_ListOrganizationalUnitsForParent_Example_1"></a>

The following example shows how to get a list of OUs in a specified root.

#### Sample Request
<a name="API_ListOrganizationalUnitsForParent_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListOrganizationalUnitsForParent

{ "ParentId": "r-examplerootid111" }
```

#### Sample Response
<a name="API_ListOrganizationalUnitsForParent_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "OrganizationalUnits": [
    {
      "Name": "AccountingDepartment",
      "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
      "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
    },
    {
      "Name": "ProductionDepartment",
      "Arn": "arn:aws:organizations::222222222222:ou/o-exampleorgid/ou-examplerootid111-exampleouid222",
      "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid222/"
    }
  ]
}
```

## See Also
<a name="API_ListOrganizationalUnitsForParent_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListOrganizationalUnitsForParent) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListOrganizationalUnitsForParent) 

# ListOutboundResponsibilityTransfers
<a name="API_ListOutboundResponsibilityTransfers"></a>

Lists transfers that allow an account outside your organization to manage the specified responsibilities for your organization. This operation returns both transfer invitations and transfers.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

## Request Syntax
<a name="API_ListOutboundResponsibilityTransfers_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "Type": "string"
}
```

## Request Parameters
<a name="API_ListOutboundResponsibilityTransfers_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListOutboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListOutboundResponsibilityTransfers-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListOutboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListOutboundResponsibilityTransfers-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [Type](#API_ListOutboundResponsibilityTransfers_RequestSyntax) **   <a name="organizations-ListOutboundResponsibilityTransfers-request-Type"></a>
The type of responsibility. Currently, only `BILLING` is supported.  
Type: String  
Valid Values: `BILLING`   
Required: Yes

## Response Syntax
<a name="API_ListOutboundResponsibilityTransfers_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "ResponsibilityTransfers": [ 
      { 
         "ActiveHandshakeId": "string",
         "Arn": "string",
         "EndTimestamp": number,
         "Id": "string",
         "Name": "string",
         "Source": { 
            "ManagementAccountEmail": "string",
            "ManagementAccountId": "string"
         },
         "StartTimestamp": number,
         "Status": "string",
         "Target": { 
            "ManagementAccountEmail": "string",
            "ManagementAccountId": "string"
         },
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListOutboundResponsibilityTransfers_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListOutboundResponsibilityTransfers_ResponseSyntax) **   <a name="organizations-ListOutboundResponsibilityTransfers-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [ResponsibilityTransfers](#API_ListOutboundResponsibilityTransfers_ResponseSyntax) **   <a name="organizations-ListOutboundResponsibilityTransfers-response-ResponsibilityTransfers"></a>
An array of `ResponsibilityTransfer` objects. Contains details for a transfer.  
Type: Array of [ResponsibilityTransfer](API_ResponsibilityTransfer.md) objects

## Errors
<a name="API_ListOutboundResponsibilityTransfers_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListOutboundResponsibilityTransfers_Examples"></a>

### Example
<a name="API_ListOutboundResponsibilityTransfers_Example_1"></a>

The following example shows how to get a list of all outbound responsibility transfers that are associated with the account of the credentials that were used to call the operation.

#### Sample Request
<a name="API_ListOutboundResponsibilityTransfers_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListOutboundResponsibilityTransfers

{ "Type": "BILLING" }
```

#### Sample Response
<a name="API_ListOutboundResponsibilityTransfers_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ResponsibilityTransfers": [
    {
      "Arn": "arn:aws:organizations::222222222222:transfer/o-exampleorgid222/billing/outbound/rt-exampletransferid222",
      "EndTimestamp": "1769903999000",
      "Id": "rt-exampletransferid222",
      "Name": "transfer name",
      "Source": {
        "ManagementAccountId": "222222222222"
      },
      "StartTimestamp": "1767225600000",
      "Status": "WITHDRAWN",
      "Target": {
        "ManagementAccountId": "333333333333"
      },
      "Type": "BILLING"
    }
  ]
}
```

## See Also
<a name="API_ListOutboundResponsibilityTransfers_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListOutboundResponsibilityTransfers) 

# ListParents
<a name="API_ListParents"></a>

Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account. This operation, along with [ListChildren](API_ListChildren.md) enables you to traverse the tree structure that makes up this root.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

**Note**  
In the current release, a child can have only a single parent.

## Request Syntax
<a name="API_ListParents_RequestSyntax"></a>

```
{
   "ChildId": "string",
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListParents_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ChildId](#API_ListParents_RequestSyntax) **   <a name="organizations-ListParents-request-ChildId"></a>
ID for the OU or account whose parent containers you want to list. Don't specify a root.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a child ID string requires one of the following:  
+  **Account** - A string that consists of exactly 12 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 contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

 ** [MaxResults](#API_ListParents_RequestSyntax) **   <a name="organizations-ListParents-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListParents_RequestSyntax) **   <a name="organizations-ListParents-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListParents_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Parents": [ 
      { 
         "Id": "string",
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListParents_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListParents_ResponseSyntax) **   <a name="organizations-ListParents-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Parents](#API_ListParents_ResponseSyntax) **   <a name="organizations-ListParents-response-Parents"></a>
A list of parents for the specified child account or OU.  
Type: Array of [Parent](API_Parent.md) objects

## Errors
<a name="API_ListParents_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ChildNotFoundException **   
We can't find an organizational unit (OU) or AWS account with the `ChildId` that you specified.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListParents_Examples"></a>

### Example
<a name="API_ListParents_Example_1"></a>

The following example shows how to list the root or OUs that contain account 444444444444.

#### Sample Request
<a name="API_ListParents_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListParents

{ "ChildId": "444444444444" }
```

#### Sample Response
<a name="API_ListParents_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Parents": [
    {
      "Id": "ou-examplerootid111-exampleouid111",
      "Type": "ORGANIZATIONAL_UNIT"
    }
  ]
}
```

## See Also
<a name="API_ListParents_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListParents) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListParents) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListParents) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListParents) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListParents) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListParents) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListParents) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListParents) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListParents) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListParents) 

# ListPolicies
<a name="API_ListPolicies"></a>

Retrieves the list of all policies in an organization of a specified type.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListPolicies_RequestSyntax"></a>

```
{
   "Filter": "string",
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListPolicies_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filter](#API_ListPolicies_RequestSyntax) **   <a name="organizations-ListPolicies-request-Filter"></a>
Specifies the type of policy that you want to include in the response. You must specify one of the following values:  
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

 ** [MaxResults](#API_ListPolicies_RequestSyntax) **   <a name="organizations-ListPolicies-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListPolicies_RequestSyntax) **   <a name="organizations-ListPolicies-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListPolicies_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Policies": [ 
      { 
         "Arn": "string",
         "AwsManaged": boolean,
         "Description": "string",
         "Id": "string",
         "Name": "string",
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPolicies_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListPolicies_ResponseSyntax) **   <a name="organizations-ListPolicies-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Policies](#API_ListPolicies_ResponseSyntax) **   <a name="organizations-ListPolicies-response-Policies"></a>
A list of policies that match the filter criteria in the request. The output list doesn't include the policy contents. To see the content for a policy, see [DescribePolicy](API_DescribePolicy.md).  
Type: Array of [PolicySummary](API_PolicySummary.md) objects

## Errors
<a name="API_ListPolicies_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListPolicies_Examples"></a>

### Example
<a name="API_ListPolicies_Example_1"></a>

The following example shows how to get a list of service control policies (SCPs).

#### Sample Request
<a name="API_ListPolicies_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListPolicies

{ "Filter": "SERVICE_CONTROL_POLICY" }
```

#### Sample Response
<a name="API_ListPolicies_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Policies": [
    {
      "Type": "SERVICE_CONTROL_POLICY",
      "Name": "AllowAllS3Actions",
      "AwsManaged": false,
      "Id": "p-examplepolicyid111",
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
      "Description": "Enables account admins to delegate permissions for any S3 actions to users and roles in their accounts."
    },
    {
      "Type": "SERVICE_CONTROL_POLICY",
      "Name": "AllowAllEC2Actions",
      "AwsManaged": false,
      "Id": "p-examplepolicyid222",
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid222",
      "Description": "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts."
    },
    {
      "AwsManaged": true,
      "Description": "Allows access to every operation",
      "Type": "SERVICE_CONTROL_POLICY",
      "Id": "p-FullAWSAccess",
      "Arn": "arn:aws:organizations::aws:policy/service_control_policy/p-FullAWSAccess",
      "Name": "FullAWSAccess"
    }
  ]
}
```

### Example
<a name="API_ListPolicies_Example_2"></a>

The following example shows how to get a list of resource control policies (RCPs).

#### Sample Request
<a name="API_ListPolicies_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListPolicies

{ "Filter": "RESOURCE_CONTROL_POLICY" }
```

#### Sample Response
<a name="API_ListPolicies_Example_2_Response"></a>

```
"HTTP/1.1 200 OK
Content-Type":"application/json"{
   "Policy":[
      {         
         "AwsManaged":false,
         "Description":"Requires access to all resources that are sent using SSL",
         "Type":"RESOURCE_CONTROL_POLICY"
         "Id":"p-examplepolicyid111",
         "Arn":"arn:aws:organizations::111111111111:policy/o-exampleorgid/resource_control_policy/p-examplepolicyid111",
         "Name":"EnforceSSL",
      },
      {
         "AwsManaged":true,
         "Description":"Allows access to every resource"
         "Type":"RESOURCE_CONTROL_POLICY"
         "Id":"p-RCPFullAWSAccess",
         "Arn":"arn:aws:organizations::aws:policy/resource_control_policy/p-RCPFullAWSAccess",
         "Name":"RCPFullAWSAccess"
      }
   }
}
```

## See Also
<a name="API_ListPolicies_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListPolicies) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListPolicies) 

# ListPoliciesForTarget
<a name="API_ListPoliciesForTarget"></a>

Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListPoliciesForTarget_RequestSyntax"></a>

```
{
   "Filter": "string",
   "MaxResults": number,
   "NextToken": "string",
   "TargetId": "string"
}
```

## Request Parameters
<a name="API_ListPoliciesForTarget_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filter](#API_ListPoliciesForTarget_RequestSyntax) **   <a name="organizations-ListPoliciesForTarget-request-Filter"></a>
The type of policy that you want to include in the returned list. You must specify one of the following values:  
+  [SERVICE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) 
+  [RESOURCE\$1CONTROL\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) 
+  [DECLARATIVE\$1POLICY\$1EC2](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html) 
+  [BACKUP\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) 
+  [TAG\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) 
+  [CHATBOT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html) 
+  [AISERVICES\$1OPT\$1OUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 
+  [SECURITYHUB\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html) 
+  [UPGRADE\$1ROLLOUT\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html) 
+  [INSPECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html) 
+  [BEDROCK\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html) 
+  [S3\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html) 
+  [NETWORK\$1SECURITY\$1DIRECTOR\$1POLICY](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html) 
Type: String  
Valid Values: `SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY | INSPECTOR_POLICY | UPGRADE_ROLLOUT_POLICY | BEDROCK_POLICY | S3_POLICY | NETWORK_SECURITY_DIRECTOR_POLICY`   
Required: Yes

 ** [MaxResults](#API_ListPoliciesForTarget_RequestSyntax) **   <a name="organizations-ListPoliciesForTarget-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListPoliciesForTarget_RequestSyntax) **   <a name="organizations-ListPoliciesForTarget-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [TargetId](#API_ListPoliciesForTarget_RequestSyntax) **   <a name="organizations-ListPoliciesForTarget-request-TargetId"></a>
ID for the root, organizational unit, or account whose policies you want to list.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a target ID string requires one of the following:  
+  **Root** - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
+  **Account** - A string that consists of exactly 12 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Syntax
<a name="API_ListPoliciesForTarget_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Policies": [ 
      { 
         "Arn": "string",
         "AwsManaged": boolean,
         "Description": "string",
         "Id": "string",
         "Name": "string",
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPoliciesForTarget_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListPoliciesForTarget_ResponseSyntax) **   <a name="organizations-ListPoliciesForTarget-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Policies](#API_ListPoliciesForTarget_ResponseSyntax) **   <a name="organizations-ListPoliciesForTarget-response-Policies"></a>
The list of policies that match the criteria in the request.  
Type: Array of [PolicySummary](API_PolicySummary.md) objects

## Errors
<a name="API_ListPoliciesForTarget_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListPoliciesForTarget_Examples"></a>

### Example
<a name="API_ListPoliciesForTarget_Example_1"></a>

The following example shows how to get a list of all service control policies (SCPs) of the type specified by the `Filter` parameter, that are *directly* attached to an account. The list doesn't include policies that apply to the account because of inheritance from its location in an OU hierarchy.

#### Sample Request
<a name="API_ListPoliciesForTarget_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListPoliciesForTarget

{ "Filter": "SERVICE_CONTROL_POLICY", "TargetId": "444444444444" }
```

#### Sample Response
<a name="API_ListPoliciesForTarget_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Policies": [
    {
      "Type": "SERVICE_CONTROL_POLICY",
      "Name": "AllowAllEC2Actions",
      "AwsManaged", false,
      "Id": "p-examplepolicyid222",
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid222",
      "Description": "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts."
    }
  ]
}
```

### Example
<a name="API_ListPoliciesForTarget_Example_2"></a>

The following example shows how to get a list of all resource control policies (RCPs) of the type specified by the `Filter` parameter, that are *directly* attached to an account. The list doesn't include policies that apply to the account because of inheritance from its location in an OU hierarchy.

#### Sample Request
<a name="API_ListPoliciesForTarget_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListPoliciesForTarget

{ "Filter": "RESOURCE_CONTROL_POLICY", "TargetId": "444444444444" }
```

#### Sample Response
<a name="API_ListPoliciesForTarget_Example_2_Response"></a>

```
"HTTP/1.1 200 OK
Content-Type":"application/json"{
   "Policies":[
      {
         "AwsManaged":true,
         "Description":"Allows access to every resource"
         "Type":"RESOURCE_CONTROL_POLICY"
         "Id":"p-RCPFullAWSAccess",
         "Arn":"arn:aws:organizations::aws:policy/resource_control_policy/p-RCPFullAWSAccess",
         "Name":"RCPFullAWSAccess"
      }
   }
}
```

## See Also
<a name="API_ListPoliciesForTarget_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListPoliciesForTarget) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListPoliciesForTarget) 

# ListRoots
<a name="API_ListRoots"></a>

Lists the roots that are defined in the current organization.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

**Note**  
Policy types can be enabled and disabled in roots. This is distinct from whether they're available in the organization. When you enable all features, you make policy types available for use in that organization. Individual policy types can then be enabled and disabled in a root. To see the availability of a policy type in an organization, use [DescribeOrganization](API_DescribeOrganization.md).

## Request Syntax
<a name="API_ListRoots_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_ListRoots_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListRoots_RequestSyntax) **   <a name="organizations-ListRoots-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListRoots_RequestSyntax) **   <a name="organizations-ListRoots-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

## Response Syntax
<a name="API_ListRoots_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Roots": [ 
      { 
         "Arn": "string",
         "Id": "string",
         "Name": "string",
         "PolicyTypes": [ 
            { 
               "Status": "string",
               "Type": "string"
            }
         ]
      }
   ]
}
```

## Response Elements
<a name="API_ListRoots_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListRoots_ResponseSyntax) **   <a name="organizations-ListRoots-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Roots](#API_ListRoots_ResponseSyntax) **   <a name="organizations-ListRoots-response-Roots"></a>
A list of roots that are defined in an organization.  
Type: Array of [Root](API_Root.md) objects

## Errors
<a name="API_ListRoots_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListRoots_Examples"></a>

### Example
<a name="API_ListRoots_Example_1"></a>

The following example shows how to get a list of roots for an organization.

#### Sample Request
<a name="API_ListRoots_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListRoots

{}
```

#### Sample Response
<a name="API_ListRoots_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
    "Roots": [
        {
            "Name": "Root",
            "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
            "Id": "r-examplerootid111",
            "PolicyTypes": [
                {
                    "Type": "AISERVICES_OPT_OUT_POLICY",
                    "Status": "ENABLED"
                },
                {
                    "Type": "BACKUP_POLICY",
                    "Status": "ENABLED"
                },
                {
                    "Type": "TAG_POLICY",
                    "Status": "ENABLED"
                },
                {
                    "Type": "SERVICE_CONTROL_POLICY",
                    "Status": "ENABLED"
                },
                {
                    "Type": "RESOURCE_CONTROL_POLICY",
                    "Status": "ENABLED"
                }
            ]
        }
    ]
}
```

## See Also
<a name="API_ListRoots_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListRoots) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListRoots) 

# ListTagsForResource
<a name="API_ListTagsForResource"></a>

Lists tags that are attached to the specified resource.

You can attach tags to the following resources in AWS Organizations.
+  AWS account 
+ Organization root
+ Organizational unit (OU)
+ Policy (any type)

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListTagsForResource_RequestSyntax"></a>

```
{
   "NextToken": "string",
   "ResourceId": "string"
}
```

## Request Parameters
<a name="API_ListTagsForResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [NextToken](#API_ListTagsForResource_RequestSyntax) **   <a name="organizations-ListTagsForResource-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [ResourceId](#API_ListTagsForResource_RequestSyntax) **   <a name="organizations-ListTagsForResource-request-ResourceId"></a>
The ID of the resource with the tags to list.  
You can specify any of the following taggable resources.  
+  AWS account – specify the account ID number.
+ Organizational unit – specify the OU ID that begins with `ou-` and looks similar to: `ou-1a2b-34uvwxyz ` 
+ Root – specify the root ID that begins with `r-` and looks similar to: `r-1a2b ` 
+ Policy – specify the policy ID that begins with `p-` andlooks similar to: `p-12abcdefg3 ` 
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})|(^p-[0-9a-zA-Z_]{8,128})|(^rp-[0-9a-zA-Z_]{4,128})|(^rt-[0-9a-zA-Z_]{8,32})$`   
Required: Yes

## Response Syntax
<a name="API_ListTagsForResource_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListTagsForResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListTagsForResource_ResponseSyntax) **   <a name="organizations-ListTagsForResource-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Tags](#API_ListTagsForResource_ResponseSyntax) **   <a name="organizations-ListTagsForResource-response-Tags"></a>
The tags that are assigned to the resource.  
Type: Array of [Tag](API_Tag.md) objects

## Errors
<a name="API_ListTagsForResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_ListTagsForResource_Examples"></a>

### Example
<a name="API_ListTagsForResource_Example_1"></a>

The following example shows how to list tags for account 444444444444.

#### Sample Request
<a name="API_ListTagsForResource_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListTagsForResource

{ "ResourceId": "444444444444" }
```

#### Sample Response
<a name="API_ListTagsForResource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{ "Tags": [
     { 
        "Key": "Key1"
        "Value": ["value1"]
     }
  ]
}
```

## See Also
<a name="API_ListTagsForResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListTagsForResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListTagsForResource) 

# ListTargetsForPolicy
<a name="API_ListTargetsForPolicy"></a>

Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to.

**Note**  
When calling List\$1 operations, always check the `NextToken` response parameter value, even if you receive an empty result set. These operations can occasionally return an empty set of results even when more results are available. Continue making requests until `NextToken` returns null. A null `NextToken` value indicates that you have retrieved all available results.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_ListTargetsForPolicy_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "PolicyId": "string"
}
```

## Request Parameters
<a name="API_ListTargetsForPolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListTargetsForPolicy_RequestSyntax) **   <a name="organizations-ListTargetsForPolicy-request-MaxResults"></a>
The maximum number of items to return in the response. If more results exist than the specified `MaxResults` value, a token is included in the response so that you can retrieve the remaining results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 20.  
Required: No

 ** [NextToken](#API_ListTargetsForPolicy_RequestSyntax) **   <a name="organizations-ListTargetsForPolicy-request-NextToken"></a>
The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call's `NextToken` response to indicate where the output should continue from.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*`   
Required: No

 ** [PolicyId](#API_ListTargetsForPolicy_RequestSyntax) **   <a name="organizations-ListTargetsForPolicy-request-PolicyId"></a>
ID for the policy whose attachments you want to know.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

## Response Syntax
<a name="API_ListTargetsForPolicy_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Targets": [ 
      { 
         "Arn": "string",
         "Name": "string",
         "TargetId": "string",
         "Type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListTargetsForPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListTargetsForPolicy_ResponseSyntax) **   <a name="organizations-ListTargetsForPolicy-response-NextToken"></a>
If present, indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`.  
Type: String  
Length Constraints: Maximum length of 100000.  
Pattern: `[\s\S]*` 

 ** [Targets](#API_ListTargetsForPolicy_ResponseSyntax) **   <a name="organizations-ListTargetsForPolicy-response-Targets"></a>
A list of structures, each of which contains details about one of the entities to which the specified policy is attached.  
Type: Array of [PolicyTargetSummary](API_PolicyTargetSummary.md) objects

## Errors
<a name="API_ListTargetsForPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_ListTargetsForPolicy_Examples"></a>

### Example
<a name="API_ListTargetsForPolicy_Example_1"></a>

The following example shows how to get the list of roots, OUs, and accounts that the specified policy is attached to.

#### Sample Request
<a name="API_ListTargetsForPolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.ListTargetsForPolicy

{ "PolicyId": "p-FullAWSAccess" }
```

#### Sample Response
<a name="API_ListTargetsForPolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Targets": [
    {
      "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
      "Name": "Root",
      "TargetId":"r-examplerootid111",
      "Type":"ROOT"
    },
    {
      "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
      "Name": "Developer Test Account",
      "TargetId": "333333333333",
      "Type": "ACCOUNT"
    },
    {
      "Arn":"arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
      "Name":"Accounting",
      "TargetId":"ou-examplerootid111-exampleouid111",
      "Type":"ORGANIZATIONAL_UNIT"
    }
  ]
}
```

## See Also
<a name="API_ListTargetsForPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/ListTargetsForPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/ListTargetsForPolicy) 

# MoveAccount
<a name="API_MoveAccount"></a>

Moves an account from its current source parent root or organizational unit (OU) to the specified destination parent root or OU.

You can only call this operation from the management account.

## Request Syntax
<a name="API_MoveAccount_RequestSyntax"></a>

```
{
   "AccountId": "string",
   "DestinationParentId": "string",
   "SourceParentId": "string"
}
```

## Request Parameters
<a name="API_MoveAccount_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_MoveAccount_RequestSyntax) **   <a name="organizations-MoveAccount-request-AccountId"></a>
ID for the account that you want to move.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an account ID string requires exactly 12 digits.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

 ** [DestinationParentId](#API_MoveAccount_RequestSyntax) **   <a name="organizations-MoveAccount-request-DestinationParentId"></a>
ID for the root or organizational unit that you want to move the account to.  
The [regex pattern](http://wikipedia.org/wiki/regex) 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

 ** [SourceParentId](#API_MoveAccount_RequestSyntax) **   <a name="organizations-MoveAccount-request-SourceParentId"></a>
ID for the root or organizational unit that you want to move the account from.  
The [regex pattern](http://wikipedia.org/wiki/regex) 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.
Type: String  
Length Constraints: Maximum length of 100.  
Pattern: `^(r-[0-9a-z]{4,32})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$`   
Required: Yes

## Response Elements
<a name="API_MoveAccount_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_MoveAccount_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** DestinationParentNotFoundException **   
We can't find the destination container (a root or OU) with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** DuplicateAccountException **   
That account is already present in the specified destination.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** SourceParentNotFoundException **   
We can't find a source root or OU with the `ParentId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_MoveAccount_Examples"></a>

### Example
<a name="API_MoveAccount_Example_1"></a>

The following example shows how to move a member account from the root to an OU.

#### Sample Request
<a name="API_MoveAccount_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.MoveAccount

{ "AccountId": "333333333333", "SourceParentId": "r-examplerootid111", "DestinationParentId": "ou-examplerootid111-exampleouid111" }
```

#### Sample Response
<a name="API_MoveAccount_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_MoveAccount_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/MoveAccount) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/MoveAccount) 

# PutResourcePolicy
<a name="API_PutResourcePolicy"></a>

Creates or updates a resource policy.

You can only call this operation from the management account..

## Request Syntax
<a name="API_PutResourcePolicy_RequestSyntax"></a>

```
{
   "Content": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_PutResourcePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Content](#API_PutResourcePolicy_RequestSyntax) **   <a name="organizations-PutResourcePolicy-request-Content"></a>
If provided, the new content for the resource policy. The text must be correctly formatted JSON that complies with the syntax for the resource policy's type. For more information, see [SCP syntax](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) in the * AWS Organizations User Guide*.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 40000.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [Tags](#API_PutResourcePolicy_RequestSyntax) **   <a name="organizations-PutResourcePolicy-request-Tags"></a>
A list of tags that you want to attach to the newly created resource policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null`. For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.  
Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is not valid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created. 
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_PutResourcePolicy_ResponseSyntax"></a>

```
{
   "ResourcePolicy": { 
      "Content": "string",
      "ResourcePolicySummary": { 
         "Arn": "string",
         "Id": "string"
      }
   }
}
```

## Response Elements
<a name="API_PutResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResourcePolicy](#API_PutResourcePolicy_ResponseSyntax) **   <a name="organizations-PutResourcePolicy-response-ResourcePolicy"></a>
A structure that contains details about the resource policy.  
Type: [ResourcePolicy](API_ResourcePolicy.md) object

## Errors
<a name="API_PutResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## See Also
<a name="API_PutResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/PutResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/PutResourcePolicy) 

# RegisterDelegatedAdministrator
<a name="API_RegisterDelegatedAdministrator"></a>

Enables the specified member account to administer the Organizations features of the specified AWS service. It grants read-only access to AWS Organizations service data. The account still requires IAM permissions to access and administer the AWS service.

You can run this action only for AWS services that support this feature. For a current list of services that support it, see the column *Supports Delegated Administrator* in the table at [AWS Services that you can use with AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) in the * AWS Organizations User Guide.* 

You can only call this operation from the management account.

## Request Syntax
<a name="API_RegisterDelegatedAdministrator_RequestSyntax"></a>

```
{
   "AccountId": "string",
   "ServicePrincipal": "string"
}
```

## Request Parameters
<a name="API_RegisterDelegatedAdministrator_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_RegisterDelegatedAdministrator_RequestSyntax) **   <a name="organizations-RegisterDelegatedAdministrator-request-AccountId"></a>
The account ID number of the member account in the organization to register as a delegated administrator.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

 ** [ServicePrincipal](#API_RegisterDelegatedAdministrator_RequestSyntax) **   <a name="organizations-RegisterDelegatedAdministrator-request-ServicePrincipal"></a>
The service principal of the AWS service for which you want to make the member account a delegated administrator.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+=,.@-]*`   
Required: Yes

## Response Elements
<a name="API_RegisterDelegatedAdministrator_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_RegisterDelegatedAdministrator_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountAlreadyRegisteredException **   
The specified account is already a delegated administrator for this AWS service.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_RegisterDelegatedAdministrator_Examples"></a>

### Example
<a name="API_RegisterDelegatedAdministrator_Example_1"></a>

This example illustrates one usage of RegisterDelegatedAdministrator.

#### Sample Request
<a name="API_RegisterDelegatedAdministrator_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.RegisterDelegatedAdministrators

{ "AccountId": "111111111111", "ServicePrincipal": "example.amazonaws.com" }
```

#### Sample Response
<a name="API_RegisterDelegatedAdministrator_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_RegisterDelegatedAdministrator_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/RegisterDelegatedAdministrator) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/RegisterDelegatedAdministrator) 

# RemoveAccountFromOrganization
<a name="API_RemoveAccountFromOrganization"></a>

Removes 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](API_LeaveOrganization.md) instead.

**Important**  
You can remove an account from your organization only if the account is configured with the information required to operate as a standalone account. When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required of standalone accounts is *not* automatically collected. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
The account that you want to leave must not be a delegated administrator account for any AWS service enabled for your organization. If the account is a delegated administrator, you must first change the delegated administrator account to another account that is remaining in the organization.
After the account leaves the organization, all tags that were attached to the account object in the organization are deleted. AWS accounts outside of an organization do not support tags.

## Request Syntax
<a name="API_RemoveAccountFromOrganization_RequestSyntax"></a>

```
{
   "AccountId": "string"
}
```

## Request Parameters
<a name="API_RemoveAccountFromOrganization_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AccountId](#API_RemoveAccountFromOrganization_RequestSyntax) **   <a name="organizations-RemoveAccountFromOrganization-request-AccountId"></a>
ID for the member account that you want to remove from the organization.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an account ID string requires exactly 12 digits.  
Type: String  
Length Constraints: Maximum length of 12.  
Pattern: `^\d{12}$`   
Required: Yes

## Response Elements
<a name="API_RemoveAccountFromOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_RemoveAccountFromOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AccountNotFoundException **   
 We can't find an AWS account with the `AccountId` that you specified, or the account whose credentials you used to make this request isn't a member of an organization.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** MasterCannotLeaveOrganizationException **   
You can't remove a management account from an organization. If you want the management account to become a member account in another organization, you must first delete the current organization of the management account.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_RemoveAccountFromOrganization_Examples"></a>

The following example shows how to remove member account 333333333333 from an organization.

### Example
<a name="API_RemoveAccountFromOrganization_Example_1"></a>

This example illustrates one usage of RemoveAccountFromOrganization.

#### Sample Request
<a name="API_RemoveAccountFromOrganization_Example_1_Request"></a>

```
POST / HTTP/1.1

Host: organizations.us-east-1.amazonaws.com
X-Amz-Target: AWSOrganizationsV20161128.RemoveAccountFromOrganization

{ "AccountId": "333333333333" }
```

#### Sample Response
<a name="API_RemoveAccountFromOrganization_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_RemoveAccountFromOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/RemoveAccountFromOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/RemoveAccountFromOrganization) 

# TagResource
<a name="API_TagResource"></a>

Adds one or more tags to the specified resource.

Currently, you can attach tags to the following resources in AWS Organizations.
+  AWS account 
+ Organization root
+ Organizational unit (OU)
+ Policy (any type)

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_TagResource_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_TagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_TagResource_RequestSyntax) **   <a name="organizations-TagResource-request-ResourceId"></a>
The ID of the resource to add a tag to.  
You can specify any of the following taggable resources.  
+  AWS account – specify the account ID number.
+ Organizational unit – specify the OU ID that begins with `ou-` and looks similar to: `ou-1a2b-34uvwxyz ` 
+ Root – specify the root ID that begins with `r-` and looks similar to: `r-1a2b ` 
+ Policy – specify the policy ID that begins with `p-` andlooks similar to: `p-12abcdefg3 ` 
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})|(^p-[0-9a-zA-Z_]{8,128})|(^rp-[0-9a-zA-Z_]{4,128})|(^rt-[0-9a-zA-Z_]{8,32})$`   
Required: Yes

 ** [Tags](#API_TagResource_RequestSyntax) **   <a name="organizations-TagResource-request-Tags"></a>
A list of tags to add to the specified resource.  
For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to `null`.  
If any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
Type: Array of [Tag](API_Tag.md) objects  
Required: Yes

## Response Elements
<a name="API_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_TagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_TagResource_Examples"></a>

### Example
<a name="API_TagResource_Example_1"></a>

The following example shows how to tag a resource with the account ID of 444444444444.

#### Sample Request
<a name="API_TagResource_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.TagResource

{ “ResourceId” : "444444444444", "Tags": [ {"Key”: “Key1”, “Value” : “value1”}, {"Key”: “Key2”, “Value” : “value2”}]
}
```

#### Sample Response
<a name="API_TagResource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/TagResource) 

# TerminateResponsibilityTransfer
<a name="API_TerminateResponsibilityTransfer"></a>

Ends a transfer. A *transfer* is an arrangement between two management accounts where one account designates the other with specified responsibilities for their organization.

## Request Syntax
<a name="API_TerminateResponsibilityTransfer_RequestSyntax"></a>

```
{
   "EndTimestamp": number,
   "Id": "string"
}
```

## Request Parameters
<a name="API_TerminateResponsibilityTransfer_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EndTimestamp](#API_TerminateResponsibilityTransfer_RequestSyntax) **   <a name="organizations-TerminateResponsibilityTransfer-request-EndTimestamp"></a>
Timestamp when the responsibility transfer is to end.  
Type: Timestamp  
Required: No

 ** [Id](#API_TerminateResponsibilityTransfer_RequestSyntax) **   <a name="organizations-TerminateResponsibilityTransfer-request-Id"></a>
ID for the transfer.  
Type: String  
Pattern: `^rt-[0-9a-z]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_TerminateResponsibilityTransfer_ResponseSyntax"></a>

```
{
   "ResponsibilityTransfer": { 
      "ActiveHandshakeId": "string",
      "Arn": "string",
      "EndTimestamp": number,
      "Id": "string",
      "Name": "string",
      "Source": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "StartTimestamp": number,
      "Status": "string",
      "Target": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "Type": "string"
   }
}
```

## Response Elements
<a name="API_TerminateResponsibilityTransfer_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResponsibilityTransfer](#API_TerminateResponsibilityTransfer_ResponseSyntax) **   <a name="organizations-TerminateResponsibilityTransfer-response-ResponsibilityTransfer"></a>
A `ResponsibilityTransfer` object. Contains details for a transfer.  
Type: [ResponsibilityTransfer](API_ResponsibilityTransfer.md) object

## Errors
<a name="API_TerminateResponsibilityTransfer_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** InvalidResponsibilityTransferTransitionException **   
The responsibility transfer can't transition to the requested state because it's not in a valid state for this operation.  
HTTP Status Code: 400

 ** ResponsibilityTransferAlreadyInStatusException **   
The responsibility transfer is already in the status that you specified.  
HTTP Status Code: 400

 ** ResponsibilityTransferNotFoundException **   
We can't find a transfer that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_TerminateResponsibilityTransfer_Examples"></a>

### Example
<a name="API_TerminateResponsibilityTransfer_Example_1"></a>

The following example shows how to terminate a transfer.

#### Sample Request
<a name="API_TerminateResponsibilityTransfer_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.TerminateResponsibilityTransfer

{ "EndTimestamp": "1769903999", "Id": "rt-exampletransferid222" }
```

#### Sample Response
<a name="API_TerminateResponsibilityTransfer_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ResponsibilityTransfer": {
    "Arn": "arn:aws:organizations::222222222222:transfer/o-exampleorgid222/billing/outbound/rt-exampletransferid222",
    "EndTimestamp": "1769903999000",
    "Id": "rt-exampletransferid222",
    "Name": "transfer name",
    "Source": {
        "ManagementAccountId": "222222222222"
    },
    "StartTimestamp": "1767225600000",
    "Status": "WITHDRAWN",
    "Target": {
        "ManagementAccountId": "333333333333"
    },
    "Type": "BILLING"
  }
}
```

## See Also
<a name="API_TerminateResponsibilityTransfer_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/TerminateResponsibilityTransfer) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/TerminateResponsibilityTransfer) 

# UntagResource
<a name="API_UntagResource"></a>

Removes any tags with the specified keys from the specified resource.

You can attach tags to the following resources in AWS Organizations.
+  AWS account 
+ Organization root
+ Organizational unit (OU)
+ Policy (any type)

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_UntagResource_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "TagKeys": [ "string" ]
}
```

## Request Parameters
<a name="API_UntagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_UntagResource_RequestSyntax) **   <a name="organizations-UntagResource-request-ResourceId"></a>
The ID of the resource to remove a tag from.  
You can specify any of the following taggable resources.  
+  AWS account – specify the account ID number.
+ Organizational unit – specify the OU ID that begins with `ou-` and looks similar to: `ou-1a2b-34uvwxyz ` 
+ Root – specify the root ID that begins with `r-` and looks similar to: `r-1a2b ` 
+ Policy – specify the policy ID that begins with `p-` andlooks similar to: `p-12abcdefg3 ` 
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^(r-[0-9a-z]{4,32})|(\d{12})|(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})|(^p-[0-9a-zA-Z_]{8,128})|(^rp-[0-9a-zA-Z_]{4,128})|(^rt-[0-9a-zA-Z_]{8,32})$`   
Required: Yes

 ** [TagKeys](#API_UntagResource_RequestSyntax) **   <a name="organizations-UntagResource-request-TagKeys"></a>
The list of keys for tags to remove from the specified resource.  
Type: Array of strings  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`   
Required: Yes

## Response Elements
<a name="API_UntagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UntagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TargetNotFoundException **   
We can't find a root, OU, account, or policy with the `TargetId` that you specified.  
HTTP Status Code: 400

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_UntagResource_Examples"></a>

### Example
<a name="API_UntagResource_Example_1"></a>

The following example shows how to remove a tag from a resource with the account ID of 444444444444.

#### Sample Request
<a name="API_UntagResource_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.UntagResource

{ “ResourceId” : "444444444444", "TagKeys": [ {"Key”: “Key1”, “Key2”} ]
}
```

#### Sample Response
<a name="API_UntagResource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
```

## See Also
<a name="API_UntagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/UntagResource) 

# UpdateOrganizationalUnit
<a name="API_UpdateOrganizationalUnit"></a>

Renames the specified organizational unit (OU). The ID and ARN don't change. The child OUs and accounts remain in place, and any attached policies of the OU remain attached.

You can only call this operation from the management account.

## Request Syntax
<a name="API_UpdateOrganizationalUnit_RequestSyntax"></a>

```
{
   "Name": "string",
   "OrganizationalUnitId": "string"
}
```

## Request Parameters
<a name="API_UpdateOrganizationalUnit_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Name](#API_UpdateOrganizationalUnit_RequestSyntax) **   <a name="organizations-UpdateOrganizationalUnit-request-Name"></a>
The new name that you want to assign to the OU.  
The [regex pattern](http://wikipedia.org/wiki/regex) that is used to validate this parameter is a string of any of the characters in the ASCII character range.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\s\S]*`   
Required: No

 ** [OrganizationalUnitId](#API_UpdateOrganizationalUnit_RequestSyntax) **   <a name="organizations-UpdateOrganizationalUnit-request-OrganizationalUnitId"></a>
ID for the OU that you want to rename. You can get the ID from the [ListOrganizationalUnitsForParent](API_ListOrganizationalUnitsForParent.md) operation.  
The [regex pattern](http://wikipedia.org/wiki/regex) for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.  
Type: String  
Length Constraints: Maximum length of 68.  
Pattern: `^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$`   
Required: Yes

## Response Syntax
<a name="API_UpdateOrganizationalUnit_ResponseSyntax"></a>

```
{
   "OrganizationalUnit": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "Path": "string"
   }
}
```

## Response Elements
<a name="API_UpdateOrganizationalUnit_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [OrganizationalUnit](#API_UpdateOrganizationalUnit_ResponseSyntax) **   <a name="organizations-UpdateOrganizationalUnit-response-OrganizationalUnit"></a>
A structure that contains the details about the specified OU, including its new name.  
Type: [OrganizationalUnit](API_OrganizationalUnit.md) object

## Errors
<a name="API_UpdateOrganizationalUnit_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** DuplicateOrganizationalUnitException **   
An OU with the same name already exists.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** OrganizationalUnitNotFoundException **   
We can't find an OU with the `OrganizationalUnitId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateOrganizationalUnit_Examples"></a>

### Example
<a name="API_UpdateOrganizationalUnit_Example_1"></a>

The following example shows how to rename an OU. The output confirms the new name.

#### Sample Request
<a name="API_UpdateOrganizationalUnit_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.UpdateOrganizationalUnit

{ "OrganizationalUnitId": "ou-examplerootid111-exampleouid111", "Name": "AccountingOU" }
```

#### Sample Response
<a name="API_UpdateOrganizationalUnit_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "OrganizationalUnit": {
    "Id": "ou-examplerootid111-exampleouid111",
    "Name": "AccountingOU",
    "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
    "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
  }
}
```

## See Also
<a name="API_UpdateOrganizationalUnit_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/UpdateOrganizationalUnit) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/UpdateOrganizationalUnit) 

# UpdatePolicy
<a name="API_UpdatePolicy"></a>

Updates an existing policy with a new name, description, or content. If you don't supply any parameter, that value remains unchanged. You can't change a policy's type.

You can only call this operation from the management account or a member account that is a delegated administrator.

## Request Syntax
<a name="API_UpdatePolicy_RequestSyntax"></a>

```
{
   "Content": "string",
   "Description": "string",
   "Name": "string",
   "PolicyId": "string"
}
```

## Request Parameters
<a name="API_UpdatePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Content](#API_UpdatePolicy_RequestSyntax) **   <a name="organizations-UpdatePolicy-request-Content"></a>
If provided, the new content for the policy. The text must be correctly formatted JSON that complies with the syntax for the policy's type. For more information, see [SCP syntax](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) in the * AWS Organizations User Guide*.  
The maximum size of a policy document depends on the policy's type. For more information, see [Maximum and minimum values](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values) in the * AWS Organizations User Guide*.  
Type: String  
Length Constraints: Minimum length of 1.  
Pattern: `[\s\S]*`   
Required: No

 ** [Description](#API_UpdatePolicy_RequestSyntax) **   <a name="organizations-UpdatePolicy-request-Description"></a>
If provided, the new description for the policy.  
Type: String  
Length Constraints: Maximum length of 512.  
Pattern: `[\s\S]*`   
Required: No

 ** [Name](#API_UpdatePolicy_RequestSyntax) **   <a name="organizations-UpdatePolicy-request-Name"></a>
If provided, the new name for the policy.  
The [regex pattern](http://wikipedia.org/wiki/regex) that is used to validate this parameter is a string of any of the characters in the ASCII character range.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\s\S]*`   
Required: No

 ** [PolicyId](#API_UpdatePolicy_RequestSyntax) **   <a name="organizations-UpdatePolicy-request-PolicyId"></a>
ID for the policy that you want to update.  
The [regex pattern](http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (\$1).  
Type: String  
Length Constraints: Maximum length of 130.  
Pattern: `^p-[0-9a-zA-Z_]{8,128}$`   
Required: Yes

## Response Syntax
<a name="API_UpdatePolicy_ResponseSyntax"></a>

```
{
   "Policy": { 
      "Content": "string",
      "PolicySummary": { 
         "Arn": "string",
         "AwsManaged": boolean,
         "Description": "string",
         "Id": "string",
         "Name": "string",
         "Type": "string"
      }
   }
}
```

## Response Elements
<a name="API_UpdatePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_UpdatePolicy_ResponseSyntax) **   <a name="organizations-UpdatePolicy-response-Policy"></a>
A structure that contains details about the updated policy, showing the requested changes.  
Type: [Policy](API_Policy.md) object

## Errors
<a name="API_UpdatePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConcurrentModificationException **   
The target of the operation is currently being modified by a different request. Try again later.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** DuplicatePolicyException **   
A policy with the same name already exists.  
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** MalformedPolicyDocumentException **   
The provided policy document doesn't meet the requirements of the specified policy type. For example, the syntax might be incorrect. For details about service control policy syntax, see [SCP syntax](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** PolicyChangesInProgressException **   
Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.   
HTTP Status Code: 400

 ** PolicyNotFoundException **   
We can't find a policy with the `PolicyId` that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_UpdatePolicy_Examples"></a>

### Example
<a name="API_UpdatePolicy_Example_1"></a>

The following example shows how to rename a policy and give it a new description. The output confirms the new name and description text.

#### Sample Request
<a name="API_UpdatePolicy_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.UpdatePolicy

{ "PolicyId": "p-examplepolicyid111", "Name": "Renamed-Policy", "Description": "This description replaces the original." }
```

#### Sample Response
<a name="API_UpdatePolicy_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Policy": {
    "Content": "{ \"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"ec2:*\", \"Resource\": \"*\" } }",
    "PolicySummary": {
      "Id": "p-examplepolicyid111",
      "AwsManaged": false,
      "Arn":"arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
      "Description": "This description replaces the original.",
      "Name": "Renamed-Policy",
      "Type": "SERVICE_CONTROL_POLICY"
    }
  }
}
```

### Example
<a name="API_UpdatePolicy_Example_2"></a>

The following example shows how to replace the JSON text of a policy.

#### Sample Request
<a name="API_UpdatePolicy_Example_2_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.UpdatePolicy

{ "PolicyId": "p-examplepolicyid111",
  "Content": "{ \"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\", \"Action\": \"s3:*\", \"Resource\": \"*\" } }" }
```

#### Sample Response
<a name="API_UpdatePolicy_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Policy": {
    "Content": "{ \"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"s3:*\", \"Resource\": \"*\" } }",
    "PolicySummary": {    
      "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
      "AwsManaged": false;
      "Description": "This description replaces the original.",
      "Id": "p-examplepolicyid111",
      "Name": "Renamed-Policy",
      "Type": "SERVICE_CONTROL_POLICY"
    }
  }
}
```

## See Also
<a name="API_UpdatePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/UpdatePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/UpdatePolicy) 

# UpdateResponsibilityTransfer
<a name="API_UpdateResponsibilityTransfer"></a>

Updates a transfer. A *transfer* is the arrangement between two management accounts where one account designates the other with specified responsibilities for their organization.

You can update the name assigned to a transfer.

## Request Syntax
<a name="API_UpdateResponsibilityTransfer_RequestSyntax"></a>

```
{
   "Id": "string",
   "Name": "string"
}
```

## Request Parameters
<a name="API_UpdateResponsibilityTransfer_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Id](#API_UpdateResponsibilityTransfer_RequestSyntax) **   <a name="organizations-UpdateResponsibilityTransfer-request-Id"></a>
ID for the transfer.  
Type: String  
Pattern: `^rt-[0-9a-z]{8,32}$`   
Required: Yes

 ** [Name](#API_UpdateResponsibilityTransfer_RequestSyntax) **   <a name="organizations-UpdateResponsibilityTransfer-request-Name"></a>
New name you want to assign to the transfer.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^[ -~]+$`   
Required: Yes

## Response Syntax
<a name="API_UpdateResponsibilityTransfer_ResponseSyntax"></a>

```
{
   "ResponsibilityTransfer": { 
      "ActiveHandshakeId": "string",
      "Arn": "string",
      "EndTimestamp": number,
      "Id": "string",
      "Name": "string",
      "Source": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "StartTimestamp": number,
      "Status": "string",
      "Target": { 
         "ManagementAccountEmail": "string",
         "ManagementAccountId": "string"
      },
      "Type": "string"
   }
}
```

## Response Elements
<a name="API_UpdateResponsibilityTransfer_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResponsibilityTransfer](#API_UpdateResponsibilityTransfer_ResponseSyntax) **   <a name="organizations-UpdateResponsibilityTransfer-response-ResponsibilityTransfer"></a>
Contains details for a transfer. A *transfer* is the arrangement between two management accounts where one account designates the other with specified responsibilities for their organization.  
Type: [ResponsibilityTransfer](API_ResponsibilityTransfer.md) object

## Errors
<a name="API_UpdateResponsibilityTransfer_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see [Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the *IAM User Guide*.  
HTTP Status Code: 400

 ** AWSOrganizationsNotInUseException **   
Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.  
HTTP Status Code: 400

 ** ConstraintViolationException **   
Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.
+ ACCOUNT\$1CANNOT\$1LEAVE\$1WITHOUT\$1PHONE\$1VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at [Removing a member account from your organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) in the * AWS Organizations User Guide*.
+ ACCOUNT\$1CREATION\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.
+ ACCOUNT\$1CREATION\$1NOT\$1COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.
+ ACTIVE\$1RESPONSIBILITY\$1TRANSFER\$1PROCESS: You cannot delete organization due to an ongoing responsibility transfer process. For example, a pending invitation or an in-progress transfer. To delete the organization, you must resolve the current transfer process.
+ ACCOUNT\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact [AWS Support](https://console.aws.amazon.com/support/home#/) to request an increase in your limit. 

  Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact AWS Support to request an increase in the number of accounts.
**Note**  
Deleted and closed accounts still count toward your limit.
**Important**  
If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact [AWS Support](https://console.aws.amazon.com/support/home#/).
+ ALL\$1FEATURES\$1MIGRATION\$1ORGANIZATION\$1SIZE\$1LIMIT\$1EXCEEDED: Your organization has more than 5000 accounts, and you can only use the standard migration process for organizations with less than 5000 accounts. Use the assisted migration process to enable all features mode, or create a support case for assistance if you are unable to use assisted migration.
+ CANNOT\$1REGISTER\$1SUSPENDED\$1ACCOUNT\$1AS\$1DELEGATED\$1ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.
+ CANNOT\$1REGISTER\$1MASTER\$1AS\$1DELEGATED\$1ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an AWS service integrated with Organizations. You can designate only a member account as a delegated administrator.
+ CANNOT\$1CLOSE\$1MANAGEMENT\$1ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​ 
+ CANNOT\$1REMOVE\$1DELEGATED\$1ADMINISTRATOR\$1FROM\$1ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator. 
+ CLOSE\$1ACCOUNT\$1QUOTA\$1EXCEEDED: You have exceeded close account quota for the past 30 days. 
+ CLOSE\$1ACCOUNT\$1REQUESTS\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​ 
+ CREATE\$1ORGANIZATION\$1IN\$1BILLING\$1MODE\$1UNSUPPORTED\$1REGION: To create an organization in the specified region, you must enable all features mode.
+ DELEGATED\$1ADMINISTRATOR\$1EXISTS\$1FOR\$1THIS\$1SERVICE: You attempted to register an AWS account as a delegated administrator for an AWS service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.
+ EMAIL\$1VERIFICATION\$1CODE\$1EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verification code.
+ HANDSHAKE\$1RATE\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.
+ INVALID\$1PAYMENT\$1INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. AWS does not support cards issued by financial institutions in Russia or Belarus. For more information, see [Managing your AWS payments](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html).
+ MASTER\$1ACCOUNT\$1ADDRESS\$1DOES\$1NOT\$1MATCH\$1MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. All accounts in an organization must be associated with the same marketplace.
+ MASTER\$1ACCOUNT\$1MISSING\$1BUSINESS\$1LICENSE: Applies only to the AWS Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.
+ MASTER\$1ACCOUNT\$1MISSING\$1CONTACT\$1INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.
+ MASTER\$1ACCOUNT\$1NOT\$1GOVCLOUD\$1ENABLED: To complete this operation, the management account must have an associated account in the AWS GovCloud (US-West) Region. For more information, see [AWS Organizations](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) in the * AWS GovCloud User Guide*.
+ MASTER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MAX\$1DELEGATED\$1ADMINISTRATORS\$1FOR\$1SERVICE\$1LIMIT\$1EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal. 
+ MAX\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.
+ MAX\$1TAG\$1LIMIT\$1EXCEEDED: You have exceeded the number of tags allowed on this resource. 
+ MEMBER\$1ACCOUNT\$1PAYMENT\$1INSTRUMENT\$1REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) in the * AWS Organizations User Guide*.
+ MIN\$1POLICY\$1TYPE\$1ATTACHMENT\$1LIMIT\$1EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.
+ ORGANIZATION\$1NOT\$1IN\$1ALL\$1FEATURES\$1MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.
+ OU\$1DEPTH\$1LIMIT\$1EXCEEDED: You attempted to create an OU tree that is too many levels deep.
+ OU\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.
+ POLICY\$1CONTENT\$1LIMIT\$1EXCEEDED: You attempted to create a policy that is larger than the maximum size.
+ POLICY\$1NUMBER\$1LIMIT\$1EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.
+ POLICY\$1TYPE\$1ENABLED\$1FOR\$1THIS\$1SERVICE: You attempted to disable service access before you disabled the policy type (for example, SECURITYHUB\$1POLICY). To complete this operation, you must first disable the policy type.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1INBOUND\$1QUOTA\$1VIOLATION: You have exceeded your inbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1LEVEL\$1VIOLATION: You have exceeded the maximum length of your transfer chain.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1OUTBOUND\$1QUOTA\$1VIOLATION: You have exceeded your outbound transfers limit.
+ RESPONSIBILITY\$1TRANSFER\$1MAX\$1TRANSFERS\$1QUOTA\$1VIOLATION: You have exceeded the maximum number of inbound transfers allowed in a transfer chain.
+ SERVICE\$1ACCESS\$1NOT\$1ENABLED:
  + You attempted to register a delegated administrator before you enabled service access. Call the `EnableAWSServiceAccess` API first.
  + You attempted to enable a policy type before you enabled service access. Call the `EnableAWSServiceAccess` API first.
+ TAG\$1POLICY\$1VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.
+ TRANSFER\$1RESPONSIBILITY\$1SOURCE\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because it is marked for deletion.
+ TRANSFER\$1RESPONSIBILITY\$1TARGET\$1DELETION\$1IN\$1PROGRESS: The source organization cannot accept this transfer invitation because target organization is marked for deletion.
+ UNSUPPORTED\$1PRICING: Your organization has a pricing contract that is unsupported.
+ WAIT\$1PERIOD\$1ACTIVE: After you create an AWS account, you must wait until at least four days after the account was created. Invited accounts aren't subject to this waiting period.
HTTP Status Code: 400

 ** InvalidInputException **   
The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:  
Some of the reasons in the following list might not be applicable to this specific API or operation.
+ CALLER\$1REQUIRED\$1FIELD\$1MISSING: At least one of the required field is missing: Caller Account Id, Management Account Id or Organization Id.
+ DUPLICATE\$1TAG\$1KEY: Tag keys must be unique among the tags attached to the same entity.
+ END\$1DATE\$1NOT\$1END\$1OF\$1MONTH: You provided an invalid end date. The end date must be the end of the last day of the month (23.59.59.999).
+ END\$1DATE\$1TOO\$1EARLY: You provided an invalid end date. It is too early for the transfer to end.
+ IMMUTABLE\$1POLICY: You specified a policy that is managed by AWS and can't be modified.
+ INPUT\$1REQUIRED: You must include a value for all required parameters.
+ INVALID\$1EMAIL\$1ADDRESS\$1TARGET: You specified an invalid email address for the invited account owner.
+ INVALID\$1END\$1DATE: The selected withdrawal date doesn't meet the terms of your partner agreement. Visit AWS Partner Central to view your partner agreements or contact your AWS Partner for help.
+ INVALID\$1ENUM: You specified an invalid value.
+ INVALID\$1ENUM\$1POLICY\$1TYPE: You specified an invalid policy type string.
+ INVALID\$1FULL\$1NAME\$1TARGET: You specified a full name that contains invalid characters.
+ INVALID\$1LIST\$1MEMBER: You provided a list to a parameter that contains at least one invalid value.
+ INVALID\$1PAGINATION\$1TOKEN: Get the value for the `NextToken` parameter from the response to a previous call of the operation.
+ INVALID\$1PARTY\$1TYPE\$1TARGET: You specified the wrong type of entity (account, organization, or email) as a party.
+ INVALID\$1PATTERN: You provided a value that doesn't match the required pattern.
+ INVALID\$1PATTERN\$1TARGET\$1ID: You specified a policy target ID that doesn't match the required pattern.
+ INVALID\$1PRINCIPAL: You specified an invalid principal element in the policy.
+ INVALID\$1ROLE\$1NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix `AWSServiceRoleFor`.
+ INVALID\$1START\$1DATE: The start date doesn't meet the minimum requirements.
+ INVALID\$1SYNTAX\$1ORGANIZATION\$1ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.
+ INVALID\$1SYNTAX\$1POLICY\$1ID: You specified an invalid policy ID. 
+ INVALID\$1SYSTEM\$1TAGS\$1PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for AWS use. System tags don’t count against your tags per resource limit.
+ MAX\$1FILTER\$1LIMIT\$1EXCEEDED: You can specify only one filter parameter for the operation.
+ MAX\$1LENGTH\$1EXCEEDED: You provided a string parameter that is longer than allowed.
+ MAX\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a larger value than allowed.
+ MIN\$1LENGTH\$1EXCEEDED: You provided a string parameter that is shorter than allowed.
+ MIN\$1VALUE\$1EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.
+ MOVING\$1ACCOUNT\$1BETWEEN\$1DIFFERENT\$1ROOTS: You can move an account only between entities in the same root.
+ NON\$1DETACHABLE\$1POLICY: You can't detach this AWS Managed Policy.
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1DAY: You provided an invalid start date. The start date must be the beginning of the day (00:00:00.000).
+ START\$1DATE\$1NOT\$1BEGINNING\$1OF\$1MONTH: You provided an invalid start date. The start date must be the first day of the month.
+ START\$1DATE\$1TOO\$1EARLY: You provided an invalid start date. The start date is too early.
+ START\$1DATE\$1TOO\$1LATE: You provided an invalid start date. The start date is too late.
+ TARGET\$1NOT\$1SUPPORTED: You can't perform the specified operation on that target entity.
+ UNRECOGNIZED\$1SERVICE\$1PRINCIPAL: You specified a service principal that isn't recognized.
+ UNSUPPORTED\$1ACTION\$1IN\$1RESPONSIBILITY\$1TRANSFER: You provided a value that is not supported by this operation.
HTTP Status Code: 400

 ** ResponsibilityTransferNotFoundException **   
We can't find a transfer that you specified.  
HTTP Status Code: 400

 ** ServiceException **   
 AWS Organizations can't complete your request because of an internal service error. Try again later.  
HTTP Status Code: 500

 ** TooManyRequestsException **   
You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.  
For information about quotas that affect AWS Organizations, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** UnsupportedAPIEndpointException **   
This action isn't available in the current AWS Region.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateResponsibilityTransfer_Examples"></a>

### Example
<a name="API_UpdateResponsibilityTransfer_Example_1"></a>

The following example shows how to rename a transfer. The output confirms the new name.

#### Sample Request
<a name="API_UpdateResponsibilityTransfer_Example_1_Request"></a>

```
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.UpdateResponsibilityTransfer

{ "Id": "rt-exampletransferid222", "Name": "new name" }
```

#### Sample Response
<a name="API_UpdateResponsibilityTransfer_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ResponsibilityTransfer": {
    "Arn": "arn:aws:organizations::222222222222:transfer/o-exampleorgid222/billing/outbound/rt-exampletransferid222",
    "EndTimestamp": "1769903999000",
    "Id": "rt-exampletransferid222",
    "Name": "new name",
    "Source": {
        "ManagementAccountId": "222222222222"
    },
    "StartTimestamp": "1767225600000",
    "Status": "WITHDRAWN",
    "Target": {
        "ManagementAccountId": "333333333333"
    },
    "Type": "BILLING"
  }
}
```

## See Also
<a name="API_UpdateResponsibilityTransfer_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/organizations-2016-11-28/UpdateResponsibilityTransfer) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/organizations-2016-11-28/UpdateResponsibilityTransfer) 