:doc:`Redshift <../../redshift>` / Client / describe_data_shares_for_consumer

*********************************
describe_data_shares_for_consumer
*********************************



.. py:method:: Redshift.Client.describe_data_shares_for_consumer(**kwargs)

  

  Returns a list of datashares where the account identifier being called is a consumer account identifier.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeDataSharesForConsumer>`_  


  **Request Syntax**
  ::

    response = client.describe_data_shares_for_consumer(
        ConsumerArn='string',
        Status='ACTIVE'|'AVAILABLE',
        MaxRecords=123,
        Marker='string'
    )
    
  :type ConsumerArn: string
  :param ConsumerArn: 

    The Amazon Resource Name (ARN) of the consumer namespace that returns in the list of datashares.

    

  
  :type Status: string
  :param Status: 

    An identifier giving the status of a datashare in the consumer cluster. If this field is specified, Amazon Redshift returns the list of datashares that have the specified status.

    

  
  :type MaxRecords: integer
  :param MaxRecords: 

    The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified ``MaxRecords`` value, a value is returned in a ``marker`` field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.

    

  
  :type Marker: string
  :param Marker: 

    An optional parameter that specifies the starting point to return a set of response records. When the results of a  DescribeDataSharesForConsumer request exceed the value specified in ``MaxRecords``, Amazon Web Services returns a value in the ``Marker`` field of the response. You can retrieve the next set of response records by providing the returned marker value in the ``Marker`` parameter and retrying the request.

    

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

    
    ::

      {
          'DataShares': [
              {
                  'DataShareArn': 'string',
                  'ProducerArn': 'string',
                  'AllowPubliclyAccessibleConsumers': True|False,
                  'DataShareAssociations': [
                      {
                          'ConsumerIdentifier': 'string',
                          'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
                          'ConsumerRegion': 'string',
                          'CreatedDate': datetime(2015, 1, 1),
                          'StatusChangeDate': datetime(2015, 1, 1),
                          'ProducerAllowedWrites': True|False,
                          'ConsumerAcceptedWrites': True|False
                      },
                  ],
                  'ManagedBy': 'string',
                  'DataShareType': 'INTERNAL'
              },
          ],
          'Marker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DataShares** *(list) --* 

        Shows the results of datashares available for consumers.

        
        

        - *(dict) --* 
          

          - **DataShareArn** *(string) --* 

            The Amazon Resource Name (ARN) of the datashare that the consumer is to use.

            
          

          - **ProducerArn** *(string) --* 

            The Amazon Resource Name (ARN) of the producer namespace.

            
          

          - **AllowPubliclyAccessibleConsumers** *(boolean) --* 

            A value that specifies whether the datashare can be shared to a publicly accessible cluster.

            
          

          - **DataShareAssociations** *(list) --* 

            A value that specifies when the datashare has an association between producer and data consumers.

            
            

            - *(dict) --* 

              The association of a datashare from a producer account with a data consumer.

              
              

              - **ConsumerIdentifier** *(string) --* 

                The name of the consumer accounts that have an association with a producer datashare.

                
              

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

                The status of the datashare that is associated.

                
              

              - **ConsumerRegion** *(string) --* 

                The Amazon Web Services Region of the consumer accounts that have an association with a producer datashare.

                
              

              - **CreatedDate** *(datetime) --* 

                The creation date of the datashare that is associated.

                
              

              - **StatusChangeDate** *(datetime) --* 

                The status change data of the datashare that is associated.

                
              

              - **ProducerAllowedWrites** *(boolean) --* 

                Specifies whether write operations were allowed during data share authorization.

                
              

              - **ConsumerAcceptedWrites** *(boolean) --* 

                Specifies whether write operations were allowed during data share association.

                
          
        
          

          - **ManagedBy** *(string) --* 

            The identifier of a datashare to show its managing entity.

            
          

          - **DataShareType** *(string) --* 

            The type of the datashare created by RegisterNamespace.

            
      
    
      

      - **Marker** *(string) --* 

        An optional parameter that specifies the starting point to return a set of response records. When the results of a  DescribeDataSharesForConsumer request exceed the value specified in ``MaxRecords``, Amazon Web Services returns a value in the ``Marker`` field of the response. You can retrieve the next set of response records by providing the returned marker value in the ``Marker`` parameter and retrying the request.

        
  
  **Exceptions**
  
  *   :py:class:`Redshift.Client.exceptions.InvalidNamespaceFault`

  