#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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 an EndDate if the EndDateType is unlimited.

  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited.

§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

source

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.

source

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.

source

pub fn instance_platform(&self) -> Option<&CapacityReservationInstancePlatform>

The type of operating system for which to reserve capacity.

source

pub fn availability_zone(&self) -> Option<&str>

The Availability Zone in which to create the Capacity Reservation.

source

pub fn availability_zone_id(&self) -> Option<&str>

The ID of the Availability Zone in which to create the Capacity Reservation.

source

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.

source

pub fn instance_count(&self) -> Option<i32>

The number of instances for which to reserve capacity.

Valid range: 1 - 1000

source

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.

source

pub fn ephemeral_storage(&self) -> Option<bool>

Deprecated.

source

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.

source

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 an EndDate if the EndDateType is unlimited.

  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited.

source

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

source

pub fn tag_specifications(&self) -> Option<&[TagSpecification]>

The tags to apply to the Capacity Reservation during launch.

source

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.

source

pub fn outpost_arn(&self) -> Option<&str>

The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.

source

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

source

pub fn builder() -> CreateCapacityReservationInputBuilder

Creates a new builder-style object to manufacture CreateCapacityReservationInput.

Trait Implementations§

source§

impl Clone for CreateCapacityReservationInput

source§

fn clone(&self) -> CreateCapacityReservationInput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateCapacityReservationInput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<CreateCapacityReservationInput> for CreateCapacityReservationInput

source§

fn eq(&self, other: &CreateCapacityReservationInput) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for CreateCapacityReservationInput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more