GET Bucket Policy

This operation uses the policy subresource to return the policy of a specified bucket.

Only the bucket owner can get the bucket policy.

If the bucket specified in this operation does not have a policy, OBS returns 404 NoSuchBucketPolicy.

Request Syntax

GET /?policy HTTP/1.1
Date: date
Authorization: authorization

Request Parameters

This request contains no parameter.

Request Headers

This request uses common headers. For details, see Common Request Headers.

Request Elements

This request contains no element.

Response Syntax

HTTP/1.1 status_code
Content-Type: application/xml
Date: date

Policy Content

Response Headers

This response uses common headers. For details, see Common Response Headers.

Response Elements

The response body is a JSON string containing bucket policies.

Error Responses

No special error responses are returned. For details about error responses, see Table 1.