Difference between revisions of "Aws s3api put-bucket-notification-configuration"
Jump to navigation
Jump to search
↑ https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
− | *https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-bucket-notification-configuration.html | + | * https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-bucket-notification-configuration.html |
+ | aws s3api put-bucket-notification-configuration \ | ||
+ | --bucket my-bucket \ | ||
+ | [[--notification-configuration]] file://notification.json | ||
+ | == JSON official example == | ||
+ | <pre> | ||
+ | |||
+ | { | ||
+ | "TopicConfigurations": [ | ||
+ | { | ||
+ | "Id": "string", | ||
+ | "TopicArn": "string", | ||
+ | "Events": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], | ||
+ | "Filter": { | ||
+ | "Key": { | ||
+ | "FilterRules": [ | ||
+ | { | ||
+ | "Name": "prefix"|"suffix", | ||
+ | "Value": "[[string]]" | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "QueueConfigurations": [ | ||
+ | { | ||
+ | "Id": "string", | ||
+ | "QueueArn": "string", | ||
+ | "[[Events]]": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], | ||
+ | "Filter": { | ||
+ | "[[Key]]": { | ||
+ | "[[FilterRules]]": [ | ||
+ | { | ||
+ | "Name": "prefix"|"suffix", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "LambdaFunctionConfigurations": [ | ||
+ | { | ||
+ | "Id": "string", | ||
+ | "LambdaFunctionArn": "string", | ||
+ | "Events": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], | ||
+ | "Filter": { | ||
+ | "Key": { | ||
+ | "FilterRules": [ | ||
+ | { | ||
+ | "Name": "prefix"|"suffix", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "EventBridgeConfiguration": { | ||
+ | |||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | == Related == | ||
+ | * Terraform resource: <code>[[aws_s3_bucket_notification]]</code> | ||
+ | * <code>[[aws sns create-topic]]</code> | ||
+ | * [[Terraform resource: aws s3 bucket notification]] | ||
+ | * [[Invalid JSON: Expecting property name enclosed in double quotes]] | ||
== See also == | == See also == | ||
+ | * {{s3:}} | ||
* {{aws s3api put-bucket-notification-configuration}} | * {{aws s3api put-bucket-notification-configuration}} | ||
* {{aws s3api}} | * {{aws s3api}} | ||
+ | |||
+ | [[Category:AWS]] |
Latest revision as of 06:23, 20 June 2024
aws s3api put-bucket-notification-configuration \ --bucket my-bucket \ --notification-configuration file://notification.json
JSON official example[edit]
{ "TopicConfigurations": [ { "Id": "string", "TopicArn": "string", "Events": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], "Filter": { "Key": { "FilterRules": [ { "Name": "prefix"|"suffix", "Value": "[[string]]" } ... ] } } } ... ], "QueueConfigurations": [ { "Id": "string", "QueueArn": "string", "[[Events]]": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], "Filter": { "[[Key]]": { "[[FilterRules]]": [ { "Name": "prefix"|"suffix", "Value": "string" } ... ] } } } ... ], "LambdaFunctionConfigurations": [ { "Id": "string", "LambdaFunctionArn": "string", "Events": ["s3:ReducedRedundancyLostObject"|"s3:ObjectCreated:*"|"s3:ObjectCreated:Put"|"s3:ObjectCreated:Post"|"s3:ObjectCreated:Copy"|"s3:ObjectCreated:CompleteMultipartUpload"|"s3:ObjectRemoved:*"|"s3:ObjectRemoved:Delete"|"s3:ObjectRemoved:DeleteMarkerCreated"|"s3:ObjectRestore:*"|"s3:ObjectRestore:Post"|"s3:ObjectRestore:Completed"|"s3:Replication:*"|"s3:Replication:OperationFailedReplication"|"s3:Replication:OperationNotTracked"|"s3:Replication:OperationMissedThreshold"|"s3:Replication:OperationReplicatedAfterThreshold"|"s3:ObjectRestore:Delete"|"s3:LifecycleTransition"|"s3:IntelligentTiering"|"s3:ObjectAcl:Put"|"s3:LifecycleExpiration:*"|"s3:LifecycleExpiration:Delete"|"s3:LifecycleExpiration:DeleteMarkerCreated"|"s3:ObjectTagging:*"|"s3:ObjectTagging:Put"|"s3:ObjectTagging:Delete", ...], "Filter": { "Key": { "FilterRules": [ { "Name": "prefix"|"suffix", "Value": "string" } ... ] } } } ... ], "EventBridgeConfiguration": { } }
Related[edit]
- Terraform resource:
aws_s3_bucket_notification
aws sns create-topic
- Terraform resource: aws s3 bucket notification
- Invalid JSON: Expecting property name enclosed in double quotes
See also[edit]
s3:, s3:ListBucket, s3:ListAllMyBuckets, s3:PutObject, s3:PutObjectAcl, s3:GetObject, s3:GetObjectAcl [1], s3:GetBucketPolicy, s3:PutBucketPolicy, s3:DeleteObject, s3:ReplicateObject, s3:ReplicateDelete, s3:ReplicateTags
- aws s3api put-bucket-notification-configuration
- AWS S3:
s3api
|list-buckets
|get-bucket-website
|get-bucket-policy
|create-bucket
|put-bucket-encryption
|aws s3api put-bucket-policy
|get-bucket-acl
|get-bucket-versioning
|get-bucket-location
|put-bucket-versioning | get-bucket-tagging | head-bucket | put-object-lock-configuration
Advertising: