Difference between revisions of "Aws s3api put-bucket-notification-configuration"

From wikieduonline
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
  aws s3api put-bucket-notification-configuration \
 
  aws s3api put-bucket-notification-configuration \
 
     --bucket my-bucket \
 
     --bucket my-bucket \
     --notification-configuration file://notification.json
+
     [[--notification-configuration]] file://notification.json
  
* <code>[[aws_s3_bucket_notification]]</code>
+
== 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 ==
Line 13: Line 84:
 
* {{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]

See also[edit]

  • https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
  • Advertising: