:doc:`CognitoIdentity <../../cognito-identity>` / Client / set_principal_tag_attribute_map

*******************************
set_principal_tag_attribute_map
*******************************



.. py:method:: CognitoIdentity.Client.set_principal_tag_attribute_map(**kwargs)

  

  You can use this operation to use default (username and clientID) attribute or custom attribute mappings.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/SetPrincipalTagAttributeMap>`_  


  **Request Syntax**
  ::

    response = client.set_principal_tag_attribute_map(
        IdentityPoolId='string',
        IdentityProviderName='string',
        UseDefaults=True|False,
        PrincipalTags={
            'string': 'string'
        }
    )
    
  :type IdentityPoolId: string
  :param IdentityPoolId: **[REQUIRED]** 

    The ID of the Identity Pool you want to set attribute mappings for.

    

  
  :type IdentityProviderName: string
  :param IdentityProviderName: **[REQUIRED]** 

    The provider name you want to use for attribute mappings.

    

  
  :type UseDefaults: boolean
  :param UseDefaults: 

    You can use this operation to use default (username and clientID) attribute mappings.

    

  
  :type PrincipalTags: dict
  :param PrincipalTags: 

    You can use this operation to add principal tags.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'IdentityPoolId': 'string',
          'IdentityProviderName': 'string',
          'UseDefaults': True|False,
          'PrincipalTags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **IdentityPoolId** *(string) --* 

        The ID of the Identity Pool you want to set attribute mappings for.

        
      

      - **IdentityProviderName** *(string) --* 

        The provider name you want to use for attribute mappings.

        
      

      - **UseDefaults** *(boolean) --* 

        You can use this operation to select default (username and clientID) attribute mappings.

        
      

      - **PrincipalTags** *(dict) --* 

        You can use this operation to add principal tags. The ``PrincipalTags``operation enables you to reference user attributes in your IAM permissions policy.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`CognitoIdentity.Client.exceptions.InvalidParameterException`

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

  
  *   :py:class:`CognitoIdentity.Client.exceptions.NotAuthorizedException`

  
  *   :py:class:`CognitoIdentity.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`CognitoIdentity.Client.exceptions.InternalErrorException`

  