Struct aws_sdk_ec2::model::ScheduledInstance
source · #[non_exhaustive]pub struct ScheduledInstance { /* private fields */ }
Expand description
Describes a Scheduled Instance.
Implementations§
source§impl ScheduledInstance
impl ScheduledInstance
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone.
sourcepub fn create_date(&self) -> Option<&DateTime>
pub fn create_date(&self) -> Option<&DateTime>
The date when the Scheduled Instance was purchased.
sourcepub fn hourly_price(&self) -> Option<&str>
pub fn hourly_price(&self) -> Option<&str>
The hourly price for a single instance.
sourcepub fn instance_count(&self) -> Option<i32>
pub fn instance_count(&self) -> Option<i32>
The number of instances.
sourcepub fn instance_type(&self) -> Option<&str>
pub fn instance_type(&self) -> Option<&str>
The instance type.
sourcepub fn network_platform(&self) -> Option<&str>
pub fn network_platform(&self) -> Option<&str>
The network platform (EC2-Classic
or EC2-VPC
).
sourcepub fn next_slot_start_time(&self) -> Option<&DateTime>
pub fn next_slot_start_time(&self) -> Option<&DateTime>
The time for the next schedule to start.
sourcepub fn previous_slot_end_time(&self) -> Option<&DateTime>
pub fn previous_slot_end_time(&self) -> Option<&DateTime>
The time that the previous schedule ended or will end.
sourcepub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrence>
pub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrence>
The schedule recurrence.
sourcepub fn scheduled_instance_id(&self) -> Option<&str>
pub fn scheduled_instance_id(&self) -> Option<&str>
The Scheduled Instance ID.
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 term_end_date(&self) -> Option<&DateTime>
pub fn term_end_date(&self) -> Option<&DateTime>
The end date for the Scheduled Instance.
sourcepub fn term_start_date(&self) -> Option<&DateTime>
pub fn term_start_date(&self) -> Option<&DateTime>
The start date for the Scheduled Instance.
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 ScheduledInstance
impl ScheduledInstance
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ScheduledInstance
.
Examples found in repository?
src/xml_deser.rs (line 49103)
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ScheduledInstance
impl Clone for ScheduledInstance
source§fn clone(&self) -> ScheduledInstance
fn clone(&self) -> ScheduledInstance
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