Struct aws_sdk_ec2::model::ScheduledInstanceAvailability
source · #[non_exhaustive]pub struct ScheduledInstanceAvailability { /* private fields */ }
Expand description
Describes a schedule that is available for your Scheduled Instances.
Implementations§
source§impl ScheduledInstanceAvailability
impl ScheduledInstanceAvailability
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone.
sourcepub fn available_instance_count(&self) -> Option<i32>
pub fn available_instance_count(&self) -> Option<i32>
The number of available instances.
sourcepub fn first_slot_start_time(&self) -> Option<&DateTime>
pub fn first_slot_start_time(&self) -> Option<&DateTime>
The time period for the first schedule to start.
sourcepub fn hourly_price(&self) -> Option<&str>
pub fn hourly_price(&self) -> Option<&str>
The hourly price for a single instance.
sourcepub fn instance_type(&self) -> Option<&str>
pub fn instance_type(&self) -> Option<&str>
The instance type. You can specify one of the C3, C4, M4, or R3 instance types.
sourcepub fn max_term_duration_in_days(&self) -> Option<i32>
pub fn max_term_duration_in_days(&self) -> Option<i32>
The maximum term. The only possible value is 365 days.
sourcepub fn min_term_duration_in_days(&self) -> Option<i32>
pub fn min_term_duration_in_days(&self) -> Option<i32>
The minimum term. The only possible value is 365 days.
sourcepub fn network_platform(&self) -> Option<&str>
pub fn network_platform(&self) -> Option<&str>
The network platform (EC2-Classic
or EC2-VPC
).
sourcepub fn purchase_token(&self) -> Option<&str>
pub fn purchase_token(&self) -> Option<&str>
The purchase token. This token expires in two hours.
sourcepub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrence>
pub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrence>
The schedule recurrence.
sourcepub fn slot_duration_in_hours(&self) -> Option<i32>
pub fn slot_duration_in_hours(&self) -> Option<i32>
The number of hours in the schedule.
sourcepub fn total_scheduled_instance_hours(&self) -> Option<i32>
pub fn total_scheduled_instance_hours(&self) -> Option<i32>
The total number of hours for a single instance for the entire term.
source§impl ScheduledInstanceAvailability
impl ScheduledInstanceAvailability
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ScheduledInstanceAvailability
.
Examples found in repository?
src/xml_deser.rs (line 48913)
48909 48910 48911 48912 48913 48914 48915 48916 48917 48918 48919 48920 48921 48922 48923 48924 48925 48926 48927 48928 48929 48930 48931 48932 48933 48934 48935 48936 48937 48938 48939 48940 48941 48942 48943 48944 48945 48946 48947 48948 48949 48950 48951 48952 48953 48954 48955 48956 48957 48958 48959 48960 48961 48962 48963 48964 48965 48966 48967 48968 48969 48970 48971 48972 48973 48974 48975 48976 48977 48978 48979 48980 48981 48982 48983 48984 48985 48986 48987 48988 48989 48990 48991 48992 48993 48994 48995 48996 48997 48998 48999 49000 49001 49002 49003 49004 49005 49006 49007 49008 49009 49010 49011 49012 49013 49014 49015 49016 49017 49018 49019 49020 49021 49022 49023 49024 49025 49026 49027 49028 49029 49030 49031 49032 49033 49034 49035 49036 49037 49038 49039 49040 49041 49042 49043 49044 49045 49046 49047 49048 49049 49050 49051 49052 49053 49054 49055 49056 49057 49058 49059 49060 49061 49062 49063 49064 49065 49066 49067 49068 49069 49070 49071 49072 49073 49074 49075 49076 49077 49078 49079 49080 49081 49082 49083 49084 49085 49086 49087 49088 49089 49090 49091 49092 49093 49094 49095 49096 49097
pub fn deser_structure_crate_model_scheduled_instance_availability(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstanceAvailability, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstanceAvailability::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstanceAvailability$AvailabilityZone */ => {
let var_2264 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2264);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#ScheduledInstanceAvailability$AvailableInstanceCount */ => {
let var_2265 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_2265);
}
,
s if s.matches("firstSlotStartTime") /* FirstSlotStartTime com.amazonaws.ec2#ScheduledInstanceAvailability$FirstSlotStartTime */ => {
let var_2266 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_first_slot_start_time(var_2266);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstanceAvailability$HourlyPrice */ => {
let var_2267 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_2267);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstanceAvailability$InstanceType */ => {
let var_2268 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_2268);
}
,
s if s.matches("maxTermDurationInDays") /* MaxTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MaxTermDurationInDays */ => {
let var_2269 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_max_term_duration_in_days(var_2269);
}
,
s if s.matches("minTermDurationInDays") /* MinTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MinTermDurationInDays */ => {
let var_2270 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_term_duration_in_days(var_2270);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstanceAvailability$NetworkPlatform */ => {
let var_2271 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_platform(var_2271);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstanceAvailability$Platform */ => {
let var_2272 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_2272);
}
,
s if s.matches("purchaseToken") /* PurchaseToken com.amazonaws.ec2#ScheduledInstanceAvailability$PurchaseToken */ => {
let var_2273 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_purchase_token(var_2273);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstanceAvailability$Recurrence */ => {
let var_2274 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2274);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstanceAvailability$SlotDurationInHours */ => {
let var_2275 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_slot_duration_in_hours(var_2275);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstanceAvailability$TotalScheduledInstanceHours */ => {
let var_2276 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_scheduled_instance_hours(var_2276);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ScheduledInstanceAvailability
impl Clone for ScheduledInstanceAvailability
source§fn clone(&self) -> ScheduledInstanceAvailability
fn clone(&self) -> ScheduledInstanceAvailability
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more