list_accounts
async
¶
list_accounts(
access_token: AccessTokenType,
*,
config_overrides: Optional[AsyncSSOClientConfig] = None,
next_token: Optional[NextTokenType] = None,
max_results: Optional[MaxResultType] = None,
) -> ListAccountsResponse
Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response.
Parameters:
-
next_token(Optional[NextTokenType], default:None) –(Optional) When requesting subsequent pages, this is the page token from the previous response output.
-
max_results(Optional[MaxResultType], default:None) –This is the number of items clients can request per page.
-
access_token(AccessTokenType) –The token issued by the
CreateTokenAPI call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.
Raises:
-
InvalidRequestException–Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
-
ResourceNotFoundException–The specified resource doesn't exist.
-
TooManyRequestsException–Indicates that the request is being made too frequently and is more than what the server can handle.
-
UnauthorizedException–Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
-
UnknownServiceError–The service returned an error code this client does not model.