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.”

GetResourcePolicy - AWS Marketplace

GetResourcePolicy

Gets a resource-based policy of an entity that is identified by its resource ARN.

Request Syntax

GET /GetResourcePolicy?resourceArn=ResourceArn HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

ResourceArn

The Amazon Resource Name (ARN) of the entity resource that is associated with the resource policy.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ^arn:[\w+=/,.@-]+:aws-marketplace:[\w+=/,.@-]*:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)*$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Policy": "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.

Policy

The policy document to set; formatted in JSON.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 10240.

Pattern: ^[\u0009\u000A\u000D\u0020-\u00FF]+$

Errors

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

AccessDeniedException

Access is denied.

HTTP status code: 403

HTTP Status Code: 403

InternalServiceException

There was an internal service exception.

HTTP status code: 500

HTTP Status Code: 500

ResourceNotFoundException

The specified resource wasn't found.

HTTP status code: 404

HTTP Status Code: 404

ThrottlingException

Too many requests.

HTTP status code: 429

HTTP Status Code: 429

ValidationException

An error occurred during validation.

HTTP status code: 422

HTTP Status Code: 422

See Also

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

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