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

A builder for GetObjectInput.

Implementations§

The bucket name 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 using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 7593)
7592
7593
7594
7595
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.bucket(input.into());
            self
        }

The bucket name 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 using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 7601)
7600
7601
7602
7603
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_bucket(input);
            self
        }

Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.

Examples found in repository?
src/client.rs (line 7606)
7605
7606
7607
7608
        pub fn if_match(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.if_match(input.into());
            self
        }

Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.

Examples found in repository?
src/client.rs (line 7611)
7610
7611
7612
7613
        pub fn set_if_match(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_if_match(input);
            self
        }

Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.

Examples found in repository?
src/client.rs (line 7616)
7615
7616
7617
7618
        pub fn if_modified_since(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.if_modified_since(input);
            self
        }

Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.

Examples found in repository?
src/client.rs (line 7624)
7620
7621
7622
7623
7624
7625
7626
        pub fn set_if_modified_since(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_if_modified_since(input);
            self
        }

Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.

Examples found in repository?
src/client.rs (line 7629)
7628
7629
7630
7631
        pub fn if_none_match(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.if_none_match(input.into());
            self
        }

Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.

Examples found in repository?
src/client.rs (line 7637)
7633
7634
7635
7636
7637
7638
7639
        pub fn set_if_none_match(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_if_none_match(input);
            self
        }

Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.

Examples found in repository?
src/client.rs (line 7642)
7641
7642
7643
7644
        pub fn if_unmodified_since(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.if_unmodified_since(input);
            self
        }

Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.

Examples found in repository?
src/client.rs (line 7650)
7646
7647
7648
7649
7650
7651
7652
        pub fn set_if_unmodified_since(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_if_unmodified_since(input);
            self
        }

Key of the object to get.

Examples found in repository?
src/client.rs (line 7655)
7654
7655
7656
7657
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.key(input.into());
            self
        }

Key of the object to get.

Examples found in repository?
src/client.rs (line 7660)
7659
7660
7661
7662
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_key(input);
            self
        }

Downloads the specified range bytes of an object. For more information about the HTTP Range header, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.

Amazon S3 doesn't support retrieving multiple ranges of data per GET request.

Examples found in repository?
src/client.rs (line 7667)
7666
7667
7668
7669
        pub fn range(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.range(input.into());
            self
        }

Downloads the specified range bytes of an object. For more information about the HTTP Range header, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.

Amazon S3 doesn't support retrieving multiple ranges of data per GET request.

Examples found in repository?
src/client.rs (line 7674)
7673
7674
7675
7676
        pub fn set_range(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_range(input);
            self
        }

Sets the Cache-Control header of the response.

Examples found in repository?
src/client.rs (line 7679)
7678
7679
7680
7681
        pub fn response_cache_control(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.response_cache_control(input.into());
            self
        }

Sets the Cache-Control header of the response.

Examples found in repository?
src/client.rs (line 7687)
7683
7684
7685
7686
7687
7688
7689
        pub fn set_response_cache_control(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_response_cache_control(input);
            self
        }

Sets the Content-Disposition header of the response

Examples found in repository?
src/client.rs (line 7695)
7691
7692
7693
7694
7695
7696
7697
        pub fn response_content_disposition(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.response_content_disposition(input.into());
            self
        }

Sets the Content-Disposition header of the response

Examples found in repository?
src/client.rs (line 7703)
7699
7700
7701
7702
7703
7704
7705
        pub fn set_response_content_disposition(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_response_content_disposition(input);
            self
        }

Sets the Content-Encoding header of the response.

Examples found in repository?
src/client.rs (line 7708)
7707
7708
7709
7710
        pub fn response_content_encoding(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.response_content_encoding(input.into());
            self
        }

Sets the Content-Encoding header of the response.

Examples found in repository?
src/client.rs (line 7716)
7712
7713
7714
7715
7716
7717
7718
        pub fn set_response_content_encoding(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_response_content_encoding(input);
            self
        }

Sets the Content-Language header of the response.

Examples found in repository?
src/client.rs (line 7721)
7720
7721
7722
7723
        pub fn response_content_language(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.response_content_language(input.into());
            self
        }

Sets the Content-Language header of the response.

Examples found in repository?
src/client.rs (line 7729)
7725
7726
7727
7728
7729
7730
7731
        pub fn set_response_content_language(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_response_content_language(input);
            self
        }

Sets the Content-Type header of the response.

Examples found in repository?
src/client.rs (line 7734)
7733
7734
7735
7736
        pub fn response_content_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.response_content_type(input.into());
            self
        }

Sets the Content-Type header of the response.

Examples found in repository?
src/client.rs (line 7742)
7738
7739
7740
7741
7742
7743
7744
        pub fn set_response_content_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_response_content_type(input);
            self
        }

Sets the Expires header of the response.

Examples found in repository?
src/client.rs (line 7747)
7746
7747
7748
7749
        pub fn response_expires(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.response_expires(input);
            self
        }

Sets the Expires header of the response.

Examples found in repository?
src/client.rs (line 7755)
7751
7752
7753
7754
7755
7756
7757
        pub fn set_response_expires(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_response_expires(input);
            self
        }

VersionId used to reference a specific version of the object.

Examples found in repository?
src/client.rs (line 7760)
7759
7760
7761
7762
        pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.version_id(input.into());
            self
        }

VersionId used to reference a specific version of the object.

Examples found in repository?
src/client.rs (line 7765)
7764
7765
7766
7767
        pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_version_id(input);
            self
        }

Specifies the algorithm to use to when decrypting the object (for example, AES256).

Examples found in repository?
src/client.rs (line 7770)
7769
7770
7771
7772
        pub fn sse_customer_algorithm(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sse_customer_algorithm(input.into());
            self
        }

Specifies the algorithm to use to when decrypting the object (for example, AES256).

Examples found in repository?
src/client.rs (line 7778)
7774
7775
7776
7777
7778
7779
7780
        pub fn set_sse_customer_algorithm(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sse_customer_algorithm(input);
            self
        }

Specifies the customer-provided encryption key for Amazon S3 used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.

Examples found in repository?
src/client.rs (line 7783)
7782
7783
7784
7785
        pub fn sse_customer_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sse_customer_key(input.into());
            self
        }

Specifies the customer-provided encryption key for Amazon S3 used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.

Examples found in repository?
src/client.rs (line 7791)
7787
7788
7789
7790
7791
7792
7793
        pub fn set_sse_customer_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sse_customer_key(input);
            self
        }

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 that the encryption key was transmitted without error.

Examples found in repository?
src/client.rs (line 7796)
7795
7796
7797
7798
        pub fn sse_customer_key_md5(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sse_customer_key_md5(input.into());
            self
        }

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 that the encryption key was transmitted without error.

Examples found in repository?
src/client.rs (line 7804)
7800
7801
7802
7803
7804
7805
7806
        pub fn set_sse_customer_key_md5(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sse_customer_key_md5(input);
            self
        }

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 7809)
7808
7809
7810
7811
        pub fn request_payer(mut self, input: crate::model::RequestPayer) -> Self {
            self.inner = self.inner.request_payer(input);
            self
        }

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 7817)
7813
7814
7815
7816
7817
7818
7819
        pub fn set_request_payer(
            mut self,
            input: std::option::Option<crate::model::RequestPayer>,
        ) -> Self {
            self.inner = self.inner.set_request_payer(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 7822)
7821
7822
7823
7824
        pub fn part_number(mut self, input: i32) -> Self {
            self.inner = self.inner.part_number(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 7827)
7826
7827
7828
7829
        pub fn set_part_number(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_part_number(input);
            self
        }

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).

Examples found in repository?
src/client.rs (line 7832)
7831
7832
7833
7834
        pub fn expected_bucket_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.expected_bucket_owner(input.into());
            self
        }

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).

Examples found in repository?
src/client.rs (line 7840)
7836
7837
7838
7839
7840
7841
7842
        pub fn set_expected_bucket_owner(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_expected_bucket_owner(input);
            self
        }

To retrieve the checksum, this mode must be enabled.

Examples found in repository?
src/client.rs (line 7845)
7844
7845
7846
7847
        pub fn checksum_mode(mut self, input: crate::model::ChecksumMode) -> Self {
            self.inner = self.inner.checksum_mode(input);
            self
        }

To retrieve the checksum, this mode must be enabled.

Examples found in repository?
src/client.rs (line 7853)
7849
7850
7851
7852
7853
7854
7855
        pub fn set_checksum_mode(
            mut self,
            input: std::option::Option<crate::model::ChecksumMode>,
        ) -> Self {
            self.inner = self.inner.set_checksum_mode(input);
            self
        }

Consumes the builder and constructs a GetObjectInput.

Examples found in repository?
src/client.rs (line 7535)
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetObject,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetObjectError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetObjectOutput,
            aws_smithy_http::result::SdkError<crate::error::GetObjectError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        ///
        /// Creates a presigned request for this operation.
        ///
        /// The `presigning_config` provides additional presigning-specific config values, such as the
        /// amount of time the request should be valid for after creation.
        ///
        /// Presigned requests can be given to other users or applications to access a resource or perform
        /// an operation without having access to the AWS security credentials.
        ///
        pub async fn presigned(
            self,
            presigning_config: crate::presigning::config::PresigningConfig,
        ) -> Result<
            crate::presigning::request::PresignedRequest,
            aws_smithy_http::result::SdkError<crate::error::GetObjectError>,
        > {
            let input = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            input.presigned(&self.handle.conf, presigning_config).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more