Struct aws_sdk_ec2::model::LaunchSpecification
source · #[non_exhaustive]pub struct LaunchSpecification { /* private fields */ }
Expand description
Describes the launch specification for an instance.
Implementations§
source§impl LaunchSpecification
impl LaunchSpecification
sourcepub fn security_groups(&self) -> Option<&[GroupIdentifier]>
pub fn security_groups(&self) -> Option<&[GroupIdentifier]>
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
sourcepub fn addressing_type(&self) -> Option<&str>
pub fn addressing_type(&self) -> Option<&str>
Deprecated.
sourcepub fn block_device_mappings(&self) -> Option<&[BlockDeviceMapping]>
pub fn block_device_mappings(&self) -> Option<&[BlockDeviceMapping]>
One or more block device mapping entries.
sourcepub fn ebs_optimized(&self) -> Option<bool>
pub fn ebs_optimized(&self) -> Option<bool>
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default: false
sourcepub fn iam_instance_profile(&self) -> Option<&IamInstanceProfileSpecification>
pub fn iam_instance_profile(&self) -> Option<&IamInstanceProfileSpecification>
The IAM instance profile.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type. Only one instance type can be specified.
sourcepub fn network_interfaces(
&self
) -> Option<&[InstanceNetworkInterfaceSpecification]>
pub fn network_interfaces(
&self
) -> Option<&[InstanceNetworkInterfaceSpecification]>
One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
sourcepub fn placement(&self) -> Option<&SpotPlacement>
pub fn placement(&self) -> Option<&SpotPlacement>
The placement information for the instance.
sourcepub fn ramdisk_id(&self) -> Option<&str>
pub fn ramdisk_id(&self) -> Option<&str>
The ID of the RAM disk.
sourcepub fn monitoring(&self) -> Option<&RunInstancesMonitoringEnabled>
pub fn monitoring(&self) -> Option<&RunInstancesMonitoringEnabled>
Describes the monitoring of an instance.
source§impl LaunchSpecification
impl LaunchSpecification
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LaunchSpecification
.
Examples found in repository?
60784 60785 60786 60787 60788 60789 60790 60791 60792 60793 60794 60795 60796 60797 60798 60799 60800 60801 60802 60803 60804 60805 60806 60807 60808 60809 60810 60811 60812 60813 60814 60815 60816 60817 60818 60819 60820 60821 60822 60823 60824 60825 60826 60827 60828 60829 60830 60831 60832 60833 60834 60835 60836 60837 60838 60839 60840 60841 60842 60843 60844 60845 60846 60847 60848 60849 60850 60851 60852 60853 60854 60855 60856 60857 60858 60859 60860 60861 60862 60863 60864 60865 60866 60867 60868 60869 60870 60871 60872 60873 60874 60875 60876 60877 60878 60879 60880 60881 60882 60883 60884 60885 60886 60887 60888 60889 60890 60891 60892 60893 60894 60895 60896 60897 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914 60915 60916 60917 60918 60919 60920 60921 60922 60923 60924 60925 60926 60927 60928 60929 60930 60931 60932 60933 60934 60935 60936 60937 60938 60939 60940 60941 60942 60943 60944 60945 60946 60947 60948 60949 60950 60951 60952 60953 60954 60955 60956 60957 60958 60959 60960 60961 60962 60963 60964 60965 60966 60967 60968 60969 60970 60971 60972 60973 60974 60975
pub fn deser_structure_crate_model_launch_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("userData") /* UserData com.amazonaws.ec2#LaunchSpecification$UserData */ => {
let var_2967 =
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_2967);
}
,
s if s.matches("groupSet") /* SecurityGroups com.amazonaws.ec2#LaunchSpecification$SecurityGroups */ => {
let var_2968 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_2968);
}
,
s if s.matches("addressingType") /* AddressingType com.amazonaws.ec2#LaunchSpecification$AddressingType */ => {
let var_2969 =
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_addressing_type(var_2969);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#LaunchSpecification$BlockDeviceMappings */ => {
let var_2970 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_2970);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#LaunchSpecification$EbsOptimized */ => {
let var_2971 =
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_2971);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#LaunchSpecification$IamInstanceProfile */ => {
let var_2972 =
Some(
crate::xml_deser::deser_structure_crate_model_iam_instance_profile_specification(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_2972);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#LaunchSpecification$ImageId */ => {
let var_2973 =
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_2973);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#LaunchSpecification$InstanceType */ => {
let var_2974 =
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_2974);
}
,
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#LaunchSpecification$KernelId */ => {
let var_2975 =
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_2975);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#LaunchSpecification$KeyName */ => {
let var_2976 =
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_2976);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#LaunchSpecification$NetworkInterfaces */ => {
let var_2977 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_network_interface_specification_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_2977);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#LaunchSpecification$Placement */ => {
let var_2978 =
Some(
crate::xml_deser::deser_structure_crate_model_spot_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_2978);
}
,
s if s.matches("ramdiskId") /* RamdiskId com.amazonaws.ec2#LaunchSpecification$RamdiskId */ => {
let var_2979 =
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_ramdisk_id(var_2979);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#LaunchSpecification$SubnetId */ => {
let var_2980 =
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_subnet_id(var_2980);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#LaunchSpecification$Monitoring */ => {
let var_2981 =
Some(
crate::xml_deser::deser_structure_crate_model_run_instances_monitoring_enabled(&mut tag)
?
)
;
builder = builder.set_monitoring(var_2981);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LaunchSpecification
impl Clone for LaunchSpecification
source§fn clone(&self) -> LaunchSpecification
fn clone(&self) -> LaunchSpecification
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more