Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

GetResourcePolicies - AWS Systems Manager

GetResourcePolicies

Returns an array of the Policy object.

Request Syntax

{ "MaxResults": number, "NextToken": "string", "ResourceArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

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.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

NextToken

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

Type: String

Required: No

ResourceArn

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

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: Yes

Response Syntax

{ "NextToken": "string", "Policies": [ { "Policy": "string", "PolicyHash": "string", "PolicyId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

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

Type: String

Policies

An array of the Policy object.

Type: Array of GetResourcePoliciesResponseEntry objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

ResourceNotFoundException

The specified parameter to be shared could not be found.

HTTP Status Code: 400

ResourcePolicyInvalidParameterException

One or more parameters specified for the call aren't valid. Verify the parameters and their values and try again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.