PinpointSMSVoiceV2.Client.
update_phone_number
(**kwargs)¶Updates the configuration of an existing origination phone number. You can update the opt-out list, enable or disable two-way messaging, change the TwoWayChannelArn, enable or disable self-managed opt-outs, and enable or disable deletion protection.
If the origination phone number is associated with a pool, an Error is returned.
See also: AWS API Documentation
Request Syntax
response = client.update_phone_number(
PhoneNumberId='string',
TwoWayEnabled=True|False,
TwoWayChannelArn='string',
SelfManagedOptOutsEnabled=True|False,
OptOutListName='string',
DeletionProtectionEnabled=True|False
)
[REQUIRED]
The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.
dict
Response Syntax
{
'PhoneNumberArn': 'string',
'PhoneNumberId': 'string',
'PhoneNumber': 'string',
'Status': 'PENDING'|'ACTIVE'|'ASSOCIATING'|'DISASSOCIATING'|'DELETED',
'IsoCountryCode': 'string',
'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
'NumberCapabilities': [
'SMS'|'VOICE',
],
'NumberType': 'SHORT_CODE'|'LONG_CODE'|'TOLL_FREE'|'TEN_DLC',
'MonthlyLeasingPrice': 'string',
'TwoWayEnabled': True|False,
'TwoWayChannelArn': 'string',
'SelfManagedOptOutsEnabled': True|False,
'OptOutListName': 'string',
'DeletionProtectionEnabled': True|False,
'CreatedTimestamp': datetime(2015, 1, 1)
}
Response Structure
(dict) --
PhoneNumberArn (string) --
The Amazon Resource Name (ARN) of the updated phone number.
PhoneNumberId (string) --
The unique identifier of the phone number.
PhoneNumber (string) --
The phone number that was updated.
Status (string) --
The current status of the request.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
MessageType (string) --
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
NumberCapabilities (list) --
Specifies if the number could be used for text messages, voice or both.
NumberType (string) --
The type of number that was requested.
MonthlyLeasingPrice (string) --
The monthly leasing price of the phone number, in US dollars.
TwoWayEnabled (boolean) --
By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
TwoWayChannelArn (string) --
The Amazon Resource Name (ARN) of the two way channel.
SelfManagedOptOutsEnabled (boolean) --
This is true if self managed opt-out are enabled.
OptOutListName (string) --
The name of the OptOutList associated with the phone number.
DeletionProtectionEnabled (boolean) --
When set to true the phone number can't be deleted.
CreatedTimestamp (datetime) --
The time when the phone number was created, in UNIX epoch time format.
Exceptions
PinpointSMSVoiceV2.Client.exceptions.ThrottlingException
PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException
PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException
PinpointSMSVoiceV2.Client.exceptions.ValidationException
PinpointSMSVoiceV2.Client.exceptions.ConflictException
PinpointSMSVoiceV2.Client.exceptions.InternalServerException