S3ServiceResource#
Auto-generated documentation for S3 type annotations stubs module types-boto3-s3.
S3ServiceResource#
Type annotations and code completion for boto3.resource("s3")
, included resources and collections.
boto3 documentation
# S3ServiceResource usage example
from types_boto3_s3.service_resource import S3ServiceResource
def get_s3_resource() -> S3ServiceResource:
return boto3.resource("s3")
Attributes#
-
meta
:S3ResourceMeta
-
buckets
:ServiceResourceBucketsCollection
Collections#
ServiceResourceBucketsCollection#
Provides access to Bucket resource.
Type annotations and code completion for boto3.resource("s3").buckets
collection.
boto3 documentation
# ServiceResourceBucketsCollection usage example
from types_boto3_s3.service_resource import ServiceResourceBucketsCollection
def get_collection() -> ServiceResourceBucketsCollection:
return boto3.resource("s3").buckets
Methods#
S3ServiceResource.get_available_subresources method#
Returns a list of all the available sub-resources for this resource.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
S3ServiceResource.create_bucket method#
This action creates an Amazon S3 bucket.
Type annotations and code completion for boto3.resource("s3").create_bucket
method.
boto3 documentation
# create_bucket 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)
) -> _Bucket:
...
# create_bucket method usage example with argument unpacking
kwargs: CreateBucketRequestServiceResourceCreateBucketTypeDef = { # (1)
"Bucket": ...,
}
parent.create_bucket(**kwargs)
S3ServiceResource.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
name: str,
) -> _Bucket:
...
S3ServiceResource.BucketAcl method#
Creates a BucketAcl resource.
Type annotations and code completion for boto3.resource("s3").BucketAcl
method.
boto3 documentation
# BucketAcl method definition
def BucketAcl(
self,
bucket_name: str,
) -> _BucketAcl:
...
S3ServiceResource.BucketCors method#
Creates a BucketCors resource.
Type annotations and code completion for boto3.resource("s3").BucketCors
method.
boto3 documentation
# BucketCors method definition
def BucketCors(
self,
bucket_name: str,
) -> _BucketCors:
...
S3ServiceResource.BucketLifecycle method#
Creates a BucketLifecycle resource.
Type annotations and code completion for boto3.resource("s3").BucketLifecycle
method.
boto3 documentation
# BucketLifecycle method definition
def BucketLifecycle(
self,
bucket_name: str,
) -> _BucketLifecycle:
...
S3ServiceResource.BucketLifecycleConfiguration method#
Creates a BucketLifecycleConfiguration resource.
Type annotations and code completion for boto3.resource("s3").BucketLifecycleConfiguration
method.
boto3 documentation
# BucketLifecycleConfiguration method definition
def BucketLifecycleConfiguration(
self,
bucket_name: str,
) -> _BucketLifecycleConfiguration:
...
S3ServiceResource.BucketLogging method#
Creates a BucketLogging resource.
Type annotations and code completion for boto3.resource("s3").BucketLogging
method.
boto3 documentation
# BucketLogging method definition
def BucketLogging(
self,
bucket_name: str,
) -> _BucketLogging:
...
S3ServiceResource.BucketNotification method#
Creates a BucketNotification resource.
Type annotations and code completion for boto3.resource("s3").BucketNotification
method.
boto3 documentation
# BucketNotification method definition
def BucketNotification(
self,
bucket_name: str,
) -> _BucketNotification:
...
S3ServiceResource.BucketPolicy method#
Creates a BucketPolicy resource.
Type annotations and code completion for boto3.resource("s3").BucketPolicy
method.
boto3 documentation
# BucketPolicy method definition
def BucketPolicy(
self,
bucket_name: str,
) -> _BucketPolicy:
...
S3ServiceResource.BucketRequestPayment method#
Creates a BucketRequestPayment resource.
Type annotations and code completion for boto3.resource("s3").BucketRequestPayment
method.
boto3 documentation
# BucketRequestPayment method definition
def BucketRequestPayment(
self,
bucket_name: str,
) -> _BucketRequestPayment:
...
S3ServiceResource.BucketTagging method#
Creates a BucketTagging resource.
Type annotations and code completion for boto3.resource("s3").BucketTagging
method.
boto3 documentation
# BucketTagging method definition
def BucketTagging(
self,
bucket_name: str,
) -> _BucketTagging:
...
S3ServiceResource.BucketVersioning method#
Creates a BucketVersioning resource.
Type annotations and code completion for boto3.resource("s3").BucketVersioning
method.
boto3 documentation
# BucketVersioning method definition
def BucketVersioning(
self,
bucket_name: str,
) -> _BucketVersioning:
...
S3ServiceResource.BucketWebsite method#
Creates a BucketWebsite resource.
Type annotations and code completion for boto3.resource("s3").BucketWebsite
method.
boto3 documentation
# BucketWebsite method definition
def BucketWebsite(
self,
bucket_name: str,
) -> _BucketWebsite:
...
S3ServiceResource.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for boto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
def MultipartUpload(
self,
bucket_name: str,
object_key: str,
id: str,
) -> _MultipartUpload:
...
S3ServiceResource.MultipartUploadPart method#
Creates a MultipartUploadPart resource.
Type annotations and code completion for boto3.resource("s3").MultipartUploadPart
method.
boto3 documentation
# MultipartUploadPart method definition
def MultipartUploadPart(
self,
bucket_name: str,
object_key: str,
multipart_upload_id: str,
part_number: int,
) -> _MultipartUploadPart:
...
S3ServiceResource.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
bucket_name: str,
key: str,
) -> _Object:
...
S3ServiceResource.ObjectAcl method#
Creates a ObjectAcl resource.
Type annotations and code completion for boto3.resource("s3").ObjectAcl
method.
boto3 documentation
# ObjectAcl method definition
def ObjectAcl(
self,
bucket_name: str,
object_key: str,
) -> _ObjectAcl:
...
S3ServiceResource.ObjectSummary method#
Creates a ObjectSummary resource.
Type annotations and code completion for boto3.resource("s3").ObjectSummary
method.
boto3 documentation
# ObjectSummary method definition
def ObjectSummary(
self,
bucket_name: str,
key: str,
) -> _ObjectSummary:
...
S3ServiceResource.ObjectVersion method#
Creates a ObjectVersion resource.
Type annotations and code completion for boto3.resource("s3").ObjectVersion
method.
boto3 documentation
# ObjectVersion method definition
def ObjectVersion(
self,
bucket_name: str,
object_key: str,
id: str,
) -> _ObjectVersion:
...
Bucket#
Type annotations and code completion for boto3.resource("s3").Bucket
class.
boto3 documentation
# Bucket usage example
from types_boto3_s3.service_resource import Bucket
def get_resource() -> Bucket:
return boto3.resource("s3").Bucket(...)
Bucket attributes#
name
:str
multipart_uploads
:BucketMultipartUploadsCollection
object_versions
:BucketObjectVersionsCollection
objects
:BucketObjectsCollection
creation_date
:datetime
bucket_region
:str
meta
:S3ResourceMeta
Bucket collections#
Bucket.multipart_uploads#
Provides access to MultipartUpload resource.
Type annotations and code completion for boto3.resource("s3").Bucket(...).multipart_uploads
collection.
boto3 documentation
# BucketMultipartUploadsCollection usage example
from types_boto3_s3.service_resource import BucketMultipartUploadsCollection
def get_collection() -> BucketMultipartUploadsCollection:
resource = boto3.resource("s3").Bucket(...)
return resource.multipart_uploads
Bucket.object_versions#
Provides access to ObjectVersion resource.
Type annotations and code completion for boto3.resource("s3").Bucket(...).object_versions
collection.
boto3 documentation
# BucketObjectVersionsCollection usage example
from types_boto3_s3.service_resource import BucketObjectVersionsCollection
def get_collection() -> BucketObjectVersionsCollection:
resource = boto3.resource("s3").Bucket(...)
return resource.object_versions
Bucket.objects#
Provides access to ObjectSummary resource.
Type annotations and code completion for boto3.resource("s3").Bucket(...).objects
collection.
boto3 documentation
# BucketObjectsCollection usage example
from types_boto3_s3.service_resource import BucketObjectsCollection
def get_collection() -> BucketObjectsCollection:
resource = boto3.resource("s3").Bucket(...)
return resource.objects
Bucket methods#
Bucket.get_available_subresources method#
Returns a list of all the available sub-resources for this Bucket.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
Bucket.create method#
This action creates an Amazon S3 bucket.
Type annotations and code completion for boto3.resource("s3").create
method.
boto3 documentation
# create method definition
def create(
self,
*,
ACL: BucketCannedACLType = ..., # (1)
CreateBucketConfiguration: CreateBucketConfigurationTypeDef = ..., # (2)
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWrite: str = ...,
GrantWriteACP: str = ...,
ObjectLockEnabledForBucket: bool = ...,
ObjectOwnership: ObjectOwnershipType = ..., # (3)
) -> CreateBucketOutputTypeDef: # (4)
...
- See BucketCannedACLType
- See CreateBucketConfigurationTypeDef
- See ObjectOwnershipType
- See CreateBucketOutputTypeDef
# create method usage example with argument unpacking
kwargs: CreateBucketRequestBucketCreateTypeDef = { # (1)
"ACL": ...,
}
parent.create(**kwargs)
Bucket.delete method#
Deletes the S3 bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketRequestBucketDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
Bucket.delete_objects method#
This operation enables you to delete multiple objects from a bucket using a single HTTP request.
Type annotations and code completion for boto3.resource("s3").delete_objects
method.
boto3 documentation
# delete_objects method definition
def delete_objects(
self,
*,
Delete: DeleteTypeDef, # (1)
MFA: str = ...,
RequestPayer: RequestPayerType = ..., # (2)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
) -> DeleteObjectsOutputTypeDef: # (4)
...
- See DeleteTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See DeleteObjectsOutputTypeDef
# delete_objects method usage example with argument unpacking
kwargs: DeleteObjectsRequestBucketDeleteObjectsTypeDef = { # (1)
"Delete": ...,
}
parent.delete_objects(**kwargs)
Bucket.put_object method#
Adds an object to a bucket.
Type annotations and code completion for boto3.resource("s3").put_object
method.
boto3 documentation
# put_object method definition
def put_object(
self,
*,
Key: str,
ACL: ObjectCannedACLType = ..., # (1)
Body: BlobTypeDef = ...,
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: TimestampTypeDef = ...,
IfMatch: str = ...,
IfNoneMatch: str = ...,
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWriteACP: str = ...,
WriteOffsetBytes: int = ...,
Metadata: Mapping[str, str] = ...,
ServerSideEncryption: ServerSideEncryptionType = ..., # (3)
StorageClass: StorageClassType = ..., # (4)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
RequestPayer: RequestPayerType = ..., # (5)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (6)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (7)
ExpectedBucketOwner: str = ...,
) -> _Object:
...
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
# put_object method usage example with argument unpacking
kwargs: PutObjectRequestBucketPutObjectTypeDef = { # (1)
"Key": ...,
}
parent.put_object(**kwargs)
Bucket.wait_until_exists method#
Waits until Bucket is exists.
Type annotations and code completion for boto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
def wait_until_exists(
self,
) -> None:
...
Bucket.wait_until_not_exists method#
Waits until Bucket is not_exists.
Type annotations and code completion for boto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
def wait_until_not_exists(
self,
) -> None:
...
Bucket.Acl method#
Creates a BucketAcl resource.
Type annotations and code completion for boto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
def Acl(
self,
) -> _BucketAcl:
...
Bucket.Cors method#
Creates a BucketCors resource.
Type annotations and code completion for boto3.resource("s3").Cors
method.
boto3 documentation
# Cors method definition
def Cors(
self,
) -> _BucketCors:
...
Bucket.Lifecycle method#
Creates a BucketLifecycle resource.
Type annotations and code completion for boto3.resource("s3").Lifecycle
method.
boto3 documentation
# Lifecycle method definition
def Lifecycle(
self,
) -> _BucketLifecycle:
...
Bucket.LifecycleConfiguration method#
Creates a BucketLifecycleConfiguration resource.
Type annotations and code completion for boto3.resource("s3").LifecycleConfiguration
method.
boto3 documentation
# LifecycleConfiguration method definition
def LifecycleConfiguration(
self,
) -> _BucketLifecycleConfiguration:
...
Bucket.Logging method#
Creates a BucketLogging resource.
Type annotations and code completion for boto3.resource("s3").Logging
method.
boto3 documentation
# Logging method definition
def Logging(
self,
) -> _BucketLogging:
...
Bucket.Notification method#
Creates a BucketNotification resource.
Type annotations and code completion for boto3.resource("s3").Notification
method.
boto3 documentation
# Notification method definition
def Notification(
self,
) -> _BucketNotification:
...
Bucket.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
key: str,
) -> _Object:
...
Bucket.Policy method#
Creates a BucketPolicy resource.
Type annotations and code completion for boto3.resource("s3").Policy
method.
boto3 documentation
# Policy method definition
def Policy(
self,
) -> _BucketPolicy:
...
Bucket.RequestPayment method#
Creates a BucketRequestPayment resource.
Type annotations and code completion for boto3.resource("s3").RequestPayment
method.
boto3 documentation
# RequestPayment method definition
def RequestPayment(
self,
) -> _BucketRequestPayment:
...
Bucket.Tagging method#
Creates a BucketTagging resource.
Type annotations and code completion for boto3.resource("s3").Tagging
method.
boto3 documentation
# Tagging method definition
def Tagging(
self,
) -> _BucketTagging:
...
Bucket.Versioning method#
Creates a BucketVersioning resource.
Type annotations and code completion for boto3.resource("s3").Versioning
method.
boto3 documentation
# Versioning method definition
def Versioning(
self,
) -> _BucketVersioning:
...
Bucket.Website method#
Creates a BucketWebsite resource.
Type annotations and code completion for boto3.resource("s3").Website
method.
boto3 documentation
# Website method definition
def Website(
self,
) -> _BucketWebsite:
...
Bucket.load method#
Calls s3.Client.list_buckets() to update the attributes of the Bucket resource.
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
Bucket.copy method#
Copy an object from one S3 location to another.
Type annotations and code completion for boto3.resource("s3").copy
method.
boto3 documentation
# copy method definition
def copy(
self,
CopySource: CopySourceTypeDef, # (1)
Key: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
SourceClient: Union[BaseClient, None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# copy method usage example with argument unpacking
kwargs: BucketCopyRequestTypeDef = { # (1)
"CopySource": ...,
"Key": ...,
}
parent.copy(**kwargs)
Bucket.download_file method#
Download an object from S3 to a file.
Type annotations and code completion for boto3.resource("s3").download_file
method.
boto3 documentation
# download_file method definition
def download_file(
self,
Key: str,
Filename: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# download_file method usage example with argument unpacking
kwargs: BucketDownloadFileRequestTypeDef = { # (1)
"Key": ...,
"Filename": ...,
}
parent.download_file(**kwargs)
Bucket.download_fileobj method#
Download an object from S3 to a file-like object.
Type annotations and code completion for boto3.resource("s3").download_fileobj
method.
boto3 documentation
# download_fileobj method definition
def download_fileobj(
self,
Key: str,
Fileobj: FileobjTypeDef,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# download_fileobj method usage example with argument unpacking
kwargs: BucketDownloadFileobjRequestTypeDef = { # (1)
"Key": ...,
"Fileobj": ...,
}
parent.download_fileobj(**kwargs)
Bucket.upload_file method#
Upload a file to S3.
Type annotations and code completion for boto3.resource("s3").upload_file
method.
boto3 documentation
# upload_file method definition
def upload_file(
self,
Filename: str,
Key: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# upload_file method usage example with argument unpacking
kwargs: BucketUploadFileRequestTypeDef = { # (1)
"Filename": ...,
"Key": ...,
}
parent.upload_file(**kwargs)
Bucket.upload_fileobj method#
Upload a file-like object to S3.
Type annotations and code completion for boto3.resource("s3").upload_fileobj
method.
boto3 documentation
# upload_fileobj method definition
def upload_fileobj(
self,
Fileobj: FileobjTypeDef,
Key: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# upload_fileobj method usage example with argument unpacking
kwargs: BucketUploadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
"Key": ...,
}
parent.upload_fileobj(**kwargs)
BucketAcl#
Type annotations and code completion for boto3.resource("s3").BucketAcl
class.
boto3 documentation
# BucketAcl usage example
from types_boto3_s3.service_resource import BucketAcl
def get_resource() -> BucketAcl:
return boto3.resource("s3").BucketAcl(...)
BucketAcl attributes#
bucket_name
:str
owner
: OwnerTypeDefgrants
:list
[GrantTypeDef]meta
:S3ResourceMeta
BucketAcl methods#
BucketAcl.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketAcl.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketAcl.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ACL: BucketCannedACLType = ..., # (1)
AccessControlPolicy: AccessControlPolicyTypeDef = ..., # (2)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWrite: str = ...,
GrantWriteACP: str = ...,
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketAclRequestBucketAclPutTypeDef = { # (1)
"ACL": ...,
}
parent.put(**kwargs)
BucketAcl.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketAcl.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketAcl.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketCors#
Type annotations and code completion for boto3.resource("s3").BucketCors
class.
boto3 documentation
# BucketCors usage example
from types_boto3_s3.service_resource import BucketCors
def get_resource() -> BucketCors:
return boto3.resource("s3").BucketCors(...)
BucketCors attributes#
bucket_name
:str
cors_rules
:list
[CORSRuleOutputTypeDef]meta
:S3ResourceMeta
BucketCors methods#
BucketCors.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketCors.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketCors.delete method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketCorsRequestBucketCorsDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketCors.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
CORSConfiguration: CORSConfigurationTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketCorsRequestBucketCorsPutTypeDef = { # (1)
"CORSConfiguration": ...,
}
parent.put(**kwargs)
BucketCors.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketCors.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketCors.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketLifecycle#
Type annotations and code completion for boto3.resource("s3").BucketLifecycle
class.
boto3 documentation
# BucketLifecycle usage example
from types_boto3_s3.service_resource import BucketLifecycle
def get_resource() -> BucketLifecycle:
return boto3.resource("s3").BucketLifecycle(...)
BucketLifecycle attributes#
bucket_name
:str
rules
:list
[RuleOutputTypeDef]meta
:S3ResourceMeta
BucketLifecycle methods#
BucketLifecycle.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketLifecycle.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLifecycle.delete method#
Deletes the lifecycle configuration from the specified bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketLifecycleRequestBucketLifecycleDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketLifecycle.put method#
For an updated version of this API, see PutBucketLifecycleConfiguration.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
LifecycleConfiguration: LifecycleConfigurationTypeDef = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketLifecycleRequestBucketLifecyclePutTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.put(**kwargs)
BucketLifecycle.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketLifecycle.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketLifecycle.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketLifecycleConfiguration#
Type annotations and code completion for boto3.resource("s3").BucketLifecycleConfiguration
class.
boto3 documentation
# BucketLifecycleConfiguration usage example
from types_boto3_s3.service_resource import BucketLifecycleConfiguration
def get_resource() -> BucketLifecycleConfiguration:
return boto3.resource("s3").BucketLifecycleConfiguration(...)
BucketLifecycleConfiguration attributes#
bucket_name
:str
rules
:list
[LifecycleRuleOutputTypeDef]transition_default_minimum_object_size
: TransitionDefaultMinimumObjectSizeTypemeta
:S3ResourceMeta
BucketLifecycleConfiguration methods#
BucketLifecycleConfiguration.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketLifecycleConfiguration.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLifecycleConfiguration.delete method#
Deletes the lifecycle configuration from the specified bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketLifecycleRequestBucketLifecycleConfigurationDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketLifecycleConfiguration.put method#
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
LifecycleConfiguration: BucketLifecycleConfigurationTypeDef = ..., # (2)
ExpectedBucketOwner: str = ...,
TransitionDefaultMinimumObjectSize: TransitionDefaultMinimumObjectSizeType = ..., # (3)
) -> PutBucketLifecycleConfigurationOutputTypeDef: # (4)
...
- See ChecksumAlgorithmType
- See BucketLifecycleConfigurationTypeDef
- See TransitionDefaultMinimumObjectSizeType
- See PutBucketLifecycleConfigurationOutputTypeDef
# put method usage example with argument unpacking
kwargs: PutBucketLifecycleConfigurationRequestBucketLifecycleConfigurationPutTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.put(**kwargs)
BucketLifecycleConfiguration.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketLifecycleConfiguration.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketLifecycleConfiguration.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketLogging#
Type annotations and code completion for boto3.resource("s3").BucketLogging
class.
boto3 documentation
# BucketLogging usage example
from types_boto3_s3.service_resource import BucketLogging
def get_resource() -> BucketLogging:
return boto3.resource("s3").BucketLogging(...)
BucketLogging attributes#
bucket_name
:str
logging_enabled
: LoggingEnabledOutputTypeDefmeta
:S3ResourceMeta
BucketLogging methods#
BucketLogging.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketLogging.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLogging.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
BucketLoggingStatus: BucketLoggingStatusTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketLoggingRequestBucketLoggingPutTypeDef = { # (1)
"BucketLoggingStatus": ...,
}
parent.put(**kwargs)
BucketLogging.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketLogging.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketLogging.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketNotification#
Type annotations and code completion for boto3.resource("s3").BucketNotification
class.
boto3 documentation
# BucketNotification usage example
from types_boto3_s3.service_resource import BucketNotification
def get_resource() -> BucketNotification:
return boto3.resource("s3").BucketNotification(...)
BucketNotification attributes#
bucket_name
:str
topic_configurations
:list
[TopicConfigurationOutputTypeDef]queue_configurations
:list
[QueueConfigurationOutputTypeDef]lambda_function_configurations
:list
[LambdaFunctionConfigurationOutputTypeDef]event_bridge_configuration
:dict
[str
,Any
]meta
:S3ResourceMeta
BucketNotification methods#
BucketNotification.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketNotification.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketNotification.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
NotificationConfiguration: NotificationConfigurationTypeDef, # (1)
ExpectedBucketOwner: str = ...,
SkipDestinationValidation: bool = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketNotificationConfigurationRequestBucketNotificationPutTypeDef = { # (1)
"NotificationConfiguration": ...,
}
parent.put(**kwargs)
BucketNotification.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketNotification.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketNotification.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketPolicy#
Type annotations and code completion for boto3.resource("s3").BucketPolicy
class.
boto3 documentation
# BucketPolicy usage example
from types_boto3_s3.service_resource import BucketPolicy
def get_resource() -> BucketPolicy:
return boto3.resource("s3").BucketPolicy(...)
BucketPolicy attributes#
bucket_name
:str
policy
:str
meta
:S3ResourceMeta
BucketPolicy methods#
BucketPolicy.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketPolicy.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketPolicy.delete method#
Deletes the policy of a specified bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketPolicyRequestBucketPolicyDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketPolicy.put method#
Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
Policy: str,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
ConfirmRemoveSelfBucketAccess: bool = ...,
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketPolicyRequestBucketPolicyPutTypeDef = { # (1)
"Policy": ...,
}
parent.put(**kwargs)
BucketPolicy.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketPolicy.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketPolicy.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketRequestPayment#
Type annotations and code completion for boto3.resource("s3").BucketRequestPayment
class.
boto3 documentation
# BucketRequestPayment usage example
from types_boto3_s3.service_resource import BucketRequestPayment
def get_resource() -> BucketRequestPayment:
return boto3.resource("s3").BucketRequestPayment(...)
BucketRequestPayment attributes#
bucket_name
:str
payer
: PayerTypemeta
:S3ResourceMeta
BucketRequestPayment methods#
BucketRequestPayment.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketRequestPayment.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketRequestPayment.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
RequestPaymentConfiguration: RequestPaymentConfigurationTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketRequestPaymentRequestBucketRequestPaymentPutTypeDef = { # (1)
"RequestPaymentConfiguration": ...,
}
parent.put(**kwargs)
BucketRequestPayment.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketRequestPayment.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketRequestPayment.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketTagging#
Type annotations and code completion for boto3.resource("s3").BucketTagging
class.
boto3 documentation
# BucketTagging usage example
from types_boto3_s3.service_resource import BucketTagging
def get_resource() -> BucketTagging:
return boto3.resource("s3").BucketTagging(...)
BucketTagging attributes#
bucket_name
:str
tag_set
:list
[TagTypeDef]meta
:S3ResourceMeta
BucketTagging methods#
BucketTagging.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketTagging.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketTagging.delete method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketTaggingRequestBucketTaggingDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketTagging.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
Tagging: TaggingTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
- See TaggingTypeDef
- See ChecksumAlgorithmType
# put method usage example with argument unpacking
kwargs: PutBucketTaggingRequestBucketTaggingPutTypeDef = { # (1)
"Tagging": ...,
}
parent.put(**kwargs)
BucketTagging.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketTagging.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketTagging.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketVersioning#
Type annotations and code completion for boto3.resource("s3").BucketVersioning
class.
boto3 documentation
# BucketVersioning usage example
from types_boto3_s3.service_resource import BucketVersioning
def get_resource() -> BucketVersioning:
return boto3.resource("s3").BucketVersioning(...)
BucketVersioning attributes#
bucket_name
:str
status
: BucketVersioningStatusTypemfa_delete
: MFADeleteStatusTypemeta
:S3ResourceMeta
BucketVersioning methods#
BucketVersioning.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketVersioning.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketVersioning.enable method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").enable
method.
boto3 documentation
# enable method definition
def enable(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
MFA: str = ...,
ExpectedBucketOwner: str = ...,
) -> None:
...
# enable method usage example with argument unpacking
kwargs: PutBucketVersioningRequestBucketVersioningEnableTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.enable(**kwargs)
BucketVersioning.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
VersioningConfiguration: VersioningConfigurationTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
MFA: str = ...,
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketVersioningRequestBucketVersioningPutTypeDef = { # (1)
"VersioningConfiguration": ...,
}
parent.put(**kwargs)
BucketVersioning.suspend method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").suspend
method.
boto3 documentation
# suspend method definition
def suspend(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
MFA: str = ...,
ExpectedBucketOwner: str = ...,
) -> None:
...
# suspend method usage example with argument unpacking
kwargs: PutBucketVersioningRequestBucketVersioningSuspendTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.suspend(**kwargs)
BucketVersioning.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketVersioning.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketVersioning.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
BucketWebsite#
Type annotations and code completion for boto3.resource("s3").BucketWebsite
class.
boto3 documentation
# BucketWebsite usage example
from types_boto3_s3.service_resource import BucketWebsite
def get_resource() -> BucketWebsite:
return boto3.resource("s3").BucketWebsite(...)
BucketWebsite attributes#
bucket_name
:str
redirect_all_requests_to
: RedirectAllRequestsToTypeDefindex_document
: IndexDocumentTypeDeferror_document
: ErrorDocumentTypeDefrouting_rules
:list
[RoutingRuleTypeDef]meta
:S3ResourceMeta
BucketWebsite methods#
BucketWebsite.get_available_subresources method#
Returns a list of all the available sub-resources for this BucketWebsite.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketWebsite.delete method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketWebsiteRequestBucketWebsiteDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketWebsite.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
WebsiteConfiguration: WebsiteConfigurationTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketWebsiteRequestBucketWebsitePutTypeDef = { # (1)
"WebsiteConfiguration": ...,
}
parent.put(**kwargs)
BucketWebsite.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
BucketWebsite.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
BucketWebsite.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
MultipartUpload#
Type annotations and code completion for boto3.resource("s3").MultipartUpload
class.
boto3 documentation
# MultipartUpload usage example
from types_boto3_s3.service_resource import MultipartUpload
def get_resource() -> MultipartUpload:
return boto3.resource("s3").MultipartUpload(...)
MultipartUpload attributes#
bucket_name
:str
object_key
:str
id
:str
parts
:MultipartUploadPartsCollection
upload_id
:str
key
:str
initiated
:datetime
storage_class
: StorageClassTypeowner
: OwnerTypeDefinitiator
: InitiatorTypeDefchecksum_algorithm
: ChecksumAlgorithmTypemeta
:S3ResourceMeta
MultipartUpload collections#
MultipartUpload.parts#
Provides access to MultipartUploadPart resource.
Type annotations and code completion for boto3.resource("s3").MultipartUpload(...).parts
collection.
boto3 documentation
# MultipartUploadPartsCollection usage example
from types_boto3_s3.service_resource import MultipartUploadPartsCollection
def get_collection() -> MultipartUploadPartsCollection:
resource = boto3.resource("s3").MultipartUpload(...)
return resource.parts
MultipartUpload methods#
MultipartUpload.get_available_subresources method#
Returns a list of all the available sub-resources for this MultipartUpload.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
MultipartUpload.abort method#
This operation aborts a multipart upload.
Type annotations and code completion for boto3.resource("s3").abort
method.
boto3 documentation
# abort method definition
def abort(
self,
*,
RequestPayer: RequestPayerType = ..., # (1)
ExpectedBucketOwner: str = ...,
IfMatchInitiatedTime: TimestampTypeDef = ...,
) -> AbortMultipartUploadOutputTypeDef: # (2)
...
# abort method usage example with argument unpacking
kwargs: AbortMultipartUploadRequestMultipartUploadAbortTypeDef = { # (1)
"RequestPayer": ...,
}
parent.abort(**kwargs)
MultipartUpload.complete method#
Completes a multipart upload by assembling previously uploaded parts.
Type annotations and code completion for boto3.resource("s3").complete
method.
boto3 documentation
# complete method definition
def complete(
self,
*,
MultipartUpload: CompletedMultipartUploadTypeDef = ..., # (1)
ChecksumCRC32: str = ...,
ChecksumCRC32C: str = ...,
ChecksumSHA1: str = ...,
ChecksumSHA256: str = ...,
RequestPayer: RequestPayerType = ..., # (2)
ExpectedBucketOwner: str = ...,
IfMatch: str = ...,
IfNoneMatch: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
) -> _Object:
...
# complete method usage example with argument unpacking
kwargs: CompleteMultipartUploadRequestMultipartUploadCompleteTypeDef = { # (1)
"MultipartUpload": ...,
}
parent.complete(**kwargs)
MultipartUpload.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
) -> _Object:
...
MultipartUpload.Part method#
Creates a MultipartUploadPart resource.
Type annotations and code completion for boto3.resource("s3").Part
method.
boto3 documentation
# Part method definition
def Part(
self,
part_number: int,
) -> _MultipartUploadPart:
...
MultipartUploadPart#
Type annotations and code completion for boto3.resource("s3").MultipartUploadPart
class.
boto3 documentation
# MultipartUploadPart usage example
from types_boto3_s3.service_resource import MultipartUploadPart
def get_resource() -> MultipartUploadPart:
return boto3.resource("s3").MultipartUploadPart(...)
MultipartUploadPart attributes#
bucket_name
:str
object_key
:str
multipart_upload_id
:str
part_number
:int
last_modified
:datetime
e_tag
:str
size
:int
checksum_crc32
:str
checksum_crc32_c
:str
checksum_sha1
:str
checksum_sha256
:str
meta
:S3ResourceMeta
MultipartUploadPart methods#
MultipartUploadPart.get_available_subresources method#
Returns a list of all the available sub-resources for this MultipartUploadPart.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
MultipartUploadPart.copy_from method#
Uploads a part by copying data from an existing object as data source.
Type annotations and code completion for boto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
def copy_from(
self,
*,
CopySource: CopySourceOrStrTypeDef, # (1)
CopySourceIfMatch: str = ...,
CopySourceIfModifiedSince: TimestampTypeDef = ...,
CopySourceIfNoneMatch: str = ...,
CopySourceIfUnmodifiedSince: TimestampTypeDef = ...,
CopySourceRange: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
CopySourceSSECustomerAlgorithm: str = ...,
CopySourceSSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (2)
ExpectedBucketOwner: str = ...,
ExpectedSourceBucketOwner: str = ...,
) -> UploadPartCopyOutputTypeDef: # (3)
...
# copy_from method usage example with argument unpacking
kwargs: UploadPartCopyRequestMultipartUploadPartCopyFromTypeDef = { # (1)
"CopySource": ...,
}
parent.copy_from(**kwargs)
MultipartUploadPart.upload method#
Uploads a part in a multipart upload.
Type annotations and code completion for boto3.resource("s3").upload
method.
boto3 documentation
# upload method definition
def upload(
self,
*,
Body: BlobTypeDef = ...,
ContentLength: int = ...,
ContentMD5: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
ChecksumCRC32: str = ...,
ChecksumCRC32C: str = ...,
ChecksumSHA1: str = ...,
ChecksumSHA256: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> UploadPartOutputTypeDef: # (3)
...
# upload method usage example with argument unpacking
kwargs: UploadPartRequestMultipartUploadPartUploadTypeDef = { # (1)
"Body": ...,
}
parent.upload(**kwargs)
MultipartUploadPart.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for boto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
def MultipartUpload(
self,
) -> _MultipartUpload:
...
Object#
Type annotations and code completion for boto3.resource("s3").Object
class.
boto3 documentation
# Object usage example
from types_boto3_s3.service_resource import Object
def get_resource() -> Object:
return boto3.resource("s3").Object(...)
Object attributes#
bucket_name
:str
key
:str
delete_marker
:bool
accept_ranges
:str
expiration
:str
restore
:str
archive_status
: ArchiveStatusTypelast_modified
:datetime
content_length
:int
checksum_crc32
:str
checksum_crc32_c
:str
checksum_sha1
:str
checksum_sha256
:str
e_tag
:str
missing_meta
:int
version_id
:str
cache_control
:str
content_disposition
:str
content_encoding
:str
content_language
:str
content_type
:str
expires
:datetime
website_redirect_location
:str
server_side_encryption
: ServerSideEncryptionTypemetadata
:dict
[str
,str
]sse_customer_algorithm
:str
sse_customer_key_md5
:str
ssekms_key_id
:str
bucket_key_enabled
:bool
storage_class
: StorageClassTyperequest_charged
:Literal['requester']
(see RequestChargedType)replication_status
: ReplicationStatusTypeparts_count
:int
object_lock_mode
: ObjectLockModeTypeobject_lock_retain_until_date
:datetime
object_lock_legal_hold_status
: ObjectLockLegalHoldStatusTypemeta
:S3ResourceMeta
Object methods#
Object.get_available_subresources method#
Returns a list of all the available sub-resources for this Object.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
Object.copy_from method#
Creates a copy of an object that is already stored in Amazon S3.
Type annotations and code completion for boto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
def copy_from(
self,
*,
CopySource: CopySourceOrStrTypeDef, # (1)
ACL: ObjectCannedACLType = ..., # (2)
CacheControl: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
ContentDisposition: str = ...,
ContentEncoding: str = ...,
ContentLanguage: str = ...,
ContentType: str = ...,
CopySourceIfMatch: str = ...,
CopySourceIfModifiedSince: TimestampTypeDef = ...,
CopySourceIfNoneMatch: str = ...,
CopySourceIfUnmodifiedSince: TimestampTypeDef = ...,
Expires: TimestampTypeDef = ...,
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: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
CopySourceSSECustomerAlgorithm: str = ...,
CopySourceSSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (8)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (9)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (10)
ExpectedBucketOwner: str = ...,
ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef: # (11)
...
- See CopySourceTypeDef
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See MetadataDirectiveType
- See TaggingDirectiveType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See CopyObjectOutputTypeDef
# copy_from method usage example with argument unpacking
kwargs: CopyObjectRequestObjectCopyFromTypeDef = { # (1)
"CopySource": ...,
}
parent.copy_from(**kwargs)
Object.delete method#
Removes an object from a bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
MFA: str = ...,
VersionId: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
IfMatch: str = ...,
IfMatchLastModifiedTime: TimestampTypeDef = ...,
IfMatchSize: int = ...,
) -> DeleteObjectOutputTypeDef: # (2)
...
# delete method usage example with argument unpacking
kwargs: DeleteObjectRequestObjectDeleteTypeDef = { # (1)
"MFA": ...,
}
parent.delete(**kwargs)
Object.get method#
Retrieves an object from Amazon S3.
Type annotations and code completion for boto3.resource("s3").get
method.
boto3 documentation
# get method definition
def get(
self,
*,
IfMatch: str = ...,
IfModifiedSince: TimestampTypeDef = ...,
IfNoneMatch: str = ...,
IfUnmodifiedSince: TimestampTypeDef = ...,
Range: str = ...,
ResponseCacheControl: str = ...,
ResponseContentDisposition: str = ...,
ResponseContentEncoding: str = ...,
ResponseContentLanguage: str = ...,
ResponseContentType: str = ...,
ResponseExpires: TimestampTypeDef = ...,
VersionId: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (1)
PartNumber: int = ...,
ExpectedBucketOwner: str = ...,
ChecksumMode: ChecksumModeType = ..., # (2)
) -> GetObjectOutputTypeDef: # (3)
...
- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get method usage example with argument unpacking
kwargs: GetObjectRequestObjectGetTypeDef = { # (1)
"IfMatch": ...,
}
parent.get(**kwargs)
Object.initiate_multipart_upload method#
This action initiates a multipart upload and returns an upload ID.
Type annotations and code completion for boto3.resource("s3").initiate_multipart_upload
method.
boto3 documentation
# initiate_multipart_upload method definition
def initiate_multipart_upload(
self,
*,
ACL: ObjectCannedACLType = ..., # (1)
CacheControl: str = ...,
ContentDisposition: str = ...,
ContentEncoding: str = ...,
ContentLanguage: str = ...,
ContentType: str = ...,
Expires: TimestampTypeDef = ...,
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWriteACP: str = ...,
Metadata: Mapping[str, str] = ...,
ServerSideEncryption: ServerSideEncryptionType = ..., # (2)
StorageClass: StorageClassType = ..., # (3)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
RequestPayer: RequestPayerType = ..., # (4)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (5)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (6)
ExpectedBucketOwner: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (7)
) -> _MultipartUpload:
...
- See ObjectCannedACLType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See ChecksumAlgorithmType
# initiate_multipart_upload method usage example with argument unpacking
kwargs: CreateMultipartUploadRequestObjectInitiateMultipartUploadTypeDef = { # (1)
"ACL": ...,
}
parent.initiate_multipart_upload(**kwargs)
Object.put method#
Adds an object to a bucket.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ACL: ObjectCannedACLType = ..., # (1)
Body: BlobTypeDef = ...,
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: TimestampTypeDef = ...,
IfMatch: str = ...,
IfNoneMatch: str = ...,
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWriteACP: str = ...,
WriteOffsetBytes: int = ...,
Metadata: Mapping[str, str] = ...,
ServerSideEncryption: ServerSideEncryptionType = ..., # (3)
StorageClass: StorageClassType = ..., # (4)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
RequestPayer: RequestPayerType = ..., # (5)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (6)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (7)
ExpectedBucketOwner: str = ...,
) -> PutObjectOutputTypeDef: # (8)
...
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See PutObjectOutputTypeDef
# put method usage example with argument unpacking
kwargs: PutObjectRequestObjectPutTypeDef = { # (1)
"ACL": ...,
}
parent.put(**kwargs)
Object.restore_object method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").restore_object
method.
boto3 documentation
# restore_object method definition
def restore_object(
self,
*,
VersionId: str = ...,
RestoreRequest: RestoreRequestTypeDef = ..., # (1)
RequestPayer: RequestPayerType = ..., # (2)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
ExpectedBucketOwner: str = ...,
) -> RestoreObjectOutputTypeDef: # (4)
...
- See RestoreRequestTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See RestoreObjectOutputTypeDef
# restore_object method usage example with argument unpacking
kwargs: RestoreObjectRequestObjectRestoreObjectTypeDef = { # (1)
"VersionId": ...,
}
parent.restore_object(**kwargs)
Object.wait_until_exists method#
Waits until Object is exists.
Type annotations and code completion for boto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
def wait_until_exists(
self,
) -> None:
...
Object.wait_until_not_exists method#
Waits until Object is not_exists.
Type annotations and code completion for boto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
def wait_until_not_exists(
self,
) -> None:
...
Object.Acl method#
Creates a ObjectAcl resource.
Type annotations and code completion for boto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
def Acl(
self,
) -> _ObjectAcl:
...
Object.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
Object.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for boto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
def MultipartUpload(
self,
id: str,
) -> _MultipartUpload:
...
Object.Version method#
Creates a ObjectVersion resource.
Type annotations and code completion for boto3.resource("s3").Version
method.
boto3 documentation
# Version method definition
def Version(
self,
id: str,
) -> _ObjectVersion:
...
Object.copy method#
Copy an object from one S3 location to another.
Type annotations and code completion for boto3.resource("s3").copy
method.
boto3 documentation
# copy method definition
def copy(
self,
CopySource: CopySourceTypeDef, # (1)
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
SourceClient: Union[BaseClient, None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# copy method usage example with argument unpacking
kwargs: ObjectCopyRequestTypeDef = { # (1)
"CopySource": ...,
}
parent.copy(**kwargs)
Object.download_file method#
Download an object from S3 to a file.
Type annotations and code completion for boto3.resource("s3").download_file
method.
boto3 documentation
# download_file method definition
def download_file(
self,
Filename: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# download_file method usage example with argument unpacking
kwargs: ObjectDownloadFileRequestTypeDef = { # (1)
"Filename": ...,
}
parent.download_file(**kwargs)
Object.download_fileobj method#
Download an object from S3 to a file-like object.
Type annotations and code completion for boto3.resource("s3").download_fileobj
method.
boto3 documentation
# download_fileobj method definition
def download_fileobj(
self,
Fileobj: FileobjTypeDef,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# download_fileobj method usage example with argument unpacking
kwargs: ObjectDownloadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
}
parent.download_fileobj(**kwargs)
Object.upload_file method#
Upload a file to S3.
Type annotations and code completion for boto3.resource("s3").upload_file
method.
boto3 documentation
# upload_file method definition
def upload_file(
self,
Filename: str,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# upload_file method usage example with argument unpacking
kwargs: ObjectUploadFileRequestTypeDef = { # (1)
"Filename": ...,
}
parent.upload_file(**kwargs)
Object.upload_fileobj method#
Upload a file-like object to S3.
Type annotations and code completion for boto3.resource("s3").upload_fileobj
method.
boto3 documentation
# upload_fileobj method definition
def upload_fileobj(
self,
Fileobj: FileobjTypeDef,
ExtraArgs: Union[dict[str, Any], None] = ...,
Callback: Union[Callable[..., Any], None] = ...,
Config: Union[TransferConfig, None] = ...,
) -> None:
...
# upload_fileobj method usage example with argument unpacking
kwargs: ObjectUploadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
}
parent.upload_fileobj(**kwargs)
Object.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
Object.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
ObjectAcl#
Type annotations and code completion for boto3.resource("s3").ObjectAcl
class.
boto3 documentation
# ObjectAcl usage example
from types_boto3_s3.service_resource import ObjectAcl
def get_resource() -> ObjectAcl:
return boto3.resource("s3").ObjectAcl(...)
ObjectAcl attributes#
bucket_name
:str
object_key
:str
owner
: OwnerTypeDefgrants
:list
[GrantTypeDef]request_charged
:Literal['requester']
(see RequestChargedType)meta
:S3ResourceMeta
ObjectAcl methods#
ObjectAcl.get_available_subresources method#
Returns a list of all the available sub-resources for this ObjectAcl.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectAcl.put method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ACL: ObjectCannedACLType = ..., # (1)
AccessControlPolicy: AccessControlPolicyTypeDef = ..., # (2)
ContentMD5: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWrite: str = ...,
GrantWriteACP: str = ...,
RequestPayer: RequestPayerType = ..., # (4)
VersionId: str = ...,
ExpectedBucketOwner: str = ...,
) -> PutObjectAclOutputTypeDef: # (5)
...
- See ObjectCannedACLType
- See AccessControlPolicyTypeDef
- See ChecksumAlgorithmType
- See RequestPayerType
- See PutObjectAclOutputTypeDef
# put method usage example with argument unpacking
kwargs: PutObjectAclRequestObjectAclPutTypeDef = { # (1)
"ACL": ...,
}
parent.put(**kwargs)
ObjectAcl.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
) -> _Object:
...
ObjectAcl.load method#
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
ObjectAcl.reload method#
Type annotations and code completion for boto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
def reload(
self,
) -> None:
...
ObjectSummary#
Type annotations and code completion for boto3.resource("s3").ObjectSummary
class.
boto3 documentation
# ObjectSummary usage example
from types_boto3_s3.service_resource import ObjectSummary
def get_resource() -> ObjectSummary:
return boto3.resource("s3").ObjectSummary(...)
ObjectSummary attributes#
bucket_name
:str
key
:str
last_modified
:datetime
e_tag
:str
checksum_algorithm
:list
[ChecksumAlgorithmType]size
:int
storage_class
: ObjectStorageClassTypeowner
: OwnerTypeDefrestore_status
: RestoreStatusTypeDefmeta
:S3ResourceMeta
ObjectSummary methods#
ObjectSummary.get_available_subresources method#
Returns a list of all the available sub-resources for this ObjectSummary.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectSummary.copy_from method#
Creates a copy of an object that is already stored in Amazon S3.
Type annotations and code completion for boto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
def copy_from(
self,
*,
CopySource: CopySourceOrStrTypeDef, # (1)
ACL: ObjectCannedACLType = ..., # (2)
CacheControl: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
ContentDisposition: str = ...,
ContentEncoding: str = ...,
ContentLanguage: str = ...,
ContentType: str = ...,
CopySourceIfMatch: str = ...,
CopySourceIfModifiedSince: TimestampTypeDef = ...,
CopySourceIfNoneMatch: str = ...,
CopySourceIfUnmodifiedSince: TimestampTypeDef = ...,
Expires: TimestampTypeDef = ...,
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: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
CopySourceSSECustomerAlgorithm: str = ...,
CopySourceSSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (8)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (9)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (10)
ExpectedBucketOwner: str = ...,
ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef: # (11)
...
- See CopySourceTypeDef
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See MetadataDirectiveType
- See TaggingDirectiveType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See CopyObjectOutputTypeDef
# copy_from method usage example with argument unpacking
kwargs: CopyObjectRequestObjectSummaryCopyFromTypeDef = { # (1)
"CopySource": ...,
}
parent.copy_from(**kwargs)
ObjectSummary.delete method#
Removes an object from a bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
MFA: str = ...,
VersionId: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
IfMatch: str = ...,
IfMatchLastModifiedTime: TimestampTypeDef = ...,
IfMatchSize: int = ...,
) -> DeleteObjectOutputTypeDef: # (2)
...
# delete method usage example with argument unpacking
kwargs: DeleteObjectRequestObjectSummaryDeleteTypeDef = { # (1)
"MFA": ...,
}
parent.delete(**kwargs)
ObjectSummary.get method#
Retrieves an object from Amazon S3.
Type annotations and code completion for boto3.resource("s3").get
method.
boto3 documentation
# get method definition
def get(
self,
*,
IfMatch: str = ...,
IfModifiedSince: TimestampTypeDef = ...,
IfNoneMatch: str = ...,
IfUnmodifiedSince: TimestampTypeDef = ...,
Range: str = ...,
ResponseCacheControl: str = ...,
ResponseContentDisposition: str = ...,
ResponseContentEncoding: str = ...,
ResponseContentLanguage: str = ...,
ResponseContentType: str = ...,
ResponseExpires: TimestampTypeDef = ...,
VersionId: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (1)
PartNumber: int = ...,
ExpectedBucketOwner: str = ...,
ChecksumMode: ChecksumModeType = ..., # (2)
) -> GetObjectOutputTypeDef: # (3)
...
- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get method usage example with argument unpacking
kwargs: GetObjectRequestObjectSummaryGetTypeDef = { # (1)
"IfMatch": ...,
}
parent.get(**kwargs)
ObjectSummary.initiate_multipart_upload method#
This action initiates a multipart upload and returns an upload ID.
Type annotations and code completion for boto3.resource("s3").initiate_multipart_upload
method.
boto3 documentation
# initiate_multipart_upload method definition
def initiate_multipart_upload(
self,
*,
ACL: ObjectCannedACLType = ..., # (1)
CacheControl: str = ...,
ContentDisposition: str = ...,
ContentEncoding: str = ...,
ContentLanguage: str = ...,
ContentType: str = ...,
Expires: TimestampTypeDef = ...,
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWriteACP: str = ...,
Metadata: Mapping[str, str] = ...,
ServerSideEncryption: ServerSideEncryptionType = ..., # (2)
StorageClass: StorageClassType = ..., # (3)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
RequestPayer: RequestPayerType = ..., # (4)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (5)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (6)
ExpectedBucketOwner: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (7)
) -> _MultipartUpload:
...
- See ObjectCannedACLType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See ChecksumAlgorithmType
# initiate_multipart_upload method usage example with argument unpacking
kwargs: CreateMultipartUploadRequestObjectSummaryInitiateMultipartUploadTypeDef = { # (1)
"ACL": ...,
}
parent.initiate_multipart_upload(**kwargs)
ObjectSummary.put method#
Adds an object to a bucket.
Type annotations and code completion for boto3.resource("s3").put
method.
boto3 documentation
# put method definition
def put(
self,
*,
ACL: ObjectCannedACLType = ..., # (1)
Body: BlobTypeDef = ...,
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: TimestampTypeDef = ...,
IfMatch: str = ...,
IfNoneMatch: str = ...,
GrantFullControl: str = ...,
GrantRead: str = ...,
GrantReadACP: str = ...,
GrantWriteACP: str = ...,
WriteOffsetBytes: int = ...,
Metadata: Mapping[str, str] = ...,
ServerSideEncryption: ServerSideEncryptionType = ..., # (3)
StorageClass: StorageClassType = ..., # (4)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
RequestPayer: RequestPayerType = ..., # (5)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (6)
ObjectLockRetainUntilDate: TimestampTypeDef = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (7)
ExpectedBucketOwner: str = ...,
) -> PutObjectOutputTypeDef: # (8)
...
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See PutObjectOutputTypeDef
# put method usage example with argument unpacking
kwargs: PutObjectRequestObjectSummaryPutTypeDef = { # (1)
"ACL": ...,
}
parent.put(**kwargs)
ObjectSummary.restore_object method#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.resource("s3").restore_object
method.
boto3 documentation
# restore_object method definition
def restore_object(
self,
*,
VersionId: str = ...,
RestoreRequest: RestoreRequestTypeDef = ..., # (1)
RequestPayer: RequestPayerType = ..., # (2)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (3)
ExpectedBucketOwner: str = ...,
) -> RestoreObjectOutputTypeDef: # (4)
...
- See RestoreRequestTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See RestoreObjectOutputTypeDef
# restore_object method usage example with argument unpacking
kwargs: RestoreObjectRequestObjectSummaryRestoreObjectTypeDef = { # (1)
"VersionId": ...,
}
parent.restore_object(**kwargs)
ObjectSummary.wait_until_exists method#
Waits until ObjectSummary is exists.
Type annotations and code completion for boto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
def wait_until_exists(
self,
) -> None:
...
ObjectSummary.wait_until_not_exists method#
Waits until ObjectSummary is not_exists.
Type annotations and code completion for boto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
def wait_until_not_exists(
self,
) -> None:
...
ObjectSummary.Acl method#
Creates a ObjectAcl resource.
Type annotations and code completion for boto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
def Acl(
self,
) -> _ObjectAcl:
...
ObjectSummary.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for boto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
def Bucket(
self,
) -> _Bucket:
...
ObjectSummary.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for boto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
def MultipartUpload(
self,
id: str,
) -> _MultipartUpload:
...
ObjectSummary.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
) -> _Object:
...
ObjectSummary.Version method#
Creates a ObjectVersion resource.
Type annotations and code completion for boto3.resource("s3").Version
method.
boto3 documentation
# Version method definition
def Version(
self,
id: str,
) -> _ObjectVersion:
...
ObjectSummary.load method#
Calls s3.Client.head_object to update the attributes of the ObjectSummary resource.
Type annotations and code completion for boto3.resource("s3").load
method.
boto3 documentation
# load method definition
def load(
self,
) -> None:
...
ObjectVersion#
Type annotations and code completion for boto3.resource("s3").ObjectVersion
class.
boto3 documentation
# ObjectVersion usage example
from types_boto3_s3.service_resource import ObjectVersion
def get_resource() -> ObjectVersion:
return boto3.resource("s3").ObjectVersion(...)
ObjectVersion attributes#
bucket_name
:str
object_key
:str
id
:str
e_tag
:str
checksum_algorithm
:list
[ChecksumAlgorithmType]size
:int
storage_class
:Literal['STANDARD']
(see ObjectVersionStorageClassType)key
:str
version_id
:str
is_latest
:bool
last_modified
:datetime
owner
: OwnerTypeDefrestore_status
: RestoreStatusTypeDefmeta
:S3ResourceMeta
ObjectVersion methods#
ObjectVersion.get_available_subresources method#
Returns a list of all the available sub-resources for this ObjectVersion.
Type annotations and code completion for boto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectVersion.delete method#
Removes an object from a bucket.
Type annotations and code completion for boto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
def delete(
self,
*,
MFA: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
IfMatch: str = ...,
IfMatchLastModifiedTime: TimestampTypeDef = ...,
IfMatchSize: int = ...,
) -> DeleteObjectOutputTypeDef: # (2)
...
# delete method usage example with argument unpacking
kwargs: DeleteObjectRequestObjectVersionDeleteTypeDef = { # (1)
"MFA": ...,
}
parent.delete(**kwargs)
ObjectVersion.get method#
Retrieves an object from Amazon S3.
Type annotations and code completion for boto3.resource("s3").get
method.
boto3 documentation
# get method definition
def get(
self,
*,
IfMatch: str = ...,
IfModifiedSince: TimestampTypeDef = ...,
IfNoneMatch: str = ...,
IfUnmodifiedSince: TimestampTypeDef = ...,
Range: str = ...,
ResponseCacheControl: str = ...,
ResponseContentDisposition: str = ...,
ResponseContentEncoding: str = ...,
ResponseContentLanguage: str = ...,
ResponseContentType: str = ...,
ResponseExpires: TimestampTypeDef = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (1)
PartNumber: int = ...,
ExpectedBucketOwner: str = ...,
ChecksumMode: ChecksumModeType = ..., # (2)
) -> GetObjectOutputTypeDef: # (3)
...
- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get method usage example with argument unpacking
kwargs: GetObjectRequestObjectVersionGetTypeDef = { # (1)
"IfMatch": ...,
}
parent.get(**kwargs)
ObjectVersion.head method#
The HEAD
operation retrieves metadata from an object without
returning the object itself.
Type annotations and code completion for boto3.resource("s3").head
method.
boto3 documentation
# head method definition
def head(
self,
*,
IfMatch: str = ...,
IfModifiedSince: TimestampTypeDef = ...,
IfNoneMatch: str = ...,
IfUnmodifiedSince: TimestampTypeDef = ...,
Range: str = ...,
ResponseCacheControl: str = ...,
ResponseContentDisposition: str = ...,
ResponseContentEncoding: str = ...,
ResponseContentLanguage: str = ...,
ResponseContentType: str = ...,
ResponseExpires: TimestampTypeDef = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: Union[str, bytes] = ...,
RequestPayer: RequestPayerType = ..., # (1)
PartNumber: int = ...,
ExpectedBucketOwner: str = ...,
ChecksumMode: ChecksumModeType = ..., # (2)
) -> HeadObjectOutputTypeDef: # (3)
...
- See RequestPayerType
- See ChecksumModeType
- See HeadObjectOutputTypeDef
# head method usage example with argument unpacking
kwargs: HeadObjectRequestObjectVersionHeadTypeDef = { # (1)
"IfMatch": ...,
}
parent.head(**kwargs)
ObjectVersion.Object method#
Creates a Object resource.
Type annotations and code completion for boto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
def Object(
self,
) -> _Object:
...