:doc:`DataZone <../../datazone>` / Client / list_policy_grants

******************
list_policy_grants
******************



.. py:method:: DataZone.Client.list_policy_grants(**kwargs)

  

  Lists policy grants.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/datazone-2018-05-10/ListPolicyGrants>`_  


  **Request Syntax**
  ::

    response = client.list_policy_grants(
        domainIdentifier='string',
        entityType='DOMAIN_UNIT'|'ENVIRONMENT_BLUEPRINT_CONFIGURATION'|'ENVIRONMENT_PROFILE'|'ASSET_TYPE',
        entityIdentifier='string',
        policyType='CREATE_DOMAIN_UNIT'|'OVERRIDE_DOMAIN_UNIT_OWNERS'|'ADD_TO_PROJECT_MEMBER_POOL'|'OVERRIDE_PROJECT_OWNERS'|'CREATE_GLOSSARY'|'CREATE_FORM_TYPE'|'CREATE_ASSET_TYPE'|'CREATE_PROJECT'|'CREATE_ENVIRONMENT_PROFILE'|'DELEGATE_CREATE_ENVIRONMENT_PROFILE'|'CREATE_ENVIRONMENT'|'CREATE_ENVIRONMENT_FROM_BLUEPRINT'|'CREATE_PROJECT_FROM_PROJECT_PROFILE'|'USE_ASSET_TYPE',
        maxResults=123,
        nextToken='string'
    )
    
  :type domainIdentifier: string
  :param domainIdentifier: **[REQUIRED]** 

    The ID of the domain where you want to list policy grants.

    

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

    The type of entity for which you want to list policy grants.

    

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

    The ID of the entity for which you want to list policy grants.

    

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

    The type of policy that you want to list.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of grants to return in a single call to ``ListPolicyGrants``. When the number of grants to be listed is greater than the value of ``MaxResults``, the response contains a ``NextToken`` value that you can use in a subsequent call to ``ListPolicyGrants`` to list the next set of grants.

    

  
  :type nextToken: string
  :param nextToken: 

    When the number of grants is greater than the default value for the ``MaxResults`` parameter, or if you explicitly specify a value for ``MaxResults`` that is less than the number of grants, the response includes a pagination token named ``NextToken``. You can specify this ``NextToken`` value in a subsequent call to ``ListPolicyGrants`` to list the next set of grants.

    

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

    
    ::

      {
          'grantList': [
              {
                  'principal': {
                      'user': {
                          'userIdentifier': 'string',
                          'allUsersGrantFilter': {}
                      },
                      'group': {
                          'groupIdentifier': 'string'
                      },
                      'project': {
                          'projectDesignation': 'OWNER'|'CONTRIBUTOR'|'PROJECT_CATALOG_STEWARD',
                          'projectIdentifier': 'string',
                          'projectGrantFilter': {
                              'domainUnitFilter': {
                                  'domainUnit': 'string',
                                  'includeChildDomainUnits': True|False
                              }
                          }
                      },
                      'domainUnit': {
                          'domainUnitDesignation': 'OWNER',
                          'domainUnitIdentifier': 'string',
                          'domainUnitGrantFilter': {
                              'allDomainUnitsGrantFilter': {}
                          }
                      }
                  },
                  'detail': {
                      'createDomainUnit': {
                          'includeChildDomainUnits': True|False
                      },
                      'overrideDomainUnitOwners': {
                          'includeChildDomainUnits': True|False
                      },
                      'addToProjectMemberPool': {
                          'includeChildDomainUnits': True|False
                      },
                      'overrideProjectOwners': {
                          'includeChildDomainUnits': True|False
                      },
                      'createGlossary': {
                          'includeChildDomainUnits': True|False
                      },
                      'createFormType': {
                          'includeChildDomainUnits': True|False
                      },
                      'createAssetType': {
                          'includeChildDomainUnits': True|False
                      },
                      'createProject': {
                          'includeChildDomainUnits': True|False
                      },
                      'createEnvironmentProfile': {
                          'domainUnitId': 'string'
                      },
                      'delegateCreateEnvironmentProfile': {},
                      'createEnvironment': {},
                      'createEnvironmentFromBlueprint': {},
                      'createProjectFromProjectProfile': {
                          'includeChildDomainUnits': True|False,
                          'projectProfiles': [
                              'string',
                          ]
                      },
                      'useAssetType': {
                          'domainUnitId': 'string'
                      }
                  },
                  'createdAt': datetime(2015, 1, 1),
                  'createdBy': 'string',
                  'grantId': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **grantList** *(list) --* 

        The results of this action - the listed grants.

        
        

        - *(dict) --* 

          A member of the policy grant list.

          
          

          - **principal** *(dict) --* 

            The principal of the policy grant member.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``user``, ``group``, ``project``, ``domainUnit``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **user** *(dict) --* 

              The user of the policy grant principal.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``userIdentifier``, ``allUsersGrantFilter``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **userIdentifier** *(string) --* 

                The user ID of the user policy grant principal.

                
              

              - **allUsersGrantFilter** *(dict) --* 

                The all users grant filter of the user policy grant principal.

                
            
          
            

            - **group** *(dict) --* 

              The group of the policy grant principal.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``groupIdentifier``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **groupIdentifier** *(string) --* 

                The ID Of the group of the group principal.

                
          
            

            - **project** *(dict) --* 

              The project of the policy grant principal.

              
              

              - **projectDesignation** *(string) --* 

                The project designation of the project policy grant principal.

                
              

              - **projectIdentifier** *(string) --* 

                The project ID of the project policy grant principal.

                
              

              - **projectGrantFilter** *(dict) --* 

                The project grant filter of the project policy grant principal.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``domainUnitFilter``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


              
                

                - **domainUnitFilter** *(dict) --* 

                  The domain unit filter of the project grant filter.

                  
                  

                  - **domainUnit** *(string) --* 

                    The domain unit ID to use in the filter.

                    
                  

                  - **includeChildDomainUnits** *(boolean) --* 

                    Specifies whether to include child domain units.

                    
              
            
          
            

            - **domainUnit** *(dict) --* 

              The domain unit of the policy grant principal.

              
              

              - **domainUnitDesignation** *(string) --* 

                Specifes the designation of the domain unit users.

                
              

              - **domainUnitIdentifier** *(string) --* 

                The ID of the domain unit.

                
              

              - **domainUnitGrantFilter** *(dict) --* 

                The grant filter for the domain unit.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``allDomainUnitsGrantFilter``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


              
                

                - **allDomainUnitsGrantFilter** *(dict) --* 

                  Specifies a grant filter containing all domain units.

                  
              
            
          
        
          

          - **detail** *(dict) --* 

            The details of the policy grant member.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``createDomainUnit``, ``overrideDomainUnitOwners``, ``addToProjectMemberPool``, ``overrideProjectOwners``, ``createGlossary``, ``createFormType``, ``createAssetType``, ``createProject``, ``createEnvironmentProfile``, ``delegateCreateEnvironmentProfile``, ``createEnvironment``, ``createEnvironmentFromBlueprint``, ``createProjectFromProjectProfile``, ``useAssetType``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **createDomainUnit** *(dict) --* 

              Specifies that this is a create domain unit policy.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **overrideDomainUnitOwners** *(dict) --* 

              Specifies whether to override domain unit owners.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy is inherited by child domain units.

                
          
            

            - **addToProjectMemberPool** *(dict) --* 

              Specifies that the policy grant is to be added to the members of the project.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **overrideProjectOwners** *(dict) --* 

              Specifies whether to override project owners.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy is inherited by child domain units.

                
          
            

            - **createGlossary** *(dict) --* 

              Specifies that this is a create glossary policy.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **createFormType** *(dict) --* 

              Specifies that this is a create form type policy.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **createAssetType** *(dict) --* 

              Specifies that this is a create asset type policy.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **createProject** *(dict) --* 

              Specifies that this is a create project policy.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether the policy grant is applied to child domain units.

                
          
            

            - **createEnvironmentProfile** *(dict) --* 

              Specifies that this is a create environment profile policy.

              
              

              - **domainUnitId** *(string) --* 

                The ID of the domain unit.

                
          
            

            - **delegateCreateEnvironmentProfile** *(dict) --* 

              Specifies that this is the delegation of the create environment profile policy.

              
          
            

            - **createEnvironment** *(dict) --* 

              Specifies that this is a create environment policy.

              
          
            

            - **createEnvironmentFromBlueprint** *(dict) --* 

              The details of the policy of creating an environment.

              
          
            

            - **createProjectFromProjectProfile** *(dict) --* 

              Specifies whether to create a project from project profile.

              
              

              - **includeChildDomainUnits** *(boolean) --* 

                Specifies whether to include child domain units when creating a project from project profile policy grant details

                
              

              - **projectProfiles** *(list) --* 

                Specifies project profiles when creating a project from project profile policy grant details

                
                

                - *(string) --* 
            
          
            

            - **useAssetType** *(dict) --* 

              Specifies the domain unit(s) whose projects can use this asset type while creating asset or asset revisions.

              
              

              - **domainUnitId** *(string) --* 

                The ID of the domain unit.

                
          
        
          

          - **createdAt** *(datetime) --* 

            Specifies the timestamp at which policy grant member was created.

            
          

          - **createdBy** *(string) --* 

            Specifies the user who created the policy grant member.

            
          

          - **grantId** *(string) --* 

            The ID of the policy grant.

            
      
    
      

      - **nextToken** *(string) --* 

        When the number of grants is greater than the default value for the ``MaxResults`` parameter, or if you explicitly specify a value for ``MaxResults`` that is less than the number of grants, the response includes a pagination token named ``NextToken``. You can specify this ``NextToken`` value in a subsequent call to ``ListPolicyGrants`` to list the next set of grants.

        
  
  **Exceptions**
  
  *   :py:class:`DataZone.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`DataZone.Client.exceptions.ThrottlingException`

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

  
  *   :py:class:`DataZone.Client.exceptions.UnauthorizedException`

  