get_resource_policies

SSM.Client.get_resource_policies(**kwargs)

Returns an array of the Policy object.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_policies(
    ResourceArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

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

  • NextToken (string) -- A token to start the list. Use this token to get the next set of results.
  • MaxResults (integer) -- 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.
Return type

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

  • SSM.Client.exceptions.InternalServerError
  • SSM.Client.exceptions.ResourcePolicyInvalidParameterException