Struct aws_sdk_ec2::client::fluent_builders::AllocateHosts
source · pub struct AllocateHosts { /* private fields */ }
Expand description
Fluent builder constructing a request to AllocateHosts
.
Allocates a Dedicated Host to your account. At a minimum, specify the supported instance type or instance family, the Availability Zone in which to allocate the host, and the number of hosts to allocate.
Implementations§
source§impl AllocateHosts
impl AllocateHosts
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<AllocateHosts, AwsResponseRetryClassifier>, SdkError<AllocateHostsError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<AllocateHosts, AwsResponseRetryClassifier>, SdkError<AllocateHostsError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<AllocateHostsOutput, SdkError<AllocateHostsError>>
pub async fn send(
self
) -> Result<AllocateHostsOutput, SdkError<AllocateHostsError>>
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, which can be set when configuring the client.
sourcepub fn auto_placement(self, input: AutoPlacement) -> Self
pub fn auto_placement(self, input: AutoPlacement) -> Self
Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.
Default: on
sourcepub fn set_auto_placement(self, input: Option<AutoPlacement>) -> Self
pub fn set_auto_placement(self, input: Option<AutoPlacement>) -> Self
Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide.
Default: on
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which to allocate the Dedicated Host.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which to allocate the Dedicated Host.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the 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
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.
sourcepub fn instance_family(self, input: impl Into<String>) -> Self
pub fn instance_family(self, input: impl Into<String>) -> Self
Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family.
If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.
sourcepub fn set_instance_family(self, input: Option<String>) -> Self
pub fn set_instance_family(self, input: Option<String>) -> Self
Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family.
If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.
sourcepub fn quantity(self, input: i32) -> Self
pub fn quantity(self, input: i32) -> Self
The number of Dedicated Hosts to allocate to your account with these parameters.
sourcepub fn set_quantity(self, input: Option<i32>) -> Self
pub fn set_quantity(self, input: Option<i32>) -> Self
The number of Dedicated Hosts to allocate to your account with these parameters.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to apply to the Dedicated Host during creation.
sourcepub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
pub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
The tags to apply to the Dedicated Host during creation.
sourcepub fn host_recovery(self, input: HostRecovery) -> Self
pub fn host_recovery(self, input: HostRecovery) -> Self
Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide.
Default: off
sourcepub fn set_host_recovery(self, input: Option<HostRecovery>) -> Self
pub fn set_host_recovery(self, input: Option<HostRecovery>) -> Self
Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide.
Default: off
sourcepub fn outpost_arn(self, input: impl Into<String>) -> Self
pub fn outpost_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host.
sourcepub fn set_outpost_arn(self, input: Option<String>) -> Self
pub fn set_outpost_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host.
Trait Implementations§
source§impl Clone for AllocateHosts
impl Clone for AllocateHosts
source§fn clone(&self) -> AllocateHosts
fn clone(&self) -> AllocateHosts
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more