#[non_exhaustive]
pub struct CapacityReservation {
Show 23 fields pub capacity_reservation_id: Option<String>, pub owner_id: Option<String>, pub capacity_reservation_arn: Option<String>, pub availability_zone_id: Option<String>, pub instance_type: Option<String>, pub instance_platform: Option<CapacityReservationInstancePlatform>, pub availability_zone: Option<String>, pub tenancy: Option<CapacityReservationTenancy>, pub total_instance_count: Option<i32>, pub available_instance_count: Option<i32>, pub ebs_optimized: Option<bool>, pub ephemeral_storage: Option<bool>, pub state: Option<CapacityReservationState>, pub start_date: Option<DateTime>, pub end_date: Option<DateTime>, pub end_date_type: Option<EndDateType>, pub instance_match_criteria: Option<InstanceMatchCriteria>, pub create_date: Option<DateTime>, pub tags: Option<Vec<Tag>>, pub outpost_arn: Option<String>, pub capacity_reservation_fleet_id: Option<String>, pub placement_group_arn: Option<String>, pub capacity_allocations: Option<Vec<CapacityAllocation>>,
}
Expand description

Describes a Capacity Reservation.

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.
§capacity_reservation_id: Option<String>

The ID of the Capacity Reservation.

§owner_id: Option<String>

The ID of the Amazon Web Services account that owns the Capacity Reservation.

§capacity_reservation_arn: Option<String>

The Amazon Resource Name (ARN) of the Capacity Reservation.

§availability_zone_id: Option<String>

The Availability Zone ID of the Capacity Reservation.

§instance_type: Option<String>

The type of instance for which the Capacity Reservation reserves capacity.

§instance_platform: Option<CapacityReservationInstancePlatform>

The type of operating system for which the Capacity Reservation reserves capacity.

§availability_zone: Option<String>

The Availability Zone in which the capacity is reserved.

§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.

§total_instance_count: Option<i32>

The total number of instances for which the Capacity Reservation reserves capacity.

§available_instance_count: Option<i32>

The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

§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.

§state: 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.

§start_date: Option<DateTime>

The date and time at which the Capacity Reservation was started.

§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.

§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.

  • limited - The Capacity Reservation expires automatically at a specified date and time.

§instance_match_criteria: 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.

§create_date: Option<DateTime>

The date and time at which the Capacity Reservation was created.

§tags: Option<Vec<Tag>>

Any tags assigned to the Capacity Reservation.

§outpost_arn: Option<String>

The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

§capacity_reservation_fleet_id: 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.

§placement_group_arn: 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.

§capacity_allocations: Option<Vec<CapacityAllocation>>

Information about instance capacity usage.

Implementations§

source§

impl CapacityReservation

source

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

The ID of the Capacity Reservation.

source

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

The ID of the Amazon Web Services account that owns the Capacity Reservation.

source

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

The Amazon Resource Name (ARN) of the Capacity Reservation.

source

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

The Availability Zone ID of the Capacity Reservation.

source

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

The type of instance for which the Capacity Reservation reserves capacity.

source

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

The type of operating system for which the Capacity Reservation reserves capacity.

source

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

The Availability Zone in which the capacity is reserved.

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 total_instance_count(&self) -> Option<i32>

The total number of instances for which the Capacity Reservation reserves capacity.

source

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

The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

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 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.

source

pub fn start_date(&self) -> Option<&DateTime>

The date and time at which the Capacity Reservation was started.

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.

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.

  • limited - The Capacity Reservation expires automatically at a specified date and time.

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 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.

source

pub fn create_date(&self) -> Option<&DateTime>

The date and time at which the Capacity Reservation was created.

source

pub fn tags(&self) -> Option<&[Tag]>

Any tags assigned to the Capacity Reservation.

source

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

The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

source

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

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.

source

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

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.

source

pub fn capacity_allocations(&self) -> Option<&[CapacityAllocation]>

Information about instance capacity usage.

source§

impl CapacityReservation

source

pub fn builder() -> CapacityReservationBuilder

Creates a new builder-style object to manufacture CapacityReservation.

Trait Implementations§

source§

impl Clone for CapacityReservation

source§

fn clone(&self) -> CapacityReservation

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 CapacityReservation

source§

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

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

impl PartialEq<CapacityReservation> for CapacityReservation

source§

fn eq(&self, other: &CapacityReservation) -> 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 CapacityReservation

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