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

A builder for PutBucketVersioningInput.

Implementations§

The bucket name.

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

The bucket name.

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

>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

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 13164)
13163
13164
13165
13166
        pub fn content_md5(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.content_md5(input.into());
            self
        }

>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

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 13170)
13169
13170
13171
13172
        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 13176)
13175
13176
13177
13178
        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 13185)
13181
13182
13183
13184
13185
13186
13187
        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 concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.

Examples found in repository?
src/client.rs (line 13190)
13189
13190
13191
13192
        pub fn mfa(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.mfa(input.into());
            self
        }

The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.

Examples found in repository?
src/client.rs (line 13195)
13194
13195
13196
13197
        pub fn set_mfa(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_mfa(input);
            self
        }

Container for setting the versioning state.

Examples found in repository?
src/client.rs (line 13203)
13199
13200
13201
13202
13203
13204
13205
        pub fn versioning_configuration(
            mut self,
            input: crate::model::VersioningConfiguration,
        ) -> Self {
            self.inner = self.inner.versioning_configuration(input);
            self
        }

Container for setting the versioning state.

Examples found in repository?
src/client.rs (line 13211)
13207
13208
13209
13210
13211
13212
13213
        pub fn set_versioning_configuration(
            mut self,
            input: std::option::Option<crate::model::VersioningConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_versioning_configuration(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 13216)
13215
13216
13217
13218
        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 13224)
13220
13221
13222
13223
13224
13225
13226
        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 PutBucketVersioningInput.

Examples found in repository?
src/client.rs (line 13120)
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutBucketVersioning,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutBucketVersioningError>,
        > {
            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::PutBucketVersioningOutput,
            aws_smithy_http::result::SdkError<crate::error::PutBucketVersioningError>,
        > {
            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