Chime.Client.
get_phone_number
(**kwargs)¶Retrieves details for the specified phone number ID, such as associations, capabilities, and product type.
See also: AWS API Documentation
Request Syntax
response = client.get_phone_number(
PhoneNumberId='string'
)
[REQUIRED]
The phone number ID.
{
'PhoneNumber': {
'PhoneNumberId': 'string',
'E164PhoneNumber': 'string',
'Country': 'string',
'Type': 'Local'|'TollFree',
'ProductType': 'BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
'Capabilities': {
'InboundCall': True|False,
'OutboundCall': True|False,
'InboundSMS': True|False,
'OutboundSMS': True|False,
'InboundMMS': True|False,
'OutboundMMS': True|False
},
'Associations': [
{
'Value': 'string',
'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
'AssociatedTimestamp': datetime(2015, 1, 1)
},
],
'CallingName': 'string',
'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
'CreatedTimestamp': datetime(2015, 1, 1),
'UpdatedTimestamp': datetime(2015, 1, 1),
'DeletionTimestamp': datetime(2015, 1, 1)
}
}
Response Structure
The phone number details.
The phone number ID.
The phone number, in E.164 format.
The phone number country. Format: ISO 3166-1 alpha-2.
The phone number type.
The phone number product type.
The phone number status.
The phone number capabilities.
Allows or denies inbound calling for the specified phone number.
Allows or denies outbound calling for the specified phone number.
Allows or denies inbound SMS messaging for the specified phone number.
Allows or denies outbound SMS messaging for the specified phone number.
Allows or denies inbound MMS messaging for the specified phone number.
Allows or denies outbound MMS messaging for the specified phone number.
The phone number associations.
The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.
Contains the ID for the entity specified in Name.
Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.
The timestamp of the phone number association, in ISO 8601 format.
The outbound calling name associated with the phone number.
The outbound calling name status.
The phone number creation timestamp, in ISO 8601 format.
The updated phone number timestamp, in ISO 8601 format.
The deleted phone number timestamp, in ISO 8601 format.
Exceptions
Chime.Client.exceptions.UnauthorizedClientException
Chime.Client.exceptions.NotFoundException
Chime.Client.exceptions.ForbiddenException
Chime.Client.exceptions.BadRequestException
Chime.Client.exceptions.ThrottledClientException
Chime.Client.exceptions.ServiceUnavailableException
Chime.Client.exceptions.ServiceFailureException