• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. PUT Bucket Notification
  6. Examples

Examples

Sample Request

PUT /?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 
Pragma: no-cache 
Accept: */*Date: Tue, 28 Apr 2015 08:56:07 +0000 
Authorization:AWS D13E0C94E722DD69423C:QhHpU6Amg/2r6wIYdU3RXIx7Tlc=
Content-Length: 468 [request body]
Expect: 100-continue
<NotificationConfiguration>
 <TopicConfiguration>
  <Id>Id001</Id>
  <Topic>urn:smn:example:35667523564:topic001</Topic>
  <Event>s3:ObjectCreated:*</Event>
  <Filter>
   <S3Key>
    <FilterRule>
     <Name>prefix</Name>
     <Value>smn/</Value>
    </FilterRule>
    <FilterRule>
     <Name>suffix</Name>
     <Value>.jpg</Value>
    </FilterRule>
   </S3Key>
  </Filter>
 </TopicConfiguration> 
</NotificationConfiguration>

Sample Response

HTTP/1.1 200 OK 
x-amz-request-id: C2D2F581B3C5AF6C6698322AB56836F6 
x-amz-id-2: lDGZAj4h+A33eYauDCTsPvFSHzBXEtZon6Eg1idIZl18/2/odotyqJUJ/lTh80uA
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
Content-Type: text/xml 
Date: Tue, 28 Apr 2015 08:56:07 GMT 
Content-Length: 0