GetResourcePolicy - AWS Billing and Cost Management

GetResourcePolicy

Returns the resource-based policy document attached to the resource in JSON format.

Request Syntax

{ "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.

resourceArn

The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.

Type: String

Pattern: arn:aws[a-z-]*:(billing)::[0-9]{12}:[a-zA-Z0-9/:_\+=\.\@-]{0,70}[a-zA-Z0-9]

Required: Yes

Response Syntax

{ "policy": "string", "resourceArn": "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 resource-based policy document attached to the resource in JSON format.

Type: String

resourceArn

The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.

Type: String

Pattern: arn:aws[a-z-]*:(billing)::[0-9]{12}:[a-zA-Z0-9/:_\+=\.\@-]{0,70}[a-zA-Z0-9]

Errors

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

BillingAccessDenied

You don't have sufficient access to perform this action.

HTTP Status Code: 403

BillingInternalServer

The request processing failed because of an unknown error, exception, or failure.

HTTP Status Code: 500

BillingResourceNotFound

The specified ARN in the request doesn't exist.

HTTP Status Code: 404

BillingThrottling

The request was denied due to request throttling.

HTTP Status Code: 429

BillingValidation

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

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