openapi: 3.1.0 info: title: Amazon S3 Lifecycle (bucket-level) description: '3 operations from the Amazon S3 REST API, generated from the authoritative service model. S3 identifies these operations by the `lifecycle` query subresource, which is declared as a required query parameter on each one because an OpenAPI path cannot carry a query string. 2 further operation(s) share a method, path and subresource with one described here and are recorded in `x-s3-sibling-operations`: S3 separates them by a request header or an id parameter, which OpenAPI cannot express. Generated from boto/botocore `service-2.json` at `aeb03fc4ae530e0b3f47d588b6021581db870c8c` (Apache-2.0). Responses are XML.' version: '2006-03-01' contact: name: AWS Support url: https://aws.amazon.com/premiumsupport/ externalDocs: description: Amazon S3 API Reference url: https://docs.aws.amazon.com/AmazonS3/latest/API/ servers: - url: https://s3.{region}.amazonaws.com variables: region: default: us-east-1 tags: - name: lifecycle paths: /{Bucket}: delete: operationId: DeleteBucketLifecycle summary: Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules i description: Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration. Permissions General purpose bucket permissions - By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the Amazon Web Services account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must have the s3:PutLifecycleConfiguration permission. For more information about permissions, see Managing Access Permissions to Your Amazon S3 Resources. Directory bucket permissions - You must have the s3express:PutLifecycleConfiguration permission in an IAM identity-based policy to use this operation. Cross-account access to this API operation isn't supported. The resource owner can optionally grant access per tags: - lifecycle parameters: - name: lifecycle in: query required: true description: Selects this operation. S3 identifies it by the `lifecycle` subresource. schema: type: string - name: Bucket in: path required: true description: The bucket name of the lifecycle to delete. schema: type: string - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. get: operationId: GetBucketLifecycle summary: 'For an updated version of this API, see GetBucketLifecycleConfiguration. If you configured a bucket lifecycle using the ' description: 'For an updated version of this API, see GetBucketLifecycleConfiguration. If you configured a bucket lifecycle using the filter element, you should see the updated version of this topic. This topic is provided for backward compatibility. This operation is not supported for directory buckets. 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. GetBucketLifecycle 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 GetBucketLifecycle: GetBucketLifecycleConfiguration PutBucketLifecycle DeleteBucketLifecycle You must URL encode any signed header values that cont' tags: - lifecycle parameters: - name: lifecycle in: query required: true description: Selects this operation. S3 identifies it by the `lifecycle` subresource. schema: type: string - name: Bucket in: path required: true description: The name of the bucket for which to get the lifecycle information. schema: type: string - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. x-output-shape: GetBucketLifecycleOutput '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. put: operationId: PutBucketLifecycle summary: This operation is not supported for directory buckets. For an updated version of this API, see PutBucketLifecycleConfigu description: This operation is not supported for directory buckets. For an updated version of this API, see PutBucketLifecycleConfiguration. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API. This operation is not supported for directory buckets. Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Object Lifecycle Management in the Amazon S3 User Guide. By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the Amazon Web Services account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the s3:PutLifecycleConfiguration permission. You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the tags: - lifecycle parameters: - name: lifecycle in: query required: true description: Selects this operation. S3 identifies it by the `lifecycle` subresource. schema: type: string - name: Bucket in: path required: true schema: type: string - name: Content-MD5 in: header required: false description: For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically. schema: type: string - name: x-amz-sdk-checksum-algorithm in: header required: false description: Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, schema: type: string enum: - CRC32 - CRC32C - SHA1 - SHA256 - CRC64NVME - SHA512 - MD5 - XXHASH64 - XXHASH3 - XXHASH128 - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. x-s3-sibling-operations: - operation: GetBucketLifecycleConfiguration shadows: GetBucketLifecycle summary: Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management. Bucket lifecycle configuration now supports specifyin why: Same method, path and query subresource as the operation above. S3 separates them by a request header or by the presence of an id parameter, neither of which an OpenAPI path can express. - operation: PutBucketLifecycleConfiguration shadows: PutBucketLifecycle summary: Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if you want to retai why: Same method, path and query subresource as the operation above. S3 separates them by a request header or by the presence of an id parameter, neither of which an OpenAPI path can express.