IAM / Client / delete_account_alias

delete_account_alias#

IAM.Client.delete_account_alias(**kwargs)#

Deletes the specified Amazon Web Services account alias. For information about using an Amazon Web Services account alias, see Using an alias for your Amazon Web Services account ID in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

response = client.delete_account_alias(
    AccountAlias='string'
)
Parameters:

AccountAlias (string) –

[REQUIRED]

The name of the account alias to delete.

This parameter allows (through its regex pattern) a string of characters consisting of lowercase letters, digits, and dashes. You cannot start or finish with a dash, nor can you have two dashes in a row.

Returns:

None

Exceptions

  • IAM.Client.exceptions.NoSuchEntityException

  • IAM.Client.exceptions.LimitExceededException

  • IAM.Client.exceptions.ServiceFailureException

Examples

The following command removes the alias mycompany from the current AWS account:

response = client.delete_account_alias(
    AccountAlias='mycompany',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}