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

A builder for ModifyHostsInput.

Implementations§

Specify whether to enable or disable auto-placement.

Examples found in repository?
src/client.rs (line 64114)
64113
64114
64115
64116
        pub fn auto_placement(mut self, input: crate::model::AutoPlacement) -> Self {
            self.inner = self.inner.auto_placement(input);
            self
        }

Specify whether to enable or disable auto-placement.

Examples found in repository?
src/client.rs (line 64122)
64118
64119
64120
64121
64122
64123
64124
        pub fn set_auto_placement(
            mut self,
            input: std::option::Option<crate::model::AutoPlacement>,
        ) -> Self {
            self.inner = self.inner.set_auto_placement(input);
            self
        }

Appends an item to host_ids.

To override the contents of this collection use set_host_ids.

The IDs of the Dedicated Hosts to modify.

Examples found in repository?
src/client.rs (line 64131)
64130
64131
64132
64133
        pub fn host_ids(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.host_ids(input.into());
            self
        }

The IDs of the Dedicated Hosts to modify.

Examples found in repository?
src/client.rs (line 64139)
64135
64136
64137
64138
64139
64140
64141
        pub fn set_host_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_host_ids(input);
            self
        }

Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 64144)
64143
64144
64145
64146
        pub fn host_recovery(mut self, input: crate::model::HostRecovery) -> Self {
            self.inner = self.inner.host_recovery(input);
            self
        }

Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

Examples found in repository?
src/client.rs (line 64152)
64148
64149
64150
64151
64152
64153
64154
        pub fn set_host_recovery(
            mut self,
            input: std::option::Option<crate::model::HostRecovery>,
        ) -> Self {
            self.inner = self.inner.set_host_recovery(input);
            self
        }

Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

Examples found in repository?
src/client.rs (line 64158)
64157
64158
64159
64160
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.instance_type(input.into());
            self
        }

Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

Examples found in repository?
src/client.rs (line 64167)
64163
64164
64165
64166
64167
64168
64169
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_instance_type(input);
            self
        }

Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

Examples found in repository?
src/client.rs (line 64173)
64172
64173
64174
64175
        pub fn instance_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.instance_family(input.into());
            self
        }

Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

Examples found in repository?
src/client.rs (line 64182)
64178
64179
64180
64181
64182
64183
64184
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_instance_family(input);
            self
        }

Consumes the builder and constructs a ModifyHostsInput.

Examples found in repository?
src/client.rs (line 64081)
64069
64070
64071
64072
64073
64074
64075
64076
64077
64078
64079
64080
64081
64082
64083
64084
64085
64086
64087
64088
64089
64090
64091
64092
64093
64094
64095
64096
64097
64098
64099
64100
64101
64102
64103
64104
64105
64106
64107
64108
64109
64110
64111
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ModifyHosts,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ModifyHostsError>,
        > {
            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::ModifyHostsOutput,
            aws_smithy_http::result::SdkError<crate::error::ModifyHostsError>,
        > {
            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