Updated on 2022-05-17 GMT+08:00

Obtaining a DIS-Enabled Notification Policy

Functions

Queries the DIS notification policy of a specified bucket. If such a rule exists, a success message is returned with the status code of 200.

Request Syntax

GET /?disPolicy HTTP/1.1
Host: bucketname.obs.region.example.com
Authorization: authorization
Date: date

Request parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code
Server: OBS
Date: date
Content-Type: type
Content-Length: length

policy json body

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

Table 1 Response Elements

Parameter

Description

id

Rule ID. Unique identifier of the DIS policy rule configured for the bucket.

Type: string

stream

DIS stream name.

Type: string

project

ID of the project to which the DIS stream belongs.

Type: string

events

OBS event list.

Type: string array

prefix

Object name prefix.

Type: string

suffix

Object name suffix.

Type: string

agency

IAM agency.

Type: string

Error Responses

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

Sample Request

GET /?disPolicy HTTP/1.1
Host: bucketname.obs.region.example.com
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Date: Tue, 21 Jul 2020 22:28:46 GMT

Sample Response

HTTP/1.1 200 OK
Server: OBS
Date: Tue, 07 Jul 2020 07:28:46 GMT
Content-Type: application/json
Content-Length: 1063
{
    "rules": [{
        "id": "event-01",
        "stream": "stream_name",
        "project": "project_id",
        "events": ["ObjectCreated:*", "ObjectRemoved:*"],
        "prefix": "",
        "suffix": "",
        "agency": "agency001"
    }]
}