S3ServiceResource#
Auto-generated documentation for S3 type annotations stubs module types-aiobotocore-s3.
S3ServiceResource#
Type annotations and code completion for session.resource("s3")
, included resources and collections.
boto3 documentation
# S3ServiceResource usage example
from aioboto3.session import Session
from types_aiobotocore_s3.service_resource import S3ServiceResource
session = Session()
async with session.resource("s3") as resource:
resource: S3ServiceResource
Attributes#
-
meta
: S3ResourceMeta -
buckets
: ServiceResourceBucketsCollection
Collections#
ServiceResourceBucketsCollection#
Provides access to Bucket resource.
Type annotations and code completion for session.resource("s3").buckets
collection.
boto3 documentation
# ServiceResourceBucketsCollection usage example
from types_aiobotocore_s3.service_resource import ServiceResourceBucketsCollection,
def get_collection() -> ServiceResourceBucketsCollection:
return session.resource("s3").buckets
Methods#
S3ServiceResource.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for session.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
name: str,
) -> Bucket:
...
S3ServiceResource.BucketAcl method#
Creates a BucketAcl resource.
Type annotations and code completion for session.resource("s3").BucketAcl
method.
boto3 documentation
# BucketAcl method definition
await def BucketAcl(
self,
bucket_name: str,
) -> BucketAcl:
...
S3ServiceResource.BucketCors method#
Creates a BucketCors resource.
Type annotations and code completion for session.resource("s3").BucketCors
method.
boto3 documentation
# BucketCors method definition
await def BucketCors(
self,
bucket_name: str,
) -> BucketCors:
...
S3ServiceResource.BucketLifecycle method#
Creates a BucketLifecycle resource.
Type annotations and code completion for session.resource("s3").BucketLifecycle
method.
boto3 documentation
# BucketLifecycle method definition
await def BucketLifecycle(
self,
bucket_name: str,
) -> BucketLifecycle:
...
S3ServiceResource.BucketLifecycleConfiguration method#
Creates a BucketLifecycleConfiguration resource.
Type annotations and code completion for session.resource("s3").BucketLifecycleConfiguration
method.
boto3 documentation
# BucketLifecycleConfiguration method definition
await def BucketLifecycleConfiguration(
self,
bucket_name: str,
) -> BucketLifecycleConfiguration:
...
S3ServiceResource.BucketLogging method#
Creates a BucketLogging resource.
Type annotations and code completion for session.resource("s3").BucketLogging
method.
boto3 documentation
# BucketLogging method definition
await def BucketLogging(
self,
bucket_name: str,
) -> BucketLogging:
...
S3ServiceResource.BucketNotification method#
Creates a BucketNotification resource.
Type annotations and code completion for session.resource("s3").BucketNotification
method.
boto3 documentation
# BucketNotification method definition
await def BucketNotification(
self,
bucket_name: str,
) -> BucketNotification:
...
S3ServiceResource.BucketPolicy method#
Creates a BucketPolicy resource.
Type annotations and code completion for session.resource("s3").BucketPolicy
method.
boto3 documentation
# BucketPolicy method definition
await def BucketPolicy(
self,
bucket_name: str,
) -> BucketPolicy:
...
S3ServiceResource.BucketRequestPayment method#
Creates a BucketRequestPayment resource.
Type annotations and code completion for session.resource("s3").BucketRequestPayment
method.
boto3 documentation
# BucketRequestPayment method definition
await def BucketRequestPayment(
self,
bucket_name: str,
) -> BucketRequestPayment:
...
S3ServiceResource.BucketTagging method#
Creates a BucketTagging resource.
Type annotations and code completion for session.resource("s3").BucketTagging
method.
boto3 documentation
# BucketTagging method definition
await def BucketTagging(
self,
bucket_name: str,
) -> BucketTagging:
...
S3ServiceResource.BucketVersioning method#
Creates a BucketVersioning resource.
Type annotations and code completion for session.resource("s3").BucketVersioning
method.
boto3 documentation
# BucketVersioning method definition
await def BucketVersioning(
self,
bucket_name: str,
) -> BucketVersioning:
...
S3ServiceResource.BucketWebsite method#
Creates a BucketWebsite resource.
Type annotations and code completion for session.resource("s3").BucketWebsite
method.
boto3 documentation
# BucketWebsite method definition
await def BucketWebsite(
self,
bucket_name: str,
) -> BucketWebsite:
...
S3ServiceResource.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for session.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
await 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 session.resource("s3").MultipartUploadPart
method.
boto3 documentation
# MultipartUploadPart method definition
await def MultipartUploadPart(
self,
bucket_name: str,
object_key: str,
multipart_upload_id: str,
part_number: str,
) -> MultipartUploadPart:
...
S3ServiceResource.Object method#
Creates a Object resource.
Type annotations and code completion for session.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
bucket_name: str,
key: str,
) -> Object:
...
S3ServiceResource.ObjectAcl method#
Creates a ObjectAcl resource.
Type annotations and code completion for session.resource("s3").ObjectAcl
method.
boto3 documentation
# ObjectAcl method definition
await def ObjectAcl(
self,
bucket_name: str,
object_key: str,
) -> ObjectAcl:
...
S3ServiceResource.ObjectSummary method#
Creates a ObjectSummary resource.
Type annotations and code completion for session.resource("s3").ObjectSummary
method.
boto3 documentation
# ObjectSummary method definition
await def ObjectSummary(
self,
bucket_name: str,
key: str,
) -> ObjectSummary:
...
S3ServiceResource.ObjectVersion method#
Creates a ObjectVersion resource.
Type annotations and code completion for session.resource("s3").ObjectVersion
method.
boto3 documentation
# ObjectVersion method definition
await def ObjectVersion(
self,
bucket_name: str,
object_key: str,
id: str,
) -> ObjectVersion:
...
S3ServiceResource.create_bucket method#
.
Type annotations and code completion for session.resource("s3").create_bucket
method.
boto3 documentation
# create_bucket method definition
await 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.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for session.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
Bucket#
Type annotations and code completion for session.resource("s3").Bucket
class.
boto3 documentation
# Bucket usage example
from types_aiobotocore_s3.service_resource import Bucket
async def get_resource() -> Bucket:
async with session.resource("s3") as resource:
return await resource.Bucket(...)
Bucket attributes#
creation_date
:Awaitable
[datetime
]name
:str
multipart_uploads
: BucketMultipartUploadsCollectionobject_versions
: BucketObjectVersionsCollectionobjects
: BucketObjectsCollectionmeta
:Awaitable
[S3ResourceMeta]
Bucket collections#
Bucket.multipart_uploads#
Provides access to MultipartUpload resource.
Type annotations and code completion for session.resource("s3").Bucket(...).multipart_uploads
collection.
boto3 documentation
# BucketMultipartUploadsCollection usage example
from types_aiobotocore_s3.service_resource import BucketMultipartUploadsCollection,
def get_collection() -> BucketMultipartUploadsCollection:
resource = session.resource("s3").Bucket(...)
return resource.multipart_uploads
Bucket.object_versions#
Provides access to ObjectVersion resource.
Type annotations and code completion for session.resource("s3").Bucket(...).object_versions
collection.
boto3 documentation
# BucketObjectVersionsCollection usage example
from types_aiobotocore_s3.service_resource import BucketObjectVersionsCollection,
def get_collection() -> BucketObjectVersionsCollection:
resource = session.resource("s3").Bucket(...)
return resource.object_versions
Bucket.objects#
Provides access to ObjectSummary resource.
Type annotations and code completion for session.resource("s3").Bucket(...).objects
collection.
boto3 documentation
# BucketObjectsCollection usage example
from types_aiobotocore_s3.service_resource import BucketObjectsCollection,
def get_collection() -> BucketObjectsCollection:
resource = session.resource("s3").Bucket(...)
return resource.objects
Bucket methods#
Bucket.Acl method#
Creates a BucketAcl resource.
Type annotations and code completion for aioboto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
await def Acl(
self,
) -> BucketAcl:
...
Bucket.Cors method#
Creates a BucketCors resource.
Type annotations and code completion for aioboto3.resource("s3").Cors
method.
boto3 documentation
# Cors method definition
await def Cors(
self,
) -> BucketCors:
...
Bucket.Lifecycle method#
Creates a BucketLifecycle resource.
Type annotations and code completion for aioboto3.resource("s3").Lifecycle
method.
boto3 documentation
# Lifecycle method definition
await def Lifecycle(
self,
) -> BucketLifecycle:
...
Bucket.LifecycleConfiguration method#
Creates a BucketLifecycleConfiguration resource.
Type annotations and code completion for aioboto3.resource("s3").LifecycleConfiguration
method.
boto3 documentation
# LifecycleConfiguration method definition
await def LifecycleConfiguration(
self,
) -> BucketLifecycleConfiguration:
...
Bucket.Logging method#
Creates a BucketLogging resource.
Type annotations and code completion for aioboto3.resource("s3").Logging
method.
boto3 documentation
# Logging method definition
await def Logging(
self,
) -> BucketLogging:
...
Bucket.Notification method#
Creates a BucketNotification resource.
Type annotations and code completion for aioboto3.resource("s3").Notification
method.
boto3 documentation
# Notification method definition
await def Notification(
self,
) -> BucketNotification:
...
Bucket.Object method#
Creates a Object resource.
Type annotations and code completion for aioboto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
key: str,
) -> Object:
...
Bucket.Policy method#
Creates a BucketPolicy resource.
Type annotations and code completion for aioboto3.resource("s3").Policy
method.
boto3 documentation
# Policy method definition
await def Policy(
self,
) -> BucketPolicy:
...
Bucket.RequestPayment method#
Creates a BucketRequestPayment resource.
Type annotations and code completion for aioboto3.resource("s3").RequestPayment
method.
boto3 documentation
# RequestPayment method definition
await def RequestPayment(
self,
) -> BucketRequestPayment:
...
Bucket.Tagging method#
Creates a BucketTagging resource.
Type annotations and code completion for aioboto3.resource("s3").Tagging
method.
boto3 documentation
# Tagging method definition
await def Tagging(
self,
) -> BucketTagging:
...
Bucket.Versioning method#
Creates a BucketVersioning resource.
Type annotations and code completion for aioboto3.resource("s3").Versioning
method.
boto3 documentation
# Versioning method definition
await def Versioning(
self,
) -> BucketVersioning:
...
Bucket.Website method#
Creates a BucketWebsite resource.
Type annotations and code completion for aioboto3.resource("s3").Website
method.
boto3 documentation
# Website method definition
await def Website(
self,
) -> BucketWebsite:
...
Bucket.copy method#
Copy an object from one S3 location to an object in this bucket.
Type annotations and code completion for aioboto3.resource("s3").copy
method.
boto3 documentation
# copy method definition
await def copy(
self,
CopySource: CopySourceTypeDef, # (1)
Key: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
SourceClient: Optional[AioBaseClient] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# copy method usage example with argument unpacking
kwargs: BucketCopyRequestTypeDef = { # (1)
"CopySource": ...,
"Key": ...,
}
parent.copy(**kwargs)
Bucket.create method#
.
Type annotations and code completion for aioboto3.resource("s3").create
method.
boto3 documentation
# create method definition
await 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 aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await 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 aioboto3.resource("s3").delete_objects
method.
boto3 documentation
# delete_objects method definition
await 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.download_file method#
Download an S3 object to a file.
Type annotations and code completion for aioboto3.resource("s3").download_file
method.
boto3 documentation
# download_file method definition
await def download_file(
self,
Key: str,
Filename: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> 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 this bucket to a file-like-object.
Type annotations and code completion for aioboto3.resource("s3").download_fileobj
method.
boto3 documentation
# download_fileobj method definition
await def download_fileobj(
self,
Key: str,
Fileobj: Union[IO[Any], StreamingBody],
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# download_fileobj method usage example with argument unpacking
kwargs: BucketDownloadFileobjRequestTypeDef = { # (1)
"Key": ...,
"Fileobj": ...,
}
parent.download_fileobj(**kwargs)
Bucket.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
Bucket.load method#
Calls s3.Client.list_buckets() to update the attributes of the Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
Bucket.put_object method#
Adds an object to a bucket.
Type annotations and code completion for aioboto3.resource("s3").put_object
method.
boto3 documentation
# put_object method definition
await def put_object(
self,
*,
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 = ...,
) -> 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.upload_file method#
Upload a file to an S3 object.
Type annotations and code completion for aioboto3.resource("s3").upload_file
method.
boto3 documentation
# upload_file method definition
await def upload_file(
self,
Filename: str,
Key: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> 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 this bucket.
Type annotations and code completion for aioboto3.resource("s3").upload_fileobj
method.
boto3 documentation
# upload_fileobj method definition
await def upload_fileobj(
self,
Fileobj: Union[IO[Any], StreamingBody],
Key: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# upload_fileobj method usage example with argument unpacking
kwargs: BucketUploadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
"Key": ...,
}
parent.upload_fileobj(**kwargs)
Bucket.wait_until_exists method#
Waits until this Bucket is exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
await def wait_until_exists(
self,
) -> None:
...
Bucket.wait_until_not_exists method#
Waits until this Bucket is not exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
await def wait_until_not_exists(
self,
) -> None:
...
BucketAcl#
Type annotations and code completion for session.resource("s3").BucketAcl
class.
boto3 documentation
# BucketAcl usage example
from types_aiobotocore_s3.service_resource import BucketAcl
async def get_resource() -> BucketAcl:
async with session.resource("s3") as resource:
return await resource.BucketAcl(...)
BucketAcl attributes#
owner
:Awaitable
[OwnerTypeDef]grants
:Awaitable
[List
[GrantTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketAcl methods#
BucketAcl.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketAcl.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketAcl.load method#
Calls meth:S3.Client.get_bucket_acl
to update the attributes of the
BucketAcl
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketAcl.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_acl
to update the attributes of the
BucketAcl
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketCors#
Type annotations and code completion for session.resource("s3").BucketCors
class.
boto3 documentation
# BucketCors usage example
from types_aiobotocore_s3.service_resource import BucketCors
async def get_resource() -> BucketCors:
async with session.resource("s3") as resource:
return await resource.BucketCors(...)
BucketCors attributes#
cors_rules
:Awaitable
[List
[CORSRuleBucketCorsTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketCors methods#
BucketCors.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketCors.delete method#
.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketCorsRequestBucketCorsDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketCors.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketCors.load method#
Calls meth:S3.Client.get_bucket_cors
to update the attributes of the
BucketCors
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketCors.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
CORSConfiguration: CORSConfigurationBucketCorsTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketCorsRequestBucketCorsPutTypeDef = { # (1)
"CORSConfiguration": ...,
}
parent.put(**kwargs)
BucketCors.reload method#
Calls meth:S3.Client.get_bucket_cors
to update the attributes of the
BucketCors
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketLifecycle#
Type annotations and code completion for session.resource("s3").BucketLifecycle
class.
boto3 documentation
# BucketLifecycle usage example
from types_aiobotocore_s3.service_resource import BucketLifecycle
async def get_resource() -> BucketLifecycle:
async with session.resource("s3") as resource:
return await resource.BucketLifecycle(...)
BucketLifecycle attributes#
rules
:Awaitable
[List
[RuleBucketLifecycleTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketLifecycle methods#
BucketLifecycle.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketLifecycle.delete method#
.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketLifecycleRequestBucketLifecycleDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketLifecycle.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLifecycle.load method#
Calls meth:S3.Client.get_bucket_lifecycle
to update the attributes of the
BucketLifecycle
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketLifecycle.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
LifecycleConfiguration: LifecycleConfigurationBucketLifecycleTypeDef = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketLifecycleRequestBucketLifecyclePutTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.put(**kwargs)
BucketLifecycle.reload method#
Calls meth:S3.Client.get_bucket_lifecycle
to update the attributes of the
BucketLifecycle
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketLifecycleConfiguration#
Type annotations and code completion for session.resource("s3").BucketLifecycleConfiguration
class.
boto3 documentation
# BucketLifecycleConfiguration usage example
from types_aiobotocore_s3.service_resource import BucketLifecycleConfiguration
async def get_resource() -> BucketLifecycleConfiguration:
async with session.resource("s3") as resource:
return await resource.BucketLifecycleConfiguration(...)
BucketLifecycleConfiguration attributes#
rules
:Awaitable
[List
[LifecycleRuleBucketLifecycleConfigurationTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketLifecycleConfiguration methods#
BucketLifecycleConfiguration.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketLifecycleConfiguration.delete method#
.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketLifecycleRequestBucketLifecycleConfigurationDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketLifecycleConfiguration.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLifecycleConfiguration.load method#
Calls meth:S3.Client.get_bucket_lifecycle_configuration
to update the
attributes of the BucketLifecycleConfiguration
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketLifecycleConfiguration.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (1)
LifecycleConfiguration: BucketLifecycleConfigurationBucketLifecycleConfigurationTypeDef = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketLifecycleConfigurationRequestBucketLifecycleConfigurationPutTypeDef = { # (1)
"ChecksumAlgorithm": ...,
}
parent.put(**kwargs)
BucketLifecycleConfiguration.reload method#
Calls meth:S3.Client.get_bucket_lifecycle_configuration
to update the
attributes of the BucketLifecycleConfiguration
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketLogging#
Type annotations and code completion for session.resource("s3").BucketLogging
class.
boto3 documentation
# BucketLogging usage example
from types_aiobotocore_s3.service_resource import BucketLogging
async def get_resource() -> BucketLogging:
async with session.resource("s3") as resource:
return await resource.BucketLogging(...)
BucketLogging attributes#
logging_enabled
:Awaitable
[LoggingEnabledResponseTypeDef]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketLogging methods#
BucketLogging.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketLogging.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketLogging.load method#
Calls meth:S3.Client.get_bucket_logging
to update the attributes of the
BucketLogging
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketLogging.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
BucketLoggingStatus: BucketLoggingStatusBucketLoggingTypeDef, # (1)
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
ExpectedBucketOwner: str = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketLoggingRequestBucketLoggingPutTypeDef = { # (1)
"BucketLoggingStatus": ...,
}
parent.put(**kwargs)
BucketLogging.reload method#
Calls meth:S3.Client.get_bucket_logging
to update the attributes of the
BucketLogging
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketNotification#
Type annotations and code completion for session.resource("s3").BucketNotification
class.
boto3 documentation
# BucketNotification usage example
from types_aiobotocore_s3.service_resource import BucketNotification
async def get_resource() -> BucketNotification:
async with session.resource("s3") as resource:
return await resource.BucketNotification(...)
BucketNotification attributes#
topic_configurations
:Awaitable
[List
[TopicConfigurationBucketNotificationTypeDef]]queue_configurations
:Awaitable
[List
[QueueConfigurationBucketNotificationTypeDef]]lambda_function_configurations
:Awaitable
[List
[LambdaFunctionConfigurationBucketNotificationTypeDef]]event_bridge_configuration
:Awaitable
[Dict
[str
,Any
]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketNotification methods#
BucketNotification.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketNotification.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketNotification.load method#
Calls meth:S3.Client.get_bucket_notification_configuration
to update the
attributes of the BucketNotification
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketNotification.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
NotificationConfiguration: NotificationConfigurationBucketNotificationTypeDef, # (1)
ExpectedBucketOwner: str = ...,
SkipDestinationValidation: bool = ...,
) -> None:
...
# put method usage example with argument unpacking
kwargs: PutBucketNotificationConfigurationRequestBucketNotificationPutTypeDef = { # (1)
"NotificationConfiguration": ...,
}
parent.put(**kwargs)
BucketNotification.reload method#
Calls meth:S3.Client.get_bucket_notification_configuration
to update the
attributes of the BucketNotification
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketPolicy#
Type annotations and code completion for session.resource("s3").BucketPolicy
class.
boto3 documentation
# BucketPolicy usage example
from types_aiobotocore_s3.service_resource import BucketPolicy
async def get_resource() -> BucketPolicy:
async with session.resource("s3") as resource:
return await resource.BucketPolicy(...)
BucketPolicy attributes#
policy
:Awaitable
[str
]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketPolicy methods#
BucketPolicy.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketPolicy.delete method#
Deletes the policy of a specified bucket.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketPolicyRequestBucketPolicyDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketPolicy.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketPolicy.load method#
Calls meth:S3.Client.get_bucket_policy
to update the attributes of the
BucketPolicy
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketPolicy.put method#
Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_policy
to update the attributes of the
BucketPolicy
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketRequestPayment#
Type annotations and code completion for session.resource("s3").BucketRequestPayment
class.
boto3 documentation
# BucketRequestPayment usage example
from types_aiobotocore_s3.service_resource import BucketRequestPayment
async def get_resource() -> BucketRequestPayment:
async with session.resource("s3") as resource:
return await resource.BucketRequestPayment(...)
BucketRequestPayment attributes#
payer
:Awaitable
[PayerType]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketRequestPayment methods#
BucketRequestPayment.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketRequestPayment.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketRequestPayment.load method#
Calls meth:S3.Client.get_bucket_request_payment
to update the attributes
of the BucketRequestPayment
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketRequestPayment.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_request_payment
to update the attributes
of the BucketRequestPayment
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketTagging#
Type annotations and code completion for session.resource("s3").BucketTagging
class.
boto3 documentation
# BucketTagging usage example
from types_aiobotocore_s3.service_resource import BucketTagging
async def get_resource() -> BucketTagging:
async with session.resource("s3") as resource:
return await resource.BucketTagging(...)
BucketTagging attributes#
tag_set
:Awaitable
[List
[TagTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketTagging methods#
BucketTagging.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketTagging.delete method#
.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketTaggingRequestBucketTaggingDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketTagging.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketTagging.load method#
Calls meth:S3.Client.get_bucket_tagging
to update the attributes of the
BucketTagging
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketTagging.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_tagging
to update the attributes of the
BucketTagging
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketVersioning#
Type annotations and code completion for session.resource("s3").BucketVersioning
class.
boto3 documentation
# BucketVersioning usage example
from types_aiobotocore_s3.service_resource import BucketVersioning
async def get_resource() -> BucketVersioning:
async with session.resource("s3") as resource:
return await resource.BucketVersioning(...)
BucketVersioning attributes#
status
:Awaitable
[BucketVersioningStatusType]mfa_delete
:Awaitable
[MFADeleteStatusType]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketVersioning methods#
BucketVersioning.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketVersioning.enable method#
.
Type annotations and code completion for aioboto3.resource("s3").enable
method.
boto3 documentation
# enable method definition
await 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.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketVersioning.load method#
Calls meth:S3.Client.get_bucket_versioning
to update the attributes of
the BucketVersioning
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketVersioning.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_versioning
to update the attributes of
the BucketVersioning
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
BucketVersioning.suspend method#
.
Type annotations and code completion for aioboto3.resource("s3").suspend
method.
boto3 documentation
# suspend method definition
await 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)
BucketWebsite#
Type annotations and code completion for session.resource("s3").BucketWebsite
class.
boto3 documentation
# BucketWebsite usage example
from types_aiobotocore_s3.service_resource import BucketWebsite
async def get_resource() -> BucketWebsite:
async with session.resource("s3") as resource:
return await resource.BucketWebsite(...)
BucketWebsite attributes#
redirect_all_requests_to
:Awaitable
[RedirectAllRequestsToResponseTypeDef]index_document
:Awaitable
[IndexDocumentResponseTypeDef]error_document
:Awaitable
[ErrorDocumentResponseTypeDef]routing_rules
:Awaitable
[List
[RoutingRuleTypeDef]]bucket_name
:str
meta
:Awaitable
[S3ResourceMeta]
BucketWebsite methods#
BucketWebsite.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
BucketWebsite.delete method#
.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
ExpectedBucketOwner: str = ...,
) -> None:
...
# delete method usage example with argument unpacking
kwargs: DeleteBucketWebsiteRequestBucketWebsiteDeleteTypeDef = { # (1)
"ExpectedBucketOwner": ...,
}
parent.delete(**kwargs)
BucketWebsite.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
BucketWebsite.load method#
Calls meth:S3.Client.get_bucket_website
to update the attributes of the
BucketWebsite
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
BucketWebsite.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await 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.reload method#
Calls meth:S3.Client.get_bucket_website
to update the attributes of the
BucketWebsite
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
MultipartUpload#
Type annotations and code completion for session.resource("s3").MultipartUpload
class.
boto3 documentation
# MultipartUpload usage example
from types_aiobotocore_s3.service_resource import MultipartUpload
async def get_resource() -> MultipartUpload:
async with session.resource("s3") as resource:
return await resource.MultipartUpload(...)
MultipartUpload attributes#
upload_id
:Awaitable
[str
]key
:Awaitable
[str
]initiated
:Awaitable
[datetime
]storage_class
:Awaitable
[StorageClassType]owner
:Awaitable
[OwnerTypeDef]initiator
:Awaitable
[InitiatorResponseTypeDef]checksum_algorithm
:Awaitable
[ChecksumAlgorithmType]bucket_name
:str
object_key
:str
id
:str
parts
: MultipartUploadPartsCollectionmeta
:Awaitable
[S3ResourceMeta]
MultipartUpload collections#
MultipartUpload.parts#
Provides access to MultipartUploadPart resource.
Type annotations and code completion for session.resource("s3").MultipartUpload(...).parts
collection.
boto3 documentation
# MultipartUploadPartsCollection usage example
from types_aiobotocore_s3.service_resource import MultipartUploadPartsCollection,
def get_collection() -> MultipartUploadPartsCollection:
resource = session.resource("s3").MultipartUpload(...)
return resource.parts
MultipartUpload methods#
MultipartUpload.Object method#
Creates a Object resource.
Type annotations and code completion for aioboto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
) -> Object:
...
MultipartUpload.Part method#
Creates a MultipartUploadPart resource.
Type annotations and code completion for aioboto3.resource("s3").Part
method.
boto3 documentation
# Part method definition
await def Part(
self,
part_number: str,
) -> MultipartUploadPart:
...
MultipartUpload.abort method#
This operation aborts a multipart upload.
Type annotations and code completion for aioboto3.resource("s3").abort
method.
boto3 documentation
# abort method definition
await def abort(
self,
*,
RequestPayer: RequestPayerType = ..., # (1)
ExpectedBucketOwner: str = ...,
) -> 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 aioboto3.resource("s3").complete
method.
boto3 documentation
# complete method definition
await def complete(
self,
*,
MultipartUpload: CompletedMultipartUploadTypeDef = ..., # (1)
ChecksumCRC32: str = ...,
ChecksumCRC32C: str = ...,
ChecksumSHA1: str = ...,
ChecksumSHA256: str = ...,
RequestPayer: RequestPayerType = ..., # (2)
ExpectedBucketOwner: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: str = ...,
SSECustomerKeyMD5: str = ...,
) -> Object:
...
# complete method usage example with argument unpacking
kwargs: CompleteMultipartUploadRequestMultipartUploadCompleteTypeDef = { # (1)
"MultipartUpload": ...,
}
parent.complete(**kwargs)
MultipartUpload.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
MultipartUploadPart#
Type annotations and code completion for session.resource("s3").MultipartUploadPart
class.
boto3 documentation
# MultipartUploadPart usage example
from types_aiobotocore_s3.service_resource import MultipartUploadPart
async def get_resource() -> MultipartUploadPart:
async with session.resource("s3") as resource:
return await resource.MultipartUploadPart(...)
MultipartUploadPart attributes#
last_modified
:Awaitable
[datetime
]e_tag
:Awaitable
[str
]size
:Awaitable
[int
]checksum_crc32
:Awaitable
[str
]checksum_crc32_c
:Awaitable
[str
]checksum_sha1
:Awaitable
[str
]checksum_sha256
:Awaitable
[str
]bucket_name
:str
object_key
:str
multipart_upload_id
:str
part_number
:str
meta
:Awaitable
[S3ResourceMeta]
MultipartUploadPart methods#
MultipartUploadPart.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for aioboto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
await def MultipartUpload(
self,
) -> MultipartUpload:
...
MultipartUploadPart.copy_from method#
Uploads a part by copying data from an existing object as data source.
Type annotations and code completion for aioboto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
await def copy_from(
self,
*,
CopySource: Union[str, CopySourceTypeDef], # (1)
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)
...
# copy_from method usage example with argument unpacking
kwargs: UploadPartCopyRequestMultipartUploadPartCopyFromTypeDef = { # (1)
"CopySource": ...,
}
parent.copy_from(**kwargs)
MultipartUploadPart.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
MultipartUploadPart.upload method#
Uploads a part in a multipart upload.
Type annotations and code completion for aioboto3.resource("s3").upload
method.
boto3 documentation
# upload method definition
await def upload(
self,
*,
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)
...
# upload method usage example with argument unpacking
kwargs: UploadPartRequestMultipartUploadPartUploadTypeDef = { # (1)
"Body": ...,
}
parent.upload(**kwargs)
Object#
Type annotations and code completion for session.resource("s3").Object
class.
boto3 documentation
# Object usage example
from types_aiobotocore_s3.service_resource import Object
async def get_resource() -> Object:
async with session.resource("s3") as resource:
return await resource.Object(...)
Object attributes#
delete_marker
:Awaitable
[bool
]accept_ranges
:Awaitable
[str
]expiration
:Awaitable
[str
]restore
:Awaitable
[str
]archive_status
:Awaitable
[ArchiveStatusType]last_modified
:Awaitable
[datetime
]content_length
:Awaitable
[int
]checksum_crc32
:Awaitable
[str
]checksum_crc32_c
:Awaitable
[str
]checksum_sha1
:Awaitable
[str
]checksum_sha256
:Awaitable
[str
]e_tag
:Awaitable
[str
]missing_meta
:Awaitable
[int
]version_id
:Awaitable
[str
]cache_control
:Awaitable
[str
]content_disposition
:Awaitable
[str
]content_encoding
:Awaitable
[str
]content_language
:Awaitable
[str
]content_type
:Awaitable
[str
]expires
:Awaitable
[datetime
]website_redirect_location
:Awaitable
[str
]server_side_encryption
:Awaitable
[ServerSideEncryptionType]metadata
:Awaitable
[Dict
[str
,str
]]sse_customer_algorithm
:Awaitable
[str
]sse_customer_key_md5
:Awaitable
[str
]ssekms_key_id
:Awaitable
[str
]bucket_key_enabled
:Awaitable
[bool
]storage_class
:Awaitable
[StorageClassType]request_charged
:Awaitable
[Literal['requester']
(see RequestChargedType)]replication_status
:Awaitable
[ReplicationStatusType]parts_count
:Awaitable
[int
]object_lock_mode
:Awaitable
[ObjectLockModeType]object_lock_retain_until_date
:Awaitable
[datetime
]object_lock_legal_hold_status
:Awaitable
[ObjectLockLegalHoldStatusType]bucket_name
:str
key
:str
meta
:Awaitable
[S3ResourceMeta]
Object methods#
Object.Acl method#
Creates a ObjectAcl resource.
Type annotations and code completion for aioboto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
await def Acl(
self,
) -> ObjectAcl:
...
Object.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
Object.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for aioboto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
await def MultipartUpload(
self,
id: str,
) -> MultipartUpload:
...
Object.Version method#
Creates a ObjectVersion resource.
Type annotations and code completion for aioboto3.resource("s3").Version
method.
boto3 documentation
# Version method definition
await def Version(
self,
id: str,
) -> ObjectVersion:
...
Object.copy method#
Copy an object from one S3 location to this object.
Type annotations and code completion for aioboto3.resource("s3").copy
method.
boto3 documentation
# copy method definition
await def copy(
self,
CopySource: CopySourceTypeDef, # (1)
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
SourceClient: Optional[AioBaseClient] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# copy method usage example with argument unpacking
kwargs: ObjectCopyRequestTypeDef = { # (1)
"CopySource": ...,
}
parent.copy(**kwargs)
Object.copy_from method#
Creates a copy of an object that is already stored in Amazon S3.
Type annotations and code completion for aioboto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
await def copy_from(
self,
*,
CopySource: str,
ACL: ObjectCannedACLType = ..., # (1)
CacheControl: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
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 = ..., # (3)
TaggingDirective: TaggingDirectiveType = ..., # (4)
ServerSideEncryption: ServerSideEncryptionType = ..., # (5)
StorageClass: StorageClassType = ..., # (6)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: str = ...,
SSECustomerKeyMD5: str = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
CopySourceSSECustomerAlgorithm: str = ...,
CopySourceSSECustomerKey: str = ...,
CopySourceSSECustomerKeyMD5: str = ...,
RequestPayer: RequestPayerType = ..., # (7)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (8)
ObjectLockRetainUntilDate: Union[datetime, str] = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (9)
ExpectedBucketOwner: str = ...,
ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef: # (10)
...
- 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 aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
MFA: str = ...,
VersionId: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
) -> DeleteObjectOutputTypeDef: # (2)
...
# delete method usage example with argument unpacking
kwargs: DeleteObjectRequestObjectDeleteTypeDef = { # (1)
"MFA": ...,
}
parent.delete(**kwargs)
Object.download_file method#
Download an S3 object to a file.
Type annotations and code completion for aioboto3.resource("s3").download_file
method.
boto3 documentation
# download_file method definition
await def download_file(
self,
Filename: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# download_file method usage example with argument unpacking
kwargs: ObjectDownloadFileRequestTypeDef = { # (1)
"Filename": ...,
}
parent.download_file(**kwargs)
Object.download_fileobj method#
Download this object from S3 to a file-like object.
Type annotations and code completion for aioboto3.resource("s3").download_fileobj
method.
boto3 documentation
# download_fileobj method definition
await def download_fileobj(
self,
Fileobj: Union[IO[Any], StreamingBody],
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# download_fileobj method usage example with argument unpacking
kwargs: ObjectDownloadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
}
parent.download_fileobj(**kwargs)
Object.get method#
Retrieves an object from Amazon S3.
Type annotations and code completion for aioboto3.resource("s3").get
method.
boto3 documentation
# get method definition
await def get(
self,
*,
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)
...
- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get method usage example with argument unpacking
kwargs: GetObjectRequestObjectGetTypeDef = { # (1)
"IfMatch": ...,
}
parent.get(**kwargs)
Object.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
Object.initiate_multipart_upload method#
This action initiates a multipart upload and returns an upload ID.
Type annotations and code completion for aioboto3.resource("s3").initiate_multipart_upload
method.
boto3 documentation
# initiate_multipart_upload method definition
await def initiate_multipart_upload(
self,
*,
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)
) -> 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.load method#
Calls meth:S3.Client.head_object
to update the attributes of the Object
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
Object.put method#
Adds an object to a bucket.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
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)
...
- 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.reload method#
Calls meth:S3.Client.head_object
to update the attributes of the Object
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
Object.restore_object method#
.
Type annotations and code completion for aioboto3.resource("s3").restore_object
method.
boto3 documentation
# restore_object method definition
await 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.upload_file method#
Upload a file to an S3 object.
Type annotations and code completion for aioboto3.resource("s3").upload_file
method.
boto3 documentation
# upload_file method definition
await def upload_file(
self,
Filename: str,
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> 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 this object.
Type annotations and code completion for aioboto3.resource("s3").upload_fileobj
method.
boto3 documentation
# upload_fileobj method definition
await def upload_fileobj(
self,
Fileobj: Union[IO[Any], StreamingBody],
ExtraArgs: Optional[Dict[str, Any]] = ...,
Callback: Optional[Callable[..., Any]] = ...,
Config: Optional[TransferConfig] = ...,
) -> None:
...
# upload_fileobj method usage example with argument unpacking
kwargs: ObjectUploadFileobjRequestTypeDef = { # (1)
"Fileobj": ...,
}
parent.upload_fileobj(**kwargs)
Object.wait_until_exists method#
Waits until this Object is exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
await def wait_until_exists(
self,
) -> None:
...
Object.wait_until_not_exists method#
Waits until this Object is not exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
await def wait_until_not_exists(
self,
) -> None:
...
ObjectAcl#
Type annotations and code completion for session.resource("s3").ObjectAcl
class.
boto3 documentation
# ObjectAcl usage example
from types_aiobotocore_s3.service_resource import ObjectAcl
async def get_resource() -> ObjectAcl:
async with session.resource("s3") as resource:
return await resource.ObjectAcl(...)
ObjectAcl attributes#
owner
:Awaitable
[OwnerTypeDef]grants
:Awaitable
[List
[GrantTypeDef]]request_charged
:Awaitable
[Literal['requester']
(see RequestChargedType)]bucket_name
:str
object_key
:str
meta
:Awaitable
[S3ResourceMeta]
ObjectAcl methods#
ObjectAcl.Object method#
Creates a Object resource.
Type annotations and code completion for aioboto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
) -> Object:
...
ObjectAcl.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectAcl.load method#
Calls meth:S3.Client.get_object_acl
to update the attributes of the
ObjectAcl
resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
ObjectAcl.put method#
.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
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)
...
- 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.reload method#
Calls meth:S3.Client.get_object_acl
to update the attributes of the
ObjectAcl
resource.
Type annotations and code completion for aioboto3.resource("s3").reload
method.
boto3 documentation
# reload method definition
await def reload(
self,
) -> None:
...
ObjectSummary#
Type annotations and code completion for session.resource("s3").ObjectSummary
class.
boto3 documentation
# ObjectSummary usage example
from types_aiobotocore_s3.service_resource import ObjectSummary
async def get_resource() -> ObjectSummary:
async with session.resource("s3") as resource:
return await resource.ObjectSummary(...)
ObjectSummary attributes#
last_modified
:Awaitable
[datetime
]e_tag
:Awaitable
[str
]checksum_algorithm
:Awaitable
[List
[ChecksumAlgorithmType]]size
:Awaitable
[int
]storage_class
:Awaitable
[ObjectStorageClassType]owner
:Awaitable
[OwnerTypeDef]restore_status
:Awaitable
[RestoreStatusTypeDef]bucket_name
:str
key
:str
meta
:Awaitable
[S3ResourceMeta]
ObjectSummary methods#
ObjectSummary.Acl method#
Creates a ObjectAcl resource.
Type annotations and code completion for aioboto3.resource("s3").Acl
method.
boto3 documentation
# Acl method definition
await def Acl(
self,
) -> ObjectAcl:
...
ObjectSummary.Bucket method#
Creates a Bucket resource.
Type annotations and code completion for aioboto3.resource("s3").Bucket
method.
boto3 documentation
# Bucket method definition
await def Bucket(
self,
) -> Bucket:
...
ObjectSummary.MultipartUpload method#
Creates a MultipartUpload resource.
Type annotations and code completion for aioboto3.resource("s3").MultipartUpload
method.
boto3 documentation
# MultipartUpload method definition
await def MultipartUpload(
self,
id: str,
) -> MultipartUpload:
...
ObjectSummary.Object method#
Creates a Object resource.
Type annotations and code completion for aioboto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
) -> Object:
...
ObjectSummary.Version method#
Creates a ObjectVersion resource.
Type annotations and code completion for aioboto3.resource("s3").Version
method.
boto3 documentation
# Version method definition
await def Version(
self,
id: str,
) -> ObjectVersion:
...
ObjectSummary.copy_from method#
Creates a copy of an object that is already stored in Amazon S3.
Type annotations and code completion for aioboto3.resource("s3").copy_from
method.
boto3 documentation
# copy_from method definition
await def copy_from(
self,
*,
CopySource: str,
ACL: ObjectCannedACLType = ..., # (1)
CacheControl: str = ...,
ChecksumAlgorithm: ChecksumAlgorithmType = ..., # (2)
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 = ..., # (3)
TaggingDirective: TaggingDirectiveType = ..., # (4)
ServerSideEncryption: ServerSideEncryptionType = ..., # (5)
StorageClass: StorageClassType = ..., # (6)
WebsiteRedirectLocation: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: str = ...,
SSECustomerKeyMD5: str = ...,
SSEKMSKeyId: str = ...,
SSEKMSEncryptionContext: str = ...,
BucketKeyEnabled: bool = ...,
CopySourceSSECustomerAlgorithm: str = ...,
CopySourceSSECustomerKey: str = ...,
CopySourceSSECustomerKeyMD5: str = ...,
RequestPayer: RequestPayerType = ..., # (7)
Tagging: str = ...,
ObjectLockMode: ObjectLockModeType = ..., # (8)
ObjectLockRetainUntilDate: Union[datetime, str] = ...,
ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ..., # (9)
ExpectedBucketOwner: str = ...,
ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef: # (10)
...
- 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 aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
MFA: str = ...,
VersionId: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
) -> 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 aioboto3.resource("s3").get
method.
boto3 documentation
# get method definition
await def get(
self,
*,
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)
...
- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get method usage example with argument unpacking
kwargs: GetObjectRequestObjectSummaryGetTypeDef = { # (1)
"IfMatch": ...,
}
parent.get(**kwargs)
ObjectSummary.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectSummary.initiate_multipart_upload method#
This action initiates a multipart upload and returns an upload ID.
Type annotations and code completion for aioboto3.resource("s3").initiate_multipart_upload
method.
boto3 documentation
# initiate_multipart_upload method definition
await def initiate_multipart_upload(
self,
*,
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)
) -> 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.load method#
Calls s3.Client.head_object to update the attributes of the ObjectSummary resource.
Type annotations and code completion for aioboto3.resource("s3").load
method.
boto3 documentation
# load method definition
await def load(
self,
) -> None:
...
ObjectSummary.put method#
Adds an object to a bucket.
Type annotations and code completion for aioboto3.resource("s3").put
method.
boto3 documentation
# put method definition
await def put(
self,
*,
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)
...
- 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#
.
Type annotations and code completion for aioboto3.resource("s3").restore_object
method.
boto3 documentation
# restore_object method definition
await 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 this ObjectSummary is exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_exists
method.
boto3 documentation
# wait_until_exists method definition
await def wait_until_exists(
self,
) -> None:
...
ObjectSummary.wait_until_not_exists method#
Waits until this ObjectSummary is not exists.
Type annotations and code completion for aioboto3.resource("s3").wait_until_not_exists
method.
boto3 documentation
# wait_until_not_exists method definition
await def wait_until_not_exists(
self,
) -> None:
...
ObjectVersion#
Type annotations and code completion for session.resource("s3").ObjectVersion
class.
boto3 documentation
# ObjectVersion usage example
from types_aiobotocore_s3.service_resource import ObjectVersion
async def get_resource() -> ObjectVersion:
async with session.resource("s3") as resource:
return await resource.ObjectVersion(...)
ObjectVersion attributes#
e_tag
:Awaitable
[str
]checksum_algorithm
:Awaitable
[List
[ChecksumAlgorithmType]]size
:Awaitable
[int
]storage_class
:Awaitable
[Literal['STANDARD']
(see ObjectVersionStorageClassType)]key
:Awaitable
[str
]version_id
:Awaitable
[str
]is_latest
:Awaitable
[bool
]last_modified
:Awaitable
[datetime
]owner
:Awaitable
[OwnerResponseTypeDef]restore_status
:Awaitable
[RestoreStatusResponseTypeDef]bucket_name
:str
object_key
:str
id
:str
meta
:Awaitable
[S3ResourceMeta]
ObjectVersion methods#
ObjectVersion.Object method#
Creates a Object resource.
Type annotations and code completion for aioboto3.resource("s3").Object
method.
boto3 documentation
# Object method definition
await def Object(
self,
) -> Object:
...
ObjectVersion.delete method#
Removes an object from a bucket.
Type annotations and code completion for aioboto3.resource("s3").delete
method.
boto3 documentation
# delete method definition
await def delete(
self,
*,
MFA: str = ...,
RequestPayer: RequestPayerType = ..., # (1)
BypassGovernanceRetention: bool = ...,
ExpectedBucketOwner: str = ...,
) -> 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 aioboto3.resource("s3").get
method.
boto3 documentation
# get method definition
await def get(
self,
*,
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] = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: str = ...,
SSECustomerKeyMD5: str = ...,
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.get_available_subresources method#
Returns a list of all the available sub-resources for this Resource.
Type annotations and code completion for aioboto3.resource("s3").get_available_subresources
method.
boto3 documentation
# get_available_subresources method definition
await def get_available_subresources(
self,
) -> Sequence[str]:
...
ObjectVersion.head method#
The HEAD
operation retrieves metadata from an object without returning the
object
itself.
Type annotations and code completion for aioboto3.resource("s3").head
method.
boto3 documentation
# head method definition
await def head(
self,
*,
IfMatch: str = ...,
IfModifiedSince: Union[datetime, str] = ...,
IfNoneMatch: str = ...,
IfUnmodifiedSince: Union[datetime, str] = ...,
Range: str = ...,
SSECustomerAlgorithm: str = ...,
SSECustomerKey: str = ...,
SSECustomerKeyMD5: str = ...,
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)