forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Jawei, Li <lijiawei5@huawei.com> Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
160 lines
12 KiB
HTML
160 lines
12 KiB
HTML
<a name="EN-US_TOPIC_0125560442"></a><a name="EN-US_TOPIC_0125560442"></a>
|
|
|
|
<h1 class="topictitle1">GET Bucket Notification</h1>
|
|
<div id="body1472107434300"><p id="EN-US_TOPIC_0125560442__p21643094145616">Obtains the notification configuration of a bucket.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p60570118145616">The <strong id="EN-US_TOPIC_0125560442__b3170621184114">s3:GetBucketNotification</strong> permission is required to perform this operation. By default, the permission is granted to the bucket owner only. However, it can be granted to other users by configuring the bucket policy.</p>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section38789260145638"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560442__screen54922357145638">GET /?notification HTTP/1.1
|
|
User-Agent: agent
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: date
|
|
Authorization: authorization</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section24539173145638"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560442__p41515982145638">This request contains no parameter.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section38099522145638"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560442__p66162421145638">This request uses common headers. For details, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section58590878145638"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560442__p48240660145638">This request contains no element.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section4775281714585"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560442__screen4277299114585">HTTP/1.1 status_code
|
|
x-amz-request-id: id
|
|
x-amz-id-2: id
|
|
x-reserved: reserved info
|
|
Content-Type: type
|
|
Date: date
|
|
Content-Length: lenth
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<NotificationConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
|
|
<TopicConfiguration>
|
|
<Id>topic_001</Id>
|
|
<Topic>urn:smn:example:35667523564:topic001</Topic>
|
|
<Event>s3:ObjectCreated:*</Event>
|
|
....
|
|
</TopicConfiguration>
|
|
</NotificationConfiguration></pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section4941260014585"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560442__p4299766914585">This response uses common headers. For details, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section5143470714585"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560442__p546173814585">The following table describes the elements contained in this response.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560442__table4915564514585" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Response elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560442__row5925512314585"><th align="left" class="cellrowborder" valign="top" width="31.31%" id="mcps1.3.9.3.2.3.1.1"><p id="EN-US_TOPIC_0125560442__p3493561914585">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.69%" id="mcps1.3.9.3.2.3.1.2"><p id="EN-US_TOPIC_0125560442__p1121286314585">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560442__row3582673614585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p1628454214585">NotificationConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p4397953614585">Container for configuring the event notification function of a bucket. If this element is null, the function is disabled.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p6027151114585">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560442__p557268714585">Ancestor: None</p>
|
|
<p id="EN-US_TOPIC_0125560442__p5015418614585">Children: one TopicConfiguration or TopicConfigurations</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row4873449814585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p5518027414585">TopicConfiguration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p4041719014585">Container for configuring the event notification topic</p>
|
|
<p id="EN-US_TOPIC_0125560442__p2821039314585">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560442__p5256695114585">Ancestor: NotificationConfiguration</p>
|
|
<p id="EN-US_TOPIC_0125560442__p334051114585">Children: Id, Filter, Topic, Event or Events</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row3006460414585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p1931383714585">Topic</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p2091699614585">URN of the event notification topic. After detecting a specific event, OBS sends a message to the topic.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p5403523614585">Type: String</p>
|
|
<p id="EN-US_TOPIC_0125560442__p1655507814585">Ancestor: TopicConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row1477798014585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p5616570814585">Id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p5312850914585">Unique ID of each event notification. If the user does not specify an ID, the system assigns an ID automatically.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p839453714585">Type: String</p>
|
|
<p id="EN-US_TOPIC_0125560442__p844197414585">Ancestor: TopicConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row886891014585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p4729309514585">Filter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p553548514585">Container of S3Key used to store rules of filtering object names</p>
|
|
<p id="EN-US_TOPIC_0125560442__p4981936614585">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560442__p4572111114585">Ancestor: TopicConfiguration</p>
|
|
<p id="EN-US_TOPIC_0125560442__p883681714585">Children: S3Key</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row1242249314585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p6669791314585">S3Key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p3382184014585">Container of S3Key used to store rules of filtering object names</p>
|
|
<p id="EN-US_TOPIC_0125560442__p3596111014585">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560442__p5521454014585">Ancestor: TopicConfiguration</p>
|
|
<p id="EN-US_TOPIC_0125560442__p2716882014585">Children: Name,Value</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row4319278914585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p895502614585">FilterRule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p5426852414585">Container that defines key-value pairs of filtering rules</p>
|
|
<p id="EN-US_TOPIC_0125560442__p1865467114585">Type: Container</p>
|
|
<p id="EN-US_TOPIC_0125560442__p3367431414585">Ancestor: S3Key</p>
|
|
<p id="EN-US_TOPIC_0125560442__p3463337414585">Children: Name, Value</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row4326491714585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p1479736414585">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p5773582414585">Specifies the prefix or suffix of object names for filtering The value contains a maximum of 1024 characters.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p4986036814585">Type: String</p>
|
|
<p id="EN-US_TOPIC_0125560442__p4609012814585">Ancestor: FilterRule</p>
|
|
<p id="EN-US_TOPIC_0125560442__p1215796914585">Legal value: prefix or suffix</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row4231286014585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p478966114585">Value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p5241829914585">Specifies keywords of object names so that objects can be filtered based on the prefixes or suffixes.</p>
|
|
<p id="EN-US_TOPIC_0125560442__p200264814585">Type: String</p>
|
|
<p id="EN-US_TOPIC_0125560442__p1802383714585">Ancestor: FilterRule</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560442__row2799681214585"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.9.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560442__p5314926314585">Event</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.9.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560442__p1012308414585">Type of events that need to be notified</p>
|
|
<div class="note" id="EN-US_TOPIC_0125560442__note2399889514585"><span class="notetitle"> NOTE: </span><div class="notebody"><p class="textintable" id="EN-US_TOPIC_0125560442__p1466346514585">Multiple event types can be added in one TopicConfiguration configuration item.</p>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0125560442__p6486232314585">Type: String</p>
|
|
<p id="EN-US_TOPIC_0125560442__p3999350814585">Ancestor: TopicConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section1824872214585"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560442__p175155314585">No special error responses are returned. For details about error responses, see <a href="en-us_topic_0125560440.html#EN-US_TOPIC_0125560440__table30733758">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section1353531615134"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560442__screen2261884615134">GET /?notification HTTP/1.1
|
|
User-Agent: curl/7.19.0 (x86_64-suse-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8{ zlib/1.2.3 libidn/1.10
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: Tue, 28 Apr 2015 09:11:35 +0000
|
|
Authorization: AWS D13E0C94E722DD69423C:FJt2xJ1gEnozLSdpRNTJUoy6344=</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560442__section224302915134"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560442__screen2175975315258">HTTP/1.1 200 OK
|
|
x-amz-id-2: YgIPIfBiKa2bj0KMgUAdQkf3ShJTOOpXUueF6QKo
|
|
x-amz-request-id: 236A8905248E5A02
|
|
Date: Wed, 15 Oct 2014 16:59:04 GMT
|
|
Server: AmazonS3
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<NotificationConfiguration xmlns="http://obs.huawie.com/doc/2015-06-30/">
|
|
<TopicConfiguration>
|
|
<Id>id001</Id>
|
|
<Topic>urn:smn:example:1236598854:topic1</Topic>
|
|
<Event>s3:ObjectCreated:*</Event>
|
|
</TopicConfiguration>
|
|
</NotificationConfiguration></pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560493.html">Operations on Buckets</a></div>
|
|
</div>
|
|
</div>
|
|
|