2.15.8. 管理通知配置
您可以使用命令行界面列出、获取和删除存储桶的通知配置。
先决条件
- 一个正在运行的 Red Hat Ceph Storage 集群。
- 配置了 Ceph 对象网关。
流程
列出所有存储桶通知配置:
语法
radosgw-admin notification list --bucket=BUCKET_NAMEExample
[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": {} } } ] }获取存储桶通知配置:
语法
radosgw-admin notification get --bucket BUCKET_NAME --notification-id NOTIFICATION_IDExample
[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": {} } }删除特定的存储桶通知配置:
语法
radosgw-admin notification rm --bucket BUCKET_NAME [--notification-id NOTIFICATION_ID]此处,NOTIFICATION_ID 是可选的。如果没有指定,命令会删除该存储桶的所有通知配置。
Example
[root@host04 ~]# radosgw-admin notification rm --bucket bkt2 --notification-id notif1