Package-level declarations

Types

Link copied to clipboard
interface S3Client : SdkClient

Properties

Link copied to clipboard
const val SdkVersion: String
Link copied to clipboard
Link copied to clipboard
const val ServiceId: String

Inherited functions

Link copied to clipboard

This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.

Link copied to clipboard

Completes a multipart upload by assembling previously uploaded parts.

Link copied to clipboard
inline suspend fun S3Client.copyObject(crossinline block: CopyObjectRequest.Builder.() -> Unit): CopyObjectResponse

Creates a copy of an object that is already stored in Amazon S3.

Link copied to clipboard
inline suspend fun S3Client.createBucket(crossinline block: CreateBucketRequest.Builder.() -> Unit): CreateBucketResponse

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see CreateBucket.

Link copied to clipboard

Creates an S3 Metadata V2 metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Link copied to clipboard

We recommend that you create your S3 Metadata configurations by using the V2 CreateBucketMetadataConfiguration API operation. We no longer recommend using the V1 CreateBucketMetadataTableConfiguration API operation.

Link copied to clipboard

End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an HTTP 405 (Method Not Allowed) error.

Link copied to clipboard
inline suspend fun S3Client.createSession(crossinline block: CreateSessionRequest.Builder.() -> Unit): CreateSessionResponse

Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets. For more information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone APIs in the Amazon S3 User Guide.

Link copied to clipboard
inline suspend fun S3Client.deleteBucket(crossinline block: DeleteBucketRequest.Builder.() -> Unit): DeleteBucketResponse

Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This implementation of the DELETE action resets the default encryption for the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3).

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

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.

Link copied to clipboard

Deletes an S3 Metadata configuration from a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Link copied to clipboard

We recommend that you delete your S3 Metadata configurations by using the V2 DeleteBucketMetadataTableConfiguration API operation. We no longer recommend using the V1 DeleteBucketMetadataTableConfiguration API operation.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

Deletes the policy of a specified bucket.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.deleteObject(crossinline block: DeleteObjectRequest.Builder.() -> Unit): DeleteObjectResponse

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

Link copied to clipboard
inline suspend fun S3Client.deleteObjects(crossinline block: DeleteObjectsRequest.Builder.() -> Unit): DeleteObjectsResponse

This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.getBucketAbac(crossinline block: GetBucketAbacRequest.Builder.() -> Unit): GetBucketAbacResponse

Returns the attribute-based access control (ABAC) property of the general purpose bucket. If ABAC is enabled on your bucket, you can use tags on the bucket for access control. For more information, see Enabling ABAC in general purpose buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.getBucketAcl(crossinline block: GetBucketAclRequest.Builder.() -> Unit): GetBucketAclResponse

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.getBucketCors(crossinline block: GetBucketCorsRequest.Builder.() -> Unit): GetBucketCorsResponse

This operation is not supported for directory buckets.

Link copied to clipboard

Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets have a default encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). This operation also returns the BucketKeyEnabled and BlockedEncryptionTypes statuses.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

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

Link copied to clipboard

Using the GetBucketLocation operation is no longer a best practice. To return the Region that a bucket resides in, we recommend that you use the HeadBucket operation instead. For backward compatibility, Amazon S3 continues to support the GetBucketLocation operation.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

Retrieves the S3 Metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Link copied to clipboard

We recommend that you retrieve your S3 Metadata configurations by using the V2 GetBucketMetadataTableConfiguration API operation. We no longer recommend using the V1 GetBucketMetadataTableConfiguration API operation.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

Returns the policy of a specified bucket.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.getObjectAcl(crossinline block: GetObjectAclRequest.Builder.() -> Unit): GetObjectAclResponse

This operation is not supported for directory buckets.

Link copied to clipboard

Retrieves all of the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.headBucket(crossinline block: HeadBucketRequest.Builder.() -> Unit): HeadBucketResponse

You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a 200 OK HTTP status code if the bucket exists and you have permission to access it. You can make a HeadBucket call on any bucket name to any Region in the partition, and regardless of the permissions on the bucket, you will receive a response header with the correct bucket location so that you can then make a proper, signed request to the appropriate Regional endpoint.

Link copied to clipboard
inline suspend fun S3Client.headObject(crossinline block: HeadObjectRequest.Builder.() -> Unit): HeadObjectResponse

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.listBuckets(crossinline block: ListBucketsRequest.Builder.() -> Unit): ListBucketsResponse

This operation is not supported for directory buckets.

Link copied to clipboard

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

Link copied to clipboard

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a multipart upload that has been initiated by the CreateMultipartUpload request, but has not yet been completed or aborted.

Link copied to clipboard
inline suspend fun S3Client.listObjects(crossinline block: ListObjectsRequest.Builder.() -> Unit): ListObjectsResponse

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.listObjectsV2(crossinline block: ListObjectsV2Request.Builder.() -> Unit): ListObjectsV2Response

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. For more information about listing objects, see Listing object keys programmatically in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.listParts(crossinline block: ListPartsRequest.Builder.() -> Unit): ListPartsResponse

Lists the parts that have been uploaded for a specific multipart upload.

Link copied to clipboard
inline suspend fun S3Client.putBucketAbac(crossinline block: PutBucketAbacRequest.Builder.() -> Unit): PutBucketAbacResponse

Sets the attribute-based access control (ABAC) property of the general purpose bucket. You must have s3:PutBucketABAC permission to perform this action. When you enable ABAC, you can use tags for access control on your buckets. Additionally, when ABAC is enabled, you must use the TagResource and UntagResource actions to manage tags on your buckets. You can nolonger use the PutBucketTagging and DeleteBucketTagging actions to tag your bucket. For more information, see Enabling ABAC in general purpose buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.putBucketAcl(crossinline block: PutBucketAclRequest.Builder.() -> Unit): PutBucketAclResponse

End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an HTTP 405 (Method Not Allowed) error.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.putBucketCors(crossinline block: PutBucketCorsRequest.Builder.() -> Unit): PutBucketCorsResponse

This operation is not supported for directory buckets.

Link copied to clipboard

This operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket. You can also block encryption types using this operation.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

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 retain any configuration details, they must be included in the new lifecycle configuration. For information about lifecycle configuration, see Managing your storage lifecycle.

Link copied to clipboard

End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an HTTP 405 (Method Not Allowed) error.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.putObject(crossinline block: PutObjectRequest.Builder.() -> Unit): PutObjectResponse

End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an HTTP 405 (Method Not Allowed) error.

Link copied to clipboard
inline suspend fun S3Client.putObjectAcl(crossinline block: PutObjectAclRequest.Builder.() -> Unit): PutObjectAclResponse

End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an HTTP 405 (Method Not Allowed) error.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard

This operation is not supported for directory buckets.

Link copied to clipboard
inline suspend fun S3Client.renameObject(crossinline block: RenameObjectRequest.Builder.() -> Unit): RenameObjectResponse

Renames an existing object in a directory bucket that uses the S3 Express One Zone storage class. You can use RenameObject by specifying an existing object’s name as the source and the new name of the object as the destination within the same directory bucket.

Link copied to clipboard
inline suspend fun S3Client.restoreObject(crossinline block: RestoreObjectRequest.Builder.() -> Unit): RestoreObjectResponse

This operation is not supported for directory buckets.

Enables or disables a live inventory table for an S3 Metadata configuration on a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Enables or disables journal table record expiration for an S3 Metadata configuration on a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Link copied to clipboard
inline suspend fun S3Client.uploadPart(crossinline block: UploadPartRequest.Builder.() -> Unit): UploadPartResponse

Uploads a part in a multipart upload.

Link copied to clipboard

Uploads a part by copying data from an existing object as data source. To specify the data source, you add the request header x-amz-copy-source in your request. To specify a byte range, you add the request header x-amz-copy-source-range in your request.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.

Link copied to clipboard

This operation is not supported for directory buckets.