pub struct Builder { /* private fields */ }
Expand description
A builder for PutBucketMetricsConfigurationInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn bucket(self, input: impl Into<String>) -> Self
pub fn bucket(self, input: impl Into<String>) -> Self
The name of the bucket for which the metrics configuration is set.
sourcepub fn set_bucket(self, input: Option<String>) -> Self
pub fn set_bucket(self, input: Option<String>) -> Self
The name of the bucket for which the metrics configuration is set.
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The ID used to identify the metrics configuration.
sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The ID used to identify the metrics configuration.
sourcepub fn metrics_configuration(self, input: MetricsConfiguration) -> Self
pub fn metrics_configuration(self, input: MetricsConfiguration) -> Self
Specifies the metrics configuration.
sourcepub fn set_metrics_configuration(
self,
input: Option<MetricsConfiguration>
) -> Self
pub fn set_metrics_configuration(
self,
input: Option<MetricsConfiguration>
) -> Self
Specifies the metrics configuration.
sourcepub fn expected_bucket_owner(self, input: impl Into<String>) -> Self
pub fn expected_bucket_owner(self, input: impl Into<String>) -> 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).
sourcepub fn set_expected_bucket_owner(self, input: Option<String>) -> Self
pub fn set_expected_bucket_owner(self, input: Option<String>) -> 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).
sourcepub fn build(self) -> Result<PutBucketMetricsConfigurationInput, BuildError>
pub fn build(self) -> Result<PutBucketMetricsConfigurationInput, BuildError>
Consumes the builder and constructs a PutBucketMetricsConfigurationInput
.
Examples found in repository?
12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PutBucketMetricsConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PutBucketMetricsConfigurationError>,
> {
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::PutBucketMetricsConfigurationOutput,
aws_smithy_http::result::SdkError<crate::error::PutBucketMetricsConfigurationError>,
> {
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
}