PUT Bucket metadata notification configuration request

The PUT Bucket metadata notification configuration request allows you to enable the search integration service for individual buckets. The metadata notification configuration XML that you supply in the request body specifies the objects whose metadata is sent to the destination search index.

Attention: StorageGRID Webscale 11.0 includes the initial release of platform services. CloudMirror replication, notifications, and search integration are currently appropriate only for specific situations and workloads. You must contact your NetApp representative if you want to use the initial release of these services.

You must have the s3:PutBucketMetadataNotification permission for a bucket to enable or disable the metadata notification configuration for the bucket.

Request

Request HTTP Header Description
Authorization Specifies the AWS signature and the access key ID for the account to use for the request.
Date The date and time of the request.
Host The host name to which the request is directed.

The request must include the metadata notification configuration in the request body. Each metadata notification configuration includes one or more rules. Each rule specifies the objects that it applies to, and the destination where StorageGRID Webscale should send object metadata.

Objects can be filtered on the prefix of the object name. For example, you could send metadata for objects with the prefix "/images" to one destination, and objects with the prefix "/videos" to another.

Configurations that have overlapping prefixes are not valid, and are rejected when they are submitted. For example, a configuration that included one rule for for objects with the prefix "test" and a second rule for objects with the prefix "test2" would not be allowed.

Destinations must be specified using the URN of a StorageGRID Webscale endpoint. The endpoint must exist when the metadata notification configuration is submitted, or the request fails with a 404 Not Found message and the NoSuchEndpoint error code.

See the Tenant Administrator Guide for more information on configuring endpoints and on the search integration service.

<MetadataNotificationConfiguration>
    <Rule>
        <ID>Rule-1</ID>
        <Status>rule-status</Status>
        <Prefix>key-prefix</Prefix>
        <Destination>
           <Urn>arn:aws:es:region:account-ID:domain/mydomain/myindex/mytype</Urn>
        </Destination>
    </Rule>
    <Rule>
        <ID>Rule-2</ID>
         ...
    </Rule>
     ...
</MetadataNotificationConfiguration>

The table describes the elements in the metadata notification configuration XML.

Name Description Required
MetadataNotificationConfiguration

Container tag for rules used to specify the objects and destination for metadata notifications.

Contains one or more Rule elements.

Yes
Rule

Container tag for a rule that identifies the objects whose metadata should be added to a specified index.

Rules with overlapping prefixes are rejected.

Included in the MetadataNotificationConfiguration element.

Yes
ID

Unique identifier for the rule.

Included in the Rule element.

No
Status

Status can be 'Enabled' or 'Disabled'. No action is taken for rules that are disabled.

Included in the Rule element.

Yes
Prefix

Objects that match the prefix are affected by the rule, and their metadata is sent to the specified destination.

To match all objects, specify an empty prefix.

Included in the Rule element.

Yes
Destination

Container tag for the destination of a rule.

Included in the Rule element.

Yes
Urn
URN of the destination where object metadata is sent. Must be the URN of a StorageGRID Webscale endpoint with the following properties:
  • "es" must be the third element.
  • The URN must end with the index and type where the metadata is stored, in the form "domain-name/myindex/mytype".
Endpoints are configured using the Tenant Management Interface or Tenant Management API. They take the following form:
  • arn:aws:es:region:account-ID:domain/mydomain/myindex/mytype
  • urn:mysite:es:::mydomain/myindex/mytype

The endpoint must be configured before the configuration XML is submitted, or configuration will fail with a 404 error.

Urn is included in the Destination element.

Yes

Request examples

Enabling search integration for a bucket

In this example, object metadata for all objects is sent to the same destination.

PUT /test1?x-ntap-sg-metadata-notification HTTP/1.1
Host: example.com
Date: Thu, 20 Jul 2017 18:21:34 +0000
Authorization: AWS QYUTN90RX0RXO70QEGU8:y50RN9wUAYL5BnK+eFci4fz0D7U=
 
<MetadataNotificationConfiguration>
    <Rule>
        <ID>Rule-1</ID>
        <Status>Enabled</Status>
        <Prefix></Prefix>
        <Destination>
           <Urn>urn:sgws:es:::sgws-notifications/test1/all</Urn>
        </Destination>
    </Rule>
</MetadataNotificationConfiguration>

In this example, object metadata for objects that match the prefix /images is sent to one destination, while object metadata for objects that match the prefix /videos is sent to a second destination.

PUT /graphics?x-ntap-sg-metadata-notification HTTP/1.1
Host: example.com
Date: Thu, 20 Jul 2017 18:21:34 +0000
Authorization: AWS QYUTN90RX0RXO70QEGU8:y50RN9wUAYL5BnK+eFci4fz0D7U=
 
<MetadataNotificationConfiguration>
    <Rule>
        <ID>Images-rule</ID>
        <Status>Enabled</Status>
        <Prefix>/images</Prefix>
        <Destination>
           <Urn>arn:aws:es:us-east-1:3333333:domain/es-domain/graphics/imagetype</Urn>
        </Destination>
    </Rule>
    <Rule>
        <ID>Videos-rule</ID>
        <Status>Enabled</Status>
        <Prefix>/videos</Prefix>
        <Destination>
           <Urn>arn:aws:es:us-west-1:22222222:domain/es-domain/graphics/videotype</Urn>
        </Destination>
    </Rule>
</MetadataNotificationConfiguration>