Struct aws_sdk_ec2::model::Instance
source · #[non_exhaustive]pub struct Instance { /* private fields */ }
Expand description
Describes an instance.
Implementations§
source§impl Instance
impl Instance
sourcepub fn ami_launch_index(&self) -> Option<i32>
pub fn ami_launch_index(&self) -> Option<i32>
The AMI launch index, which can be used to find this instance in the launch group.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
sourcepub fn kernel_id(&self) -> Option<&str>
pub fn kernel_id(&self) -> Option<&str>
The kernel associated with this instance, if applicable.
sourcepub fn key_name(&self) -> Option<&str>
pub fn key_name(&self) -> Option<&str>
The name of the key pair, if this instance was launched with an associated key pair.
sourcepub fn launch_time(&self) -> Option<&DateTime>
pub fn launch_time(&self) -> Option<&DateTime>
The time the instance was launched.
sourcepub fn monitoring(&self) -> Option<&Monitoring>
pub fn monitoring(&self) -> Option<&Monitoring>
The monitoring for the instance.
sourcepub fn placement(&self) -> Option<&Placement>
pub fn placement(&self) -> Option<&Placement>
The location where the instance launched, if applicable.
sourcepub fn platform(&self) -> Option<&PlatformValues>
pub fn platform(&self) -> Option<&PlatformValues>
The value is Windows
for Windows instances; otherwise blank.
sourcepub fn private_dns_name(&self) -> Option<&str>
pub fn private_dns_name(&self) -> Option<&str>
(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running
state.
[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.
sourcepub fn private_ip_address(&self) -> Option<&str>
pub fn private_ip_address(&self) -> Option<&str>
The private IPv4 address assigned to the instance.
sourcepub fn product_codes(&self) -> Option<&[ProductCode]>
pub fn product_codes(&self) -> Option<&[ProductCode]>
The product codes attached to this instance, if applicable.
sourcepub fn public_dns_name(&self) -> Option<&str>
pub fn public_dns_name(&self) -> Option<&str>
(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the running
state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
sourcepub fn public_ip_address(&self) -> Option<&str>
pub fn public_ip_address(&self) -> Option<&str>
The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.
A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.
sourcepub fn ramdisk_id(&self) -> Option<&str>
pub fn ramdisk_id(&self) -> Option<&str>
The RAM disk associated with this instance, if applicable.
sourcepub fn state(&self) -> Option<&InstanceState>
pub fn state(&self) -> Option<&InstanceState>
The current state of the instance.
sourcepub fn state_transition_reason(&self) -> Option<&str>
pub fn state_transition_reason(&self) -> Option<&str>
The reason for the most recent state transition. This might be an empty string.
sourcepub fn subnet_id(&self) -> Option<&str>
pub fn subnet_id(&self) -> Option<&str>
[EC2-VPC] The ID of the subnet in which the instance is running.
sourcepub fn vpc_id(&self) -> Option<&str>
pub fn vpc_id(&self) -> Option<&str>
[EC2-VPC] The ID of the VPC in which the instance is running.
sourcepub fn architecture(&self) -> Option<&ArchitectureValues>
pub fn architecture(&self) -> Option<&ArchitectureValues>
The architecture of the image.
sourcepub fn block_device_mappings(&self) -> Option<&[InstanceBlockDeviceMapping]>
pub fn block_device_mappings(&self) -> Option<&[InstanceBlockDeviceMapping]>
Any block device mapping entries for the instance.
sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
The idempotency token you provided when you launched the instance, if applicable.
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. 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 ena_support(&self) -> Option<bool>
pub fn ena_support(&self) -> Option<bool>
Specifies whether enhanced networking with ENA is enabled.
sourcepub fn hypervisor(&self) -> Option<&HypervisorType>
pub fn hypervisor(&self) -> Option<&HypervisorType>
The hypervisor type of the instance. The value xen
is used for both Xen and Nitro hypervisors.
sourcepub fn iam_instance_profile(&self) -> Option<&IamInstanceProfile>
pub fn iam_instance_profile(&self) -> Option<&IamInstanceProfile>
The IAM instance profile associated with the instance, if applicable.
sourcepub fn instance_lifecycle(&self) -> Option<&InstanceLifecycleType>
pub fn instance_lifecycle(&self) -> Option<&InstanceLifecycleType>
Indicates whether this is a Spot Instance or a Scheduled Instance.
sourcepub fn elastic_gpu_associations(&self) -> Option<&[ElasticGpuAssociation]>
pub fn elastic_gpu_associations(&self) -> Option<&[ElasticGpuAssociation]>
The Elastic GPU associated with the instance.
sourcepub fn elastic_inference_accelerator_associations(
&self
) -> Option<&[ElasticInferenceAcceleratorAssociation]>
pub fn elastic_inference_accelerator_associations(
&self
) -> Option<&[ElasticInferenceAcceleratorAssociation]>
The elastic inference accelerator associated with the instance.
sourcepub fn network_interfaces(&self) -> Option<&[InstanceNetworkInterface]>
pub fn network_interfaces(&self) -> Option<&[InstanceNetworkInterface]>
[EC2-VPC] The network interfaces for the instance.
sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Outpost.
sourcepub fn root_device_name(&self) -> Option<&str>
pub fn root_device_name(&self) -> Option<&str>
The device name of the root device volume (for example, /dev/sda1
).
sourcepub fn root_device_type(&self) -> Option<&DeviceType>
pub fn root_device_type(&self) -> Option<&DeviceType>
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
sourcepub fn security_groups(&self) -> Option<&[GroupIdentifier]>
pub fn security_groups(&self) -> Option<&[GroupIdentifier]>
The security groups for the instance.
sourcepub fn source_dest_check(&self) -> Option<bool>
pub fn source_dest_check(&self) -> Option<bool>
Indicates whether source/destination checking is enabled.
sourcepub fn spot_instance_request_id(&self) -> Option<&str>
pub fn spot_instance_request_id(&self) -> Option<&str>
If the request is a Spot Instance request, the ID of the request.
sourcepub fn sriov_net_support(&self) -> Option<&str>
pub fn sriov_net_support(&self) -> Option<&str>
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
sourcepub fn state_reason(&self) -> Option<&StateReason>
pub fn state_reason(&self) -> Option<&StateReason>
The reason for the most recent state transition.
Any tags assigned to the instance.
sourcepub fn virtualization_type(&self) -> Option<&VirtualizationType>
pub fn virtualization_type(&self) -> Option<&VirtualizationType>
The virtualization type of the instance.
sourcepub fn cpu_options(&self) -> Option<&CpuOptions>
pub fn cpu_options(&self) -> Option<&CpuOptions>
The CPU options for the instance.
sourcepub fn capacity_reservation_id(&self) -> Option<&str>
pub fn capacity_reservation_id(&self) -> Option<&str>
The ID of the Capacity Reservation.
sourcepub fn capacity_reservation_specification(
&self
) -> Option<&CapacityReservationSpecificationResponse>
pub fn capacity_reservation_specification(
&self
) -> Option<&CapacityReservationSpecificationResponse>
Information about the Capacity Reservation targeting option.
sourcepub fn hibernation_options(&self) -> Option<&HibernationOptions>
pub fn hibernation_options(&self) -> Option<&HibernationOptions>
Indicates whether the instance is enabled for hibernation.
sourcepub fn licenses(&self) -> Option<&[LicenseConfiguration]>
pub fn licenses(&self) -> Option<&[LicenseConfiguration]>
The license configurations for the instance.
sourcepub fn metadata_options(&self) -> Option<&InstanceMetadataOptionsResponse>
pub fn metadata_options(&self) -> Option<&InstanceMetadataOptionsResponse>
The metadata options for the instance.
sourcepub fn enclave_options(&self) -> Option<&EnclaveOptions>
pub fn enclave_options(&self) -> Option<&EnclaveOptions>
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
sourcepub fn boot_mode(&self) -> Option<&BootModeValues>
pub fn boot_mode(&self) -> Option<&BootModeValues>
The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.
sourcepub fn platform_details(&self) -> Option<&str>
pub fn platform_details(&self) -> Option<&str>
The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.
sourcepub fn usage_operation(&self) -> Option<&str>
pub fn usage_operation(&self) -> Option<&str>
The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.
sourcepub fn usage_operation_update_time(&self) -> Option<&DateTime>
pub fn usage_operation_update_time(&self) -> Option<&DateTime>
The time that the usage operation was last updated.
sourcepub fn private_dns_name_options(&self) -> Option<&PrivateDnsNameOptionsResponse>
pub fn private_dns_name_options(&self) -> Option<&PrivateDnsNameOptionsResponse>
The options for the instance hostname.
sourcepub fn ipv6_address(&self) -> Option<&str>
pub fn ipv6_address(&self) -> Option<&str>
The IPv6 address assigned to the instance.
sourcepub fn tpm_support(&self) -> Option<&str>
pub fn tpm_support(&self) -> Option<&str>
If the instance is configured for NitroTPM support, the value is v2.0
. For more information, see NitroTPM in the Amazon EC2 User Guide.
sourcepub fn maintenance_options(&self) -> Option<&InstanceMaintenanceOptions>
pub fn maintenance_options(&self) -> Option<&InstanceMaintenanceOptions>
Provides information on the recovery and maintenance options of your instance.