Dell Technologies ECS REST API

Search (SHIFT+S)




Get Bucket Policy

GET /object/bucket/{bucketName}/policy

Returns the bucket policy on the specified bucket

bucketNameName of the bucket for which the policy is to be displayed.

Query Parameters

namespaceNamespace of the bucket.

Required Roles

Requires one of the following roles:

  • SYSTEM_ADMIN

  • SYSTEM_MONITOR

  • NAMESPACE_ADMIN


Prerequisites

The following conditions must be met in order to call this operation.

  • Bucket must exist.


Response Body

Bucket Policy on the specified bucket.

Version: Specifies the policy language version.
Id: Specifies an optional identifier for the policy.
Statement: Contains the policies.
Sid: It is an optional identifier that is provided for the policy statement.
Effect: Specifies whether the statement will result in an allow or an explicit deny.
Principal: Specifies the user.
NotPrincipal: Use the NotPrincipal element to specify an exception to a list of principals.
Action: Specifies the action or actions that will be allowed or denied. Statements must include either an Action or NotAction element.
NotAction: Specifies an advanced policy element that explicitly matches everything except a list of actions.
Resource: Specifies the object or objects that the statement covers.
NotResource: Specifies an advanced policy element that explicitly matches everything except a list of resources.
Condition: An optional element which specifies conditions for when a policy is in effect.


Examples

Request
> GET /bucket1/policy HTTP/1.1
> Host: 192.168.0.0:9021
> User-Agent: curl/7.43.0
> Accept: */*
> Date: Wed, 24 May 2017 01:04:48 +0000
> Authorization: AWS usr:gWb7MDmgkwu4I2RXcoENfugsdsI=
>
Response
< HTTP/1.1 200 OK
< Date: Wed, 24 May 2017 01:04:48 GMT
< Server: ViPR/1.0
< x-amz-request-id: 0af9f567:15c37397b93:eee:1a
< x-amz-id-2: 79ec477d47e7382e9c95b2860282a2283d5cc504d13d0c372caf03f8fae64697
< ETag: "a491bcbb2a23d666b3e7918177736000"
< Last-Modified: Wed, 24 May 2017 01:04:30 GMT
< x-emc-mtime: 1495587870656
< x-amz-server-side-encryption: AES256
< Content-Encoding: identity
< Content-Type: application/octet-stream
< Content-Length: 236
<
{
  "Version": "",
  "Id": "",
  "Statement": {
    "ID": "",
    "Effect": "",
    "Principal": "usr",
    "NotPrincipal": "",
    "Action": "",
    "NotAction": "",
    "Resource": "",
    "NotResource": "",
    "Condition": ""
  }
}
* Connection #0 to host 10.249.245.103 left intact