Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data GetBucketLifecycleConfiguration = GetBucketLifecycleConfiguration' {}
- newGetBucketLifecycleConfiguration :: BucketName -> GetBucketLifecycleConfiguration
- getBucketLifecycleConfiguration_expectedBucketOwner :: Lens' GetBucketLifecycleConfiguration (Maybe Text)
- getBucketLifecycleConfiguration_bucket :: Lens' GetBucketLifecycleConfiguration BucketName
- data GetBucketLifecycleConfigurationResponse = GetBucketLifecycleConfigurationResponse' {
- rules :: Maybe [LifecycleRule]
- httpStatus :: Int
- newGetBucketLifecycleConfigurationResponse :: Int -> GetBucketLifecycleConfigurationResponse
- getBucketLifecycleConfigurationResponse_rules :: Lens' GetBucketLifecycleConfigurationResponse (Maybe [LifecycleRule])
- getBucketLifecycleConfigurationResponse_httpStatus :: Lens' GetBucketLifecycleConfigurationResponse Int
Creating a Request
data GetBucketLifecycleConfiguration Source #
See: newGetBucketLifecycleConfiguration
smart constructor.
GetBucketLifecycleConfiguration' | |
|
Instances
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 will fail with an HTTP
403 (Access Denied)
error.
$sel:bucket: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 will fail with an HTTP
403 (Access Denied)
error.
getBucketLifecycleConfiguration_bucket :: Lens' GetBucketLifecycleConfiguration BucketName Source #
The name of the bucket for which to get the lifecycle information.
Destructuring the Response
data GetBucketLifecycleConfigurationResponse Source #
See: newGetBucketLifecycleConfigurationResponse
smart constructor.
GetBucketLifecycleConfigurationResponse' | |
|
Instances
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:
$sel:rules:GetBucketLifecycleConfigurationResponse'
, getBucketLifecycleConfigurationResponse_rules
- Container for a lifecycle rule.
$sel:httpStatus:GetBucketLifecycleConfigurationResponse'
, getBucketLifecycleConfigurationResponse_httpStatus
- The response's http status code.
Response Lenses
getBucketLifecycleConfigurationResponse_rules :: Lens' GetBucketLifecycleConfigurationResponse (Maybe [LifecycleRule]) Source #
Container for a lifecycle rule.
getBucketLifecycleConfigurationResponse_httpStatus :: Lens' GetBucketLifecycleConfigurationResponse Int Source #
The response's http status code.