GetResourcePolicies - Amazon Systems Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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 Amazon SDKs, see the following: