Struct aws_sdk_ec2::types::builders::CapacityReservationBuilder
source · #[non_exhaustive]pub struct CapacityReservationBuilder { /* private fields */ }
Expand description
A builder for CapacityReservation
.
Implementations§
source§impl CapacityReservationBuilder
impl CapacityReservationBuilder
sourcepub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn get_capacity_reservation_id(&self) -> &Option<String>
pub fn get_capacity_reservation_id(&self) -> &Option<String>
The ID of the Capacity Reservation.
sourcepub fn owner_id(self, input: impl Into<String>) -> Self
pub fn owner_id(self, input: impl Into<String>) -> Self
The ID of the Amazon Web Services account that owns the Capacity Reservation.
sourcepub fn set_owner_id(self, input: Option<String>) -> Self
pub fn set_owner_id(self, input: Option<String>) -> Self
The ID of the Amazon Web Services account that owns the Capacity Reservation.
sourcepub fn get_owner_id(&self) -> &Option<String>
pub fn get_owner_id(&self) -> &Option<String>
The ID of the Amazon Web Services account that owns the Capacity Reservation.
sourcepub fn capacity_reservation_arn(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Capacity Reservation.
sourcepub fn set_capacity_reservation_arn(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Capacity Reservation.
sourcepub fn get_capacity_reservation_arn(&self) -> &Option<String>
pub fn get_capacity_reservation_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the Capacity Reservation.
sourcepub fn availability_zone_id(self, input: impl Into<String>) -> Self
pub fn availability_zone_id(self, input: impl Into<String>) -> Self
The Availability Zone ID of the Capacity Reservation.
sourcepub fn set_availability_zone_id(self, input: Option<String>) -> Self
pub fn set_availability_zone_id(self, input: Option<String>) -> Self
The Availability Zone ID of the Capacity Reservation.
sourcepub fn get_availability_zone_id(&self) -> &Option<String>
pub fn get_availability_zone_id(&self) -> &Option<String>
The Availability Zone ID of the Capacity Reservation.
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The type of instance for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The type of instance for which the Capacity Reservation reserves capacity.
sourcepub fn get_instance_type(&self) -> &Option<String>
pub fn get_instance_type(&self) -> &Option<String>
The type of instance for which the Capacity Reservation reserves capacity.
sourcepub fn instance_platform(
self,
input: CapacityReservationInstancePlatform
) -> Self
pub fn instance_platform( self, input: CapacityReservationInstancePlatform ) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_platform(
self,
input: Option<CapacityReservationInstancePlatform>
) -> Self
pub fn set_instance_platform( self, input: Option<CapacityReservationInstancePlatform> ) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
sourcepub fn get_instance_platform(
&self
) -> &Option<CapacityReservationInstancePlatform>
pub fn get_instance_platform( &self ) -> &Option<CapacityReservationInstancePlatform>
The type of operating system for which the Capacity Reservation reserves capacity.
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 the capacity is reserved.
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 the capacity is reserved.
sourcepub fn get_availability_zone(&self) -> &Option<String>
pub fn get_availability_zone(&self) -> &Option<String>
The Availability Zone in which the capacity is reserved.
sourcepub fn tenancy(self, input: CapacityReservationTenancy) -> Self
pub fn tenancy(self, input: CapacityReservationTenancy) -> Self
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
sourcepub fn set_tenancy(self, input: Option<CapacityReservationTenancy>) -> Self
pub fn set_tenancy(self, input: Option<CapacityReservationTenancy>) -> Self
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
sourcepub fn get_tenancy(&self) -> &Option<CapacityReservationTenancy>
pub fn get_tenancy(&self) -> &Option<CapacityReservationTenancy>
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
sourcepub fn total_instance_count(self, input: i32) -> Self
pub fn total_instance_count(self, input: i32) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn set_total_instance_count(self, input: Option<i32>) -> Self
pub fn set_total_instance_count(self, input: Option<i32>) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn get_total_instance_count(&self) -> &Option<i32>
pub fn get_total_instance_count(&self) -> &Option<i32>
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn available_instance_count(self, input: i32) -> Self
pub fn available_instance_count(self, input: i32) -> Self
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
sourcepub fn set_available_instance_count(self, input: Option<i32>) -> Self
pub fn set_available_instance_count(self, input: Option<i32>) -> Self
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
sourcepub fn get_available_instance_count(&self) -> &Option<i32>
pub fn get_available_instance_count(&self) -> &Option<i32>
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
sourcepub fn ebs_optimized(self, input: bool) -> Self
pub fn ebs_optimized(self, input: bool) -> Self
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
sourcepub fn set_ebs_optimized(self, input: Option<bool>) -> Self
pub fn set_ebs_optimized(self, input: Option<bool>) -> Self
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
sourcepub fn get_ebs_optimized(&self) -> &Option<bool>
pub fn get_ebs_optimized(&self) -> &Option<bool>
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
sourcepub fn ephemeral_storage(self, input: bool) -> Self
pub fn ephemeral_storage(self, input: bool) -> Self
Deprecated.
sourcepub fn set_ephemeral_storage(self, input: Option<bool>) -> Self
pub fn set_ephemeral_storage(self, input: Option<bool>) -> Self
Deprecated.
sourcepub fn get_ephemeral_storage(&self) -> &Option<bool>
pub fn get_ephemeral_storage(&self) -> &Option<bool>
Deprecated.
sourcepub fn state(self, input: CapacityReservationState) -> Self
pub fn state(self, input: CapacityReservationState) -> Self
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
sourcepub fn set_state(self, input: Option<CapacityReservationState>) -> Self
pub fn set_state(self, input: Option<CapacityReservationState>) -> Self
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
sourcepub fn get_state(&self) -> &Option<CapacityReservationState>
pub fn get_state(&self) -> &Option<CapacityReservationState>
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
sourcepub fn start_date(self, input: DateTime) -> Self
pub fn start_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation was started.
sourcepub fn set_start_date(self, input: Option<DateTime>) -> Self
pub fn set_start_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation was started.
sourcepub fn get_start_date(&self) -> &Option<DateTime>
pub fn get_start_date(&self) -> &Option<DateTime>
The date and time at which the Capacity Reservation was started.
sourcepub fn end_date(self, input: DateTime) -> Self
pub fn end_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
sourcepub fn set_end_date(self, input: Option<DateTime>) -> Self
pub fn set_end_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
sourcepub fn get_end_date(&self) -> &Option<DateTime>
pub fn get_end_date(&self) -> &Option<DateTime>
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
sourcepub fn end_date_type(self, input: EndDateType) -> Self
pub fn end_date_type(self, input: EndDateType) -> Self
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
sourcepub fn set_end_date_type(self, input: Option<EndDateType>) -> Self
pub fn set_end_date_type(self, input: Option<EndDateType>) -> Self
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
sourcepub fn get_end_date_type(&self) -> &Option<EndDateType>
pub fn get_end_date_type(&self) -> &Option<EndDateType>
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
sourcepub fn instance_match_criteria(self, input: InstanceMatchCriteria) -> Self
pub fn instance_match_criteria(self, input: InstanceMatchCriteria) -> Self
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
sourcepub fn set_instance_match_criteria(
self,
input: Option<InstanceMatchCriteria>
) -> Self
pub fn set_instance_match_criteria( self, input: Option<InstanceMatchCriteria> ) -> Self
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
sourcepub fn get_instance_match_criteria(&self) -> &Option<InstanceMatchCriteria>
pub fn get_instance_match_criteria(&self) -> &Option<InstanceMatchCriteria>
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
sourcepub fn create_date(self, input: DateTime) -> Self
pub fn create_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation was created.
sourcepub fn set_create_date(self, input: Option<DateTime>) -> Self
pub fn set_create_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation was created.
sourcepub fn get_create_date(&self) -> &Option<DateTime>
pub fn get_create_date(&self) -> &Option<DateTime>
The date and time at which the Capacity Reservation was created.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Any tags assigned to the Capacity Reservation.
Any tags assigned to the Capacity Reservation.
Any tags assigned to the Capacity Reservation.
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 Outpost on which the Capacity Reservation was created.
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 Outpost on which the Capacity Reservation was created.
sourcepub fn get_outpost_arn(&self) -> &Option<String>
pub fn get_outpost_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
sourcepub fn capacity_reservation_fleet_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_fleet_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
sourcepub fn set_capacity_reservation_fleet_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_fleet_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
sourcepub fn get_capacity_reservation_fleet_id(&self) -> &Option<String>
pub fn get_capacity_reservation_fleet_id(&self) -> &Option<String>
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
sourcepub fn placement_group_arn(self, input: impl Into<String>) -> Self
pub fn placement_group_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
sourcepub fn set_placement_group_arn(self, input: Option<String>) -> Self
pub fn set_placement_group_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
sourcepub fn get_placement_group_arn(&self) -> &Option<String>
pub fn get_placement_group_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
sourcepub fn capacity_allocations(self, input: CapacityAllocation) -> Self
pub fn capacity_allocations(self, input: CapacityAllocation) -> Self
Appends an item to capacity_allocations
.
To override the contents of this collection use set_capacity_allocations
.
Information about instance capacity usage.
sourcepub fn set_capacity_allocations(
self,
input: Option<Vec<CapacityAllocation>>
) -> Self
pub fn set_capacity_allocations( self, input: Option<Vec<CapacityAllocation>> ) -> Self
Information about instance capacity usage.
sourcepub fn get_capacity_allocations(&self) -> &Option<Vec<CapacityAllocation>>
pub fn get_capacity_allocations(&self) -> &Option<Vec<CapacityAllocation>>
Information about instance capacity usage.
sourcepub fn build(self) -> CapacityReservation
pub fn build(self) -> CapacityReservation
Consumes the builder and constructs a CapacityReservation
.
Trait Implementations§
source§impl Clone for CapacityReservationBuilder
impl Clone for CapacityReservationBuilder
source§fn clone(&self) -> CapacityReservationBuilder
fn clone(&self) -> CapacityReservationBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CapacityReservationBuilder
impl Debug for CapacityReservationBuilder
source§impl Default for CapacityReservationBuilder
impl Default for CapacityReservationBuilder
source§fn default() -> CapacityReservationBuilder
fn default() -> CapacityReservationBuilder
source§impl PartialEq for CapacityReservationBuilder
impl PartialEq for CapacityReservationBuilder
source§fn eq(&self, other: &CapacityReservationBuilder) -> bool
fn eq(&self, other: &CapacityReservationBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.