:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / describe_opt_out_lists

**********************
describe_opt_out_lists
**********************



.. py:method:: PinpointSMSVoiceV2.Client.describe_opt_out_lists(**kwargs)

  

  Describes the specified opt-out list or all opt-out lists in your account.

   

  If you specify opt-out list names, the output includes information for only the specified opt-out lists. Opt-out lists include only those that meet the filter criteria. If you don't specify opt-out list names or filters, the output includes information for all opt-out lists.

   

  If you specify an opt-out list name that isn't valid, an error is returned.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/DescribeOptOutLists>`_  


  **Request Syntax**
  ::

    response = client.describe_opt_out_lists(
        OptOutListNames=[
            'string',
        ],
        NextToken='string',
        MaxResults=123,
        Owner='SELF'|'SHARED'
    )
    
  :type OptOutListNames: list
  :param OptOutListNames: 

    The OptOutLists to show the details of. This is an array of strings that can be either the OptOutListName or OptOutListArn.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).

      

    

  
    - *(string) --* 

    

  :type NextToken: string
  :param NextToken: 

    The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return per each request.

    

  
  :type Owner: string
  :param Owner: 

    Use ``SELF`` to filter the list of Opt-Out List to ones your account owns or use ``SHARED`` to filter on Opt-Out List shared with your account. The ``Owner`` and ``OptOutListNames`` parameters can't be used at the same time.

    

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

    
    ::

      {
          'OptOutLists': [
              {
                  'OptOutListArn': 'string',
                  'OptOutListName': 'string',
                  'CreatedTimestamp': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **OptOutLists** *(list) --* 

        An array of OptOutListInformation objects that contain the details for the requested OptOutLists.

        
        

        - *(dict) --* 

          The information for all OptOutList in an Amazon Web Services account.

          
          

          - **OptOutListArn** *(string) --* 

            The Amazon Resource Name (ARN) of the OptOutList.

            
          

          - **OptOutListName** *(string) --* 

            The name of the OptOutList.

            
          

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

            The time when the OutOutList was created, in `UNIX epoch time <https://www.epochconverter.com/>`__ format.

            
      
    
      

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

        The token to be used for the next set of paginated results. If this field is empty then there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ValidationException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.InternalServerException`

  