pub struct Builder { /* private fields */ }Expand description
A builder for UpdateIpRestrictionInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn aws_account_id(self, input: impl Into<String>) -> Self
pub fn aws_account_id(self, input: impl Into<String>) -> Self
The ID of the Amazon Web Services account that contains the IP rules.
sourcepub fn set_aws_account_id(self, input: Option<String>) -> Self
pub fn set_aws_account_id(self, input: Option<String>) -> Self
The ID of the Amazon Web Services account that contains the IP rules.
sourcepub fn ip_restriction_rule_map(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
pub fn ip_restriction_rule_map(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
Adds a key-value pair to ip_restriction_rule_map.
To override the contents of this collection use set_ip_restriction_rule_map.
A map that describes the updated IP rules with CIDR ranges and descriptions.
sourcepub fn set_ip_restriction_rule_map(
self,
input: Option<HashMap<String, String>>
) -> Self
pub fn set_ip_restriction_rule_map(
self,
input: Option<HashMap<String, String>>
) -> Self
A map that describes the updated IP rules with CIDR ranges and descriptions.
sourcepub fn enabled(self, input: bool) -> Self
pub fn enabled(self, input: bool) -> Self
A value that specifies whether IP rules are turned on.
sourcepub fn set_enabled(self, input: Option<bool>) -> Self
pub fn set_enabled(self, input: Option<bool>) -> Self
A value that specifies whether IP rules are turned on.
sourcepub fn build(self) -> Result<UpdateIpRestrictionInput, BuildError>
pub fn build(self) -> Result<UpdateIpRestrictionInput, BuildError>
Consumes the builder and constructs a UpdateIpRestrictionInput.
Examples found in repository?
src/client.rs (line 15006)
14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdateIpRestriction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdateIpRestrictionError>,
> {
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::UpdateIpRestrictionOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateIpRestrictionError>,
> {
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
}