Amazon Simple Storage Service

2015/08/20 - Amazon Simple Storage Service - 2 updated api methods

GetBucketNotificationConfiguration (updated) Link ¶
Changes (response)
{'LambdaFunctionConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix '
                                                                              '| '
                                                                              'suffix',
                                                                      'Value': 'string'}]}}},
 'QueueConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix | '
                                                                     'suffix',
                                                             'Value': 'string'}]}}},
 'TopicConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix | '
                                                                     'suffix',
                                                             'Value': 'string'}]}}}}

Returns the notification configuration of a bucket.

Request Syntax

client.get_bucket_notification_configuration(
    Bucket='string'
)
type Bucket

string

param Bucket

[REQUIRED] Name of the buket to get the notification configuration for.

rtype

dict

returns

Response Syntax

{
    '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',
            ],
            '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',
            ],
            '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',
            ],
            'Filter': {
                'Key': {
                    'FilterRules': [
                        {
                            'Name': 'prefix'|'suffix',
                            'Value': 'string'
                        },
                    ]
                }
            }
        },
    ]
}

Response Structure

  • (dict) -- Container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off on the bucket.

    • TopicConfigurations (list) --

      • (dict) -- Container for specifying the configuration when you want Amazon S3 to publish events to an Amazon Simple Notification Service (Amazon SNS) topic.

        • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

        • TopicArn (string) -- Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects events of specified type.

        • Events (list) --

          • (string) -- Bucket event for which to send notifications.

        • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

          • Key (dict) -- Container for object key name prefix and suffix filtering rules.

            • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

              • (dict) -- Container for key value pair that defines the criteria for the filter rule.

                • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

                • Value (string) --

    • QueueConfigurations (list) --

      • (dict) -- Container for specifying an configuration when you want Amazon S3 to publish events to an Amazon Simple Queue Service (Amazon SQS) queue.

        • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

        • QueueArn (string) -- Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects events of specified type.

        • Events (list) --

          • (string) -- Bucket event for which to send notifications.

        • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

          • Key (dict) -- Container for object key name prefix and suffix filtering rules.

            • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

              • (dict) -- Container for key value pair that defines the criteria for the filter rule.

                • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

                • Value (string) --

    • LambdaFunctionConfigurations (list) --

      • (dict) -- Container for specifying the AWS Lambda notification configuration.

        • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

        • LambdaFunctionArn (string) -- Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.

        • Events (list) --

          • (string) -- Bucket event for which to send notifications.

        • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

          • Key (dict) -- Container for object key name prefix and suffix filtering rules.

            • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

              • (dict) -- Container for key value pair that defines the criteria for the filter rule.

                • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

                • Value (string) --

PutBucketNotificationConfiguration (updated) Link ¶
Changes (request)
{'NotificationConfiguration': {'LambdaFunctionConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix '
                                                                                                            '| '
                                                                                                            'suffix',
                                                                                                    'Value': 'string'}]}}},
                               'QueueConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix '
                                                                                                   '| '
                                                                                                   'suffix',
                                                                                           'Value': 'string'}]}}},
                               'TopicConfigurations': {'Filter': {'Key': {'FilterRules': [{'Name': 'prefix '
                                                                                                   '| '
                                                                                                   'suffix',
                                                                                           'Value': 'string'}]}}}}}

Enables notifications of specified events for a bucket.

Request Syntax

client.put_bucket_notification_configuration(
    Bucket='string',
    NotificationConfiguration={
        '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',
                ],
                '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',
                ],
                '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',
                ],
                'Filter': {
                    'Key': {
                        'FilterRules': [
                            {
                                'Name': 'prefix'|'suffix',
                                'Value': 'string'
                            },
                        ]
                    }
                }
            },
        ]
    }
)
type Bucket

string

param Bucket

[REQUIRED]

type NotificationConfiguration

dict

param NotificationConfiguration

[REQUIRED] Container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off on the bucket.

  • TopicConfigurations (list) --

    • (dict) -- Container for specifying the configuration when you want Amazon S3 to publish events to an Amazon Simple Notification Service (Amazon SNS) topic.

      • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

      • TopicArn (string) -- [REQUIRED] Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects events of specified type.

      • Events (list) -- [REQUIRED]

        • (string) -- Bucket event for which to send notifications.

      • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

        • Key (dict) -- Container for object key name prefix and suffix filtering rules.

          • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

            • (dict) -- Container for key value pair that defines the criteria for the filter rule.

              • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

              • Value (string) --

  • QueueConfigurations (list) --

    • (dict) -- Container for specifying an configuration when you want Amazon S3 to publish events to an Amazon Simple Queue Service (Amazon SQS) queue.

      • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

      • QueueArn (string) -- [REQUIRED] Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects events of specified type.

      • Events (list) -- [REQUIRED]

        • (string) -- Bucket event for which to send notifications.

      • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

        • Key (dict) -- Container for object key name prefix and suffix filtering rules.

          • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

            • (dict) -- Container for key value pair that defines the criteria for the filter rule.

              • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

              • Value (string) --

  • LambdaFunctionConfigurations (list) --

    • (dict) -- Container for specifying the AWS Lambda notification configuration.

      • Id (string) -- Optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.

      • LambdaFunctionArn (string) -- [REQUIRED] Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.

      • Events (list) -- [REQUIRED]

        • (string) -- Bucket event for which to send notifications.

      • Filter (dict) -- Container for object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

        • Key (dict) -- Container for object key name prefix and suffix filtering rules.

          • FilterRules (list) -- A list of containers for key value pair that defines the criteria for the filter rule.

            • (dict) -- Container for key value pair that defines the criteria for the filter rule.

              • Name (string) -- Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

              • Value (string) --

returns

None