2018/11/26 - Amazon Simple Storage Service - 6 new20 updated api methods
Changes Update s3 client to latest version
Retrieves an object's retention settings.
See also: AWS API Documentation
Request Syntax
client.get_object_retention( Bucket='string', Key='string', VersionId='string', RequestPayer='requester' )
string
[REQUIRED]
The bucket containing the object whose retention settings you want to retrieve.
string
[REQUIRED]
The key name for the object whose retention settings you want to retrieve.
string
The version ID for the object whose retention settings you want to retrieve.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
dict
Response Syntax
{ 'Retention': { 'Mode': 'GOVERNANCE'|'COMPLIANCE', 'RetainUntilDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Retention (dict) --
The container element for an object's retention settings.
Mode (string) --
Indicates the Retention mode for the specified object.
RetainUntilDate (datetime) --
Applies a Legal Hold configuration to the specified object.
See also: AWS API Documentation
Request Syntax
client.put_object_legal_hold( Bucket='string', Key='string', LegalHold={ 'Status': 'ON'|'OFF' }, RequestPayer='requester', VersionId='string', ContentMD5='string' )
string
[REQUIRED]
The bucket containing the object that you want to place a Legal Hold on.
string
[REQUIRED]
The key name for the object that you want to place a Legal Hold on.
dict
Container element for the Legal Hold configuration you want to apply to the specified object.
Status (string) --
Indicates whether the specified object has a Legal Hold in place.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
The version ID of the object that you want to place a Legal Hold on.
string
The MD5 signature for the configuration included in your request.
dict
Response Syntax
{ 'RequestCharged': 'requester' }
Response Structure
(dict) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
Places an Object Retention configuration on an object.
See also: AWS API Documentation
Request Syntax
client.put_object_retention( Bucket='string', Key='string', Retention={ 'Mode': 'GOVERNANCE'|'COMPLIANCE', 'RetainUntilDate': datetime(2015, 1, 1) }, RequestPayer='requester', VersionId='string', BypassGovernanceRetention=True|False, ContentMD5='string' )
string
[REQUIRED]
The bucket that contains the object you want to apply this Object Retention configuration to.
string
[REQUIRED]
The key name for the object that you want to apply this Object Retention configuration to.
dict
The container element for the Object Retention configuration.
Mode (string) --
Indicates the Retention mode for the specified object.
RetainUntilDate (datetime) --
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
The version ID for the object that you want to apply this Object Retention configuration to.
boolean
string
The MD5 signature for the configuration included in your request.
dict
Response Syntax
{ 'RequestCharged': 'requester' }
Response Structure
(dict) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.
See also: AWS API Documentation
Request Syntax
client.put_object_lock_configuration( Bucket='string', ObjectLockConfiguration={ 'ObjectLockEnabled': 'Enabled', 'Rule': { 'DefaultRetention': { 'Mode': 'GOVERNANCE'|'COMPLIANCE', 'Days': 123, 'Years': 123 } } }, RequestPayer='requester', Token='string', ContentMD5='string' )
string
[REQUIRED]
The bucket whose Object Lock configuration you want to create or replace.
dict
The Object Lock configuration that you want to apply to the specified bucket.
ObjectLockEnabled (string) --
Indicates whether this object has an Object Lock configuration enabled.
Rule (dict) --
The Object Lock rule in place for the specified object.
DefaultRetention (dict) --
The default retention period that you want to apply to new objects placed in the specified bucket.
Mode (string) --
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
Days (integer) --
The number of days that you want to specify for the default retention period.
Years (integer) --
The number of years that you want to specify for the default retention period.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
string
The MD5 signature for the configuration included in your request.
dict
Response Syntax
{ 'RequestCharged': 'requester' }
Response Structure
(dict) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.
See also: AWS API Documentation
Request Syntax
client.get_object_lock_configuration( Bucket='string' )
string
[REQUIRED]
The bucket whose Object Lock configuration you want to retrieve.
dict
Response Syntax
{ 'ObjectLockConfiguration': { 'ObjectLockEnabled': 'Enabled', 'Rule': { 'DefaultRetention': { 'Mode': 'GOVERNANCE'|'COMPLIANCE', 'Days': 123, 'Years': 123 } } } }
Response Structure
(dict) --
ObjectLockConfiguration (dict) --
The specified bucket's Object Lock configuration.
ObjectLockEnabled (string) --
Indicates whether this object has an Object Lock configuration enabled.
Rule (dict) --
The Object Lock rule in place for the specified object.
DefaultRetention (dict) --
The default retention period that you want to apply to new objects placed in the specified bucket.
Mode (string) --
The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.
Days (integer) --
The number of days that you want to specify for the default retention period.
Years (integer) --
The number of years that you want to specify for the default retention period.
Gets an object's current Legal Hold status.
See also: AWS API Documentation
Request Syntax
client.get_object_legal_hold( Bucket='string', Key='string', VersionId='string', RequestPayer='requester' )
string
[REQUIRED]
The bucket containing the object whose Legal Hold status you want to retrieve.
string
[REQUIRED]
The key name for the object whose Legal Hold status you want to retrieve.
string
The version ID of the object whose Legal Hold status you want to retrieve.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
dict
Response Syntax
{ 'LegalHold': { 'Status': 'ON'|'OFF' } }
Response Structure
(dict) --
LegalHold (dict) --
The current Legal Hold status for the specified object.
Status (string) --
Indicates whether the specified object has a Legal Hold in place.
{'ObjectLockLegalHoldStatus': 'ON | OFF', 'ObjectLockMode': 'GOVERNANCE | COMPLIANCE', 'ObjectLockRetainUntilDate': 'timestamp', 'StorageClass': {'GLACIER'}}
Creates a copy of an object that is already stored in Amazon S3.
See also: AWS API Documentation
Request Syntax
client.copy_object( ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', Bucket='string', CacheControl='string', ContentDisposition='string', ContentEncoding='string', ContentLanguage='string', ContentType='string', CopySource='string', CopySourceIfMatch='string', CopySourceIfModifiedSince=datetime(2015, 1, 1), CopySourceIfNoneMatch='string', CopySourceIfUnmodifiedSince=datetime(2015, 1, 1), Expires=datetime(2015, 1, 1), GrantFullControl='string', GrantRead='string', GrantReadACP='string', GrantWriteACP='string', Key='string', Metadata={ 'string': 'string' }, MetadataDirective='COPY'|'REPLACE', TaggingDirective='COPY'|'REPLACE', ServerSideEncryption='AES256'|'aws:kms', StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', WebsiteRedirectLocation='string', SSECustomerAlgorithm='string', SSECustomerKey='string', SSECustomerKeyMD5='string', SSEKMSKeyId='string', CopySourceSSECustomerAlgorithm='string', CopySourceSSECustomerKey='string', CopySourceSSECustomerKeyMD5='string', RequestPayer='requester', Tagging='string', ObjectLockMode='GOVERNANCE'|'COMPLIANCE', ObjectLockRetainUntilDate=datetime(2015, 1, 1), ObjectLockLegalHoldStatus='ON'|'OFF' )
string
The canned ACL to apply to the object.
string
[REQUIRED]
string
Specifies caching behavior along the request/reply chain.
string
Specifies presentational information for the object.
string
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
string
The language the content is in.
string
A standard MIME type describing the format of the object data.
string
[REQUIRED]
The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.
string
Copies the object if its entity tag (ETag) matches the specified tag.
datetime
Copies the object if it has been modified since the specified time.
string
Copies the object if its entity tag (ETag) is different than the specified ETag.
datetime
Copies the object if it hasn't been modified since the specified time.
datetime
The date and time at which the object is no longer cacheable.
string
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
string
Allows grantee to read the object data and its metadata.
string
Allows grantee to read the object ACL.
string
Allows grantee to write the ACL for the applicable object.
string
[REQUIRED]
dict
A map of metadata to store with the object in S3.
(string) --
(string) --
string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.
string
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
string
The type of storage to use for the object. Defaults to 'STANDARD'.
string
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
string
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
string
Specifies the algorithm to use when decrypting the source object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters
string
The Object Lock mode that you want to apply to the copied object.
datetime
The date and time when you want the copied object's Object Lock to expire.
string
Specifies whether you want to apply a Legal Hold to the copied object.
dict
Response Syntax
{ 'CopyObjectResult': { 'ETag': 'string', 'LastModified': datetime(2015, 1, 1) }, 'Expiration': 'string', 'CopySourceVersionId': 'string', 'VersionId': 'string', 'ServerSideEncryption': 'AES256'|'aws:kms', 'SSECustomerAlgorithm': 'string', 'SSECustomerKeyMD5': 'string', 'SSEKMSKeyId': 'string', 'RequestCharged': 'requester' }
Response Structure
(dict) --
CopyObjectResult (dict) --
ETag (string) --
LastModified (datetime) --
Expiration (string) --
If the object expiration is configured, the response includes this header.
CopySourceVersionId (string) --
VersionId (string) --
Version ID of the newly created copy.
ServerSideEncryption (string) --
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) --
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
{'ObjectLockEnabledForBucket': 'boolean'}
Creates a new bucket.
See also: AWS API Documentation
Request Syntax
client.create_bucket( ACL='private'|'public-read'|'public-read-write'|'authenticated-read', Bucket='string', CreateBucketConfiguration={ 'LocationConstraint': 'EU'|'eu-west-1'|'us-west-1'|'us-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1'|'eu-central-1' }, GrantFullControl='string', GrantRead='string', GrantReadACP='string', GrantWrite='string', GrantWriteACP='string', ObjectLockEnabledForBucket=True|False )
string
The canned ACL to apply to the bucket.
string
[REQUIRED]
dict
LocationConstraint (string) --
Specifies the region where the bucket will be created. If you don't specify a region, the bucket will be created in US Standard.
string
Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.
string
Allows grantee to list the objects in the bucket.
string
Allows grantee to read the bucket ACL.
string
Allows grantee to create, overwrite, and delete any object in the bucket.
string
Allows grantee to write the ACL for the applicable bucket.
boolean
Specifies whether you want S3 Object Lock to be enabled for the new bucket.
dict
Response Syntax
{ 'Location': 'string' }
Response Structure
(dict) --
Location (string) --
{'ObjectLockLegalHoldStatus': 'ON | OFF', 'ObjectLockMode': 'GOVERNANCE | COMPLIANCE', 'ObjectLockRetainUntilDate': 'timestamp', 'StorageClass': {'GLACIER'}}
Initiates a multipart upload and returns an upload ID.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
See also: AWS API Documentation
Request Syntax
client.create_multipart_upload( ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', Bucket='string', CacheControl='string', ContentDisposition='string', ContentEncoding='string', ContentLanguage='string', ContentType='string', Expires=datetime(2015, 1, 1), GrantFullControl='string', GrantRead='string', GrantReadACP='string', GrantWriteACP='string', Key='string', Metadata={ 'string': 'string' }, ServerSideEncryption='AES256'|'aws:kms', StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', WebsiteRedirectLocation='string', SSECustomerAlgorithm='string', SSECustomerKey='string', SSECustomerKeyMD5='string', SSEKMSKeyId='string', RequestPayer='requester', Tagging='string', ObjectLockMode='GOVERNANCE'|'COMPLIANCE', ObjectLockRetainUntilDate=datetime(2015, 1, 1), ObjectLockLegalHoldStatus='ON'|'OFF' )
string
The canned ACL to apply to the object.
string
[REQUIRED]
string
Specifies caching behavior along the request/reply chain.
string
Specifies presentational information for the object.
string
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
string
The language the content is in.
string
A standard MIME type describing the format of the object data.
datetime
The date and time at which the object is no longer cacheable.
string
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
string
Allows grantee to read the object data and its metadata.
string
Allows grantee to read the object ACL.
string
Allows grantee to write the ACL for the applicable object.
string
[REQUIRED]
dict
A map of metadata to store with the object in S3.
(string) --
(string) --
string
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
string
The type of storage to use for the object. Defaults to 'STANDARD'.
string
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
string
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
The tag-set for the object. The tag-set must be encoded as URL Query parameters
string
Specifies the Object Lock mode that you want to apply to the uploaded object.
datetime
Specifies the date and time when you want the Object Lock to expire.
string
Specifies whether you want to apply a Legal Hold to the uploaded object.
dict
Response Syntax
{ 'AbortDate': datetime(2015, 1, 1), 'AbortRuleId': 'string', 'Bucket': 'string', 'Key': 'string', 'UploadId': 'string', 'ServerSideEncryption': 'AES256'|'aws:kms', 'SSECustomerAlgorithm': 'string', 'SSECustomerKeyMD5': 'string', 'SSEKMSKeyId': 'string', 'RequestCharged': 'requester' }
Response Structure
(dict) --
AbortDate (datetime) --
Date when multipart upload will become eligible for abort operation by lifecycle.
AbortRuleId (string) --
Id of the lifecycle rule that makes a multipart upload eligible for abort operation.
Bucket (string) --
Name of the bucket to which the multipart upload was initiated.
Key (string) --
Object key for which the multipart upload was initiated.
UploadId (string) --
ID for the initiated multipart upload.
ServerSideEncryption (string) --
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) --
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
{'BypassGovernanceRetention': 'boolean'}
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects.
See also: AWS API Documentation
Request Syntax
client.delete_object( Bucket='string', Key='string', MFA='string', VersionId='string', RequestPayer='requester', BypassGovernanceRetention=True|False )
string
[REQUIRED]
string
[REQUIRED]
string
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
string
VersionId used to reference a specific version of the object.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
boolean
dict
Response Syntax
{ 'DeleteMarker': True|False, 'VersionId': 'string', 'RequestCharged': 'requester' }
Response Structure
(dict) --
DeleteMarker (boolean) --
Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker.
VersionId (string) --
Returns the version ID of the delete marker created as a result of the DELETE operation.
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
{'BypassGovernanceRetention': 'boolean'}
This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.
See also: AWS API Documentation
Request Syntax
client.delete_objects( Bucket='string', Delete={ 'Objects': [ { 'Key': 'string', 'VersionId': 'string' }, ], 'Quiet': True|False }, MFA='string', RequestPayer='requester', BypassGovernanceRetention=True|False )
string
[REQUIRED]
dict
[REQUIRED]
Objects (list) -- [REQUIRED]
(dict) --
Key (string) -- [REQUIRED]
Key name of the object to delete.
VersionId (string) --
VersionId for the specific version of the object to delete.
Quiet (boolean) --
Element to enable quiet mode for the request. When you add this element, you must set its value to true.
string
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
boolean
Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. You must have sufficient permissions to perform this operation.
dict
Response Syntax
{ 'Deleted': [ { 'Key': 'string', 'VersionId': 'string', 'DeleteMarker': True|False, 'DeleteMarkerVersionId': 'string' }, ], 'RequestCharged': 'requester', 'Errors': [ { 'Key': 'string', 'VersionId': 'string', 'Code': 'string', 'Message': 'string' }, ] }
Response Structure
(dict) --
Deleted (list) --
(dict) --
Key (string) --
VersionId (string) --
DeleteMarker (boolean) --
DeleteMarkerVersionId (string) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
Errors (list) --
(dict) --
Key (string) --
VersionId (string) --
Code (string) --
Message (string) --
{'InventoryConfiguration': {'OptionalFields': {'ObjectLockLegalHoldStatus', 'ObjectLockMode', 'ObjectLockRetainUntilDate'}}}
Returns an inventory configuration (identified by the inventory ID) from the bucket.
See also: AWS API Documentation
Request Syntax
client.get_bucket_inventory_configuration( Bucket='string', Id='string' )
string
[REQUIRED]
The name of the bucket containing the inventory configuration to retrieve.
string
[REQUIRED]
The ID used to identify the inventory configuration.
dict
Response Syntax
{ 'InventoryConfiguration': { 'Destination': { 'S3BucketDestination': { 'AccountId': 'string', 'Bucket': 'string', 'Format': 'CSV'|'ORC', 'Prefix': 'string', 'Encryption': { 'SSES3': {}, 'SSEKMS': { 'KeyId': 'string' } } } }, 'IsEnabled': True|False, 'Filter': { 'Prefix': 'string' }, 'Id': 'string', 'IncludedObjectVersions': 'All'|'Current', 'OptionalFields': [ 'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus', ], 'Schedule': { 'Frequency': 'Daily'|'Weekly' } } }
Response Structure
(dict) --
InventoryConfiguration (dict) --
Specifies the inventory configuration.
Destination (dict) --
Contains information about where to publish the inventory results.
S3BucketDestination (dict) --
Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.
AccountId (string) --
The ID of the account that owns the destination bucket.
Bucket (string) --
The Amazon resource name (ARN) of the bucket where inventory results will be published.
Format (string) --
Specifies the output format of the inventory results.
Prefix (string) --
The prefix that is prepended to all inventory results.
Encryption (dict) --
Contains the type of server-side encryption used to encrypt the inventory results.
SSES3 (dict) --
Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
SSEKMS (dict) --
Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
KeyId (string) --
Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.
IsEnabled (boolean) --
Specifies whether the inventory is enabled or disabled.
Filter (dict) --
Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.
Prefix (string) --
The prefix that an object must have to be included in the inventory results.
Id (string) --
The ID used to identify the inventory configuration.
IncludedObjectVersions (string) --
Specifies which object version(s) to included in the inventory results.
OptionalFields (list) --
Contains the optional fields that are included in the inventory results.
(string) --
Schedule (dict) --
Specifies the schedule for generating inventory results.
Frequency (string) --
Specifies how frequently inventory results are produced.
{'CloudFunctionConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'QueueConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'TopicConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}}
Deprecated, see the GetBucketNotificationConfiguration operation.
See also: AWS API Documentation
Request Syntax
client.get_bucket_notification( Bucket='string' )
string
[REQUIRED]
Name of the bucket to get the notification configuration for.
dict
Response Syntax
{ 'TopicConfiguration': { 'Id': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Topic': 'string' }, 'QueueConfiguration': { 'Id': 'string', 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Queue': 'string' }, 'CloudFunctionConfiguration': { 'Id': 'string', 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'CloudFunction': 'string', 'InvocationRole': 'string' } }
Response Structure
(dict) --
TopicConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Events (list) --
(string) --
The bucket event for which to send notifications.
Event (string) --
Bucket event for which to send notifications.
Topic (string) --
Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.
QueueConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Event (string) --
The bucket event for which to send notifications.
Events (list) --
(string) --
The bucket event for which to send notifications.
Queue (string) --
CloudFunctionConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Event (string) --
The bucket event for which to send notifications.
Events (list) --
(string) --
The bucket event for which to send notifications.
CloudFunction (string) --
InvocationRole (string) --
{'LambdaFunctionConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'QueueConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'TopicConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}}
Returns the notification configuration of a bucket.
See also: AWS API Documentation
Request Syntax
client.get_bucket_notification_configuration( Bucket='string' )
string
[REQUIRED]
Name of the bucket to get the notification configuration for.
dict
Response Syntax
{ 'TopicConfigurations': [ { 'Id': 'string', 'TopicArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ], 'QueueConfigurations': [ { 'Id': 'string', 'QueueArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ], 'LambdaFunctionConfigurations': [ { 'Id': 'string', 'LambdaFunctionArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ] }
Response Structure
(dict) --
A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket.
TopicConfigurations (list) --
(dict) --
A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3 detects specified events.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 will publish a message when it detects events of the specified type.
Events (list) --
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
QueueConfigurations (list) --
(dict) --
A container for specifying the configuration for publication of messages to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects specified events.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
QueueArn (string) --
The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 will publish a message when it detects events of the specified type.
Events (list) --
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
LambdaFunctionConfigurations (list) --
(dict) --
A container for specifying the configuration for AWS Lambda notifications.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
LambdaFunctionArn (string) --
The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3 can invoke when it detects events of the specified type.
Events (list) --
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
{'ReplicationConfiguration': {'Rules': {'Destination': {'StorageClass': {'GLACIER'}}}}}
Returns the replication configuration of a bucket.
See also: AWS API Documentation
Request Syntax
client.get_bucket_replication( Bucket='string' )
string
[REQUIRED]
dict
Response Syntax
{ 'ReplicationConfiguration': { 'Role': 'string', 'Rules': [ { 'ID': 'string', 'Priority': 123, 'Prefix': 'string', 'Filter': { 'Prefix': 'string', 'Tag': { 'Key': 'string', 'Value': 'string' }, 'And': { 'Prefix': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }, 'Status': 'Enabled'|'Disabled', 'SourceSelectionCriteria': { 'SseKmsEncryptedObjects': { 'Status': 'Enabled'|'Disabled' } }, 'Destination': { 'Bucket': 'string', 'Account': 'string', 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'AccessControlTranslation': { 'Owner': 'Destination' }, 'EncryptionConfiguration': { 'ReplicaKmsKeyID': 'string' } }, 'DeleteMarkerReplication': { 'Status': 'Enabled'|'Disabled' } }, ] } }
Response Structure
(dict) --
ReplicationConfiguration (dict) --
A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.
Role (string) --
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 can assume when replicating the objects.
Rules (list) --
A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.
(dict) --
A container for information about a specific replication rule.
ID (string) --
A unique identifier for the rule. The maximum value is 255 characters.
Priority (integer) --
The priority associated with the rule. If you specify multiple rules in a replication configuration, Amazon S3 prioritizes the rules to prevent conflicts when filtering. If two or more rules identify the same object based on a specified filter, the rule with higher priority takes precedence. For example:
Same object quality prefix based filter criteria If prefixes you specified in multiple rules overlap
Same object qualify tag based filter criteria specified in multiple rules
For more information, see Cross-Region Replication (CRR) in the Amazon S3 Developer Guide.
Prefix (string) --
An object keyname prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters.
Filter (dict) --
A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
Prefix (string) --
An object keyname prefix that identifies the subset of objects to which the rule applies.
Tag (dict) --
A container for specifying a tag key and value.
The rule applies only to objects that have the tag in their tag set.
Key (string) --
Name of the tag.
Value (string) --
Value of the tag.
And (dict) --
A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:
If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.
If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.
Prefix (string) --
Tags (list) --
(dict) --
Key (string) --
Name of the tag.
Value (string) --
Value of the tag.
Status (string) --
If status isn't enabled, the rule is ignored.
SourceSelectionCriteria (dict) --
A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using an AWS KMS-Managed Key (SSE-KMS).
If you want Amazon S3 to replicate objects created with server-side encryption using AWS KMS-Managed Keys.
SseKmsEncryptedObjects (dict) --
A container for filter information for the selection of S3 objects encrypted with AWS KMS. If you include SourceSelectionCriteria in the replication configuration, this element is required.
Status (string) --
If the status is not Enabled, replication for S3 objects encrypted with AWS KMS is disabled.
Destination (dict) --
A container for information about the replication destination.
Bucket (string) --
The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store replicas of the object identified by the rule.
If there are multiple rules in your replication configuration, all rules must specify the same bucket as the destination. A replication configuration can replicate objects to only one destination bucket.
Account (string) --
The account ID of the destination bucket. Currently, Amazon S3 verifies this value only if Access Control Translation is enabled.
In a cross-account scenario, if you change replica ownership to the AWS account that owns the destination bucket by adding the AccessControlTranslation element, this is the account ID of the owner of the destination bucket.
StorageClass (string) --
The class of storage used to store the object. By default Amazon S3 uses storage class of the source object when creating a replica.
AccessControlTranslation (dict) --
A container for information about access control for replicas.
Use this element only in a cross-account scenario where source and destination bucket owners are not the same to change replica ownership to the AWS account that owns the destination bucket. If you don't add this element to the replication configuration, the replicas are owned by same AWS account that owns the source object.
Owner (string) --
The override value for the owner of the replica object.
EncryptionConfiguration (dict) --
A container that provides information about encryption. If SourceSelectionCriteria is specified, you must specify this element.
ReplicaKmsKeyID (string) --
The ID of the AWS KMS key for the AWS Region where the destination bucket resides. Amazon S3 uses this key to encrypt the replica object.
DeleteMarkerReplication (dict) --
Specifies whether Amazon S3 should replicate delete makers.
Status (string) --
The status of the delete marker replication.
{'ObjectLockLegalHoldStatus': 'ON | OFF', 'ObjectLockMode': 'GOVERNANCE | COMPLIANCE', 'ObjectLockRetainUntilDate': 'timestamp', 'StorageClass': {'GLACIER'}}
Retrieves objects from Amazon S3.
See also: AWS API Documentation
Request Syntax
client.get_object( Bucket='string', IfMatch='string', IfModifiedSince=datetime(2015, 1, 1), IfNoneMatch='string', IfUnmodifiedSince=datetime(2015, 1, 1), Key='string', Range='string', ResponseCacheControl='string', ResponseContentDisposition='string', ResponseContentEncoding='string', ResponseContentLanguage='string', ResponseContentType='string', ResponseExpires=datetime(2015, 1, 1), VersionId='string', SSECustomerAlgorithm='string', SSECustomerKey='string', SSECustomerKeyMD5='string', RequestPayer='requester', PartNumber=123 )
string
[REQUIRED]
string
Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
datetime
Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
string
Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
datetime
Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
string
[REQUIRED]
string
Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
string
Sets the Cache-Control header of the response.
string
Sets the Content-Disposition header of the response
string
Sets the Content-Encoding header of the response.
string
Sets the Content-Language header of the response.
string
Sets the Content-Type header of the response.
datetime
Sets the Expires header of the response.
string
VersionId used to reference a specific version of the object.
string
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
integer
Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
dict
Response Syntax
{ 'Body': StreamingBody(), 'DeleteMarker': True|False, 'AcceptRanges': 'string', 'Expiration': 'string', 'Restore': 'string', 'LastModified': datetime(2015, 1, 1), 'ContentLength': 123, 'ETag': 'string', 'MissingMeta': 123, 'VersionId': 'string', 'CacheControl': 'string', 'ContentDisposition': 'string', 'ContentEncoding': 'string', 'ContentLanguage': 'string', 'ContentRange': 'string', 'ContentType': 'string', 'Expires': datetime(2015, 1, 1), 'WebsiteRedirectLocation': 'string', 'ServerSideEncryption': 'AES256'|'aws:kms', 'Metadata': { 'string': 'string' }, 'SSECustomerAlgorithm': 'string', 'SSECustomerKeyMD5': 'string', 'SSEKMSKeyId': 'string', 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'RequestCharged': 'requester', 'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA', 'PartsCount': 123, 'TagCount': 123, 'ObjectLockMode': 'GOVERNANCE'|'COMPLIANCE', 'ObjectLockRetainUntilDate': datetime(2015, 1, 1), 'ObjectLockLegalHoldStatus': 'ON'|'OFF' }
Response Structure
(dict) --
Body (:class:`.StreamingBody`) --
Object data.
DeleteMarker (boolean) --
Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) --
If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) --
Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) --
Last modified date of the object
ContentLength (integer) --
Size of the body in bytes.
ETag (string) --
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) --
This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) --
Version of the object.
CacheControl (string) --
Specifies caching behavior along the request/reply chain.
ContentDisposition (string) --
Specifies presentational information for the object.
ContentEncoding (string) --
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) --
The language the content is in.
ContentRange (string) --
The portion of the object returned in the response.
ContentType (string) --
A standard MIME type describing the format of the object data.
Expires (datetime) --
The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) --
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) --
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) --
A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) --
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) --
The count of parts this object has.
TagCount (integer) --
The number of tags, if any, on the object.
ObjectLockMode (string) --
The Object Lock mode currently in place for this object.
ObjectLockRetainUntilDate (datetime) --
The date and time when this object's Object Lock will expire.
ObjectLockLegalHoldStatus (string) --
{'ObjectLockLegalHoldStatus': 'ON | OFF', 'ObjectLockMode': 'GOVERNANCE | COMPLIANCE', 'ObjectLockRetainUntilDate': 'timestamp', 'StorageClass': {'GLACIER'}}
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
See also: AWS API Documentation
Request Syntax
client.head_object( Bucket='string', IfMatch='string', IfModifiedSince=datetime(2015, 1, 1), IfNoneMatch='string', IfUnmodifiedSince=datetime(2015, 1, 1), Key='string', Range='string', VersionId='string', SSECustomerAlgorithm='string', SSECustomerKey='string', SSECustomerKeyMD5='string', RequestPayer='requester', PartNumber=123 )
string
[REQUIRED]
string
Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
datetime
Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
string
Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
datetime
Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
string
[REQUIRED]
string
Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
string
VersionId used to reference a specific version of the object.
string
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
integer
Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.
dict
Response Syntax
{ 'DeleteMarker': True|False, 'AcceptRanges': 'string', 'Expiration': 'string', 'Restore': 'string', 'LastModified': datetime(2015, 1, 1), 'ContentLength': 123, 'ETag': 'string', 'MissingMeta': 123, 'VersionId': 'string', 'CacheControl': 'string', 'ContentDisposition': 'string', 'ContentEncoding': 'string', 'ContentLanguage': 'string', 'ContentType': 'string', 'Expires': datetime(2015, 1, 1), 'WebsiteRedirectLocation': 'string', 'ServerSideEncryption': 'AES256'|'aws:kms', 'Metadata': { 'string': 'string' }, 'SSECustomerAlgorithm': 'string', 'SSECustomerKeyMD5': 'string', 'SSEKMSKeyId': 'string', 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'RequestCharged': 'requester', 'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA', 'PartsCount': 123, 'ObjectLockMode': 'GOVERNANCE'|'COMPLIANCE', 'ObjectLockRetainUntilDate': datetime(2015, 1, 1), 'ObjectLockLegalHoldStatus': 'ON'|'OFF' }
Response Structure
(dict) --
DeleteMarker (boolean) --
Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) --
If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) --
Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) --
Last modified date of the object
ContentLength (integer) --
Size of the body in bytes.
ETag (string) --
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) --
This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) --
Version of the object.
CacheControl (string) --
Specifies caching behavior along the request/reply chain.
ContentDisposition (string) --
Specifies presentational information for the object.
ContentEncoding (string) --
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) --
The language the content is in.
ContentType (string) --
A standard MIME type describing the format of the object data.
Expires (datetime) --
The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) --
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) --
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) --
A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) --
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) --
The count of parts this object has.
ObjectLockMode (string) --
The Object Lock mode currently in place for this object.
ObjectLockRetainUntilDate (datetime) --
The date and time when this object's Object Lock will expire.
ObjectLockLegalHoldStatus (string) --
The Legal Hold status for the specified object.
{'InventoryConfigurationList': {'OptionalFields': {'ObjectLockLegalHoldStatus', 'ObjectLockMode', 'ObjectLockRetainUntilDate'}}}
Returns a list of inventory configurations for the bucket.
See also: AWS API Documentation
Request Syntax
client.list_bucket_inventory_configurations( Bucket='string', ContinuationToken='string' )
string
[REQUIRED]
The name of the bucket containing the inventory configurations to retrieve.
string
The marker used to continue an inventory configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.
dict
Response Syntax
{ 'ContinuationToken': 'string', 'InventoryConfigurationList': [ { 'Destination': { 'S3BucketDestination': { 'AccountId': 'string', 'Bucket': 'string', 'Format': 'CSV'|'ORC', 'Prefix': 'string', 'Encryption': { 'SSES3': {}, 'SSEKMS': { 'KeyId': 'string' } } } }, 'IsEnabled': True|False, 'Filter': { 'Prefix': 'string' }, 'Id': 'string', 'IncludedObjectVersions': 'All'|'Current', 'OptionalFields': [ 'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus', ], 'Schedule': { 'Frequency': 'Daily'|'Weekly' } }, ], 'IsTruncated': True|False, 'NextContinuationToken': 'string' }
Response Structure
(dict) --
ContinuationToken (string) --
If sent in the request, the marker that is used as a starting point for this inventory configuration list response.
InventoryConfigurationList (list) --
The list of inventory configurations for a bucket.
(dict) --
Destination (dict) --
Contains information about where to publish the inventory results.
S3BucketDestination (dict) --
Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.
AccountId (string) --
The ID of the account that owns the destination bucket.
Bucket (string) --
The Amazon resource name (ARN) of the bucket where inventory results will be published.
Format (string) --
Specifies the output format of the inventory results.
Prefix (string) --
The prefix that is prepended to all inventory results.
Encryption (dict) --
Contains the type of server-side encryption used to encrypt the inventory results.
SSES3 (dict) --
Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
SSEKMS (dict) --
Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
KeyId (string) --
Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.
IsEnabled (boolean) --
Specifies whether the inventory is enabled or disabled.
Filter (dict) --
Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.
Prefix (string) --
The prefix that an object must have to be included in the inventory results.
Id (string) --
The ID used to identify the inventory configuration.
IncludedObjectVersions (string) --
Specifies which object version(s) to included in the inventory results.
OptionalFields (list) --
Contains the optional fields that are included in the inventory results.
(string) --
Schedule (dict) --
Specifies the schedule for generating inventory results.
Frequency (string) --
Specifies how frequently inventory results are produced.
IsTruncated (boolean) --
Indicates whether the returned list of inventory configurations is truncated in this response. A value of true indicates that the list is truncated.
NextContinuationToken (string) --
The marker used to continue this inventory configuration listing. Use the NextContinuationToken from this response to continue the listing in a subsequent request. The continuation token is an opaque value that Amazon S3 understands.
{'Uploads': {'StorageClass': {'GLACIER'}}}
This operation lists in-progress multipart uploads.
See also: AWS API Documentation
Request Syntax
client.list_multipart_uploads( Bucket='string', Delimiter='string', EncodingType='url', KeyMarker='string', MaxUploads=123, Prefix='string', UploadIdMarker='string' )
string
[REQUIRED]
string
Character you use to group keys.
string
Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response.
string
Together with upload-id-marker, this parameter specifies the multipart upload after which listing should begin.
integer
Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response body. 1,000 is the maximum number of uploads that can be returned in a response.
string
Lists in-progress uploads only for those keys that begin with the specified prefix.
string
Together with key-marker, specifies the multipart upload after which listing should begin. If key-marker is not specified, the upload-id-marker parameter is ignored.
dict
Response Syntax
{ 'Bucket': 'string', 'KeyMarker': 'string', 'UploadIdMarker': 'string', 'NextKeyMarker': 'string', 'Prefix': 'string', 'Delimiter': 'string', 'NextUploadIdMarker': 'string', 'MaxUploads': 123, 'IsTruncated': True|False, 'Uploads': [ { 'UploadId': 'string', 'Key': 'string', 'Initiated': datetime(2015, 1, 1), 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'Owner': { 'DisplayName': 'string', 'ID': 'string' }, 'Initiator': { 'ID': 'string', 'DisplayName': 'string' } }, ], 'CommonPrefixes': [ { 'Prefix': 'string' }, ], 'EncodingType': 'url' }
Response Structure
(dict) --
Bucket (string) --
Name of the bucket to which the multipart upload was initiated.
KeyMarker (string) --
The key at or after which the listing began.
UploadIdMarker (string) --
Upload ID after which listing began.
NextKeyMarker (string) --
When a list is truncated, this element specifies the value that should be used for the key-marker request parameter in a subsequent request.
Prefix (string) --
When a prefix is provided in the request, this field contains the specified prefix. The result contains only keys starting with the specified prefix.
Delimiter (string) --
NextUploadIdMarker (string) --
When a list is truncated, this element specifies the value that should be used for the upload-id-marker request parameter in a subsequent request.
MaxUploads (integer) --
Maximum number of multipart uploads that could have been included in the response.
IsTruncated (boolean) --
Indicates whether the returned list of multipart uploads is truncated. A value of true indicates that the list was truncated. The list can be truncated if the number of multipart uploads exceeds the limit allowed or specified by max uploads.
Uploads (list) --
(dict) --
UploadId (string) --
Upload ID that identifies the multipart upload.
Key (string) --
Key of the object for which the multipart upload was initiated.
Initiated (datetime) --
Date and time at which the multipart upload was initiated.
StorageClass (string) --
The class of storage used to store the object.
Owner (dict) --
DisplayName (string) --
ID (string) --
Initiator (dict) --
Identifies who initiated the multipart upload.
ID (string) --
If the principal is an AWS account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.
DisplayName (string) --
Name of the Principal.
CommonPrefixes (list) --
(dict) --
Prefix (string) --
EncodingType (string) --
Encoding type used by Amazon S3 to encode object keys in the response.
{'StorageClass': {'GLACIER'}}
Lists the parts that have been uploaded for a specific multipart upload.
See also: AWS API Documentation
Request Syntax
client.list_parts( Bucket='string', Key='string', MaxParts=123, PartNumberMarker=123, UploadId='string', RequestPayer='requester' )
string
[REQUIRED]
string
[REQUIRED]
integer
Sets the maximum number of parts to return.
integer
Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.
string
[REQUIRED]
Upload ID identifying the multipart upload whose parts are being listed.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
dict
Response Syntax
{ 'AbortDate': datetime(2015, 1, 1), 'AbortRuleId': 'string', 'Bucket': 'string', 'Key': 'string', 'UploadId': 'string', 'PartNumberMarker': 123, 'NextPartNumberMarker': 123, 'MaxParts': 123, 'IsTruncated': True|False, 'Parts': [ { 'PartNumber': 123, 'LastModified': datetime(2015, 1, 1), 'ETag': 'string', 'Size': 123 }, ], 'Initiator': { 'ID': 'string', 'DisplayName': 'string' }, 'Owner': { 'DisplayName': 'string', 'ID': 'string' }, 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'RequestCharged': 'requester' }
Response Structure
(dict) --
AbortDate (datetime) --
Date when multipart upload will become eligible for abort operation by lifecycle.
AbortRuleId (string) --
Id of the lifecycle rule that makes a multipart upload eligible for abort operation.
Bucket (string) --
Name of the bucket to which the multipart upload was initiated.
Key (string) --
Object key for which the multipart upload was initiated.
UploadId (string) --
Upload ID identifying the multipart upload whose parts are being listed.
PartNumberMarker (integer) --
Part number after which listing begins.
NextPartNumberMarker (integer) --
When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
MaxParts (integer) --
Maximum number of parts that were allowed in the response.
IsTruncated (boolean) --
Indicates whether the returned list of parts is truncated.
Parts (list) --
(dict) --
PartNumber (integer) --
Part number identifying the part. This is a positive integer between 1 and 10,000.
LastModified (datetime) --
Date and time at which the part was uploaded.
ETag (string) --
Entity tag returned when the part was uploaded.
Size (integer) --
Size in bytes of the uploaded part data.
Initiator (dict) --
Identifies who initiated the multipart upload.
ID (string) --
If the principal is an AWS account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.
DisplayName (string) --
Name of the Principal.
Owner (dict) --
DisplayName (string) --
ID (string) --
StorageClass (string) --
The class of storage used to store the object.
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
{'InventoryConfiguration': {'OptionalFields': {'ObjectLockLegalHoldStatus', 'ObjectLockMode', 'ObjectLockRetainUntilDate'}}}
Adds an inventory configuration (identified by the inventory ID) from the bucket.
See also: AWS API Documentation
Request Syntax
client.put_bucket_inventory_configuration( Bucket='string', Id='string', InventoryConfiguration={ 'Destination': { 'S3BucketDestination': { 'AccountId': 'string', 'Bucket': 'string', 'Format': 'CSV'|'ORC', 'Prefix': 'string', 'Encryption': { 'SSES3': {} , 'SSEKMS': { 'KeyId': 'string' } } } }, 'IsEnabled': True|False, 'Filter': { 'Prefix': 'string' }, 'Id': 'string', 'IncludedObjectVersions': 'All'|'Current', 'OptionalFields': [ 'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus', ], 'Schedule': { 'Frequency': 'Daily'|'Weekly' } } )
string
[REQUIRED]
The name of the bucket where the inventory configuration will be stored.
string
[REQUIRED]
The ID used to identify the inventory configuration.
dict
[REQUIRED]
Specifies the inventory configuration.
Destination (dict) -- [REQUIRED]
Contains information about where to publish the inventory results.
S3BucketDestination (dict) -- [REQUIRED]
Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.
AccountId (string) --
The ID of the account that owns the destination bucket.
Bucket (string) -- [REQUIRED]
The Amazon resource name (ARN) of the bucket where inventory results will be published.
Format (string) -- [REQUIRED]
Specifies the output format of the inventory results.
Prefix (string) --
The prefix that is prepended to all inventory results.
Encryption (dict) --
Contains the type of server-side encryption used to encrypt the inventory results.
SSES3 (dict) --
Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
SSEKMS (dict) --
Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
KeyId (string) -- [REQUIRED]
Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.
IsEnabled (boolean) -- [REQUIRED]
Specifies whether the inventory is enabled or disabled.
Filter (dict) --
Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.
Prefix (string) -- [REQUIRED]
The prefix that an object must have to be included in the inventory results.
Id (string) -- [REQUIRED]
The ID used to identify the inventory configuration.
IncludedObjectVersions (string) -- [REQUIRED]
Specifies which object version(s) to included in the inventory results.
OptionalFields (list) --
Contains the optional fields that are included in the inventory results.
(string) --
Schedule (dict) -- [REQUIRED]
Specifies the schedule for generating inventory results.
Frequency (string) -- [REQUIRED]
Specifies how frequently inventory results are produced.
None
{'NotificationConfiguration': {'CloudFunctionConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'QueueConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'TopicConfiguration': {'Event': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}, 'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}}}
Deprecated, see the PutBucketNotificationConfiguraiton operation.
See also: AWS API Documentation
Request Syntax
client.put_bucket_notification( Bucket='string', ContentMD5='string', NotificationConfiguration={ 'TopicConfiguration': { 'Id': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Topic': 'string' }, 'QueueConfiguration': { 'Id': 'string', 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Queue': 'string' }, 'CloudFunctionConfiguration': { 'Id': 'string', 'Event': 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'CloudFunction': 'string', 'InvocationRole': 'string' } } )
string
[REQUIRED]
string
dict
[REQUIRED]
TopicConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Events (list) --
(string) --
The bucket event for which to send notifications.
Event (string) --
Bucket event for which to send notifications.
Topic (string) --
Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.
QueueConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Event (string) --
The bucket event for which to send notifications.
Events (list) --
(string) --
The bucket event for which to send notifications.
Queue (string) --
CloudFunctionConfiguration (dict) --
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
Event (string) --
The bucket event for which to send notifications.
Events (list) --
(string) --
The bucket event for which to send notifications.
CloudFunction (string) --
InvocationRole (string) --
None
{'NotificationConfiguration': {'LambdaFunctionConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'QueueConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}, 'TopicConfigurations': {'Events': {'s3:ObjectRestore:Completed', 's3:ObjectRestore:Post'}}}}
Enables notifications of specified events for a bucket.
See also: AWS API Documentation
Request Syntax
client.put_bucket_notification_configuration( Bucket='string', NotificationConfiguration={ 'TopicConfigurations': [ { 'Id': 'string', 'TopicArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ], 'QueueConfigurations': [ { 'Id': 'string', 'QueueArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ], 'LambdaFunctionConfigurations': [ { 'Id': 'string', 'LambdaFunctionArn': 'string', 'Events': [ 's3:ReducedRedundancyLostObject'|'s3:ObjectCreated:*'|'s3:ObjectCreated:Put'|'s3:ObjectCreated:Post'|'s3:ObjectCreated:Copy'|'s3:ObjectCreated:CompleteMultipartUpload'|'s3:ObjectRemoved:*'|'s3:ObjectRemoved:Delete'|'s3:ObjectRemoved:DeleteMarkerCreated'|'s3:ObjectRestore:Post'|'s3:ObjectRestore:Completed', ], 'Filter': { 'Key': { 'FilterRules': [ { 'Name': 'prefix'|'suffix', 'Value': 'string' }, ] } } }, ] } )
string
[REQUIRED]
dict
[REQUIRED]
A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket.
TopicConfigurations (list) --
(dict) --
A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3 detects specified events.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
TopicArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 will publish a message when it detects events of the specified type.
Events (list) -- [REQUIRED]
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
QueueConfigurations (list) --
(dict) --
A container for specifying the configuration for publication of messages to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects specified events.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
QueueArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 will publish a message when it detects events of the specified type.
Events (list) -- [REQUIRED]
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
LambdaFunctionConfigurations (list) --
(dict) --
A container for specifying the configuration for AWS Lambda notifications.
Id (string) --
An optional unique identifier for configurations in a notification configuration. If you don't provide one, Amazon S3 will assign an ID.
LambdaFunctionArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3 can invoke when it detects events of the specified type.
Events (list) -- [REQUIRED]
(string) --
The bucket event for which to send notifications.
Filter (dict) --
A container for object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Key (dict) --
A container for object key name prefix and suffix filtering rules.
FilterRules (list) --
A list of containers for the key value pair that defines the criteria for the filter rule.
(dict) --
A container for a key value pair that defines the criteria for the filter rule.
Name (string) --
The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum prefix length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.
Value (string) --
None
{'ReplicationConfiguration': {'Rules': {'Destination': {'StorageClass': {'GLACIER'}}}}}
Creates a replication configuration or replaces an existing one. For more information, see Cross-Region Replication (CRR) in the Amazon S3 Developer Guide.
See also: AWS API Documentation
Request Syntax
client.put_bucket_replication( Bucket='string', ContentMD5='string', ReplicationConfiguration={ 'Role': 'string', 'Rules': [ { 'ID': 'string', 'Priority': 123, 'Prefix': 'string', 'Filter': { 'Prefix': 'string', 'Tag': { 'Key': 'string', 'Value': 'string' }, 'And': { 'Prefix': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }, 'Status': 'Enabled'|'Disabled', 'SourceSelectionCriteria': { 'SseKmsEncryptedObjects': { 'Status': 'Enabled'|'Disabled' } }, 'Destination': { 'Bucket': 'string', 'Account': 'string', 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', 'AccessControlTranslation': { 'Owner': 'Destination' }, 'EncryptionConfiguration': { 'ReplicaKmsKeyID': 'string' } }, 'DeleteMarkerReplication': { 'Status': 'Enabled'|'Disabled' } }, ] } )
string
[REQUIRED]
string
dict
[REQUIRED]
A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.
Role (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 can assume when replicating the objects.
Rules (list) -- [REQUIRED]
A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.
(dict) --
A container for information about a specific replication rule.
ID (string) --
A unique identifier for the rule. The maximum value is 255 characters.
Priority (integer) --
The priority associated with the rule. If you specify multiple rules in a replication configuration, Amazon S3 prioritizes the rules to prevent conflicts when filtering. If two or more rules identify the same object based on a specified filter, the rule with higher priority takes precedence. For example:
Same object quality prefix based filter criteria If prefixes you specified in multiple rules overlap
Same object qualify tag based filter criteria specified in multiple rules
For more information, see Cross-Region Replication (CRR) in the Amazon S3 Developer Guide.
Prefix (string) --
An object keyname prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters.
Filter (dict) --
A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
Prefix (string) --
An object keyname prefix that identifies the subset of objects to which the rule applies.
Tag (dict) --
A container for specifying a tag key and value.
The rule applies only to objects that have the tag in their tag set.
Key (string) -- [REQUIRED]
Name of the tag.
Value (string) -- [REQUIRED]
Value of the tag.
And (dict) --
A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:
If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.
If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.
Prefix (string) --
Tags (list) --
(dict) --
Key (string) -- [REQUIRED]
Name of the tag.
Value (string) -- [REQUIRED]
Value of the tag.
Status (string) -- [REQUIRED]
If status isn't enabled, the rule is ignored.
SourceSelectionCriteria (dict) --
A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using an AWS KMS-Managed Key (SSE-KMS).
If you want Amazon S3 to replicate objects created with server-side encryption using AWS KMS-Managed Keys.
SseKmsEncryptedObjects (dict) --
A container for filter information for the selection of S3 objects encrypted with AWS KMS. If you include SourceSelectionCriteria in the replication configuration, this element is required.
Status (string) -- [REQUIRED]
If the status is not Enabled, replication for S3 objects encrypted with AWS KMS is disabled.
Destination (dict) -- [REQUIRED]
A container for information about the replication destination.
Bucket (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store replicas of the object identified by the rule.
If there are multiple rules in your replication configuration, all rules must specify the same bucket as the destination. A replication configuration can replicate objects to only one destination bucket.
Account (string) --
The account ID of the destination bucket. Currently, Amazon S3 verifies this value only if Access Control Translation is enabled.
In a cross-account scenario, if you change replica ownership to the AWS account that owns the destination bucket by adding the AccessControlTranslation element, this is the account ID of the owner of the destination bucket.
StorageClass (string) --
The class of storage used to store the object. By default Amazon S3 uses storage class of the source object when creating a replica.
AccessControlTranslation (dict) --
A container for information about access control for replicas.
Use this element only in a cross-account scenario where source and destination bucket owners are not the same to change replica ownership to the AWS account that owns the destination bucket. If you don't add this element to the replication configuration, the replicas are owned by same AWS account that owns the source object.
Owner (string) -- [REQUIRED]
The override value for the owner of the replica object.
EncryptionConfiguration (dict) --
A container that provides information about encryption. If SourceSelectionCriteria is specified, you must specify this element.
ReplicaKmsKeyID (string) --
The ID of the AWS KMS key for the AWS Region where the destination bucket resides. Amazon S3 uses this key to encrypt the replica object.
DeleteMarkerReplication (dict) --
Specifies whether Amazon S3 should replicate delete makers.
Status (string) --
The status of the delete marker replication.
None
{'ObjectLockLegalHoldStatus': 'ON | OFF', 'ObjectLockMode': 'GOVERNANCE | COMPLIANCE', 'ObjectLockRetainUntilDate': 'timestamp', 'StorageClass': {'GLACIER'}}
Adds an object to a bucket.
See also: AWS API Documentation
Request Syntax
client.put_object( ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', Body=b'bytes'|file, Bucket='string', CacheControl='string', ContentDisposition='string', ContentEncoding='string', ContentLanguage='string', ContentLength=123, ContentMD5='string', ContentType='string', Expires=datetime(2015, 1, 1), GrantFullControl='string', GrantRead='string', GrantReadACP='string', GrantWriteACP='string', Key='string', Metadata={ 'string': 'string' }, ServerSideEncryption='AES256'|'aws:kms', StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER', WebsiteRedirectLocation='string', SSECustomerAlgorithm='string', SSECustomerKey='string', SSECustomerKeyMD5='string', SSEKMSKeyId='string', RequestPayer='requester', Tagging='string', ObjectLockMode='GOVERNANCE'|'COMPLIANCE', ObjectLockRetainUntilDate=datetime(2015, 1, 1), ObjectLockLegalHoldStatus='ON'|'OFF' )
string
The canned ACL to apply to the object.
bytes or seekable file-like object
Object data.
string
[REQUIRED]
Name of the bucket to which the PUT operation was initiated.
string
Specifies caching behavior along the request/reply chain.
string
Specifies presentational information for the object.
string
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
string
The language the content is in.
integer
Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
string
The base64-encoded 128-bit MD5 digest of the part data.
string
A standard MIME type describing the format of the object data.
datetime
The date and time at which the object is no longer cacheable.
string
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
string
Allows grantee to read the object data and its metadata.
string
Allows grantee to read the object ACL.
string
Allows grantee to write the ACL for the applicable object.
string
[REQUIRED]
Object key for which the PUT operation was initiated.
dict
A map of metadata to store with the object in S3.
(string) --
(string) --
string
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
string
The type of storage to use for the object. Defaults to 'STANDARD'.
string
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
string
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
string
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.
string
Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
string
Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
string
The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")
string
The Object Lock mode that you want to apply to this object.
datetime
The date and time when you want this object's Object Lock to expire.
string
The Legal Hold status that you want to apply to the specified object.
dict
Response Syntax
{ 'Expiration': 'string', 'ETag': 'string', 'ServerSideEncryption': 'AES256'|'aws:kms', 'VersionId': 'string', 'SSECustomerAlgorithm': 'string', 'SSECustomerKeyMD5': 'string', 'SSEKMSKeyId': 'string', 'RequestCharged': 'requester' }
Response Structure
(dict) --
Expiration (string) --
If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
ETag (string) --
Entity tag for the uploaded object.
ServerSideEncryption (string) --
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
VersionId (string) --
Version of the object.
SSECustomerAlgorithm (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) --
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) --
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
{'RestoreRequest': {'OutputLocation': {'S3': {'StorageClass': {'GLACIER'}}}}}
Restores an archived copy of an object back into Amazon S3
See also: AWS API Documentation
Request Syntax
client.restore_object( Bucket='string', Key='string', VersionId='string', RestoreRequest={ 'Days': 123, 'GlacierJobParameters': { 'Tier': 'Standard'|'Bulk'|'Expedited' }, 'Type': 'SELECT', 'Tier': 'Standard'|'Bulk'|'Expedited', 'Description': 'string', 'SelectParameters': { 'InputSerialization': { 'CSV': { 'FileHeaderInfo': 'USE'|'IGNORE'|'NONE', 'Comments': 'string', 'QuoteEscapeCharacter': 'string', 'RecordDelimiter': 'string', 'FieldDelimiter': 'string', 'QuoteCharacter': 'string', 'AllowQuotedRecordDelimiter': True|False }, 'CompressionType': 'NONE'|'GZIP'|'BZIP2', 'JSON': { 'Type': 'DOCUMENT'|'LINES' }, 'Parquet': {} }, 'ExpressionType': 'SQL', 'Expression': 'string', 'OutputSerialization': { 'CSV': { 'QuoteFields': 'ALWAYS'|'ASNEEDED', 'QuoteEscapeCharacter': 'string', 'RecordDelimiter': 'string', 'FieldDelimiter': 'string', 'QuoteCharacter': 'string' }, 'JSON': { 'RecordDelimiter': 'string' } } }, 'OutputLocation': { 'S3': { 'BucketName': 'string', 'Prefix': 'string', 'Encryption': { 'EncryptionType': 'AES256'|'aws:kms', 'KMSKeyId': 'string', 'KMSContext': 'string' }, 'CannedACL': 'private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', 'AccessControlList': [ { 'Grantee': { 'DisplayName': 'string', 'EmailAddress': 'string', 'ID': 'string', 'Type': 'CanonicalUser'|'AmazonCustomerByEmail'|'Group', 'URI': 'string' }, 'Permission': 'FULL_CONTROL'|'WRITE'|'WRITE_ACP'|'READ'|'READ_ACP' }, ], 'Tagging': { 'TagSet': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'UserMetadata': [ { 'Name': 'string', 'Value': 'string' }, ], 'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER' } } }, RequestPayer='requester' )
string
[REQUIRED]
string
[REQUIRED]
string
dict
Container for restore job parameters.
Days (integer) --
Lifetime of the active copy in days. Do not use with restores that specify OutputLocation.
GlacierJobParameters (dict) --
Glacier related parameters pertaining to this job. Do not use with restores that specify OutputLocation.
Tier (string) -- [REQUIRED]
Glacier retrieval tier at which the restore will be processed.
Type (string) --
Type of restore request.
Tier (string) --
Glacier retrieval tier at which the restore will be processed.
Description (string) --
The optional description for the job.
SelectParameters (dict) --
Describes the parameters for Select job types.
InputSerialization (dict) -- [REQUIRED]
Describes the serialization format of the object.
CSV (dict) --
Describes the serialization of a CSV-encoded object.
FileHeaderInfo (string) --
Describes the first line of input. Valid values: None, Ignore, Use.
Comments (string) --
The single character used to indicate a row should be ignored when present at the start of a row.
QuoteEscapeCharacter (string) --
The single character used for escaping the quote character inside an already escaped value.
RecordDelimiter (string) --
The value used to separate individual records.
FieldDelimiter (string) --
The value used to separate individual fields in a record.
QuoteCharacter (string) --
Value used for escaping where the field delimiter is part of the value.
AllowQuotedRecordDelimiter (boolean) --
Specifies that CSV field values may contain quoted record delimiters and such records should be allowed. Default value is FALSE. Setting this value to TRUE may lower performance.
CompressionType (string) --
Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: NONE.
JSON (dict) --
Specifies JSON as object's input serialization format.
Type (string) --
The type of JSON. Valid values: Document, Lines.
Parquet (dict) --
Specifies Parquet as object's input serialization format.
ExpressionType (string) -- [REQUIRED]
The type of the provided expression (e.g., SQL).
Expression (string) -- [REQUIRED]
The expression that is used to query the object.
OutputSerialization (dict) -- [REQUIRED]
Describes how the results of the Select job are serialized.
CSV (dict) --
Describes the serialization of CSV-encoded Select results.
QuoteFields (string) --
Indicates whether or not all output fields should be quoted.
QuoteEscapeCharacter (string) --
Th single character used for escaping the quote character inside an already escaped value.
RecordDelimiter (string) --
The value used to separate individual records.
FieldDelimiter (string) --
The value used to separate individual fields in a record.
QuoteCharacter (string) --
The value used for escaping where the field delimiter is part of the value.
JSON (dict) --
Specifies JSON as request's output serialization format.
RecordDelimiter (string) --
The value used to separate individual records in the output.
OutputLocation (dict) --
Describes the location where the restore job's output is stored.
S3 (dict) --
Describes an S3 location that will receive the results of the restore request.
BucketName (string) -- [REQUIRED]
The name of the bucket where the restore results will be placed.
Prefix (string) -- [REQUIRED]
The prefix that is prepended to the restore results for this request.
Encryption (dict) --
Describes the server-side encryption that will be applied to the restore results.
EncryptionType (string) -- [REQUIRED]
The server-side encryption algorithm used when storing job results in Amazon S3 (e.g., AES256, aws:kms).
KMSKeyId (string) --
If the encryption type is aws:kms, this optional value specifies the AWS KMS key ID to use for encryption of job results.
KMSContext (string) --
If the encryption type is aws:kms, this optional value can be used to specify the encryption context for the restore results.
CannedACL (string) --
The canned ACL to apply to the restore results.
AccessControlList (list) --
A list of grants that control access to the staged results.
(dict) --
Grantee (dict) --
DisplayName (string) --
Screen name of the grantee.
EmailAddress (string) --
Email address of the grantee.
ID (string) --
The canonical user ID of the grantee.
Type (string) -- [REQUIRED]
Type of grantee
URI (string) --
URI of the grantee group.
Permission (string) --
Specifies the permission given to the grantee.
Tagging (dict) --
The tag-set that is applied to the restore results.
TagSet (list) -- [REQUIRED]
(dict) --
Key (string) -- [REQUIRED]
Name of the tag.
Value (string) -- [REQUIRED]
Value of the tag.
UserMetadata (list) --
A list of metadata to store with the restore results in S3.
(dict) --
A metadata key-value pair to store with an object.
Name (string) --
Value (string) --
StorageClass (string) --
The class of storage used to store the restore results.
string
Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
dict
Response Syntax
{ 'RequestCharged': 'requester', 'RestoreOutputPath': 'string' }
Response Structure
(dict) --
RequestCharged (string) --
If present, indicates that the requester was successfully charged for the request.
RestoreOutputPath (string) --
Indicates the path in the provided S3 output location where Select results will be restored to.