2020/10/02 - Amazon Simple Storage Service - 3 new api methods
Changes Update s3 client to latest version
Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you must have the s3:GetBucketOwnershipControls permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.
For information about Amazon S3 Object Ownership, see Using Object Ownership.
The following operations are related to GetBucketOwnershipControls:
PutBucketOwnershipControls
DeleteBucketOwnershipControls
See also: AWS API Documentation
Request Syntax
client.get_bucket_ownership_controls( Bucket='string', ExpectedBucketOwner='string' )
string
[REQUIRED]
The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.
string
dict
Response Syntax
{ 'OwnershipControls': { 'Rules': [ { 'ObjectOwnership': 'BucketOwnerPreferred'|'ObjectWriter' }, ] } }
Response Structure
(dict) --
OwnershipControls (dict) --
The OwnershipControls (BucketOwnerPreferred or ObjectWriter) currently in effect for this Amazon S3 bucket.
Rules (list) --
The container element for an ownership control rule.
(dict) --
The container element for an ownership control rule.
ObjectOwnership (string) --
The container element for object ownership for a bucket's ownership controls.
BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.
ObjectWriter - The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.
Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this operation, you must have the s3:GetBucketOwnershipControls permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.
For information about Amazon S3 Object Ownership, see Using Object Ownership.
The following operations are related to GetBucketOwnershipControls:
GetBucketOwnershipControls
DeleteBucketOwnershipControls
See also: AWS API Documentation
Request Syntax
client.put_bucket_ownership_controls( Bucket='string', ContentMD5='string', ExpectedBucketOwner='string', OwnershipControls={ 'Rules': [ { 'ObjectOwnership': 'BucketOwnerPreferred'|'ObjectWriter' }, ] } )
string
[REQUIRED]
The name of the Amazon S3 bucket whose OwnershipControls you want to set.
string
The MD5 hash of the OwnershipControls request body.
string
dict
[REQUIRED]
The OwnershipControls (BucketOwnerPreferred or ObjectWriter) that you want to apply to this Amazon S3 bucket.
Rules (list) -- [REQUIRED]
The container element for an ownership control rule.
(dict) --
The container element for an ownership control rule.
ObjectOwnership (string) -- [REQUIRED]
The container element for object ownership for a bucket's ownership controls.
BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.
ObjectWriter - The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.
None
Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketOwnershipControls permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.
For information about Amazon S3 Object Ownership, see Using Object Ownership.
The following operations are related to DeleteBucketOwnershipControls:
GetBucketOwnershipControls
PutBucketOwnershipControls
See also: AWS API Documentation
Request Syntax
client.delete_bucket_ownership_controls( Bucket='string', ExpectedBucketOwner='string' )
string
[REQUIRED]
The Amazon S3 bucket whose OwnershipControls you want to delete.
string
None