Skip to content

S3Client

Index > S3 > S3Client

Auto-generated documentation for S3 type annotations stubs module mypy-boto3-s3.

S3Client

Type annotations and code completion for boto3.client("s3"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_s3.client import S3Client

def get_s3_client() -> S3Client:
    return Session().client("s3")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("s3").exceptions structure.

Usage example
client = boto3.client("s3")

try:
    do_something(client)
except (
    client.BucketAlreadyExists,
    client.BucketAlreadyOwnedByYou,
    client.ClientError,
    client.InvalidObjectState,
    client.NoSuchBucket,
    client.NoSuchKey,
    client.NoSuchUpload,
    client.ObjectAlreadyInActiveTierError,
    client.ObjectNotInActiveTierError,
) as e:
    print(e)
Type checking example
from mypy_boto3_s3.client import Exceptions

def handle_error(exc: Exceptions.BucketAlreadyExists) -> None:
    ...

Methods

abort_multipart_upload

This action aborts a multipart upload.

Type annotations and code completion for boto3.client("s3").abort_multipart_upload method. boto3 documentation

Method definition
def abort_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> AbortMultipartUploadOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See AbortMultipartUploadOutputTypeDef
Usage example with kwargs
kwargs: AbortMultipartUploadRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}

parent.abort_multipart_upload(**kwargs)
  1. See AbortMultipartUploadRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("s3").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("s3").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

complete_multipart_upload

Completes a multipart upload by assembling previously uploaded parts.

Type annotations and code completion for boto3.client("s3").complete_multipart_upload method. boto3 documentation

Method definition
def complete_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    MultipartUpload: CompletedMultipartUploadTypeDef = ...,  # (1)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
) -> CompleteMultipartUploadOutputTypeDef:  # (3)
    ...
  1. See CompletedMultipartUploadTypeDef
  2. See RequestPayerType
  3. See CompleteMultipartUploadOutputTypeDef
Usage example with kwargs
kwargs: CompleteMultipartUploadRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}

parent.complete_multipart_upload(**kwargs)
  1. See CompleteMultipartUploadRequestRequestTypeDef

copy

Copy an object from one S3 location to another.

Type annotations and code completion for boto3.client("s3").copy method. boto3 documentation

Method definition
def copy(
    self,
    CopySource: CopySourceTypeDef,  # (1)
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] = ...,
    Callback: Callable[..., Any] = ...,
    SourceClient: BaseClient = ...,
    Config: TransferConfig = ...,
) -> None:
    ...
  1. See CopySourceTypeDef
Usage example with kwargs
kwargs: ClientCopyRequestTypeDef = {  # (1)
    "CopySource": ...,
    "Bucket": ...,
    "Key": ...,
}

parent.copy(**kwargs)
  1. See ClientCopyRequestTypeDef

copy_object

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

Type annotations and code completion for boto3.client("s3").copy_object method. boto3 documentation

Method definition
def copy_object(
    self,
    *,
    Bucket: str,
    CopySource: Union[str, CopySourceTypeDef],  # (1)
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (2)
    CacheControl: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentType: str = ...,
    CopySourceIfMatch: str = ...,
    CopySourceIfModifiedSince: Union[datetime, str] = ...,
    CopySourceIfNoneMatch: str = ...,
    CopySourceIfUnmodifiedSince: Union[datetime, str] = ...,
    Expires: Union[datetime, str] = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    Metadata: Mapping[str, str] = ...,
    MetadataDirective: MetadataDirectiveType = ...,  # (4)
    TaggingDirective: TaggingDirectiveType = ...,  # (5)
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (6)
    StorageClass: StorageClassType = ...,  # (7)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    CopySourceSSECustomerAlgorithm: str = ...,
    CopySourceSSECustomerKey: str = ...,
    CopySourceSSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (8)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (9)
    ObjectLockRetainUntilDate: Union[datetime, str] = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (10)
    ExpectedBucketOwner: str = ...,
    ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef:  # (11)
    ...
  1. See CopySourceTypeDef
  2. See ObjectCannedACLType
  3. See ChecksumAlgorithmType
  4. See MetadataDirectiveType
  5. See TaggingDirectiveType
  6. See ServerSideEncryptionType
  7. See StorageClassType
  8. See RequestPayerType
  9. See ObjectLockModeType
  10. See ObjectLockLegalHoldStatusType
  11. See CopyObjectOutputTypeDef
Usage example with kwargs
kwargs: CopyObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CopySource": ...,
    "Key": ...,
}

parent.copy_object(**kwargs)
  1. See CopyObjectRequestRequestTypeDef

create_bucket

Creates a new S3 bucket.

Type annotations and code completion for boto3.client("s3").create_bucket method. boto3 documentation

Method definition
def create_bucket(
    self,
    *,
    Bucket: str,
    ACL: BucketCannedACLType = ...,  # (1)
    CreateBucketConfiguration: CreateBucketConfigurationTypeDef = ...,  # (2)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    ObjectLockEnabledForBucket: bool = ...,
    ObjectOwnership: ObjectOwnershipType = ...,  # (3)
) -> CreateBucketOutputTypeDef:  # (4)
    ...
  1. See BucketCannedACLType
  2. See CreateBucketConfigurationTypeDef
  3. See ObjectOwnershipType
  4. See CreateBucketOutputTypeDef
Usage example with kwargs
kwargs: CreateBucketRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.create_bucket(**kwargs)
  1. See CreateBucketRequestRequestTypeDef

create_multipart_upload

This action initiates a multipart upload and returns an upload ID.

Type annotations and code completion for boto3.client("s3").create_multipart_upload method. boto3 documentation

Method definition
def create_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentType: str = ...,
    Expires: Union[datetime, str] = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    Metadata: Mapping[str, str] = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (2)
    StorageClass: StorageClassType = ...,  # (3)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    RequestPayer: RequestPayerType = ...,  # (4)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (5)
    ObjectLockRetainUntilDate: Union[datetime, str] = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (6)
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (7)
) -> CreateMultipartUploadOutputTypeDef:  # (8)
    ...
  1. See ObjectCannedACLType
  2. See ServerSideEncryptionType
  3. See StorageClassType
  4. See RequestPayerType
  5. See ObjectLockModeType
  6. See ObjectLockLegalHoldStatusType
  7. See ChecksumAlgorithmType
  8. See CreateMultipartUploadOutputTypeDef
Usage example with kwargs
kwargs: CreateMultipartUploadRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.create_multipart_upload(**kwargs)
  1. See CreateMultipartUploadRequestRequestTypeDef

delete_bucket

Deletes the S3 bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket method. boto3 documentation

Method definition
def delete_bucket(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket(**kwargs)
  1. See DeleteBucketRequestRequestTypeDef

delete_bucket_analytics_configuration

Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).

Type annotations and code completion for boto3.client("s3").delete_bucket_analytics_configuration method. boto3 documentation

Method definition
def delete_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketAnalyticsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.delete_bucket_analytics_configuration(**kwargs)
  1. See DeleteBucketAnalyticsConfigurationRequestRequestTypeDef

delete_bucket_cors

Deletes the cors configuration information set for the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_cors method. boto3 documentation

Method definition
def delete_bucket_cors(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketCorsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_cors(**kwargs)
  1. See DeleteBucketCorsRequestRequestTypeDef

delete_bucket_encryption

This implementation of the DELETE action removes default encryption from the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_encryption method. boto3 documentation

Method definition
def delete_bucket_encryption(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketEncryptionRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_encryption(**kwargs)
  1. See DeleteBucketEncryptionRequestRequestTypeDef

delete_bucket_intelligent_tiering_configuration

Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_intelligent_tiering_configuration method. boto3 documentation

Method definition
def delete_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketIntelligentTieringConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.delete_bucket_intelligent_tiering_configuration(**kwargs)
  1. See DeleteBucketIntelligentTieringConfigurationRequestRequestTypeDef

delete_bucket_inventory_configuration

Deletes an inventory configuration (identified by the inventory ID) from the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_inventory_configuration method. boto3 documentation

Method definition
def delete_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketInventoryConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.delete_bucket_inventory_configuration(**kwargs)
  1. See DeleteBucketInventoryConfigurationRequestRequestTypeDef

delete_bucket_lifecycle

Deletes the lifecycle configuration from the specified bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_lifecycle method. boto3 documentation

Method definition
def delete_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketLifecycleRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_lifecycle(**kwargs)
  1. See DeleteBucketLifecycleRequestRequestTypeDef

delete_bucket_metrics_configuration

Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_metrics_configuration method. boto3 documentation

Method definition
def delete_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketMetricsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.delete_bucket_metrics_configuration(**kwargs)
  1. See DeleteBucketMetricsConfigurationRequestRequestTypeDef

delete_bucket_ownership_controls

Removes OwnershipControls for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_ownership_controls method. boto3 documentation

Method definition
def delete_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketOwnershipControlsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_ownership_controls(**kwargs)
  1. See DeleteBucketOwnershipControlsRequestRequestTypeDef

delete_bucket_policy

This implementation of the DELETE action uses the policy subresource to delete the policy of a specified bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_policy method. boto3 documentation

Method definition
def delete_bucket_policy(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketPolicyRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_policy(**kwargs)
  1. See DeleteBucketPolicyRequestRequestTypeDef

delete_bucket_replication

Deletes the replication configuration from the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_replication method. boto3 documentation

Method definition
def delete_bucket_replication(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketReplicationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_replication(**kwargs)
  1. See DeleteBucketReplicationRequestRequestTypeDef

delete_bucket_tagging

Deletes the tags from the bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_tagging method. boto3 documentation

Method definition
def delete_bucket_tagging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_tagging(**kwargs)
  1. See DeleteBucketTaggingRequestRequestTypeDef

delete_bucket_website

This action removes the website configuration for a bucket.

Type annotations and code completion for boto3.client("s3").delete_bucket_website method. boto3 documentation

Method definition
def delete_bucket_website(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteBucketWebsiteRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_bucket_website(**kwargs)
  1. See DeleteBucketWebsiteRequestRequestTypeDef

delete_object

Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object.

Type annotations and code completion for boto3.client("s3").delete_object method. boto3 documentation

Method definition
def delete_object(
    self,
    *,
    Bucket: str,
    Key: str,
    MFA: str = ...,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    BypassGovernanceRetention: bool = ...,
    ExpectedBucketOwner: str = ...,
) -> DeleteObjectOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See DeleteObjectOutputTypeDef
Usage example with kwargs
kwargs: DeleteObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.delete_object(**kwargs)
  1. See DeleteObjectRequestRequestTypeDef

delete_object_tagging

Removes the entire tag set from the specified object.

Type annotations and code completion for boto3.client("s3").delete_object_tagging method. boto3 documentation

Method definition
def delete_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
) -> DeleteObjectTaggingOutputTypeDef:  # (1)
    ...
  1. See DeleteObjectTaggingOutputTypeDef
Usage example with kwargs
kwargs: DeleteObjectTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.delete_object_tagging(**kwargs)
  1. See DeleteObjectTaggingRequestRequestTypeDef

delete_objects

This action enables you to delete multiple objects from a bucket using a single HTTP request.

Type annotations and code completion for boto3.client("s3").delete_objects method. boto3 documentation

Method definition
def delete_objects(
    self,
    *,
    Bucket: str,
    Delete: DeleteTypeDef,  # (1)
    MFA: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    BypassGovernanceRetention: bool = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
) -> DeleteObjectsOutputTypeDef:  # (4)
    ...
  1. See DeleteTypeDef
  2. See RequestPayerType
  3. See ChecksumAlgorithmType
  4. See DeleteObjectsOutputTypeDef
Usage example with kwargs
kwargs: DeleteObjectsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Delete": ...,
}

parent.delete_objects(**kwargs)
  1. See DeleteObjectsRequestRequestTypeDef

delete_public_access_block

Removes the PublicAccessBlock configuration for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").delete_public_access_block method. boto3 documentation

Method definition
def delete_public_access_block(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeletePublicAccessBlockRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.delete_public_access_block(**kwargs)
  1. See DeletePublicAccessBlockRequestRequestTypeDef

download_file

Download an S3 object to a file.

Type annotations and code completion for boto3.client("s3").download_file method. boto3 documentation

Method definition
def download_file(
    self,
    Bucket: str,
    Key: str,
    Filename: str,
    ExtraArgs: Dict[str, Any] = ...,
    Callback: Callable[..., Any] = ...,
    Config: TransferConfig = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: ClientDownloadFileRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Filename": ...,
}

parent.download_file(**kwargs)
  1. See ClientDownloadFileRequestTypeDef

download_fileobj

Download an object from S3 to a file-like object.

Type annotations and code completion for boto3.client("s3").download_fileobj method. boto3 documentation

Method definition
def download_fileobj(
    self,
    Bucket: str,
    Key: str,
    Fileobj: Union[IO[Any], StreamingBody],
    ExtraArgs: Dict[str, Any] = ...,
    Callback: Callable[..., Any] = ...,
    Config: TransferConfig = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: ClientDownloadFileobjRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Fileobj": ...,
}

parent.download_fileobj(**kwargs)
  1. See ClientDownloadFileobjRequestTypeDef

generate_presigned_post

Builds the url and the form fields used for a presigned s3 post.

Type annotations and code completion for boto3.client("s3").generate_presigned_post method. boto3 documentation

Method definition
def generate_presigned_post(
    self,
    Bucket: str,
    Key: str,
    Fields: Dict[str, Any] = ...,
    Conditions: List[Any] = ...,
    ExpiresIn: int = 3600,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: ClientGeneratePresignedPostRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.generate_presigned_post(**kwargs)
  1. See ClientGeneratePresignedPostRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("s3").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_bucket_accelerate_configuration

This implementation of the GET action uses the accelerate subresource to return the Transfer Acceleration state of a bucket, which is either Enabled or Suspended.

Type annotations and code completion for boto3.client("s3").get_bucket_accelerate_configuration method. boto3 documentation

Method definition
def get_bucket_accelerate_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketAccelerateConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketAccelerateConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketAccelerateConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_accelerate_configuration(**kwargs)
  1. See GetBucketAccelerateConfigurationRequestRequestTypeDef

get_bucket_acl

This implementation of the GET action uses the acl subresource to return the access control list (ACL) of a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_acl method. boto3 documentation

Method definition
def get_bucket_acl(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketAclOutputTypeDef:  # (1)
    ...
  1. See GetBucketAclOutputTypeDef
Usage example with kwargs
kwargs: GetBucketAclRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_acl(**kwargs)
  1. See GetBucketAclRequestRequestTypeDef

get_bucket_analytics_configuration

This implementation of the GET action returns an analytics configuration (identified by the analytics configuration ID) from the bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_analytics_configuration method. boto3 documentation

Method definition
def get_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketAnalyticsConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketAnalyticsConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketAnalyticsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.get_bucket_analytics_configuration(**kwargs)
  1. See GetBucketAnalyticsConfigurationRequestRequestTypeDef

get_bucket_cors

Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_cors method. boto3 documentation

Method definition
def get_bucket_cors(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketCorsOutputTypeDef:  # (1)
    ...
  1. See GetBucketCorsOutputTypeDef
Usage example with kwargs
kwargs: GetBucketCorsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_cors(**kwargs)
  1. See GetBucketCorsRequestRequestTypeDef

get_bucket_encryption

Returns the default encryption configuration for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_encryption method. boto3 documentation

Method definition
def get_bucket_encryption(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketEncryptionOutputTypeDef:  # (1)
    ...
  1. See GetBucketEncryptionOutputTypeDef
Usage example with kwargs
kwargs: GetBucketEncryptionRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_encryption(**kwargs)
  1. See GetBucketEncryptionRequestRequestTypeDef

get_bucket_intelligent_tiering_configuration

Gets the S3 Intelligent-Tiering configuration from the specified bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_intelligent_tiering_configuration method. boto3 documentation

Method definition
def get_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
) -> GetBucketIntelligentTieringConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketIntelligentTieringConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketIntelligentTieringConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.get_bucket_intelligent_tiering_configuration(**kwargs)
  1. See GetBucketIntelligentTieringConfigurationRequestRequestTypeDef

get_bucket_inventory_configuration

Returns an inventory configuration (identified by the inventory configuration ID) from the bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_inventory_configuration method. boto3 documentation

Method definition
def get_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketInventoryConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketInventoryConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketInventoryConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.get_bucket_inventory_configuration(**kwargs)
  1. See GetBucketInventoryConfigurationRequestRequestTypeDef

get_bucket_lifecycle

.

Type annotations and code completion for boto3.client("s3").get_bucket_lifecycle method. boto3 documentation

Method definition
def get_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLifecycleOutputTypeDef:  # (1)
    ...
  1. See GetBucketLifecycleOutputTypeDef
Usage example with kwargs
kwargs: GetBucketLifecycleRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_lifecycle(**kwargs)
  1. See GetBucketLifecycleRequestRequestTypeDef

get_bucket_lifecycle_configuration

.

Type annotations and code completion for boto3.client("s3").get_bucket_lifecycle_configuration method. boto3 documentation

Method definition
def get_bucket_lifecycle_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLifecycleConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketLifecycleConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketLifecycleConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_lifecycle_configuration(**kwargs)
  1. See GetBucketLifecycleConfigurationRequestRequestTypeDef

get_bucket_location

Returns the Region the bucket resides in.

Type annotations and code completion for boto3.client("s3").get_bucket_location method. boto3 documentation

Method definition
def get_bucket_location(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLocationOutputTypeDef:  # (1)
    ...
  1. See GetBucketLocationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketLocationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_location(**kwargs)
  1. See GetBucketLocationRequestRequestTypeDef

get_bucket_logging

Returns the logging status of a bucket and the permissions users have to view and modify that status.

Type annotations and code completion for boto3.client("s3").get_bucket_logging method. boto3 documentation

Method definition
def get_bucket_logging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLoggingOutputTypeDef:  # (1)
    ...
  1. See GetBucketLoggingOutputTypeDef
Usage example with kwargs
kwargs: GetBucketLoggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_logging(**kwargs)
  1. See GetBucketLoggingRequestRequestTypeDef

get_bucket_metrics_configuration

Gets a metrics configuration (specified by the metrics configuration ID) from the bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_metrics_configuration method. boto3 documentation

Method definition
def get_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketMetricsConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetBucketMetricsConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketMetricsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}

parent.get_bucket_metrics_configuration(**kwargs)
  1. See GetBucketMetricsConfigurationRequestRequestTypeDef

get_bucket_notification

No longer used, see GetBucketNotificationConfiguration_.

Type annotations and code completion for boto3.client("s3").get_bucket_notification method. boto3 documentation

Method definition
def get_bucket_notification(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> NotificationConfigurationDeprecatedResponseMetadataTypeDef:  # (1)
    ...
  1. See NotificationConfigurationDeprecatedResponseMetadataTypeDef
Usage example with kwargs
kwargs: GetBucketNotificationConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_notification(**kwargs)
  1. See GetBucketNotificationConfigurationRequestRequestTypeDef

get_bucket_notification_configuration

Returns the notification configuration of a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_notification_configuration method. boto3 documentation

Method definition
def get_bucket_notification_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> NotificationConfigurationResponseMetadataTypeDef:  # (1)
    ...
  1. See NotificationConfigurationResponseMetadataTypeDef
Usage example with kwargs
kwargs: GetBucketNotificationConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_notification_configuration(**kwargs)
  1. See GetBucketNotificationConfigurationRequestRequestTypeDef

get_bucket_ownership_controls

Retrieves OwnershipControls for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_ownership_controls method. boto3 documentation

Method definition
def get_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketOwnershipControlsOutputTypeDef:  # (1)
    ...
  1. See GetBucketOwnershipControlsOutputTypeDef
Usage example with kwargs
kwargs: GetBucketOwnershipControlsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_ownership_controls(**kwargs)
  1. See GetBucketOwnershipControlsRequestRequestTypeDef

get_bucket_policy

Returns the policy of a specified bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_policy method. boto3 documentation

Method definition
def get_bucket_policy(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketPolicyOutputTypeDef:  # (1)
    ...
  1. See GetBucketPolicyOutputTypeDef
Usage example with kwargs
kwargs: GetBucketPolicyRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_policy(**kwargs)
  1. See GetBucketPolicyRequestRequestTypeDef

get_bucket_policy_status

Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.

Type annotations and code completion for boto3.client("s3").get_bucket_policy_status method. boto3 documentation

Method definition
def get_bucket_policy_status(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketPolicyStatusOutputTypeDef:  # (1)
    ...
  1. See GetBucketPolicyStatusOutputTypeDef
Usage example with kwargs
kwargs: GetBucketPolicyStatusRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_policy_status(**kwargs)
  1. See GetBucketPolicyStatusRequestRequestTypeDef

get_bucket_replication

Returns the replication configuration of a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_replication method. boto3 documentation

Method definition
def get_bucket_replication(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketReplicationOutputTypeDef:  # (1)
    ...
  1. See GetBucketReplicationOutputTypeDef
Usage example with kwargs
kwargs: GetBucketReplicationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_replication(**kwargs)
  1. See GetBucketReplicationRequestRequestTypeDef

get_bucket_request_payment

Returns the request payment configuration of a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_request_payment method. boto3 documentation

Method definition
def get_bucket_request_payment(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketRequestPaymentOutputTypeDef:  # (1)
    ...
  1. See GetBucketRequestPaymentOutputTypeDef
Usage example with kwargs
kwargs: GetBucketRequestPaymentRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_request_payment(**kwargs)
  1. See GetBucketRequestPaymentRequestRequestTypeDef

get_bucket_tagging

Returns the tag set associated with the bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_tagging method. boto3 documentation

Method definition
def get_bucket_tagging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketTaggingOutputTypeDef:  # (1)
    ...
  1. See GetBucketTaggingOutputTypeDef
Usage example with kwargs
kwargs: GetBucketTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_tagging(**kwargs)
  1. See GetBucketTaggingRequestRequestTypeDef

get_bucket_versioning

Returns the versioning state of a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_versioning method. boto3 documentation

Method definition
def get_bucket_versioning(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketVersioningOutputTypeDef:  # (1)
    ...
  1. See GetBucketVersioningOutputTypeDef
Usage example with kwargs
kwargs: GetBucketVersioningRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_versioning(**kwargs)
  1. See GetBucketVersioningRequestRequestTypeDef

get_bucket_website

Returns the website configuration for a bucket.

Type annotations and code completion for boto3.client("s3").get_bucket_website method. boto3 documentation

Method definition
def get_bucket_website(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketWebsiteOutputTypeDef:  # (1)
    ...
  1. See GetBucketWebsiteOutputTypeDef
Usage example with kwargs
kwargs: GetBucketWebsiteRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_bucket_website(**kwargs)
  1. See GetBucketWebsiteRequestRequestTypeDef

get_object

Retrieves objects from Amazon S3.

Type annotations and code completion for boto3.client("s3").get_object method. boto3 documentation

Method definition
def get_object(
    self,
    *,
    Bucket: str,
    Key: str,
    IfMatch: str = ...,
    IfModifiedSince: Union[datetime, str] = ...,
    IfNoneMatch: str = ...,
    IfUnmodifiedSince: Union[datetime, str] = ...,
    Range: str = ...,
    ResponseCacheControl: str = ...,
    ResponseContentDisposition: str = ...,
    ResponseContentEncoding: str = ...,
    ResponseContentLanguage: str = ...,
    ResponseContentType: str = ...,
    ResponseExpires: Union[datetime, str] = ...,
    VersionId: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    PartNumber: int = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumMode: ChecksumModeType = ...,  # (2)
) -> GetObjectOutputTypeDef:  # (3)
    ...
  1. See RequestPayerType
  2. See ChecksumModeType
  3. See GetObjectOutputTypeDef
Usage example with kwargs
kwargs: GetObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object(**kwargs)
  1. See GetObjectRequestRequestTypeDef

get_object_acl

Returns the access control list (ACL) of an object.

Type annotations and code completion for boto3.client("s3").get_object_acl method. boto3 documentation

Method definition
def get_object_acl(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectAclOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See GetObjectAclOutputTypeDef
Usage example with kwargs
kwargs: GetObjectAclRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object_acl(**kwargs)
  1. See GetObjectAclRequestRequestTypeDef

get_object_attributes

Retrieves all the metadata from an object without returning the object itself.

Type annotations and code completion for boto3.client("s3").get_object_attributes method. boto3 documentation

Method definition
def get_object_attributes(
    self,
    *,
    Bucket: str,
    Key: str,
    ObjectAttributes: Sequence[ObjectAttributesType],  # (1)
    VersionId: str = ...,
    MaxParts: int = ...,
    PartNumberMarker: int = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> GetObjectAttributesOutputTypeDef:  # (3)
    ...
  1. See ObjectAttributesType
  2. See RequestPayerType
  3. See GetObjectAttributesOutputTypeDef
Usage example with kwargs
kwargs: GetObjectAttributesRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "ObjectAttributes": ...,
}

parent.get_object_attributes(**kwargs)
  1. See GetObjectAttributesRequestRequestTypeDef

Gets an object's current legal hold status.

Type annotations and code completion for boto3.client("s3").get_object_legal_hold method. boto3 documentation

Method definition
def get_object_legal_hold(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectLegalHoldOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See GetObjectLegalHoldOutputTypeDef
Usage example with kwargs
kwargs: GetObjectLegalHoldRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object_legal_hold(**kwargs)
  1. See GetObjectLegalHoldRequestRequestTypeDef

get_object_lock_configuration

Gets the Object Lock configuration for a bucket.

Type annotations and code completion for boto3.client("s3").get_object_lock_configuration method. boto3 documentation

Method definition
def get_object_lock_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetObjectLockConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetObjectLockConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetObjectLockConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_object_lock_configuration(**kwargs)
  1. See GetObjectLockConfigurationRequestRequestTypeDef

get_object_retention

Retrieves an object's retention settings.

Type annotations and code completion for boto3.client("s3").get_object_retention method. boto3 documentation

Method definition
def get_object_retention(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectRetentionOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See GetObjectRetentionOutputTypeDef
Usage example with kwargs
kwargs: GetObjectRetentionRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object_retention(**kwargs)
  1. See GetObjectRetentionRequestRequestTypeDef

get_object_tagging

Returns the tag-set of an object.

Type annotations and code completion for boto3.client("s3").get_object_tagging method. boto3 documentation

Method definition
def get_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
) -> GetObjectTaggingOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See GetObjectTaggingOutputTypeDef
Usage example with kwargs
kwargs: GetObjectTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object_tagging(**kwargs)
  1. See GetObjectTaggingRequestRequestTypeDef

get_object_torrent

Returns torrent files from a bucket.

Type annotations and code completion for boto3.client("s3").get_object_torrent method. boto3 documentation

Method definition
def get_object_torrent(
    self,
    *,
    Bucket: str,
    Key: str,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectTorrentOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See GetObjectTorrentOutputTypeDef
Usage example with kwargs
kwargs: GetObjectTorrentRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.get_object_torrent(**kwargs)
  1. See GetObjectTorrentRequestRequestTypeDef

get_public_access_block

Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").get_public_access_block method. boto3 documentation

Method definition
def get_public_access_block(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetPublicAccessBlockOutputTypeDef:  # (1)
    ...
  1. See GetPublicAccessBlockOutputTypeDef
Usage example with kwargs
kwargs: GetPublicAccessBlockRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.get_public_access_block(**kwargs)
  1. See GetPublicAccessBlockRequestRequestTypeDef

head_bucket

This action is useful to determine if a bucket exists and you have permission to access it.

Type annotations and code completion for boto3.client("s3").head_bucket method. boto3 documentation

Method definition
def head_bucket(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: HeadBucketRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.head_bucket(**kwargs)
  1. See HeadBucketRequestRequestTypeDef

head_object

The HEAD action retrieves metadata from an object without returning the object itself.

Type annotations and code completion for boto3.client("s3").head_object method. boto3 documentation

Method definition
def head_object(
    self,
    *,
    Bucket: str,
    Key: str,
    IfMatch: str = ...,
    IfModifiedSince: Union[datetime, str] = ...,
    IfNoneMatch: str = ...,
    IfUnmodifiedSince: Union[datetime, str] = ...,
    Range: str = ...,
    VersionId: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    PartNumber: int = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumMode: ChecksumModeType = ...,  # (2)
) -> HeadObjectOutputTypeDef:  # (3)
    ...
  1. See RequestPayerType
  2. See ChecksumModeType
  3. See HeadObjectOutputTypeDef
Usage example with kwargs
kwargs: HeadObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.head_object(**kwargs)
  1. See HeadObjectRequestRequestTypeDef

list_bucket_analytics_configurations

Lists the analytics configurations for the bucket.

Type annotations and code completion for boto3.client("s3").list_bucket_analytics_configurations method. boto3 documentation

Method definition
def list_bucket_analytics_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketAnalyticsConfigurationsOutputTypeDef:  # (1)
    ...
  1. See ListBucketAnalyticsConfigurationsOutputTypeDef
Usage example with kwargs
kwargs: ListBucketAnalyticsConfigurationsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_bucket_analytics_configurations(**kwargs)
  1. See ListBucketAnalyticsConfigurationsRequestRequestTypeDef

list_bucket_intelligent_tiering_configurations

Lists the S3 Intelligent-Tiering configuration from the specified bucket.

Type annotations and code completion for boto3.client("s3").list_bucket_intelligent_tiering_configurations method. boto3 documentation

Method definition
def list_bucket_intelligent_tiering_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
) -> ListBucketIntelligentTieringConfigurationsOutputTypeDef:  # (1)
    ...
  1. See ListBucketIntelligentTieringConfigurationsOutputTypeDef
Usage example with kwargs
kwargs: ListBucketIntelligentTieringConfigurationsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_bucket_intelligent_tiering_configurations(**kwargs)
  1. See ListBucketIntelligentTieringConfigurationsRequestRequestTypeDef

list_bucket_inventory_configurations

Returns a list of inventory configurations for the bucket.

Type annotations and code completion for boto3.client("s3").list_bucket_inventory_configurations method. boto3 documentation

Method definition
def list_bucket_inventory_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketInventoryConfigurationsOutputTypeDef:  # (1)
    ...
  1. See ListBucketInventoryConfigurationsOutputTypeDef
Usage example with kwargs
kwargs: ListBucketInventoryConfigurationsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_bucket_inventory_configurations(**kwargs)
  1. See ListBucketInventoryConfigurationsRequestRequestTypeDef

list_bucket_metrics_configurations

Lists the metrics configurations for the bucket.

Type annotations and code completion for boto3.client("s3").list_bucket_metrics_configurations method. boto3 documentation

Method definition
def list_bucket_metrics_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketMetricsConfigurationsOutputTypeDef:  # (1)
    ...
  1. See ListBucketMetricsConfigurationsOutputTypeDef
Usage example with kwargs
kwargs: ListBucketMetricsConfigurationsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_bucket_metrics_configurations(**kwargs)
  1. See ListBucketMetricsConfigurationsRequestRequestTypeDef

list_buckets

Returns a list of all buckets owned by the authenticated sender of the request.

Type annotations and code completion for boto3.client("s3").list_buckets method. boto3 documentation

Method definition
def list_buckets(
    self,
) -> ListBucketsOutputTypeDef:  # (1)
    ...
  1. See ListBucketsOutputTypeDef

list_multipart_uploads

This action lists in-progress multipart uploads.

Type annotations and code completion for boto3.client("s3").list_multipart_uploads method. boto3 documentation

Method definition
def list_multipart_uploads(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    KeyMarker: str = ...,
    MaxUploads: int = ...,
    Prefix: str = ...,
    UploadIdMarker: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListMultipartUploadsOutputTypeDef:  # (2)
    ...
  1. See EncodingTypeType
  2. See ListMultipartUploadsOutputTypeDef
Usage example with kwargs
kwargs: ListMultipartUploadsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_multipart_uploads(**kwargs)
  1. See ListMultipartUploadsRequestRequestTypeDef

list_object_versions

Returns metadata about all versions of the objects in a bucket.

Type annotations and code completion for boto3.client("s3").list_object_versions method. boto3 documentation

Method definition
def list_object_versions(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    KeyMarker: str = ...,
    MaxKeys: int = ...,
    Prefix: str = ...,
    VersionIdMarker: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListObjectVersionsOutputTypeDef:  # (2)
    ...
  1. See EncodingTypeType
  2. See ListObjectVersionsOutputTypeDef
Usage example with kwargs
kwargs: ListObjectVersionsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_object_versions(**kwargs)
  1. See ListObjectVersionsRequestRequestTypeDef

list_objects

Returns some or all (up to 1,000) of the objects in a bucket.

Type annotations and code completion for boto3.client("s3").list_objects method. boto3 documentation

Method definition
def list_objects(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    Marker: str = ...,
    MaxKeys: int = ...,
    Prefix: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> ListObjectsOutputTypeDef:  # (3)
    ...
  1. See EncodingTypeType
  2. See RequestPayerType
  3. See ListObjectsOutputTypeDef
Usage example with kwargs
kwargs: ListObjectsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_objects(**kwargs)
  1. See ListObjectsRequestRequestTypeDef

list_objects_v2

Returns some or all (up to 1,000) of the objects in a bucket with each request.

Type annotations and code completion for boto3.client("s3").list_objects_v2 method. boto3 documentation

Method definition
def list_objects_v2(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    MaxKeys: int = ...,
    Prefix: str = ...,
    ContinuationToken: str = ...,
    FetchOwner: bool = ...,
    StartAfter: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> ListObjectsV2OutputTypeDef:  # (3)
    ...
  1. See EncodingTypeType
  2. See RequestPayerType
  3. See ListObjectsV2OutputTypeDef
Usage example with kwargs
kwargs: ListObjectsV2RequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.list_objects_v2(**kwargs)
  1. See ListObjectsV2RequestRequestTypeDef

list_parts

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

Type annotations and code completion for boto3.client("s3").list_parts method. boto3 documentation

Method definition
def list_parts(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    MaxParts: int = ...,
    PartNumberMarker: int = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
) -> ListPartsOutputTypeDef:  # (2)
    ...
  1. See RequestPayerType
  2. See ListPartsOutputTypeDef
Usage example with kwargs
kwargs: ListPartsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}

parent.list_parts(**kwargs)
  1. See ListPartsRequestRequestTypeDef

put_bucket_accelerate_configuration

Sets the accelerate configuration of an existing bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_accelerate_configuration method. boto3 documentation

Method definition
def put_bucket_accelerate_configuration(
    self,
    *,
    Bucket: str,
    AccelerateConfiguration: AccelerateConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See AccelerateConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketAccelerateConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "AccelerateConfiguration": ...,
}

parent.put_bucket_accelerate_configuration(**kwargs)
  1. See PutBucketAccelerateConfigurationRequestRequestTypeDef

put_bucket_acl

Sets the permissions on an existing bucket using access control lists (ACL).

Type annotations and code completion for boto3.client("s3").put_bucket_acl method. boto3 documentation

Method definition
def put_bucket_acl(
    self,
    *,
    Bucket: str,
    ACL: BucketCannedACLType = ...,  # (1)
    AccessControlPolicy: AccessControlPolicyTypeDef = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (4)
    ...
  1. See BucketCannedACLType
  2. See AccessControlPolicyTypeDef
  3. See ChecksumAlgorithmType
  4. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketAclRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.put_bucket_acl(**kwargs)
  1. See PutBucketAclRequestRequestTypeDef

put_bucket_analytics_configuration

Sets an analytics configuration for the bucket (specified by the analytics configuration ID).

Type annotations and code completion for boto3.client("s3").put_bucket_analytics_configuration method. boto3 documentation

Method definition
def put_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    AnalyticsConfiguration: AnalyticsConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See AnalyticsConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketAnalyticsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "AnalyticsConfiguration": ...,
}

parent.put_bucket_analytics_configuration(**kwargs)
  1. See PutBucketAnalyticsConfigurationRequestRequestTypeDef

put_bucket_cors

Sets the cors configuration for your bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_cors method. boto3 documentation

Method definition
def put_bucket_cors(
    self,
    *,
    Bucket: str,
    CORSConfiguration: CORSConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See CORSConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketCorsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CORSConfiguration": ...,
}

parent.put_bucket_cors(**kwargs)
  1. See PutBucketCorsRequestRequestTypeDef

put_bucket_encryption

This action uses the encryption subresource to configure default encryption and Amazon S3 Bucket Key for an existing bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_encryption method. boto3 documentation

Method definition
def put_bucket_encryption(
    self,
    *,
    Bucket: str,
    ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See ServerSideEncryptionConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketEncryptionRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "ServerSideEncryptionConfiguration": ...,
}

parent.put_bucket_encryption(**kwargs)
  1. See PutBucketEncryptionRequestRequestTypeDef

put_bucket_intelligent_tiering_configuration

Puts a S3 Intelligent-Tiering configuration to the specified bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_intelligent_tiering_configuration method. boto3 documentation

Method definition
def put_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    IntelligentTieringConfiguration: IntelligentTieringConfigurationTypeDef,  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See IntelligentTieringConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketIntelligentTieringConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "IntelligentTieringConfiguration": ...,
}

parent.put_bucket_intelligent_tiering_configuration(**kwargs)
  1. See PutBucketIntelligentTieringConfigurationRequestRequestTypeDef

put_bucket_inventory_configuration

This implementation of the PUT action adds an inventory configuration (identified by the inventory ID) to the bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_inventory_configuration method. boto3 documentation

Method definition
def put_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    InventoryConfiguration: InventoryConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See InventoryConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketInventoryConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "InventoryConfiguration": ...,
}

parent.put_bucket_inventory_configuration(**kwargs)
  1. See PutBucketInventoryConfigurationRequestRequestTypeDef

put_bucket_lifecycle

.

Type annotations and code completion for boto3.client("s3").put_bucket_lifecycle method. boto3 documentation

Method definition
def put_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    LifecycleConfiguration: LifecycleConfigurationTypeDef = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See ChecksumAlgorithmType
  2. See LifecycleConfigurationTypeDef
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketLifecycleRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.put_bucket_lifecycle(**kwargs)
  1. See PutBucketLifecycleRequestRequestTypeDef

put_bucket_lifecycle_configuration

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration.

Type annotations and code completion for boto3.client("s3").put_bucket_lifecycle_configuration method. boto3 documentation

Method definition
def put_bucket_lifecycle_configuration(
    self,
    *,
    Bucket: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    LifecycleConfiguration: BucketLifecycleConfigurationTypeDef = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See ChecksumAlgorithmType
  2. See BucketLifecycleConfigurationTypeDef
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketLifecycleConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.put_bucket_lifecycle_configuration(**kwargs)
  1. See PutBucketLifecycleConfigurationRequestRequestTypeDef

put_bucket_logging

Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters.

Type annotations and code completion for boto3.client("s3").put_bucket_logging method. boto3 documentation

Method definition
def put_bucket_logging(
    self,
    *,
    Bucket: str,
    BucketLoggingStatus: BucketLoggingStatusTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See BucketLoggingStatusTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketLoggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "BucketLoggingStatus": ...,
}

parent.put_bucket_logging(**kwargs)
  1. See PutBucketLoggingRequestRequestTypeDef

put_bucket_metrics_configuration

Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_metrics_configuration method. boto3 documentation

Method definition
def put_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    MetricsConfiguration: MetricsConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See MetricsConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketMetricsConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "MetricsConfiguration": ...,
}

parent.put_bucket_metrics_configuration(**kwargs)
  1. See PutBucketMetricsConfigurationRequestRequestTypeDef

put_bucket_notification

No longer used, see the PutBucketNotificationConfiguration_ operation.

Type annotations and code completion for boto3.client("s3").put_bucket_notification method. boto3 documentation

Method definition
def put_bucket_notification(
    self,
    *,
    Bucket: str,
    NotificationConfiguration: NotificationConfigurationDeprecatedTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See NotificationConfigurationDeprecatedTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketNotificationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "NotificationConfiguration": ...,
}

parent.put_bucket_notification(**kwargs)
  1. See PutBucketNotificationRequestRequestTypeDef

put_bucket_notification_configuration

Enables notifications of specified events for a bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_notification_configuration method. boto3 documentation

Method definition
def put_bucket_notification_configuration(
    self,
    *,
    Bucket: str,
    NotificationConfiguration: NotificationConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
    SkipDestinationValidation: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See NotificationConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketNotificationConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "NotificationConfiguration": ...,
}

parent.put_bucket_notification_configuration(**kwargs)
  1. See PutBucketNotificationConfigurationRequestRequestTypeDef

put_bucket_ownership_controls

Creates or modifies OwnershipControls for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_ownership_controls method. boto3 documentation

Method definition
def put_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    OwnershipControls: OwnershipControlsTypeDef,  # (1)
    ContentMD5: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See OwnershipControlsTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketOwnershipControlsRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "OwnershipControls": ...,
}

parent.put_bucket_ownership_controls(**kwargs)
  1. See PutBucketOwnershipControlsRequestRequestTypeDef

put_bucket_policy

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

Type annotations and code completion for boto3.client("s3").put_bucket_policy method. boto3 documentation

Method definition
def put_bucket_policy(
    self,
    *,
    Bucket: str,
    Policy: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    ConfirmRemoveSelfBucketAccess: bool = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See ChecksumAlgorithmType
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketPolicyRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Policy": ...,
}

parent.put_bucket_policy(**kwargs)
  1. See PutBucketPolicyRequestRequestTypeDef

put_bucket_replication

Creates a replication configuration or replaces an existing one.

Type annotations and code completion for boto3.client("s3").put_bucket_replication method. boto3 documentation

Method definition
def put_bucket_replication(
    self,
    *,
    Bucket: str,
    ReplicationConfiguration: ReplicationConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    Token: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See ReplicationConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketReplicationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "ReplicationConfiguration": ...,
}

parent.put_bucket_replication(**kwargs)
  1. See PutBucketReplicationRequestRequestTypeDef

put_bucket_request_payment

Sets the request payment configuration for a bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_request_payment method. boto3 documentation

Method definition
def put_bucket_request_payment(
    self,
    *,
    Bucket: str,
    RequestPaymentConfiguration: RequestPaymentConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See RequestPaymentConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketRequestPaymentRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "RequestPaymentConfiguration": ...,
}

parent.put_bucket_request_payment(**kwargs)
  1. See PutBucketRequestPaymentRequestRequestTypeDef

put_bucket_tagging

Sets the tags for a bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_tagging method. boto3 documentation

Method definition
def put_bucket_tagging(
    self,
    *,
    Bucket: str,
    Tagging: TaggingTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See TaggingTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Tagging": ...,
}

parent.put_bucket_tagging(**kwargs)
  1. See PutBucketTaggingRequestRequestTypeDef

put_bucket_versioning

Sets the versioning state of an existing bucket.

Type annotations and code completion for boto3.client("s3").put_bucket_versioning method. boto3 documentation

Method definition
def put_bucket_versioning(
    self,
    *,
    Bucket: str,
    VersioningConfiguration: VersioningConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    MFA: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See VersioningConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketVersioningRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "VersioningConfiguration": ...,
}

parent.put_bucket_versioning(**kwargs)
  1. See PutBucketVersioningRequestRequestTypeDef

put_bucket_website

Sets the configuration of the website that is specified in the website subresource.

Type annotations and code completion for boto3.client("s3").put_bucket_website method. boto3 documentation

Method definition
def put_bucket_website(
    self,
    *,
    Bucket: str,
    WebsiteConfiguration: WebsiteConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See WebsiteConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutBucketWebsiteRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "WebsiteConfiguration": ...,
}

parent.put_bucket_website(**kwargs)
  1. See PutBucketWebsiteRequestRequestTypeDef

put_object

Adds an object to a bucket.

Type annotations and code completion for boto3.client("s3").put_object method. boto3 documentation

Method definition
def put_object(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    Body: Union[str, bytes, IO[Any], StreamingBody] = ...,
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentLength: int = ...,
    ContentMD5: str = ...,
    ContentType: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    Expires: Union[datetime, str] = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    Metadata: Mapping[str, str] = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (3)
    StorageClass: StorageClassType = ...,  # (4)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    RequestPayer: RequestPayerType = ...,  # (5)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (6)
    ObjectLockRetainUntilDate: Union[datetime, str] = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (7)
    ExpectedBucketOwner: str = ...,
) -> PutObjectOutputTypeDef:  # (8)
    ...
  1. See ObjectCannedACLType
  2. See ChecksumAlgorithmType
  3. See ServerSideEncryptionType
  4. See StorageClassType
  5. See RequestPayerType
  6. See ObjectLockModeType
  7. See ObjectLockLegalHoldStatusType
  8. See PutObjectOutputTypeDef
Usage example with kwargs
kwargs: PutObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.put_object(**kwargs)
  1. See PutObjectRequestRequestTypeDef

put_object_acl

Uses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket.

Type annotations and code completion for boto3.client("s3").put_object_acl method. boto3 documentation

Method definition
def put_object_acl(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    AccessControlPolicy: AccessControlPolicyTypeDef = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    RequestPayer: RequestPayerType = ...,  # (4)
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
) -> PutObjectAclOutputTypeDef:  # (5)
    ...
  1. See ObjectCannedACLType
  2. See AccessControlPolicyTypeDef
  3. See ChecksumAlgorithmType
  4. See RequestPayerType
  5. See PutObjectAclOutputTypeDef
Usage example with kwargs
kwargs: PutObjectAclRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.put_object_acl(**kwargs)
  1. See PutObjectAclRequestRequestTypeDef

Applies a legal hold configuration to the specified object.

Type annotations and code completion for boto3.client("s3").put_object_legal_hold method. boto3 documentation

Method definition
def put_object_legal_hold(
    self,
    *,
    Bucket: str,
    Key: str,
    LegalHold: ObjectLockLegalHoldTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    VersionId: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectLegalHoldOutputTypeDef:  # (4)
    ...
  1. See ObjectLockLegalHoldTypeDef
  2. See RequestPayerType
  3. See ChecksumAlgorithmType
  4. See PutObjectLegalHoldOutputTypeDef
Usage example with kwargs
kwargs: PutObjectLegalHoldRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.put_object_legal_hold(**kwargs)
  1. See PutObjectLegalHoldRequestRequestTypeDef

put_object_lock_configuration

Places an Object Lock configuration on the specified bucket.

Type annotations and code completion for boto3.client("s3").put_object_lock_configuration method. boto3 documentation

Method definition
def put_object_lock_configuration(
    self,
    *,
    Bucket: str,
    ObjectLockConfiguration: ObjectLockConfigurationTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    Token: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectLockConfigurationOutputTypeDef:  # (4)
    ...
  1. See ObjectLockConfigurationTypeDef
  2. See RequestPayerType
  3. See ChecksumAlgorithmType
  4. See PutObjectLockConfigurationOutputTypeDef
Usage example with kwargs
kwargs: PutObjectLockConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}

parent.put_object_lock_configuration(**kwargs)
  1. See PutObjectLockConfigurationRequestRequestTypeDef

put_object_retention

Places an Object Retention configuration on an object.

Type annotations and code completion for boto3.client("s3").put_object_retention method. boto3 documentation

Method definition
def put_object_retention(
    self,
    *,
    Bucket: str,
    Key: str,
    Retention: ObjectLockRetentionTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    VersionId: str = ...,
    BypassGovernanceRetention: bool = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectRetentionOutputTypeDef:  # (4)
    ...
  1. See ObjectLockRetentionTypeDef
  2. See RequestPayerType
  3. See ChecksumAlgorithmType
  4. See PutObjectRetentionOutputTypeDef
Usage example with kwargs
kwargs: PutObjectRetentionRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.put_object_retention(**kwargs)
  1. See PutObjectRetentionRequestRequestTypeDef

put_object_tagging

Sets the supplied tag-set to an object that already exists in a bucket.

Type annotations and code completion for boto3.client("s3").put_object_tagging method. boto3 documentation

Method definition
def put_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    Tagging: TaggingTypeDef,  # (1)
    VersionId: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (3)
) -> PutObjectTaggingOutputTypeDef:  # (4)
    ...
  1. See TaggingTypeDef
  2. See ChecksumAlgorithmType
  3. See RequestPayerType
  4. See PutObjectTaggingOutputTypeDef
Usage example with kwargs
kwargs: PutObjectTaggingRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Tagging": ...,
}

parent.put_object_tagging(**kwargs)
  1. See PutObjectTaggingRequestRequestTypeDef

put_public_access_block

Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket.

Type annotations and code completion for boto3.client("s3").put_public_access_block method. boto3 documentation

Method definition
def put_public_access_block(
    self,
    *,
    Bucket: str,
    PublicAccessBlockConfiguration: PublicAccessBlockConfigurationTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See PublicAccessBlockConfigurationTypeDef
  2. See ChecksumAlgorithmType
  3. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutPublicAccessBlockRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "PublicAccessBlockConfiguration": ...,
}

parent.put_public_access_block(**kwargs)
  1. See PutPublicAccessBlockRequestRequestTypeDef

restore_object

Restores an archived copy of an object back into Amazon S3 This action is not supported by Amazon S3 on Outposts.

Type annotations and code completion for boto3.client("s3").restore_object method. boto3 documentation

Method definition
def restore_object(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RestoreRequest: RestoreRequestTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> RestoreObjectOutputTypeDef:  # (4)
    ...
  1. See RestoreRequestTypeDef
  2. See RequestPayerType
  3. See ChecksumAlgorithmType
  4. See RestoreObjectOutputTypeDef
Usage example with kwargs
kwargs: RestoreObjectRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}

parent.restore_object(**kwargs)
  1. See RestoreObjectRequestRequestTypeDef

select_object_content

This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement.

Type annotations and code completion for boto3.client("s3").select_object_content method. boto3 documentation

Method definition
def select_object_content(
    self,
    *,
    Bucket: str,
    Key: str,
    Expression: str,
    ExpressionType: ExpressionTypeType,  # (1)
    InputSerialization: InputSerializationTypeDef,  # (2)
    OutputSerialization: OutputSerializationTypeDef,  # (3)
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    RequestProgress: RequestProgressTypeDef = ...,  # (4)
    ScanRange: ScanRangeTypeDef = ...,  # (5)
    ExpectedBucketOwner: str = ...,
) -> SelectObjectContentOutputTypeDef:  # (6)
    ...
  1. See ExpressionTypeType
  2. See InputSerializationTypeDef
  3. See OutputSerializationTypeDef
  4. See RequestProgressTypeDef
  5. See ScanRangeTypeDef
  6. See SelectObjectContentOutputTypeDef
Usage example with kwargs
kwargs: SelectObjectContentRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Expression": ...,
    "ExpressionType": ...,
    "InputSerialization": ...,
    "OutputSerialization": ...,
}

parent.select_object_content(**kwargs)
  1. See SelectObjectContentRequestRequestTypeDef

upload_file

Upload a file to an S3 object.

Type annotations and code completion for boto3.client("s3").upload_file method. boto3 documentation

Method definition
def upload_file(
    self,
    Filename: str,
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] = ...,
    Callback: Callable[..., Any] = ...,
    Config: TransferConfig = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: ClientUploadFileRequestTypeDef = {  # (1)
    "Filename": ...,
    "Bucket": ...,
    "Key": ...,
}

parent.upload_file(**kwargs)
  1. See ClientUploadFileRequestTypeDef

upload_fileobj

Upload a file-like object to S3.

Type annotations and code completion for boto3.client("s3").upload_fileobj method. boto3 documentation

Method definition
def upload_fileobj(
    self,
    Fileobj: Union[IO[Any], StreamingBody],
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] = ...,
    Callback: Callable[..., Any] = ...,
    Config: TransferConfig = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: ClientUploadFileobjRequestTypeDef = {  # (1)
    "Fileobj": ...,
    "Bucket": ...,
    "Key": ...,
}

parent.upload_fileobj(**kwargs)
  1. See ClientUploadFileobjRequestTypeDef

upload_part

Uploads a part in a multipart upload.

Type annotations and code completion for boto3.client("s3").upload_part method. boto3 documentation

Method definition
def upload_part(
    self,
    *,
    Bucket: str,
    Key: str,
    PartNumber: int,
    UploadId: str,
    Body: Union[str, bytes, IO[Any], StreamingBody] = ...,
    ContentLength: int = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> UploadPartOutputTypeDef:  # (3)
    ...
  1. See ChecksumAlgorithmType
  2. See RequestPayerType
  3. See UploadPartOutputTypeDef
Usage example with kwargs
kwargs: UploadPartRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "PartNumber": ...,
    "UploadId": ...,
}

parent.upload_part(**kwargs)
  1. See UploadPartRequestRequestTypeDef

upload_part_copy

Uploads a part by copying data from an existing object as data source.

Type annotations and code completion for boto3.client("s3").upload_part_copy method. boto3 documentation

Method definition
def upload_part_copy(
    self,
    *,
    Bucket: str,
    CopySource: Union[str, CopySourceTypeDef],  # (1)
    Key: str,
    PartNumber: int,
    UploadId: str,
    CopySourceIfMatch: str = ...,
    CopySourceIfModifiedSince: Union[datetime, str] = ...,
    CopySourceIfNoneMatch: str = ...,
    CopySourceIfUnmodifiedSince: Union[datetime, str] = ...,
    CopySourceRange: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str = ...,
    SSECustomerKeyMD5: str = ...,
    CopySourceSSECustomerAlgorithm: str = ...,
    CopySourceSSECustomerKey: str = ...,
    CopySourceSSECustomerKeyMD5: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    ExpectedSourceBucketOwner: str = ...,
) -> UploadPartCopyOutputTypeDef:  # (3)
    ...
  1. See CopySourceTypeDef
  2. See RequestPayerType
  3. See UploadPartCopyOutputTypeDef
Usage example with kwargs
kwargs: UploadPartCopyRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CopySource": ...,
    "Key": ...,
    "PartNumber": ...,
    "UploadId": ...,
}

parent.upload_part_copy(**kwargs)
  1. See UploadPartCopyRequestRequestTypeDef

write_get_object_response

Passes transformed objects to a GetObject operation when using Object Lambda access points.

Type annotations and code completion for boto3.client("s3").write_get_object_response method. boto3 documentation

Method definition
def write_get_object_response(
    self,
    *,
    RequestRoute: str,
    RequestToken: str,
    Body: Union[str, bytes, IO[Any], StreamingBody] = ...,
    StatusCode: int = ...,
    ErrorCode: str = ...,
    ErrorMessage: str = ...,
    AcceptRanges: str = ...,
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentLength: int = ...,
    ContentRange: str = ...,
    ContentType: str = ...,
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    DeleteMarker: bool = ...,
    ETag: str = ...,
    Expires: Union[datetime, str] = ...,
    Expiration: str = ...,
    LastModified: Union[datetime, str] = ...,
    MissingMeta: int = ...,
    Metadata: Mapping[str, str] = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (1)
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (2)
    ObjectLockRetainUntilDate: Union[datetime, str] = ...,
    PartsCount: int = ...,
    ReplicationStatus: ReplicationStatusType = ...,  # (3)
    RequestCharged: RequestChargedType = ...,  # (4)
    Restore: str = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (5)
    SSECustomerAlgorithm: str = ...,
    SSEKMSKeyId: str = ...,
    SSECustomerKeyMD5: str = ...,
    StorageClass: StorageClassType = ...,  # (6)
    TagCount: int = ...,
    VersionId: str = ...,
    BucketKeyEnabled: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (7)
    ...
  1. See ObjectLockModeType
  2. See ObjectLockLegalHoldStatusType
  3. See ReplicationStatusType
  4. See RequestChargedType
  5. See ServerSideEncryptionType
  6. See StorageClassType
  7. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: WriteGetObjectResponseRequestRequestTypeDef = {  # (1)
    "RequestRoute": ...,
    "RequestToken": ...,
}

parent.write_get_object_response(**kwargs)
  1. See WriteGetObjectResponseRequestRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("s3").get_paginator method with overloads.

get_waiter

Type annotations and code completion for boto3.client("s3").get_waiter method with overloads.