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

A builder for PutObjectRetentionInput.

Implementations§

The bucket name that contains the object you want to apply this Object Retention configuration to.

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.

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

The bucket name that contains the object you want to apply this Object Retention configuration to.

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.

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

The key name for the object that you want to apply this Object Retention configuration to.

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

The key name for the object that you want to apply this Object Retention configuration to.

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

The container element for the Object Retention configuration.

Examples found in repository?
src/client.rs (line 14721)
14720
14721
14722
14723
        pub fn retention(mut self, input: crate::model::ObjectLockRetention) -> Self {
            self.inner = self.inner.retention(input);
            self
        }

The container element for the Object Retention configuration.

Examples found in repository?
src/client.rs (line 14729)
14725
14726
14727
14728
14729
14730
14731
        pub fn set_retention(
            mut self,
            input: std::option::Option<crate::model::ObjectLockRetention>,
        ) -> Self {
            self.inner = self.inner.set_retention(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 14734)
14733
14734
14735
14736
        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 14742)
14738
14739
14740
14741
14742
14743
14744
        pub fn set_request_payer(
            mut self,
            input: std::option::Option<crate::model::RequestPayer>,
        ) -> Self {
            self.inner = self.inner.set_request_payer(input);
            self
        }

The version ID for the object that you want to apply this Object Retention configuration to.

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

The version ID for the object that you want to apply this Object Retention configuration to.

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

Indicates whether this action should bypass Governance-mode restrictions.

Examples found in repository?
src/client.rs (line 14757)
14756
14757
14758
14759
        pub fn bypass_governance_retention(mut self, input: bool) -> Self {
            self.inner = self.inner.bypass_governance_retention(input);
            self
        }

Indicates whether this action should bypass Governance-mode restrictions.

Examples found in repository?
src/client.rs (line 14762)
14761
14762
14763
14764
        pub fn set_bypass_governance_retention(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_bypass_governance_retention(input);
            self
        }

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

Examples found in repository?
src/client.rs (line 14768)
14767
14768
14769
14770
        pub fn content_md5(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.content_md5(input.into());
            self
        }

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

Examples found in repository?
src/client.rs (line 14774)
14773
14774
14775
14776
        pub fn set_content_md5(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_content_md5(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 14780)
14779
14780
14781
14782
        pub fn checksum_algorithm(mut self, input: crate::model::ChecksumAlgorithm) -> Self {
            self.inner = self.inner.checksum_algorithm(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 14789)
14785
14786
14787
14788
14789
14790
14791
        pub fn set_checksum_algorithm(
            mut self,
            input: std::option::Option<crate::model::ChecksumAlgorithm>,
        ) -> Self {
            self.inner = self.inner.set_checksum_algorithm(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 14794)
14793
14794
14795
14796
        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 14802)
14798
14799
14800
14801
14802
14803
14804
        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
        }

Consumes the builder and constructs a PutObjectRetentionInput.

Examples found in repository?
src/client.rs (line 14666)
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutObjectRetention,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutObjectRetentionError>,
        > {
            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::PutObjectRetentionOutput,
            aws_smithy_http::result::SdkError<crate::error::PutObjectRetentionError>,
        > {
            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
        }

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