Struct aws_sdk_ec2::model::ResponseLaunchTemplateData
source · #[non_exhaustive]pub struct ResponseLaunchTemplateData { /* private fields */ }
Expand description
The information for a launch template.
Implementations§
source§impl ResponseLaunchTemplateData
impl ResponseLaunchTemplateData
sourcepub fn ebs_optimized(&self) -> Option<bool>
pub fn ebs_optimized(&self) -> Option<bool>
Indicates whether the instance is optimized for Amazon EBS I/O.
sourcepub fn iam_instance_profile(
&self
) -> Option<&LaunchTemplateIamInstanceProfileSpecification>
pub fn iam_instance_profile(
&self
) -> Option<&LaunchTemplateIamInstanceProfileSpecification>
The IAM instance profile.
sourcepub fn block_device_mappings(
&self
) -> Option<&[LaunchTemplateBlockDeviceMapping]>
pub fn block_device_mappings(
&self
) -> Option<&[LaunchTemplateBlockDeviceMapping]>
The block device mappings.
sourcepub fn network_interfaces(
&self
) -> Option<&[LaunchTemplateInstanceNetworkInterfaceSpecification]>
pub fn network_interfaces(
&self
) -> Option<&[LaunchTemplateInstanceNetworkInterfaceSpecification]>
The network interfaces.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
sourcepub fn monitoring(&self) -> Option<&LaunchTemplatesMonitoring>
pub fn monitoring(&self) -> Option<&LaunchTemplatesMonitoring>
The monitoring for the instance.
sourcepub fn placement(&self) -> Option<&LaunchTemplatePlacement>
pub fn placement(&self) -> Option<&LaunchTemplatePlacement>
The placement of the instance.
sourcepub fn ram_disk_id(&self) -> Option<&str>
pub fn ram_disk_id(&self) -> Option<&str>
The ID of the RAM disk, if applicable.
sourcepub fn disable_api_termination(&self) -> Option<bool>
pub fn disable_api_termination(&self) -> Option<bool>
If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.
sourcepub fn instance_initiated_shutdown_behavior(&self) -> Option<&ShutdownBehavior>
pub fn instance_initiated_shutdown_behavior(&self) -> Option<&ShutdownBehavior>
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
sourcepub fn tag_specifications(&self) -> Option<&[LaunchTemplateTagSpecification]>
pub fn tag_specifications(&self) -> Option<&[LaunchTemplateTagSpecification]>
The tags that are applied to the resources that are created during instance launch.
sourcepub fn elastic_gpu_specifications(
&self
) -> Option<&[ElasticGpuSpecificationResponse]>
pub fn elastic_gpu_specifications(
&self
) -> Option<&[ElasticGpuSpecificationResponse]>
The elastic GPU specification.
sourcepub fn elastic_inference_accelerators(
&self
) -> Option<&[LaunchTemplateElasticInferenceAcceleratorResponse]>
pub fn elastic_inference_accelerators(
&self
) -> Option<&[LaunchTemplateElasticInferenceAcceleratorResponse]>
The elastic inference accelerator for the instance.
sourcepub fn security_group_ids(&self) -> Option<&[String]>
pub fn security_group_ids(&self) -> Option<&[String]>
The security group IDs.
sourcepub fn security_groups(&self) -> Option<&[String]>
pub fn security_groups(&self) -> Option<&[String]>
The security group names.
sourcepub fn instance_market_options(
&self
) -> Option<&LaunchTemplateInstanceMarketOptions>
pub fn instance_market_options(
&self
) -> Option<&LaunchTemplateInstanceMarketOptions>
The market (purchasing) option for the instances.
sourcepub fn credit_specification(&self) -> Option<&CreditSpecification>
pub fn credit_specification(&self) -> Option<&CreditSpecification>
The credit option for CPU usage of the instance.
sourcepub fn cpu_options(&self) -> Option<&LaunchTemplateCpuOptions>
pub fn cpu_options(&self) -> Option<&LaunchTemplateCpuOptions>
The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn capacity_reservation_specification(
&self
) -> Option<&LaunchTemplateCapacityReservationSpecificationResponse>
pub fn capacity_reservation_specification(
&self
) -> Option<&LaunchTemplateCapacityReservationSpecificationResponse>
Information about the Capacity Reservation targeting option.
sourcepub fn license_specifications(
&self
) -> Option<&[LaunchTemplateLicenseConfiguration]>
pub fn license_specifications(
&self
) -> Option<&[LaunchTemplateLicenseConfiguration]>
The license configurations.
sourcepub fn hibernation_options(&self) -> Option<&LaunchTemplateHibernationOptions>
pub fn hibernation_options(&self) -> Option<&LaunchTemplateHibernationOptions>
Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn metadata_options(&self) -> Option<&LaunchTemplateInstanceMetadataOptions>
pub fn metadata_options(&self) -> Option<&LaunchTemplateInstanceMetadataOptions>
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn enclave_options(&self) -> Option<&LaunchTemplateEnclaveOptions>
pub fn enclave_options(&self) -> Option<&LaunchTemplateEnclaveOptions>
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
sourcepub fn instance_requirements(&self) -> Option<&InstanceRequirements>
pub fn instance_requirements(&self) -> Option<&InstanceRequirements>
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
If you specify InstanceRequirements
, you can't specify InstanceTypes
.
sourcepub fn private_dns_name_options(
&self
) -> Option<&LaunchTemplatePrivateDnsNameOptions>
pub fn private_dns_name_options(
&self
) -> Option<&LaunchTemplatePrivateDnsNameOptions>
The options for the instance hostname.
sourcepub fn maintenance_options(
&self
) -> Option<&LaunchTemplateInstanceMaintenanceOptions>
pub fn maintenance_options(
&self
) -> Option<&LaunchTemplateInstanceMaintenanceOptions>
The maintenance options for your instance.
sourcepub fn disable_api_stop(&self) -> Option<bool>
pub fn disable_api_stop(&self) -> Option<bool>
Indicates whether the instance is enabled for stop protection. For more information, see Stop Protection.
source§impl ResponseLaunchTemplateData
impl ResponseLaunchTemplateData
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ResponseLaunchTemplateData
.
Examples found in repository?
36206 36207 36208 36209 36210 36211 36212 36213 36214 36215 36216 36217 36218 36219 36220 36221 36222 36223 36224 36225 36226 36227 36228 36229 36230 36231 36232 36233 36234 36235 36236 36237 36238 36239 36240 36241 36242 36243 36244 36245 36246 36247 36248 36249 36250 36251 36252 36253 36254 36255 36256 36257 36258 36259 36260 36261 36262 36263 36264 36265 36266 36267 36268 36269 36270 36271 36272 36273 36274 36275 36276 36277 36278 36279 36280 36281 36282 36283 36284 36285 36286 36287 36288 36289 36290 36291 36292 36293 36294 36295 36296 36297 36298 36299 36300 36301 36302 36303 36304 36305 36306 36307 36308 36309 36310 36311 36312 36313 36314 36315 36316 36317 36318 36319 36320 36321 36322 36323 36324 36325 36326 36327 36328 36329 36330 36331 36332 36333 36334 36335 36336 36337 36338 36339 36340 36341 36342 36343 36344 36345 36346 36347 36348 36349 36350 36351 36352 36353 36354 36355 36356 36357 36358 36359 36360 36361 36362 36363 36364 36365 36366 36367 36368 36369 36370 36371 36372 36373 36374 36375 36376 36377 36378 36379 36380 36381 36382 36383 36384 36385 36386 36387 36388 36389 36390 36391 36392 36393 36394 36395 36396 36397 36398 36399 36400 36401 36402 36403 36404 36405 36406 36407 36408 36409 36410 36411 36412 36413 36414 36415 36416 36417 36418 36419 36420 36421 36422 36423 36424 36425 36426 36427 36428 36429 36430 36431 36432 36433 36434 36435 36436 36437 36438 36439 36440 36441 36442 36443 36444 36445 36446 36447 36448 36449 36450 36451 36452 36453 36454 36455 36456 36457 36458 36459 36460 36461 36462 36463 36464 36465 36466 36467 36468 36469 36470 36471 36472 36473 36474 36475 36476 36477 36478 36479 36480 36481 36482 36483 36484 36485 36486 36487 36488 36489 36490 36491 36492 36493 36494 36495 36496 36497 36498 36499 36500 36501 36502 36503 36504 36505 36506 36507 36508 36509 36510 36511 36512 36513 36514 36515 36516 36517 36518 36519 36520 36521 36522 36523 36524 36525 36526 36527 36528 36529 36530 36531 36532 36533 36534 36535 36536 36537 36538 36539 36540 36541 36542 36543 36544 36545 36546 36547 36548 36549 36550 36551 36552 36553 36554 36555 36556 36557 36558 36559 36560 36561 36562 36563 36564 36565
pub fn deser_structure_crate_model_response_launch_template_data(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseLaunchTemplateData, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseLaunchTemplateData::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#ResponseLaunchTemplateData$KernelId */ => {
let var_1503 =
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_kernel_id(var_1503);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#ResponseLaunchTemplateData$EbsOptimized */ => {
let var_1504 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1504);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#ResponseLaunchTemplateData$IamInstanceProfile */ => {
let var_1505 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_iam_instance_profile_specification(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_1505);
}
,
s if s.matches("blockDeviceMappingSet") /* BlockDeviceMappings com.amazonaws.ec2#ResponseLaunchTemplateData$BlockDeviceMappings */ => {
let var_1506 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_1506);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#ResponseLaunchTemplateData$NetworkInterfaces */ => {
let var_1507 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_instance_network_interface_specification_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_1507);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ResponseLaunchTemplateData$ImageId */ => {
let var_1508 =
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_image_id(var_1508);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceType */ => {
let var_1509 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1509);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#ResponseLaunchTemplateData$KeyName */ => {
let var_1510 =
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_key_name(var_1510);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#ResponseLaunchTemplateData$Monitoring */ => {
let var_1511 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_templates_monitoring(&mut tag)
?
)
;
builder = builder.set_monitoring(var_1511);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#ResponseLaunchTemplateData$Placement */ => {
let var_1512 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_1512);
}
,
s if s.matches("ramDiskId") /* RamDiskId com.amazonaws.ec2#ResponseLaunchTemplateData$RamDiskId */ => {
let var_1513 =
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_ram_disk_id(var_1513);
}
,
s if s.matches("disableApiTermination") /* DisableApiTermination com.amazonaws.ec2#ResponseLaunchTemplateData$DisableApiTermination */ => {
let var_1514 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_disable_api_termination(var_1514);
}
,
s if s.matches("instanceInitiatedShutdownBehavior") /* InstanceInitiatedShutdownBehavior com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceInitiatedShutdownBehavior */ => {
let var_1515 =
Some(
Result::<crate::model::ShutdownBehavior, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ShutdownBehavior::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_initiated_shutdown_behavior(var_1515);
}
,
s if s.matches("userData") /* UserData com.amazonaws.ec2#ResponseLaunchTemplateData$UserData */ => {
let var_1516 =
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_user_data(var_1516);
}
,
s if s.matches("tagSpecificationSet") /* TagSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$TagSpecifications */ => {
let var_1517 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_tag_specification_list(&mut tag)
?
)
;
builder = builder.set_tag_specifications(var_1517);
}
,
s if s.matches("elasticGpuSpecificationSet") /* ElasticGpuSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$ElasticGpuSpecifications */ => {
let var_1518 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_elastic_gpu_specification_response_list(&mut tag)
?
)
;
builder = builder.set_elastic_gpu_specifications(var_1518);
}
,
s if s.matches("elasticInferenceAcceleratorSet") /* ElasticInferenceAccelerators com.amazonaws.ec2#ResponseLaunchTemplateData$ElasticInferenceAccelerators */ => {
let var_1519 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_elastic_inference_accelerator_response_list(&mut tag)
?
)
;
builder = builder.set_elastic_inference_accelerators(var_1519);
}
,
s if s.matches("securityGroupIdSet") /* SecurityGroupIds com.amazonaws.ec2#ResponseLaunchTemplateData$SecurityGroupIds */ => {
let var_1520 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_value_string_list(&mut tag)
?
)
;
builder = builder.set_security_group_ids(var_1520);
}
,
s if s.matches("securityGroupSet") /* SecurityGroups com.amazonaws.ec2#ResponseLaunchTemplateData$SecurityGroups */ => {
let var_1521 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_value_string_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_1521);
}
,
s if s.matches("instanceMarketOptions") /* InstanceMarketOptions com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceMarketOptions */ => {
let var_1522 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_instance_market_options(&mut tag)
?
)
;
builder = builder.set_instance_market_options(var_1522);
}
,
s if s.matches("creditSpecification") /* CreditSpecification com.amazonaws.ec2#ResponseLaunchTemplateData$CreditSpecification */ => {
let var_1523 =
Some(
crate::xml_deser::deser_structure_crate_model_credit_specification(&mut tag)
?
)
;
builder = builder.set_credit_specification(var_1523);
}
,
s if s.matches("cpuOptions") /* CpuOptions com.amazonaws.ec2#ResponseLaunchTemplateData$CpuOptions */ => {
let var_1524 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_cpu_options(&mut tag)
?
)
;
builder = builder.set_cpu_options(var_1524);
}
,
s if s.matches("capacityReservationSpecification") /* CapacityReservationSpecification com.amazonaws.ec2#ResponseLaunchTemplateData$CapacityReservationSpecification */ => {
let var_1525 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_capacity_reservation_specification_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_specification(var_1525);
}
,
s if s.matches("licenseSet") /* LicenseSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$LicenseSpecifications */ => {
let var_1526 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_license_list(&mut tag)
?
)
;
builder = builder.set_license_specifications(var_1526);
}
,
s if s.matches("hibernationOptions") /* HibernationOptions com.amazonaws.ec2#ResponseLaunchTemplateData$HibernationOptions */ => {
let var_1527 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_hibernation_options(&mut tag)
?
)
;
builder = builder.set_hibernation_options(var_1527);
}
,
s if s.matches("metadataOptions") /* MetadataOptions com.amazonaws.ec2#ResponseLaunchTemplateData$MetadataOptions */ => {
let var_1528 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_instance_metadata_options(&mut tag)
?
)
;
builder = builder.set_metadata_options(var_1528);
}
,
s if s.matches("enclaveOptions") /* EnclaveOptions com.amazonaws.ec2#ResponseLaunchTemplateData$EnclaveOptions */ => {
let var_1529 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_enclave_options(&mut tag)
?
)
;
builder = builder.set_enclave_options(var_1529);
}
,
s if s.matches("instanceRequirements") /* InstanceRequirements com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceRequirements */ => {
let var_1530 =
Some(
crate::xml_deser::deser_structure_crate_model_instance_requirements(&mut tag)
?
)
;
builder = builder.set_instance_requirements(var_1530);
}
,
s if s.matches("privateDnsNameOptions") /* PrivateDnsNameOptions com.amazonaws.ec2#ResponseLaunchTemplateData$PrivateDnsNameOptions */ => {
let var_1531 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_private_dns_name_options(&mut tag)
?
)
;
builder = builder.set_private_dns_name_options(var_1531);
}
,
s if s.matches("maintenanceOptions") /* MaintenanceOptions com.amazonaws.ec2#ResponseLaunchTemplateData$MaintenanceOptions */ => {
let var_1532 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template_instance_maintenance_options(&mut tag)
?
)
;
builder = builder.set_maintenance_options(var_1532);
}
,
s if s.matches("disableApiStop") /* DisableApiStop com.amazonaws.ec2#ResponseLaunchTemplateData$DisableApiStop */ => {
let var_1533 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_disable_api_stop(var_1533);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ResponseLaunchTemplateData
impl Clone for ResponseLaunchTemplateData
source§fn clone(&self) -> ResponseLaunchTemplateData
fn clone(&self) -> ResponseLaunchTemplateData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more