Struct aws_sdk_ec2::input::modify_reserved_instances_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ModifyReservedInstancesInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn reserved_instances_ids(self, input: impl Into<String>) -> Self
pub fn reserved_instances_ids(self, input: impl Into<String>) -> Self
Appends an item to reserved_instances_ids
.
To override the contents of this collection use set_reserved_instances_ids
.
The IDs of the Reserved Instances to modify.
sourcepub fn set_reserved_instances_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_reserved_instances_ids(self, input: Option<Vec<String>>) -> Self
The IDs of the Reserved Instances to modify.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.
sourcepub fn target_configurations(self, input: ReservedInstancesConfiguration) -> Self
pub fn target_configurations(self, input: ReservedInstancesConfiguration) -> Self
Appends an item to target_configurations
.
To override the contents of this collection use set_target_configurations
.
The configuration settings for the Reserved Instances to modify.
sourcepub fn set_target_configurations(
self,
input: Option<Vec<ReservedInstancesConfiguration>>
) -> Self
pub fn set_target_configurations(
self,
input: Option<Vec<ReservedInstancesConfiguration>>
) -> Self
The configuration settings for the Reserved Instances to modify.
sourcepub fn build(self) -> Result<ModifyReservedInstancesInput, BuildError>
pub fn build(self) -> Result<ModifyReservedInstancesInput, BuildError>
Consumes the builder and constructs a ModifyReservedInstancesInput
.
Examples found in repository?
67089 67090 67091 67092 67093 67094 67095 67096 67097 67098 67099 67100 67101 67102 67103 67104 67105 67106 67107 67108 67109 67110 67111 67112 67113 67114 67115 67116 67117 67118 67119 67120 67121 67122 67123 67124 67125 67126 67127 67128 67129 67130 67131
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ModifyReservedInstances,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ModifyReservedInstancesError>,
> {
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::ModifyReservedInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyReservedInstancesError>,
> {
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
}