:doc:`ChimeSDKVoice <../../chime-sdk-voice>` / Client / list_phone_numbers

******************
list_phone_numbers
******************



.. py:method:: ChimeSDKVoice.Client.list_phone_numbers(**kwargs)

  

  Lists the phone numbers for the specified Amazon Chime SDK account, Amazon Chime SDK user, Amazon Chime SDK Voice Connector, or Amazon Chime SDK Voice Connector group.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/ListPhoneNumbers>`_  


  **Request Syntax**
  ::

    response = client.list_phone_numbers(
        Status='string',
        ProductType='VoiceConnector'|'SipMediaApplicationDialIn',
        FilterName='VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
        FilterValue='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type Status: string
  :param Status: 

    The status of your organization's phone numbers.

    

  
  :type ProductType: string
  :param ProductType: 

    The phone number product types.

    

  
  :type FilterName: string
  :param FilterName: 

    The filter to limit the number of results.

    

  
  :type FilterValue: string
  :param FilterValue: 

    The filter value.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return in a single call.

    

  
  :type NextToken: string
  :param NextToken: 

    The token used to return the next page of results.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'PhoneNumbers': [
              {
                  'PhoneNumberId': 'string',
                  'E164PhoneNumber': 'string',
                  'Country': 'string',
                  'Type': 'Local'|'TollFree',
                  'ProductType': 'VoiceConnector'|'SipMediaApplicationDialIn',
                  'Status': 'Cancelled'|'PortinCancelRequested'|'PortinInProgress'|'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': '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),
                  'OrderId': 'string',
                  'Name': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PhoneNumbers** *(list) --* 

        The phone number details.

        
        

        - *(dict) --* 

          A phone number used to call an Amazon Chime SDK Voice Connector.

          
          

          - **PhoneNumberId** *(string) --* 

            The phone number's ID.

            
          

          - **E164PhoneNumber** *(string) --* 

            The phone number, in E.164 format.

            
          

          - **Country** *(string) --* 

            The phone number's country. Format: ISO 3166-1 alpha-2.

            
          

          - **Type** *(string) --* 

            The phone number's type.

            
          

          - **ProductType** *(string) --* 

            The phone number's product type.

            
          

          - **Status** *(string) --* 

            The phone number's status.

            
          

          - **Capabilities** *(dict) --* 

            The phone number's capabilities.

            
            

            - **InboundCall** *(boolean) --* 

              Allows or denies inbound calling for the specified phone number.

              
            

            - **OutboundCall** *(boolean) --* 

              Allows or denies outbound calling for the specified phone number.

              
            

            - **InboundSMS** *(boolean) --* 

              Allows or denies inbound SMS messaging for the specified phone number.

              
            

            - **OutboundSMS** *(boolean) --* 

              Allows or denies outbound SMS messaging for the specified phone number.

              
            

            - **InboundMMS** *(boolean) --* 

              Allows or denies inbound MMS messaging for the specified phone number.

              
            

            - **OutboundMMS** *(boolean) --* 

              Allows or denies inbound MMS messaging for the specified phone number.

              
        
          

          - **Associations** *(list) --* 

            The phone number's associations.

            
            

            - *(dict) --* 

              The phone number associations, such as an Amazon Chime SDK account ID, user ID, Voice Connector ID, or Voice Connector group ID.

              
              

              - **Value** *(string) --* 

                Contains the ID for the entity specified in Name.

                
              

              - **Name** *(string) --* 

                Defines the association with an Amazon Chime SDK account ID, user ID, Voice Connector ID, or Voice Connector group ID.

                
              

              - **AssociatedTimestamp** *(datetime) --* 

                The timestamp of the phone number association, in ISO 8601 format.

                
          
        
          

          - **CallingName** *(string) --* 

            The outbound calling name associated with the phone number.

            
          

          - **CallingNameStatus** *(string) --* 

            The outbound calling name status.

            
          

          - **CreatedTimestamp** *(datetime) --* 

            The phone number creation timestamp, in ISO 8601 format.

            
          

          - **UpdatedTimestamp** *(datetime) --* 

            The updated phone number timestamp, in ISO 8601 format.

            
          

          - **DeletionTimestamp** *(datetime) --* 

            The deleted phone number timestamp, in ISO 8601 format.

            
          

          - **OrderId** *(string) --* 

            The phone number's order ID.

            
          

          - **Name** *(string) --* 

            The name of the phone number.

            
      
    
      

      - **NextToken** *(string) --* 

        The token used to return the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.NotFoundException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ServiceFailureException`

  