list_create_account_status
(**kwargs)¶Lists the account creation requests that match the specified status that is currently being tracked for the organization.
Note
Always check the NextToken
response parameter for a null
value when calling a List*
operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken
response parameter value is null
only when there are no more results to display.
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.
See also: AWS API Documentation
Request Syntax
response = client.list_create_account_status(
States=[
'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
],
NextToken='string',
MaxResults=123
)
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.
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.NextToken
response element is present and has a value (is not null). Include that value as the NextToken
request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken
after every operation to ensure that you receive all of the results.dict
Response Syntax
{
'CreateAccountStatuses': [
{
'Id': 'string',
'AccountName': 'string',
'State': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
'RequestedTimestamp': datetime(2015, 1, 1),
'CompletedTimestamp': datetime(2015, 1, 1),
'AccountId': 'string',
'GovCloudAccountId': 'string',
'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'|'GOVCLOUD_ACCOUNT_ALREADY_EXISTS'|'MISSING_BUSINESS_VALIDATION'|'FAILED_BUSINESS_VALIDATION'|'PENDING_BUSINESS_VALIDATION'|'INVALID_IDENTITY_FOR_BUSINESS_VALIDATION'|'UNKNOWN_BUSINESS_VALIDATION'|'MISSING_PAYMENT_INSTRUMENT'|'INVALID_PAYMENT_INSTRUMENT'|'UPDATE_EXISTING_RESOURCE_POLICY_WITH_TAGS_NOT_SUPPORTED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
CreateAccountStatuses (list) --
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.
(dict) --
Contains the status about a CreateAccount or CreateGovCloudAccount request to create an Amazon Web Services account or an Amazon Web Services GovCloud (US) account in an organization.
Id (string) --
The unique identifier (ID) that references this request. You get this value from the response of the initial CreateAccount request to create the account.
The regex pattern for a create account request ID string requires "car-" followed by from 8 to 32 lowercase letters or digits.
AccountName (string) --
The account name given to the account when it was created.
State (string) --
The status of the asynchronous request to create an Amazon Web Services account.
RequestedTimestamp (datetime) --
The date and time that the request was made for the account creation.
CompletedTimestamp (datetime) --
The date and time that the account was created and the request completed.
AccountId (string) --
If the account was created successfully, the unique identifier (ID) of the new account.
The regex pattern for an account ID string requires exactly 12 digits.
GovCloudAccountId (string) --
If the account was created successfully, the unique identifier (ID) of the new account in the Amazon Web Services GovCloud (US) Region.
FailureReason (string) --
If the request failed, a description of the reason for the failure.
NextToken (string) --
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
.
Exceptions
Organizations.Client.exceptions.AccessDeniedException
Organizations.Client.exceptions.AWSOrganizationsNotInUseException
Organizations.Client.exceptions.InvalidInputException
Organizations.Client.exceptions.ServiceException
Organizations.Client.exceptions.TooManyRequestsException
Organizations.Client.exceptions.UnsupportedAPIEndpointException
Examples
The following example shows a user requesting a list of only the completed account creation requests made for the current organization:
response = client.list_create_account_status(
States=[
'SUCCEEDED',
],
)
print(response)
Expected Output:
{
'CreateAccountStatuses': [
{
'AccountId': '444444444444',
'AccountName': 'Developer Test Account',
'CompletedTimestamp': datetime(2017, 1, 15, 13, 45, 23, 6, 15, 0),
'Id': 'car-exampleaccountcreationrequestid1',
'RequestedTimestamp': datetime(2017, 1, 15, 13, 45, 23, 6, 15, 0),
'State': 'SUCCEEDED',
},
],
'ResponseMetadata': {
'...': '...',
},
}
The following example shows a user requesting a list of only the in-progress account creation requests made for the current organization:
response = client.list_create_account_status(
States=[
'IN_PROGRESS',
],
)
print(response)
Expected Output:
{
'CreateAccountStatuses': [
{
'AccountName': 'Production Account',
'Id': 'car-exampleaccountcreationrequestid2',
'RequestedTimestamp': datetime(2017, 1, 15, 13, 45, 23, 6, 15, 0),
'State': 'IN_PROGRESS',
},
],
'ResponseMetadata': {
'...': '...',
},
}