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.GetBucketLifecycleConfiguration

Description

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The response describes the new filter element that you can use to specify a filter to select a subset of objects to which the rule applies. If you are using a previous version of the lifecycle configuration, it still works. For the earlier action, see GetBucketLifecycle.

Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.

To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration action. The bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

GetBucketLifecycleConfiguration has the following special error:

  • Error code: NoSuchLifecycleConfiguration

    • Description: The lifecycle configuration does not exist.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client

The following operations are related to GetBucketLifecycleConfiguration:

Synopsis

Creating a Request

data GetBucketLifecycleConfiguration Source #

See: newGetBucketLifecycleConfiguration smart constructor.

Constructors

GetBucketLifecycleConfiguration' 

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 lifecycle information.

Instances

Instances details
ToHeaders GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

ToPath GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

ToQuery GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

AWSRequest GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Generic GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Associated Types

type Rep GetBucketLifecycleConfiguration :: Type -> Type #

Read GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Show GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

NFData GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Eq GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Hashable GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

type AWSResponse GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

type Rep GetBucketLifecycleConfiguration Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

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

newGetBucketLifecycleConfiguration Source #

Create a value of GetBucketLifecycleConfiguration 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:GetBucketLifecycleConfiguration', getBucketLifecycleConfiguration_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).

GetBucketLifecycleConfiguration, getBucketLifecycleConfiguration_bucket - The name of the bucket for which to get the lifecycle information.

Request Lenses

getBucketLifecycleConfiguration_expectedBucketOwner :: Lens' GetBucketLifecycleConfiguration (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).

getBucketLifecycleConfiguration_bucket :: Lens' GetBucketLifecycleConfiguration BucketName Source #

The name of the bucket for which to get the lifecycle information.

Destructuring the Response

data GetBucketLifecycleConfigurationResponse Source #

Constructors

GetBucketLifecycleConfigurationResponse' 

Fields

Instances

Instances details
Generic GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Read GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Show GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

NFData GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

Eq GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

type Rep GetBucketLifecycleConfigurationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLifecycleConfiguration

type Rep GetBucketLifecycleConfigurationResponse = D1 ('MetaData "GetBucketLifecycleConfigurationResponse" "Amazonka.S3.GetBucketLifecycleConfiguration" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetBucketLifecycleConfigurationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "rules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [LifecycleRule])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newGetBucketLifecycleConfigurationResponse Source #

Create a value of GetBucketLifecycleConfigurationResponse 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:

GetBucketLifecycleConfigurationResponse, getBucketLifecycleConfigurationResponse_rules - Container for a lifecycle rule.

$sel:httpStatus:GetBucketLifecycleConfigurationResponse', getBucketLifecycleConfigurationResponse_httpStatus - The response's http status code.

Response Lenses