:doc:`SSM <../../ssm>` / Client / get_resource_policies

*********************
get_resource_policies
*********************



.. py:method:: SSM.Client.get_resource_policies(**kwargs)

  

  Returns an array of the ``Policy`` object.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetResourcePolicies>`_  


  **Request Syntax**
  ::

    response = client.get_resource_policies(
        ResourceArn='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    Amazon Resource Name (ARN) of the resource to which the policies are attached.

    

  
  :type NextToken: string
  :param NextToken: 

    A token to start the list. Use this token to get the next set of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Policies': [
              {
                  'PolicyId': 'string',
                  'PolicyHash': 'string',
                  'Policy': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The token for the next set of items to return. Use this token to get the next set of results.

        
      

      - **Policies** *(list) --* 

        An array of the ``Policy`` object.

        
        

        - *(dict) --* 

          A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, ``OpsItemGroup`` is the only resource that supports Systems Manager resource policies. The resource policy for ``OpsItemGroup`` enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).

          
          

          - **PolicyId** *(string) --* 

            A policy ID.

            
          

          - **PolicyHash** *(string) --* 

            ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.

            
          

          - **Policy** *(string) --* 

            A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, ``OpsItemGroup`` is the only resource that supports Systems Manager resource policies. The resource policy for ``OpsItemGroup`` enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).

            
      
    
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  
  *   :py:class:`SSM.Client.exceptions.ResourcePolicyInvalidParameterException`

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

  