#[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 is available for use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was canceled. 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 can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes. -
scheduled
- (Future-dated Capacity Reservations) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date. -
payment-pending
- (Capacity Blocks) The upfront payment has not been processed yet. -
payment-failed
- (Capacity Blocks) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released. -
assessing
- (Future-dated Capacity Reservations) Amazon EC2 is assessing your request for a future-dated Capacity Reservation. -
delayed
- (Future-dated Capacity Reservations) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time. -
unsupported
- (Future-dated Capacity Reservations) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.
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 is available for use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was canceled. 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 can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes. -
scheduled
- (Future-dated Capacity Reservations) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date. -
payment-pending
- (Capacity Blocks) The upfront payment has not been processed yet. -
payment-failed
- (Capacity Blocks) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released. -
assessing
- (Future-dated Capacity Reservations) Amazon EC2 is assessing your request for a future-dated Capacity Reservation. -
delayed
- (Future-dated Capacity Reservations) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time. -
unsupported
- (Future-dated Capacity Reservations) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.
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 is available for use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was canceled. 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 can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes. -
scheduled
- (Future-dated Capacity Reservations) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date. -
payment-pending
- (Capacity Blocks) The upfront payment has not been processed yet. -
payment-failed
- (Capacity Blocks) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released. -
assessing
- (Future-dated Capacity Reservations) Amazon EC2 is assessing your request for a future-dated Capacity Reservation. -
delayed
- (Future-dated Capacity Reservations) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time. -
unsupported
- (Future-dated Capacity Reservations) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.
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 reservation_type(self, input: CapacityReservationType) -> Self
pub fn reservation_type(self, input: CapacityReservationType) -> Self
The type of Capacity Reservation.
Sourcepub fn set_reservation_type(
self,
input: Option<CapacityReservationType>,
) -> Self
pub fn set_reservation_type( self, input: Option<CapacityReservationType>, ) -> Self
The type of Capacity Reservation.
Sourcepub fn get_reservation_type(&self) -> &Option<CapacityReservationType>
pub fn get_reservation_type(&self) -> &Option<CapacityReservationType>
The type of Capacity Reservation.
Sourcepub fn unused_reservation_billing_owner_id(
self,
input: impl Into<String>,
) -> Self
pub fn unused_reservation_billing_owner_id( self, input: impl Into<String>, ) -> Self
The ID of the Amazon Web Services account to which billing of the unused capacity of the Capacity Reservation is assigned.
Sourcepub fn set_unused_reservation_billing_owner_id(
self,
input: Option<String>,
) -> Self
pub fn set_unused_reservation_billing_owner_id( self, input: Option<String>, ) -> Self
The ID of the Amazon Web Services account to which billing of the unused capacity of the Capacity Reservation is assigned.
Sourcepub fn get_unused_reservation_billing_owner_id(&self) -> &Option<String>
pub fn get_unused_reservation_billing_owner_id(&self) -> &Option<String>
The ID of the Amazon Web Services account to which billing of the unused capacity of the Capacity Reservation is assigned.
Sourcepub fn commitment_info(self, input: CapacityReservationCommitmentInfo) -> Self
pub fn commitment_info(self, input: CapacityReservationCommitmentInfo) -> Self
Information about your commitment for a future-dated Capacity Reservation.
Sourcepub fn set_commitment_info(
self,
input: Option<CapacityReservationCommitmentInfo>,
) -> Self
pub fn set_commitment_info( self, input: Option<CapacityReservationCommitmentInfo>, ) -> Self
Information about your commitment for a future-dated Capacity Reservation.
Sourcepub fn get_commitment_info(&self) -> &Option<CapacityReservationCommitmentInfo>
pub fn get_commitment_info(&self) -> &Option<CapacityReservationCommitmentInfo>
Information about your commitment for a future-dated Capacity Reservation.
Sourcepub fn delivery_preference(
self,
input: CapacityReservationDeliveryPreference,
) -> Self
pub fn delivery_preference( self, input: CapacityReservationDeliveryPreference, ) -> Self
The delivery method for a future-dated Capacity Reservation. incremental
indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.
Sourcepub fn set_delivery_preference(
self,
input: Option<CapacityReservationDeliveryPreference>,
) -> Self
pub fn set_delivery_preference( self, input: Option<CapacityReservationDeliveryPreference>, ) -> Self
The delivery method for a future-dated Capacity Reservation. incremental
indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.
Sourcepub fn get_delivery_preference(
&self,
) -> &Option<CapacityReservationDeliveryPreference>
pub fn get_delivery_preference( &self, ) -> &Option<CapacityReservationDeliveryPreference>
The delivery method for a future-dated Capacity Reservation. incremental
indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.
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
impl StructuralPartialEq for CapacityReservationBuilder
Auto Trait Implementations§
impl Freeze for CapacityReservationBuilder
impl RefUnwindSafe for CapacityReservationBuilder
impl Send for CapacityReservationBuilder
impl Sync for CapacityReservationBuilder
impl Unpin for CapacityReservationBuilder
impl UnwindSafe for CapacityReservationBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);