Class: AWS.Organizations
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.Organizations
- Identifier:
- organizations
- API Version:
- 2016-11-28
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Organizations is a web service that enables you to consolidate your multiple Amazon Web Services accounts into an organization and centrally manage your accounts and their resources.
This guide provides descriptions of the Organizations operations. For more information about using this service, see the Organizations User Guide.
Support and feedback for Organizations
We welcome your feedback. Send your comments to feedback-awsorganizations@amazon.com or post your feedback and questions in the Organizations support forum. For more information about the Amazon Web Services support forums, see Forums Help.
Endpoint to call When using the CLI or the Amazon Web Services SDK
For the current release of Organizations, specify the us-east-1 region for all Amazon Web Services API and CLI calls made from the commercial Amazon Web Services Regions outside of China. If calling from one of the Amazon Web Services Regions in China, then specify cn-northwest-1. You can do this in the CLI by using these parameters and commands:
-
Use the following parameter with each command to specify both the endpoint and its region:
--endpoint-url https://organizations.us-east-1.amazonaws.com(from commercial Amazon Web Services Regions outside of China)or
--endpoint-url https://organizations.cn-northwest-1.amazonaws.com.cn(from Amazon Web Services Regions in China) -
Use the default endpoint, but configure your default region with this command:
aws configure set default.region us-east-1(from commercial Amazon Web Services Regions outside of China)or
aws configure set default.region cn-northwest-1(from Amazon Web Services Regions in China) -
Use the following parameter with each command to specify the endpoint:
--region us-east-1(from commercial Amazon Web Services Regions outside of China)or
--region cn-northwest-1(from Amazon Web Services Regions in China)
Recording API Requests
Organizations supports CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. By using information collected by CloudTrail, you can determine which requests the Organizations service received, who made the request and when, and so on. For more about Organizations and its support for CloudTrail, see Logging Organizations API calls with CloudTrail in the Organizations User Guide. To learn more about CloudTrail, including how to turn it on and find your log files, see the CloudTrail User Guide.
Sending a Request Using Organizations
var organizations = new AWS.Organizations();
organizations.listPoliciesForTarget(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the Organizations object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var organizations = new AWS.Organizations({apiVersion: '2016-11-28'});
You can also set the API version globally in AWS.config.apiVersions using
the organizations service identifier:
AWS.config.apiVersions = {
organizations: '2016-11-28',
// other service API versions
};
var organizations = new AWS.Organizations();
Constructor Summary collapse
-
new AWS.Organizations(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
acceptHandshake(params = {}, callback) ⇒ AWS.Request
Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.
You can only call this operation by the following principals when they also have the relevant IAM permissions:
-
Invitation to join or Approve all features request handshakes: only a principal from the member account.
The user who calls the API for an invitation to join must have the
organizations:AcceptHandshakepermission.
-
-
attachPolicy(params = {}, callback) ⇒ AWS.Request
Attaches a policy to a root, an organizational unit (OU), or an individual account.
-
cancelHandshake(params = {}, callback) ⇒ AWS.Request
Cancels a handshake.
-
closeAccount(params = {}, callback) ⇒ AWS.Request
Closes an Amazon Web Services member account within an organization.
-
createAccount(params = {}, callback) ⇒ AWS.Request
Creates an Amazon Web Services account that is automatically a member of the organization whose credentials made the request.
-
createGovCloudAccount(params = {}, callback) ⇒ AWS.Request
This action is available if all of the following are true:
-
You're authorized to create accounts in the Amazon Web Services GovCloud (US) Region.
-
-
createOrganization(params = {}, callback) ⇒ AWS.Request
Creates an Amazon Web Services organization.
-
createOrganizationalUnit(params = {}, callback) ⇒ AWS.Request
Creates an organizational unit (OU) within a root or parent OU.
-
createPolicy(params = {}, callback) ⇒ AWS.Request
Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual Amazon Web Services account.
For more information about policies and their use, see Managing Organizations policies.
If the request includes tags, then the requester must have the
organizations:TagResourcepermission.This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
. -
declineHandshake(params = {}, callback) ⇒ AWS.Request
Declines a handshake request.
-
deleteOrganization(params = {}, callback) ⇒ AWS.Request
Deletes the organization.
-
deleteOrganizationalUnit(params = {}, callback) ⇒ AWS.Request
Deletes an organizational unit (OU) from a root or another OU.
-
deletePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the specified policy from your organization.
-
deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the resource policy from your organization.
You can only call this operation from the organization's management account.
. -
deregisterDelegatedAdministrator(params = {}, callback) ⇒ AWS.Request
Removes the specified member Amazon Web Services account as a delegated administrator for the specified Amazon Web Services service.
Deregistering a delegated administrator can have unintended impacts on the functionality of the enabled Amazon Web Services service.
-
describeAccount(params = {}, callback) ⇒ AWS.Request
Retrieves Organizations-related information about the specified account.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
. -
describeCreateAccountStatus(params = {}, callback) ⇒ AWS.Request
Retrieves the current status of an asynchronous request to create an account.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
. -
describeEffectivePolicy(params = {}, callback) ⇒ AWS.Request
Returns the contents of the effective policy for specified policy type and account.
-
describeHandshake(params = {}, callback) ⇒ AWS.Request
Retrieves information about a previously requested handshake.
-
describeOrganization(params = {}, callback) ⇒ AWS.Request
Retrieves information about the organization that the user's account belongs to.
This operation can be called from any account in the 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.- describeOrganizationalUnit(params = {}, callback) ⇒ AWS.Request
Retrieves information about an organizational unit (OU).
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- describePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves information about a policy.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- describeResourcePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves information about a resource policy.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- detachPolicy(params = {}, callback) ⇒ AWS.Request
Detaches a policy from a target root, organizational unit (OU), or account.
If the policy being detached is a service control policy (SCP), the changes to permissions for 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.
- disableAWSServiceAccess(params = {}, callback) ⇒ AWS.Request
Disables the integration of an Amazon Web Services service (the service that is specified by
ServicePrincipal) with Organizations.- disablePolicyType(params = {}, callback) ⇒ AWS.Request
Disables an organizational policy type in a root.
- enableAllFeatures(params = {}, callback) ⇒ AWS.Request
Enables all features in an organization.
- enableAWSServiceAccess(params = {}, callback) ⇒ AWS.Request
Enables the integration of an Amazon Web Services service (the service that is specified by
ServicePrincipal) with Organizations.- enablePolicyType(params = {}, callback) ⇒ AWS.Request
Enables a policy type in a root.
- inviteAccountToOrganization(params = {}, callback) ⇒ AWS.Request
Sends an invitation to another account to join your organization as a member account.
- leaveOrganization(params = {}, callback) ⇒ AWS.Request
Removes a member account from its parent organization.
- listAccounts(params = {}, callback) ⇒ AWS.Request
Lists all the accounts in the organization.
- listAccountsForParent(params = {}, callback) ⇒ AWS.Request
Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU).
- listAWSServiceAccessForOrganization(params = {}, callback) ⇒ AWS.Request
Returns a list of the Amazon Web Services services that you enabled to integrate with your organization.
- listChildren(params = {}, callback) ⇒ AWS.Request
Lists all of the organizational units (OUs) or accounts that are contained in the specified parent OU or root.
- listCreateAccountStatus(params = {}, callback) ⇒ AWS.Request
Lists the account creation requests that match the specified status that is currently being tracked for the organization.
Note: Always check theNextTokenresponse parameter for anullvalue when calling aList*operation.- listDelegatedAdministrators(params = {}, callback) ⇒ AWS.Request
Lists the Amazon Web Services accounts that are designated as delegated administrators in this organization.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- listDelegatedServicesForAccount(params = {}, callback) ⇒ AWS.Request
List the Amazon Web Services services for which the specified account is a delegated administrator.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- listHandshakesForAccount(params = {}, callback) ⇒ AWS.Request
Lists the current handshakes that are associated with the account of the requesting user.
Handshakes that are
ACCEPTED,DECLINED,CANCELED, orEXPIREDappear in the results of this API for only 30 days after changing to that state.- listHandshakesForOrganization(params = {}, callback) ⇒ AWS.Request
Lists the handshakes that are associated with the organization that the requesting user is part of.
- listOrganizationalUnitsForParent(params = {}, callback) ⇒ AWS.Request
Lists the organizational units (OUs) in a parent organizational unit or root.
Note: Always check theNextTokenresponse parameter for anullvalue when calling aList*operation.- listParents(params = {}, callback) ⇒ AWS.Request
Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account.
- listPolicies(params = {}, callback) ⇒ AWS.Request
Retrieves the list of all policies in an organization of a specified type.
Note: Always check theNextTokenresponse parameter for anullvalue when calling aList*operation.- listPoliciesForTarget(params = {}, callback) ⇒ AWS.Request
Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account.
- listRoots(params = {}, callback) ⇒ AWS.Request
Lists the roots that are defined in the current organization.
Note: Always check theNextTokenresponse parameter for anullvalue when calling aList*operation.- listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists tags that are attached to the specified resource.
You can attach tags to the following resources in Organizations.
-
Amazon Web Services account
-
Organization root
-
Organizational unit (OU)
-
Policy (any type)
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- listTargetsForPolicy(params = {}, callback) ⇒ AWS.Request
Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to.
Note: Always check theNextTokenresponse parameter for anullvalue when calling aList*operation.- moveAccount(params = {}, callback) ⇒ AWS.Request
Moves an account from its current source parent root or organizational unit (OU) to the specified destination parent root or OU.
This operation can be called only from the organization's management account.
.- putResourcePolicy(params = {}, callback) ⇒ AWS.Request
Creates or updates a resource policy.
You can only call this operation from the organization's management account.
.- registerDelegatedAdministrator(params = {}, callback) ⇒ AWS.Request
Enables the specified member account to administer the Organizations features of the specified Amazon Web Services service.
- removeAccountFromOrganization(params = {}, callback) ⇒ AWS.Request
Removes the specified account from the organization.
The removed account becomes a standalone account that isn't a member of any organization.
- tagResource(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to the specified resource.
Currently, you can attach tags to the following resources in Organizations.
-
Amazon Web Services account
-
Organization root
-
Organizational unit (OU)
-
Policy (any type)
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- untagResource(params = {}, callback) ⇒ AWS.Request
Removes any tags with the specified keys from the specified resource.
You can attach tags to the following resources in Organizations.
-
Amazon Web Services account
-
Organization root
-
Organizational unit (OU)
-
Policy (any type)
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
.- updateOrganizationalUnit(params = {}, callback) ⇒ AWS.Request
Renames the specified organizational unit (OU).
- updatePolicy(params = {}, callback) ⇒ AWS.Request
Updates an existing policy with a new name, description, or content.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.Organizations(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
acceptHandshake(params = {}, callback) ⇒ AWS.Request
Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.
You can only call this operation by the following principals when they also have the relevant IAM permissions:
-
Invitation to join or Approve all features request handshakes: only a principal from the member account.
The user who calls the API for an invitation to join must have the
organizations:AcceptHandshakepermission. If you enabled all features in the organization, the user must also have theiam:CreateServiceLinkedRolepermission so that Organizations can create the required service-linked role namedAWSServiceRoleForOrganizations. For more information, see Organizations and service-linked roles in the Organizations User Guide. -
Enable all features final confirmation handshake: only a principal from the management account.
For more information about invitations, see Inviting an Amazon Web Services account to join your organization in the Organizations User Guide. For more information about requests to enable all features in the organization, see Enabling all features in your organization in the Organizations User Guide.
After you accept a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that, it's deleted.
attachPolicy(params = {}, callback) ⇒ AWS.Request
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 Organizations User Guide for information about each policy type:
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.
cancelHandshake(params = {}, callback) ⇒ AWS.Request
Cancels a handshake. Canceling a handshake sets the handshake state to
CANCELED.This operation can be called only from the account that originated the handshake. The recipient of the handshake can't cancel it, but can use DeclineHandshake instead. After a handshake is canceled, the recipient can no longer respond to that handshake.
After you cancel a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that, it's deleted.
closeAccount(params = {}, callback) ⇒ AWS.Request
Closes an Amazon Web Services member account within an organization. You can close an account when all features are enabled . You can't close the management account with this API. This is an asynchronous request that Amazon Web Services performs in the background. Because
CloseAccountoperates 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
AccountIdthat you sent in theCloseAccountrequest to provide as a parameter to the DescribeAccount operation.While the close account request is in progress, Account status will indicate PENDING_CLOSURE. When the close account request completes, the status will change to SUSPENDED.
-
Check the CloudTrail log for the
CloseAccountResultevent that gets published after the account closes successfully. For information on using CloudTrail with Organizations, see Logging and monitoring in Organizations in the Organizations User Guide.
Note:- You can close only 10% of member accounts, between 10 and 1000, within a rolling 30 day period. This quota is not bound by a calendar month, but starts when you close an account. After you reach this limit, you can close additional accounts. For more information, see Closing a member account in your organization and Quotas for Organizationsin the Organizations User Guide.
- To reinstate a closed account, contact Amazon Web Services Support within the 90-day grace period while the account is in SUSPENDED status.
- If the Amazon Web Services account you attempt to close is linked to an Amazon Web Services GovCloud (US) account, the
CloseAccountrequest will close both accounts. To learn important pre-closure details, see Closing an Amazon Web Services GovCloud (US) account in the Amazon Web Services GovCloud User Guide.
createAccount(params = {}, callback) ⇒ AWS.Request
Creates an Amazon Web Services account that is automatically a member of the organization whose credentials made the request. This is an asynchronous request that Amazon Web Services performs in the background. Because
CreateAccountoperates 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
Idvalue of theCreateAccountStatusresponse element from this operation to provide as a parameter to the DescribeCreateAccountStatus operation. -
Check the CloudTrail log for the
CreateAccountResultevent. For information on using CloudTrail with Organizations, see Logging and monitoring in Organizations in the Organizations User Guide.
The user who calls the API to create an account must have the
organizations:CreateAccountpermission. If you enabled all features in the organization, Organizations creates the required service-linked role namedAWSServiceRoleForOrganizations. For more information, see Organizations and service-linked roles in the Organizations User Guide.If the request includes tags, then the requester must have the
organizations:TagResourcepermission.Organizations preconfigures the new member account with a role (named
OrganizationAccountAccessRoleby default) that grants users in the management account administrator permissions in the new member account. Principals in the management account can assume the role. Organizations clones the company name and address information for the new account from the organization's management account.This operation can be called only from the organization's management account.
For more information about creating accounts, see Creating a member account in your organization in the Organizations User Guide.
-
When you create an account in an organization using the Organizations console, API, or 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 in the Organizations User Guide.
-
If you get an exception that indicates that you exceeded your account limits for the organization, contact Amazon Web Services Support.
-
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 Amazon Web Services Support.
-
Using
CreateAccountto create multiple temporary accounts isn't recommended. You can only close an account from the 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 in the 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. - describeOrganizationalUnit(params = {}, callback) ⇒ AWS.Request