#[non_exhaustive]pub struct CreateCapacityReservationInput {Show 16 fields
pub client_token: Option<String>,
pub instance_type: Option<String>,
pub instance_platform: Option<CapacityReservationInstancePlatform>,
pub availability_zone: Option<String>,
pub availability_zone_id: Option<String>,
pub tenancy: Option<CapacityReservationTenancy>,
pub instance_count: Option<i32>,
pub ebs_optimized: Option<bool>,
pub ephemeral_storage: Option<bool>,
pub end_date: Option<DateTime>,
pub end_date_type: Option<EndDateType>,
pub instance_match_criteria: Option<InstanceMatchCriteria>,
pub tag_specifications: Option<Vec<TagSpecification>>,
pub dry_run: Option<bool>,
pub outpost_arn: Option<String>,
pub placement_group_arn: Option<String>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.client_token: Option<String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
instance_type: Option<String>
The instance type for which to reserve capacity. For more information, see Instance types in the Amazon EC2 User Guide.
instance_platform: Option<CapacityReservationInstancePlatform>
The type of operating system for which to reserve capacity.
availability_zone: Option<String>
The Availability Zone in which to create the Capacity Reservation.
availability_zone_id: Option<String>
The ID of the Availability Zone in which to create the Capacity Reservation.
tenancy: 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.
instance_count: Option<i32>
The number of instances for which to reserve capacity.
Valid range: 1 - 1000
ebs_optimized: 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.
ephemeral_storage: Option<bool>
Deprecated.
end_date: 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.
You must provide an EndDate
value if EndDateType
is limited
. Omit EndDate
if EndDateType
is unlimited
.
If the EndDateType
is limited
, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
end_date_type: 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. Do not provide anEndDate
if theEndDateType
isunlimited
. -
limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
instance_match_criteria: Option<InstanceMatchCriteria>
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in 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.
Default: open
tag_specifications: Option<Vec<TagSpecification>>
The tags to apply to the Capacity Reservation during launch.
dry_run: Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
outpost_arn: Option<String>
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
placement_group_arn: Option<String>
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
Implementations§
source§impl CreateCapacityReservationInput
impl CreateCapacityReservationInput
sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
sourcepub fn instance_type(&self) -> Option<&str>
pub fn instance_type(&self) -> Option<&str>
The instance type for which to reserve capacity. For more information, see Instance types in the Amazon EC2 User Guide.
sourcepub fn instance_platform(&self) -> Option<&CapacityReservationInstancePlatform>
pub fn instance_platform(&self) -> Option<&CapacityReservationInstancePlatform>
The type of operating system for which to reserve capacity.
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone in which to create the Capacity Reservation.
sourcepub fn availability_zone_id(&self) -> Option<&str>
pub fn availability_zone_id(&self) -> Option<&str>
The ID of the Availability Zone in which to create the Capacity Reservation.
sourcepub fn tenancy(&self) -> Option<&CapacityReservationTenancy>
pub fn 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 instance_count(&self) -> Option<i32>
pub fn instance_count(&self) -> Option<i32>
The number of instances for which to reserve capacity.
Valid range: 1 - 1000
sourcepub fn ebs_optimized(&self) -> Option<bool>
pub fn 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) -> Option<bool>
pub fn ephemeral_storage(&self) -> Option<bool>
Deprecated.
sourcepub fn end_date(&self) -> Option<&DateTime>
pub fn 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.
You must provide an EndDate
value if EndDateType
is limited
. Omit EndDate
if EndDateType
is unlimited
.
If the EndDateType
is limited
, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
sourcepub fn end_date_type(&self) -> Option<&EndDateType>
pub fn 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. Do not provide anEndDate
if theEndDateType
isunlimited
. -
limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
sourcepub fn instance_match_criteria(&self) -> Option<&InstanceMatchCriteria>
pub fn instance_match_criteria(&self) -> Option<&InstanceMatchCriteria>
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in 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.
Default: open
sourcepub fn tag_specifications(&self) -> Option<&[TagSpecification]>
pub fn tag_specifications(&self) -> Option<&[TagSpecification]>
The tags to apply to the Capacity Reservation during launch.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
sourcepub fn placement_group_arn(&self) -> Option<&str>
pub fn placement_group_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
source§impl CreateCapacityReservationInput
impl CreateCapacityReservationInput
sourcepub fn builder() -> CreateCapacityReservationInputBuilder
pub fn builder() -> CreateCapacityReservationInputBuilder
Creates a new builder-style object to manufacture CreateCapacityReservationInput
.
Trait Implementations§
source§impl Clone for CreateCapacityReservationInput
impl Clone for CreateCapacityReservationInput
source§fn clone(&self) -> CreateCapacityReservationInput
fn clone(&self) -> CreateCapacityReservationInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq<CreateCapacityReservationInput> for CreateCapacityReservationInput
impl PartialEq<CreateCapacityReservationInput> for CreateCapacityReservationInput
source§fn eq(&self, other: &CreateCapacityReservationInput) -> bool
fn eq(&self, other: &CreateCapacityReservationInput) -> bool
self
and other
values to be equal, and is used
by ==
.