Struct aws_sdk_cloudfront::input::update_public_key_input::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for UpdatePublicKeyInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn public_key_config(self, input: PublicKeyConfig) -> Self
pub fn public_key_config(self, input: PublicKeyConfig) -> Self
A public key configuration.
sourcepub fn set_public_key_config(self, input: Option<PublicKeyConfig>) -> Self
pub fn set_public_key_config(self, input: Option<PublicKeyConfig>) -> Self
A public key configuration.
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The identifier of the public key that you are updating.
sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The identifier of the public key that you are updating.
sourcepub fn if_match(self, input: impl Into<String>) -> Self
pub fn if_match(self, input: impl Into<String>) -> Self
The value of the ETag header that you received when retrieving the public key to update. For example: E2QWRUHAPOMQZL.
sourcepub fn set_if_match(self, input: Option<String>) -> Self
pub fn set_if_match(self, input: Option<String>) -> Self
The value of the ETag header that you received when retrieving the public key to update. For example: E2QWRUHAPOMQZL.
sourcepub fn build(self) -> Result<UpdatePublicKeyInput, BuildError>
pub fn build(self) -> Result<UpdatePublicKeyInput, BuildError>
Consumes the builder and constructs a UpdatePublicKeyInput.
Examples found in repository?
src/client.rs (line 9498)
9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdatePublicKey,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdatePublicKeyError>,
> {
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::UpdatePublicKeyOutput,
aws_smithy_http::result::SdkError<crate::error::UpdatePublicKeyError>,
> {
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
}