pub struct Client { /* private fields */ }
Expand description

Client for Amazon Simple Storage Service

Client for invoking operations on Amazon Simple Storage Service. Each operation on Amazon Simple Storage Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_s3::Client::new(&config);

Occasionally, SDKs may have additional service-specific that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_s3::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

Using the Client

A client has a function for every operation that can be performed by the service. For example, the AbortMultipartUpload operation has a Client::abort_multipart_upload, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.abort_multipart_upload()
    .bucket("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

§

impl Client

pub fn from_conf(conf: Config) -> Client

Creates a new client from the service Config.

Panics

This method will panic if the conf has retry or timeouts enabled without a sleep_impl. If you experience this panic, it can be fixed by setting the sleep_impl, or by disabling retries and timeouts.

pub fn config(&self) -> &Config

Returns the client’s configuration.

§

impl Client

pub fn new(sdk_config: &SdkConfig) -> Client

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
§

impl Client

pub fn abort_multipart_upload(&self) -> AbortMultipartUploadFluentBuilder

Constructs a fluent builder for the AbortMultipartUpload operation.

§

impl Client

pub fn complete_multipart_upload(&self) -> CompleteMultipartUploadFluentBuilder

Constructs a fluent builder for the CompleteMultipartUpload operation.

§

impl Client

pub fn copy_object(&self) -> CopyObjectFluentBuilder

Constructs a fluent builder for the CopyObject operation.

§

impl Client

pub fn create_bucket(&self) -> CreateBucketFluentBuilder

Constructs a fluent builder for the CreateBucket operation.

§

impl Client

pub fn create_multipart_upload(&self) -> CreateMultipartUploadFluentBuilder

Constructs a fluent builder for the CreateMultipartUpload operation.

§

impl Client

pub fn delete_bucket(&self) -> DeleteBucketFluentBuilder

Constructs a fluent builder for the DeleteBucket operation.

§

impl Client

pub fn delete_bucket_analytics_configuration( &self ) -> DeleteBucketAnalyticsConfigurationFluentBuilder

Constructs a fluent builder for the DeleteBucketAnalyticsConfiguration operation.

§

impl Client

pub fn delete_bucket_cors(&self) -> DeleteBucketCorsFluentBuilder

Constructs a fluent builder for the DeleteBucketCors operation.

§

impl Client

pub fn delete_bucket_encryption(&self) -> DeleteBucketEncryptionFluentBuilder

Constructs a fluent builder for the DeleteBucketEncryption operation.

§

impl Client

pub fn delete_bucket_intelligent_tiering_configuration( &self ) -> DeleteBucketIntelligentTieringConfigurationFluentBuilder

Constructs a fluent builder for the DeleteBucketIntelligentTieringConfiguration operation.

§

impl Client

pub fn delete_bucket_inventory_configuration( &self ) -> DeleteBucketInventoryConfigurationFluentBuilder

Constructs a fluent builder for the DeleteBucketInventoryConfiguration operation.

§

impl Client

pub fn delete_bucket_lifecycle(&self) -> DeleteBucketLifecycleFluentBuilder

Constructs a fluent builder for the DeleteBucketLifecycle operation.

§

impl Client

pub fn delete_bucket_metrics_configuration( &self ) -> DeleteBucketMetricsConfigurationFluentBuilder

Constructs a fluent builder for the DeleteBucketMetricsConfiguration operation.

§

impl Client

pub fn delete_bucket_ownership_controls( &self ) -> DeleteBucketOwnershipControlsFluentBuilder

Constructs a fluent builder for the DeleteBucketOwnershipControls operation.

§

impl Client

pub fn delete_bucket_policy(&self) -> DeleteBucketPolicyFluentBuilder

Constructs a fluent builder for the DeleteBucketPolicy operation.

§

impl Client

pub fn delete_bucket_replication(&self) -> DeleteBucketReplicationFluentBuilder

Constructs a fluent builder for the DeleteBucketReplication operation.

§

impl Client

pub fn delete_bucket_tagging(&self) -> DeleteBucketTaggingFluentBuilder

Constructs a fluent builder for the DeleteBucketTagging operation.

§

impl Client

pub fn delete_bucket_website(&self) -> DeleteBucketWebsiteFluentBuilder

Constructs a fluent builder for the DeleteBucketWebsite operation.

§

impl Client

pub fn delete_object(&self) -> DeleteObjectFluentBuilder

Constructs a fluent builder for the DeleteObject operation.

  • The fluent builder is configurable:
    • bucket(impl Into<String>) / set_bucket(Option<String>):

      The bucket name of the bucket containing the object.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • key(impl Into<String>) / set_key(Option<String>):

      Key name of the object to delete.

    • mfa(impl Into<String>) / set_mfa(Option<String>):

      The concatenation of the authentication device’s serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.

    • version_id(impl Into<String>) / set_version_id(Option<String>):

      VersionId used to reference a specific version of the object.

    • request_payer(RequestPayer) / set_request_payer(Option<RequestPayer>):

      Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

    • bypass_governance_retention(bool) / set_bypass_governance_retention(Option<bool>):

      Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the s3:BypassGovernanceRetention permission.

    • expected_bucket_owner(impl Into<String>) / set_expected_bucket_owner(Option<String>):

      The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • On success, responds with DeleteObjectOutput with field(s):
    • delete_marker(bool):

      Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker.

    • version_id(Option<String>):

      Returns the version ID of the delete marker created as a result of the DELETE operation.

    • request_charged(Option<RequestCharged>):

      If present, indicates that the requester was successfully charged for the request.

  • On failure, responds with SdkError<DeleteObjectError>
§

impl Client

pub fn delete_object_tagging(&self) -> DeleteObjectTaggingFluentBuilder

Constructs a fluent builder for the DeleteObjectTagging operation.

  • The fluent builder is configurable:
    • bucket(impl Into<String>) / set_bucket(Option<String>):

      The bucket name containing the objects from which to remove the tags.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • key(impl Into<String>) / set_key(Option<String>):

      The key that identifies the object in the bucket from which to remove all tags.

    • version_id(impl Into<String>) / set_version_id(Option<String>):

      The versionId of the object that the tag-set will be removed from.

    • expected_bucket_owner(impl Into<String>) / set_expected_bucket_owner(Option<String>):

      The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • On success, responds with DeleteObjectTaggingOutput with field(s):
  • On failure, responds with SdkError<DeleteObjectTaggingError>
§

impl Client

pub fn delete_objects(&self) -> DeleteObjectsFluentBuilder

Constructs a fluent builder for the DeleteObjects operation.

  • The fluent builder is configurable:
    • bucket(impl Into<String>) / set_bucket(Option<String>):

      The bucket name containing the objects to delete.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • delete(Delete) / set_delete(Option<Delete>):

      Container for the request.

    • mfa(impl Into<String>) / set_mfa(Option<String>):

      The concatenation of the authentication device’s serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.

    • request_payer(RequestPayer) / set_request_payer(Option<RequestPayer>):

      Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

    • bypass_governance_retention(bool) / set_bypass_governance_retention(Option<bool>):

      Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention permission.

    • expected_bucket_owner(impl Into<String>) / set_expected_bucket_owner(Option<String>):

      The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

    • checksum_algorithm(ChecksumAlgorithm) / set_checksum_algorithm(Option<ChecksumAlgorithm>):

      Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

      If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

      This checksum algorithm must be the same for all parts and it match the checksum value supplied in the CreateMultipartUpload request.

  • On success, responds with DeleteObjectsOutput with field(s):
  • On failure, responds with SdkError<DeleteObjectsError>
§

impl Client

pub fn delete_public_access_block(&self) -> DeletePublicAccessBlockFluentBuilder

Constructs a fluent builder for the DeletePublicAccessBlock operation.

§

impl Client

pub fn get_bucket_accelerate_configuration( &self ) -> GetBucketAccelerateConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketAccelerateConfiguration operation.

§

impl Client

pub fn get_bucket_acl(&self) -> GetBucketAclFluentBuilder

Constructs a fluent builder for the GetBucketAcl operation.

§

impl Client

pub fn get_bucket_analytics_configuration( &self ) -> GetBucketAnalyticsConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketAnalyticsConfiguration operation.

§

impl Client

pub fn get_bucket_cors(&self) -> GetBucketCorsFluentBuilder

Constructs a fluent builder for the GetBucketCors operation.

§

impl Client

pub fn get_bucket_encryption(&self) -> GetBucketEncryptionFluentBuilder

Constructs a fluent builder for the GetBucketEncryption operation.

§

impl Client

pub fn get_bucket_intelligent_tiering_configuration( &self ) -> GetBucketIntelligentTieringConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketIntelligentTieringConfiguration operation.

§

impl Client

pub fn get_bucket_inventory_configuration( &self ) -> GetBucketInventoryConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketInventoryConfiguration operation.

§

impl Client

pub fn get_bucket_lifecycle_configuration( &self ) -> GetBucketLifecycleConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketLifecycleConfiguration operation.

§

impl Client

pub fn get_bucket_location(&self) -> GetBucketLocationFluentBuilder

Constructs a fluent builder for the GetBucketLocation operation.

§

impl Client

pub fn get_bucket_logging(&self) -> GetBucketLoggingFluentBuilder

Constructs a fluent builder for the GetBucketLogging operation.

§

impl Client

pub fn get_bucket_metrics_configuration( &self ) -> GetBucketMetricsConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketMetricsConfiguration operation.

§

impl Client

pub fn get_bucket_notification_configuration( &self ) -> GetBucketNotificationConfigurationFluentBuilder

Constructs a fluent builder for the GetBucketNotificationConfiguration operation.

§

impl Client

pub fn get_bucket_ownership_controls( &self ) -> GetBucketOwnershipControlsFluentBuilder

Constructs a fluent builder for the GetBucketOwnershipControls operation.

§

impl Client

pub fn get_bucket_policy(&self) -> GetBucketPolicyFluentBuilder

Constructs a fluent builder for the GetBucketPolicy operation.

§

impl Client

pub fn get_bucket_policy_status(&self) -> GetBucketPolicyStatusFluentBuilder

Constructs a fluent builder for the GetBucketPolicyStatus operation.

§

impl Client

pub fn get_bucket_replication(&self) -> GetBucketReplicationFluentBuilder

Constructs a fluent builder for the GetBucketReplication operation.

§

impl Client

pub fn get_bucket_request_payment(&self) -> GetBucketRequestPaymentFluentBuilder

Constructs a fluent builder for the GetBucketRequestPayment operation.

§

impl Client

pub fn get_bucket_tagging(&self) -> GetBucketTaggingFluentBuilder

Constructs a fluent builder for the GetBucketTagging operation.

§

impl Client

pub fn get_bucket_versioning(&self) -> GetBucketVersioningFluentBuilder

Constructs a fluent builder for the GetBucketVersioning operation.

§

impl Client

pub fn get_bucket_website(&self) -> GetBucketWebsiteFluentBuilder

Constructs a fluent builder for the GetBucketWebsite operation.

§

impl Client

pub fn get_object(&self) -> GetObjectFluentBuilder

Constructs a fluent builder for the GetObject operation.

§

impl Client

pub fn get_object_acl(&self) -> GetObjectAclFluentBuilder

Constructs a fluent builder for the GetObjectAcl operation.

§

impl Client

pub fn get_object_attributes(&self) -> GetObjectAttributesFluentBuilder

Constructs a fluent builder for the GetObjectAttributes operation.

§

impl Client

Constructs a fluent builder for the GetObjectLegalHold operation.

§

impl Client

pub fn get_object_lock_configuration( &self ) -> GetObjectLockConfigurationFluentBuilder

Constructs a fluent builder for the GetObjectLockConfiguration operation.

§

impl Client

pub fn get_object_retention(&self) -> GetObjectRetentionFluentBuilder

Constructs a fluent builder for the GetObjectRetention operation.

§

impl Client

pub fn get_object_tagging(&self) -> GetObjectTaggingFluentBuilder

Constructs a fluent builder for the GetObjectTagging operation.

§

impl Client

pub fn get_object_torrent(&self) -> GetObjectTorrentFluentBuilder

Constructs a fluent builder for the GetObjectTorrent operation.

§

impl Client

pub fn get_public_access_block(&self) -> GetPublicAccessBlockFluentBuilder

Constructs a fluent builder for the GetPublicAccessBlock operation.

§

impl Client

pub fn head_bucket(&self) -> HeadBucketFluentBuilder

Constructs a fluent builder for the HeadBucket operation.

  • The fluent builder is configurable:
    • bucket(impl Into<String>) / set_bucket(Option<String>):

      The bucket name.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • expected_bucket_owner(impl Into<String>) / set_expected_bucket_owner(Option<String>):

      The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • On success, responds with HeadBucketOutput
  • On failure, responds with SdkError<HeadBucketError>
§

impl Client

pub fn head_object(&self) -> HeadObjectFluentBuilder

Constructs a fluent builder for the HeadObject operation.

  • The fluent builder is configurable:
  • On success, responds with HeadObjectOutput with field(s):
    • delete_marker(bool):

      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.

    • accept_ranges(Option<String>):

      Indicates that a range of bytes was specified.

    • expiration(Option<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(Option<String>):

      If the object is an archived object (an object whose storage class is GLACIER), the response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

      If an archive copy is already restored, the header value indicates when Amazon S3 is scheduled to delete the object copy. For example:

      x-amz-restore: ongoing-request=“false”, expiry-date=“Fri, 21 Dec 2012 00:00:00 GMT”

      If the object restoration is in progress, the header returns the value ongoing-request=“true”.

      For more information about archiving objects, see Transitioning Objects: General Considerations.

    • archive_status(Option<ArchiveStatus>):

      The archive state of the head object.

    • last_modified(Option<DateTime>):

      Creation date of the object.

    • content_length(i64):

      Size of the body in bytes.

    • checksum_crc32(Option<String>):

      The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

    • checksum_crc32_c(Option<String>):

      The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

    • checksum_sha1(Option<String>):

      The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

    • checksum_sha256(Option<String>):

      The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

    • e_tag(Option<String>):

      An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.

    • missing_meta(i32):

      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.

    • version_id(Option<String>):

      Version of the object.

    • cache_control(Option<String>):

      Specifies caching behavior along the request/reply chain.

    • content_disposition(Option<String>):

      Specifies presentational information for the object.

    • content_encoding(Option<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.

    • content_language(Option<String>):

      The language the content is in.

    • content_type(Option<String>):

      A standard MIME type describing the format of the object data.

    • expires(Option<DateTime>):

      The date and time at which the object is no longer cacheable.

    • website_redirect_location(Option<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.

    • server_side_encryption(Option<ServerSideEncryption>):

      The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms, aws:kms:dsse).

    • metadata(Option<HashMap<String, String>>):

      A map of metadata to store with the object in S3.

    • sse_customer_algorithm(Option<String>):

      If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

    • sse_customer_key_md5(Option<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.

    • ssekms_key_id(Option<String>):

      If present, specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.

    • bucket_key_enabled(bool):

      Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).

    • storage_class(Option<StorageClass>):

      Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.

      For more information, see Storage Classes.

    • request_charged(Option<RequestCharged>):

      If present, indicates that the requester was successfully charged for the request.

    • replication_status(Option<ReplicationStatus>):

      Amazon S3 can return this header if your request involves a bucket that is either a source or a destination in a replication rule.

      In replication, you have a source bucket on which you configure replication and destination bucket or buckets where Amazon S3 stores object replicas. When you request an object (GetObject) or object metadata (HeadObject) from these buckets, Amazon S3 will return the x-amz-replication-status header in the response as follows:

      • If requesting an object from the source bucket, Amazon S3 will return the x-amz-replication-status header if the object in your request is eligible for replication.

        For example, suppose that in your replication configuration, you specify object prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix TaxDocs. Any objects you upload with this key name prefix, for example TaxDocs/document1.pdf, are eligible for replication. For any object request with this key name prefix, Amazon S3 will return the x-amz-replication-status header with value PENDING, COMPLETED or FAILED indicating object replication status.

      • If requesting an object from a destination bucket, Amazon S3 will return the x-amz-replication-status header with value REPLICA if the object in your request is a replica that Amazon S3 created and there is no replica modification replication in progress.

      • When replicating objects to multiple destination buckets, the x-amz-replication-status header acts differently. The header of the source object will only return a value of COMPLETED when replication is successful to all destinations. The header will remain at value PENDING until replication has completed for all destinations. If one or more destinations fails replication the header will return FAILED.

      For more information, see Replication.

    • parts_count(i32):

      The count of parts this object has. This value is only returned if you specify partNumber in your request and the object was uploaded as a multipart upload.

    • object_lock_mode(Option<ObjectLockMode>):

      The Object Lock mode, if any, that’s in effect for this object. This header is only returned if the requester has the s3:GetObjectRetention permission. For more information about S3 Object Lock, see Object Lock.

    • object_lock_retain_until_date(Option<DateTime>):

      The date and time when the Object Lock retention period expires. This header is only returned if the requester has the s3:GetObjectRetention permission.

    • object_lock_legal_hold_status(Option<ObjectLockLegalHoldStatus>):

      Specifies whether a legal hold is in effect for this object. This header is only returned if the requester has the s3:GetObjectLegalHold permission. This header is not returned if the specified version of this object has never had a legal hold applied. For more information about S3 Object Lock, see Object Lock.

  • On failure, responds with SdkError<HeadObjectError>
§

impl Client

pub fn list_bucket_analytics_configurations( &self ) -> ListBucketAnalyticsConfigurationsFluentBuilder

Constructs a fluent builder for the ListBucketAnalyticsConfigurations operation.

§

impl Client

pub fn list_bucket_intelligent_tiering_configurations( &self ) -> ListBucketIntelligentTieringConfigurationsFluentBuilder

Constructs a fluent builder for the ListBucketIntelligentTieringConfigurations operation.

§

impl Client

pub fn list_bucket_inventory_configurations( &self ) -> ListBucketInventoryConfigurationsFluentBuilder

Constructs a fluent builder for the ListBucketInventoryConfigurations operation.

§

impl Client

pub fn list_bucket_metrics_configurations( &self ) -> ListBucketMetricsConfigurationsFluentBuilder

Constructs a fluent builder for the ListBucketMetricsConfigurations operation.

§

impl Client

pub fn list_buckets(&self) -> ListBucketsFluentBuilder

Constructs a fluent builder for the ListBuckets operation.

§

impl Client

pub fn list_multipart_uploads(&self) -> ListMultipartUploadsFluentBuilder

Constructs a fluent builder for the ListMultipartUploads operation.

  • The fluent builder is configurable:
    • bucket(impl Into<String>) / set_bucket(Option<String>):

      The name of the bucket to which the multipart upload was initiated.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • delimiter(impl Into<String>) / set_delimiter(Option<String>):

      Character you use to group keys.

      All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, CommonPrefixes. If you don’t specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under CommonPrefixes result element are not returned elsewhere in the response.

    • encoding_type(EncodingType) / set_encoding_type(Option<EncodingType>):

      Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key can contain any Unicode character; however, the 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.

    • key_marker(impl Into<String>) / set_key_marker(Option<String>):

      Together with upload-id-marker, this parameter specifies the multipart upload after which listing should begin.

      If upload-id-marker is not specified, only the keys lexicographically greater than the specified key-marker will be included in the list.

      If upload-id-marker is specified, any multipart uploads for a key equal to the key-marker might also be included, provided those multipart uploads have upload IDs lexicographically greater than the specified upload-id-marker.

    • max_uploads(i32) / set_max_uploads(Option<i32>):

      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.

    • prefix(impl Into<String>) / set_prefix(Option<String>):

      Lists in-progress uploads only for those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different grouping of keys. (You can think of using prefix to make groups in the same way that you’d use a folder in a file system.)

    • upload_id_marker(impl Into<String>) / set_upload_id_marker(Option<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. Otherwise, any multipart uploads for a key equal to the key-marker might be included in the list only if they have an upload ID lexicographically greater than the specified upload-id-marker.

    • expected_bucket_owner(impl Into<String>) / set_expected_bucket_owner(Option<String>):

      The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

    • request_payer(RequestPayer) / set_request_payer(Option<RequestPayer>):

      Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

  • On success, responds with ListMultipartUploadsOutput with field(s):
    • bucket(Option<String>):

      The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.

    • key_marker(Option<String>):

      The key at or after which the listing began.

    • upload_id_marker(Option<String>):

      Upload ID after which listing began.

    • next_key_marker(Option<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(Option<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(Option<String>):

      Contains the delimiter you specified in the request. If you don’t specify a delimiter in your request, this element is absent from the response.

    • next_upload_id_marker(Option<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.

    • max_uploads(i32):

      Maximum number of multipart uploads that could have been included in the response.

    • is_truncated(bool):

      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(Option<Vec<MultipartUpload>>):

      Container for elements related to a particular multipart upload. A response can contain zero or more Upload elements.

    • common_prefixes(Option<Vec<CommonPrefix>>):

      If you specify a delimiter in the request, then the result returns each distinct key prefix containing the delimiter in a CommonPrefixes element. The distinct key prefixes are returned in the Prefix child element.

    • encoding_type(Option<EncodingType>):

      Encoding type used by Amazon S3 to encode object keys in the response.

      If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

      Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.

    • request_charged(Option<RequestCharged>):

      If present, indicates that the requester was successfully charged for the request.

  • On failure, responds with SdkError<ListMultipartUploadsError>
§

impl Client

pub fn list_object_versions(&self) -> ListObjectVersionsFluentBuilder

Constructs a fluent builder for the ListObjectVersions operation.

§

impl Client

pub fn list_objects(&self) -> ListObjectsFluentBuilder

Constructs a fluent builder for the ListObjects operation.

  • The fluent builder is configurable:
  • On success, responds with ListObjectsOutput with field(s):
    • is_truncated(bool):

      A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria.

    • marker(Option<String>):

      Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.

    • next_marker(Option<String>):

      When the response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as the marker parameter in the subsequent request to get the next set of objects. Amazon S3 lists objects in alphabetical order.

      This element is returned only if you have the delimiter request parameter specified. If the response does not include the NextMarker element and it is truncated, you can use the value of the last Key element in the response as the marker parameter in the subsequent request to get the next set of object keys.

    • contents(Option<Vec<Object>>):

      Metadata about each object returned.

    • name(Option<String>):

      The bucket name.

    • prefix(Option<String>):

      Keys that begin with the indicated prefix.

    • delimiter(Option<String>):

      Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value.

    • max_keys(i32):

      The maximum number of keys returned in the response body.

    • common_prefixes(Option<Vec<CommonPrefix>>):

      All of the keys (up to 1,000) rolled up in a common prefix count as a single return when calculating the number of returns.

      A response can contain CommonPrefixes only if you specify a delimiter.

      CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by the delimiter.

      CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix.

      For example, if the prefix is notes/ and the delimiter is a slash (/), as in notes/summer/july, the common prefix is notes/summer/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.

    • encoding_type(Option<EncodingType>):

      Encoding type used by Amazon S3 to encode object keys in the response.

    • request_charged(Option<RequestCharged>):

      If present, indicates that the requester was successfully charged for the request.

  • On failure, responds with SdkError<ListObjectsError>
§

impl Client

pub fn list_objects_v2(&self) -> ListObjectsV2FluentBuilder

Constructs a fluent builder for the ListObjectsV2 operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
  • On success, responds with ListObjectsV2Output with field(s):
    • is_truncated(bool):

      Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.

    • contents(Option<Vec<Object>>):

      Metadata about each object returned.

    • name(Option<String>):

      The bucket name.

      When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

      When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

    • prefix(Option<String>):

      Keys that begin with the indicated prefix.

    • delimiter(Option<String>):

      Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value.

    • max_keys(i32):

      Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.

    • common_prefixes(Option<Vec<CommonPrefix>>):

      All of the keys (up to 1,000) rolled up into a common prefix count as a single return when calculating the number of returns.

      A response can contain CommonPrefixes only if you specify a delimiter.

      CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter.

      CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix.

      For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.

    • encoding_type(Option<EncodingType>):

      Encoding type used by Amazon S3 to encode object key names in the XML response.

      If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

      Delimiter, Prefix, Key, and StartAfter.

    • key_count(i32):

      KeyCount is the number of keys returned with this request. KeyCount will always be less than or equal to the MaxKeys field. For example, if you ask for 50 keys, your result will include 50 keys or fewer.

    • continuation_token(Option<String>):

      If ContinuationToken was sent with the request, it is included in the response.

    • next_continuation_token(Option<String>):

      NextContinuationToken is sent when isTruncated is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key

    • start_after(Option<String>):

      If StartAfter was sent with the request, it is included in the response.

    • request_charged(Option<RequestCharged>):

      If present, indicates that the requester was successfully charged for the request.

  • On failure, responds with SdkError<ListObjectsV2Error>
§

impl Client

pub fn list_parts(&self) -> ListPartsFluentBuilder

Constructs a fluent builder for the ListParts operation. This operation supports pagination; See into_paginator().

§

impl Client

pub fn put_bucket_accelerate_configuration( &self ) -> PutBucketAccelerateConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketAccelerateConfiguration operation.

§

impl Client

pub fn put_bucket_acl(&self) -> PutBucketAclFluentBuilder

Constructs a fluent builder for the PutBucketAcl operation.

§

impl Client

pub fn put_bucket_analytics_configuration( &self ) -> PutBucketAnalyticsConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketAnalyticsConfiguration operation.

§

impl Client

pub fn put_bucket_cors(&self) -> PutBucketCorsFluentBuilder

Constructs a fluent builder for the PutBucketCors operation.

§

impl Client

pub fn put_bucket_encryption(&self) -> PutBucketEncryptionFluentBuilder

Constructs a fluent builder for the PutBucketEncryption operation.

§

impl Client

pub fn put_bucket_intelligent_tiering_configuration( &self ) -> PutBucketIntelligentTieringConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketIntelligentTieringConfiguration operation.

§

impl Client

pub fn put_bucket_inventory_configuration( &self ) -> PutBucketInventoryConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketInventoryConfiguration operation.

§

impl Client

pub fn put_bucket_lifecycle_configuration( &self ) -> PutBucketLifecycleConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketLifecycleConfiguration operation.

§

impl Client

pub fn put_bucket_logging(&self) -> PutBucketLoggingFluentBuilder

Constructs a fluent builder for the PutBucketLogging operation.

§

impl Client

pub fn put_bucket_metrics_configuration( &self ) -> PutBucketMetricsConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketMetricsConfiguration operation.

§

impl Client

pub fn put_bucket_notification_configuration( &self ) -> PutBucketNotificationConfigurationFluentBuilder

Constructs a fluent builder for the PutBucketNotificationConfiguration operation.

§

impl Client

pub fn put_bucket_ownership_controls( &self ) -> PutBucketOwnershipControlsFluentBuilder

Constructs a fluent builder for the PutBucketOwnershipControls operation.

§

impl Client

pub fn put_bucket_policy(&self) -> PutBucketPolicyFluentBuilder

Constructs a fluent builder for the PutBucketPolicy operation.

§

impl Client

pub fn put_bucket_replication(&self) -> PutBucketReplicationFluentBuilder

Constructs a fluent builder for the PutBucketReplication operation.

§

impl Client

pub fn put_bucket_request_payment(&self) -> PutBucketRequestPaymentFluentBuilder

Constructs a fluent builder for the PutBucketRequestPayment operation.

§

impl Client

pub fn put_bucket_tagging(&self) -> PutBucketTaggingFluentBuilder

Constructs a fluent builder for the PutBucketTagging operation.

§

impl Client

pub fn put_bucket_versioning(&self) -> PutBucketVersioningFluentBuilder

Constructs a fluent builder for the PutBucketVersioning operation.

§

impl Client

pub fn put_bucket_website(&self) -> PutBucketWebsiteFluentBuilder

Constructs a fluent builder for the PutBucketWebsite operation.

§

impl Client

pub fn put_object(&self) -> PutObjectFluentBuilder

Constructs a fluent builder for the PutObject operation.

§

impl Client

pub fn put_object_acl(&self) -> PutObjectAclFluentBuilder

Constructs a fluent builder for the PutObjectAcl operation.

§

impl Client

Constructs a fluent builder for the PutObjectLegalHold operation.

§

impl Client

pub fn put_object_lock_configuration( &self ) -> PutObjectLockConfigurationFluentBuilder

Constructs a fluent builder for the PutObjectLockConfiguration operation.

§

impl Client

pub fn put_object_retention(&self) -> PutObjectRetentionFluentBuilder

Constructs a fluent builder for the PutObjectRetention operation.

§

impl Client

pub fn put_object_tagging(&self) -> PutObjectTaggingFluentBuilder

Constructs a fluent builder for the PutObjectTagging operation.

§

impl Client

pub fn put_public_access_block(&self) -> PutPublicAccessBlockFluentBuilder

Constructs a fluent builder for the PutPublicAccessBlock operation.

§

impl Client

pub fn restore_object(&self) -> RestoreObjectFluentBuilder

Constructs a fluent builder for the RestoreObject operation.

§

impl Client

pub fn select_object_content(&self) -> SelectObjectContentFluentBuilder

Constructs a fluent builder for the SelectObjectContent operation.

§

impl Client

pub fn upload_part(&self) -> UploadPartFluentBuilder

Constructs a fluent builder for the UploadPart operation.

§

impl Client

pub fn upload_part_copy(&self) -> UploadPartCopyFluentBuilder

Constructs a fluent builder for the UploadPartCopy operation.

§

impl Client

pub fn write_get_object_response(&self) -> WriteGetObjectResponseFluentBuilder

Constructs a fluent builder for the WriteGetObjectResponse operation.

Trait Implementations§

§

impl Clone for Client

§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Client

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more