amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.GetBucketNotificationConfiguration

Description

Returns the notification configuration of a bucket.

If notifications are not enabled on the bucket, the action returns an empty NotificationConfiguration element.

By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the s3:GetBucketNotification permission.

For more information about setting and reading the notification configuration on a bucket, see Setting Up Notification of Bucket Events. For more information about bucket policies, see Using Bucket Policies.

The following action is related to GetBucketNotification:

Synopsis

Creating a Request

data GetBucketNotificationConfiguration Source #

Constructors

GetBucketNotificationConfiguration' 

Fields

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • bucket :: BucketName

    The name of the bucket for which to get the notification configuration.

Instances

Instances details
ToHeaders GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

ToPath GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

ToQuery GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

AWSRequest GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

Generic GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

Associated Types

type Rep GetBucketNotificationConfiguration :: Type -> Type #

Read GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

Show GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

NFData GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

Eq GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

Hashable GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

type AWSResponse GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

type Rep GetBucketNotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketNotificationConfiguration

type Rep GetBucketNotificationConfiguration = D1 ('MetaData "GetBucketNotificationConfiguration" "Amazonka.S3.GetBucketNotificationConfiguration" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetBucketNotificationConfiguration'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))

newGetBucketNotificationConfiguration Source #

Create a value of GetBucketNotificationConfiguration with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:expectedBucketOwner:GetBucketNotificationConfiguration', getBucketNotificationConfiguration_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

GetBucketNotificationConfiguration, getBucketNotificationConfiguration_bucket - The name of the bucket for which to get the notification configuration.

Request Lenses

getBucketNotificationConfiguration_expectedBucketOwner :: Lens' GetBucketNotificationConfiguration (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

getBucketNotificationConfiguration_bucket :: Lens' GetBucketNotificationConfiguration BucketName Source #

The name of the bucket for which to get the notification configuration.

Destructuring the Response

data NotificationConfiguration Source #

A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket.

See: newNotificationConfiguration smart constructor.

Constructors

NotificationConfiguration' 

Fields

Instances

Instances details
FromXML NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

ToXML NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

Generic NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

Associated Types

type Rep NotificationConfiguration :: Type -> Type #

Read NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

Show NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

NFData NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

Eq NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

Hashable NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

type Rep NotificationConfiguration Source # 
Instance details

Defined in Amazonka.S3.Types.NotificationConfiguration

type Rep NotificationConfiguration = D1 ('MetaData "NotificationConfiguration" "Amazonka.S3.Types.NotificationConfiguration" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "NotificationConfiguration'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "eventBridgeConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EventBridgeConfiguration)) :*: S1 ('MetaSel ('Just "lambdaFunctionConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [LambdaFunctionConfiguration]))) :*: (S1 ('MetaSel ('Just "queueConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [QueueConfiguration])) :*: S1 ('MetaSel ('Just "topicConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TopicConfiguration])))))

newNotificationConfiguration :: NotificationConfiguration Source #

Create a value of NotificationConfiguration with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:eventBridgeConfiguration:NotificationConfiguration', notificationConfiguration_eventBridgeConfiguration - Enables delivery of events to Amazon EventBridge.

$sel:lambdaFunctionConfigurations:NotificationConfiguration', notificationConfiguration_lambdaFunctionConfigurations - Describes the Lambda functions to invoke and the events for which to invoke them.

$sel:queueConfigurations:NotificationConfiguration', notificationConfiguration_queueConfigurations - The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.

$sel:topicConfigurations:NotificationConfiguration', notificationConfiguration_topicConfigurations - The topic to which notifications are sent and the events for which notifications are generated.

Response Lenses

notificationConfiguration_lambdaFunctionConfigurations :: Lens' NotificationConfiguration (Maybe [LambdaFunctionConfiguration]) Source #

Describes the Lambda functions to invoke and the events for which to invoke them.

notificationConfiguration_queueConfigurations :: Lens' NotificationConfiguration (Maybe [QueueConfiguration]) Source #

The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.

notificationConfiguration_topicConfigurations :: Lens' NotificationConfiguration (Maybe [TopicConfiguration]) Source #

The topic to which notifications are sent and the events for which notifications are generated.