Manage notification configuration of buckets with the command-line interface.
Before you begin
Before you begin, make sure that you have the following prerequisites in place:
- An IBM Storage Ceph cluster.
- A Ceph Object Gateway installed.
About this task
You can list, get, and remove a bucket notification configuration with the radosgw-admin command.
Procedure
-
List all the bucket notification configuration.
radosgw-admin notification list --bucket=BUCKET_NAME
For example,
[root@host04 ~]# radosgw-admin notification list --bucket bkt2
{
"notifications": [
{
"TopicArn": "arn:aws:sns:default::topic1",
"Id": "notif1",
"Events": [
"s3:ObjectCreated:*",
"s3:ObjectRemoved:*"
],
"Filter": {
"S3Key": {},
"S3Metadata": {},
"S3Tags": {}
}
},
{
"TopicArn": "arn:aws:sns:default::topic1",
"Id": "notif2",
"Events": [
"s3:ObjectSynced:*"
],
"Filter": {
"S3Key": {},
"S3Metadata": {},
"S3Tags": {}
}
}
]
}
-
Get the bucket notification configuration.
radosgw-admin notification get --bucket BUCKET_NAME --notification-id NOTIFICATION_ID
For example,
[root@host04 ~]# radosgw-admin notification get --bucket bkt2 --notification-id notif2
{
"TopicArn": "arn:aws:sns:default::topic1",
"Id": "notif2",
"Events": [
"s3:ObjectSynced:*"
],
"Filter": {
"S3Key": {},
"S3Metadata": {},
"S3Tags": {}
}
}
-
Remove a specific bucket notification configuration.
radosgw-admin notification rm --bucket BUCKET_NAME [--notification-id NOTIFICATION_ID]
Here,
NOTIFICATION_ID is optional. If it is not specified, the command removes all the notification configurations of that bucket.
For example,
[root@host04 ~]# radosgw-admin notification rm --bucket bkt2 --notification-id notif1