Class Image
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Image.Builder,Image>
Describes an image.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal ArchitectureValuesThe architecture of the image.final StringThe architecture of the image.final List<BlockDeviceMapping> Any block device mapping entries.final BootModeValuesbootMode()The boot mode of the image.final StringThe boot mode of the image.static Image.Builderbuilder()final StringThe date and time the image was created.final StringThe date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ.final StringIndicates whether deregistration protection is enabled for the AMI.final StringThe description of the AMI that was provided during image creation.final BooleanSpecifies whether enhanced networking with ENA is enabled.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the BlockDeviceMappings property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the ProductCodes property.final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final HypervisorTypeThe hypervisor type of the image.final StringThe hypervisor type of the image.final StringimageId()The ID of the AMI.final StringThe location of the AMI.final StringThe owner alias (amazon|aws-marketplace).final ImageTypeValuesThe type of image.final StringThe type of image.final ImdsSupportValuesIfv2.0, it indicates that IMDSv2 is specified in the AMI.final StringIfv2.0, it indicates that IMDSv2 is specified in the AMI.final StringkernelId()The kernel associated with the image, if any.final StringThe date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance.final Stringname()The name of the AMI that was provided during image creation.final StringownerId()The ID of the Amazon Web Services account that owns the image.final PlatformValuesplatform()This value is set towindowsfor Windows AMIs; otherwise, it is blank.final StringThis value is set towindowsfor Windows AMIs; otherwise, it is blank.final StringThe platform details associated with the billing code of the AMI.final List<ProductCode> Any product codes associated with the AMI.final BooleanIndicates whether the image has public launch permissions.final StringThe RAM disk associated with the image, if any.final StringThe device name of the root device volume (for example,/dev/sda1).final DeviceTypeThe type of root device used by the AMI.final StringThe type of root device used by the AMI.static Class<? extends Image.Builder> final StringThe ID of the instance that the AMI was created from if the AMI was created using CreateImage.final StringSpecifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.final ImageStatestate()The current state of the AMI.final StringThe current state of the AMI.final StateReasonThe reason for the state change.tags()Any tags assigned to the image.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final TpmSupportValuesIf the image is configured for NitroTPM support, the value isv2.0.final StringIf the image is configured for NitroTPM support, the value isv2.0.final StringThe operation of the Amazon EC2 instance and the billing code that is associated with the AMI.final VirtualizationTypeThe type of virtualization of the AMI.final StringThe type of virtualization of the AMI.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
platformDetails
The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing information in the Amazon EC2 User Guide.
- Returns:
- The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing information in the Amazon EC2 User Guide.
-
usageOperation
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
usageOperationcorresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.- Returns:
- The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
usageOperationcorresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.
-
hasBlockDeviceMappings
public final boolean hasBlockDeviceMappings()For responses, this returns true if the service returned a value for the BlockDeviceMappings property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
blockDeviceMappings
Any block device mapping entries.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasBlockDeviceMappings()method.- Returns:
- Any block device mapping entries.
-
description
The description of the AMI that was provided during image creation.
- Returns:
- The description of the AMI that was provided during image creation.
-
enaSupport
Specifies whether enhanced networking with ENA is enabled.
- Returns:
- Specifies whether enhanced networking with ENA is enabled.
-
hypervisor
The hypervisor type of the image. Only
xenis supported.ovmis not supported.If the service returns an enum value that is not available in the current SDK version,
hypervisorwill returnHypervisorType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhypervisorAsString().- Returns:
- The hypervisor type of the image. Only
xenis supported.ovmis not supported. - See Also:
-
hypervisorAsString
The hypervisor type of the image. Only
xenis supported.ovmis not supported.If the service returns an enum value that is not available in the current SDK version,
hypervisorwill returnHypervisorType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhypervisorAsString().- Returns:
- The hypervisor type of the image. Only
xenis supported.ovmis not supported. - See Also:
-
imageOwnerAlias
The owner alias (
amazon|aws-marketplace).- Returns:
- The owner alias (
amazon|aws-marketplace).
-
name
The name of the AMI that was provided during image creation.
- Returns:
- The name of the AMI that was provided during image creation.
-
rootDeviceName
The device name of the root device volume (for example,
/dev/sda1).- Returns:
- The device name of the root device volume (for example,
/dev/sda1).
-
rootDeviceType
The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
If the service returns an enum value that is not available in the current SDK version,
rootDeviceTypewill returnDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrootDeviceTypeAsString().- Returns:
- The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
- See Also:
-
rootDeviceTypeAsString
The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
If the service returns an enum value that is not available in the current SDK version,
rootDeviceTypewill returnDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrootDeviceTypeAsString().- Returns:
- The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
- See Also:
-
sriovNetSupport
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
- Returns:
- Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
-
stateReason
The reason for the state change.
- Returns:
- The reason for the state change.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
Any tags assigned to the image.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- Any tags assigned to the image.
-
virtualizationType
The type of virtualization of the AMI.
If the service returns an enum value that is not available in the current SDK version,
virtualizationTypewill returnVirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromvirtualizationTypeAsString().- Returns:
- The type of virtualization of the AMI.
- See Also:
-
virtualizationTypeAsString
The type of virtualization of the AMI.
If the service returns an enum value that is not available in the current SDK version,
virtualizationTypewill returnVirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromvirtualizationTypeAsString().- Returns:
- The type of virtualization of the AMI.
- See Also:
-
bootMode
The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
If the service returns an enum value that is not available in the current SDK version,
bootModewill returnBootModeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombootModeAsString().- Returns:
- The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
- See Also:
-
bootModeAsString
The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
If the service returns an enum value that is not available in the current SDK version,
bootModewill returnBootModeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombootModeAsString().- Returns:
- The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
- See Also:
-
tpmSupport
If the image is configured for NitroTPM support, the value is
v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide.If the service returns an enum value that is not available in the current SDK version,
tpmSupportwill returnTpmSupportValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtpmSupportAsString().- Returns:
- If the image is configured for NitroTPM support, the value is
v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide. - See Also:
-
tpmSupportAsString
If the image is configured for NitroTPM support, the value is
v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide.If the service returns an enum value that is not available in the current SDK version,
tpmSupportwill returnTpmSupportValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtpmSupportAsString().- Returns:
- If the image is configured for NitroTPM support, the value is
v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide. - See Also:
-
deprecationTime
The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.
- Returns:
- The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.
-
imdsSupport
If
v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis set to2. For more information, see Configure the AMI in the Amazon EC2 User Guide.If the service returns an enum value that is not available in the current SDK version,
imdsSupportwill returnImdsSupportValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromimdsSupportAsString().- Returns:
- If
v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis set to2. For more information, see Configure the AMI in the Amazon EC2 User Guide. - See Also:
-
imdsSupportAsString
If
v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis set to2. For more information, see Configure the AMI in the Amazon EC2 User Guide.If the service returns an enum value that is not available in the current SDK version,
imdsSupportwill returnImdsSupportValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromimdsSupportAsString().- Returns:
- If
v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis set to2. For more information, see Configure the AMI in the Amazon EC2 User Guide. - See Also:
-
sourceInstanceId
The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field only appears if the AMI was created using CreateImage.
- Returns:
- The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field only appears if the AMI was created using CreateImage.
-
deregistrationProtection
Indicates whether deregistration protection is enabled for the AMI.
- Returns:
- Indicates whether deregistration protection is enabled for the AMI.
-
lastLaunchedTime
The date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.
lastLaunchedTimedata is available starting April 2017.- Returns:
- The date and time, in ISO 8601 date-time format, when the
AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a
24-hour delay before that usage is reported.
lastLaunchedTimedata is available starting April 2017.
-
imageId
-
imageLocation
-
state
The current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance.If the service returns an enum value that is not available in the current SDK version,
statewill returnImageState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - See Also:
-
stateAsString
The current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance.If the service returns an enum value that is not available in the current SDK version,
statewill returnImageState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - See Also:
-
ownerId
The ID of the Amazon Web Services account that owns the image.
- Returns:
- The ID of the Amazon Web Services account that owns the image.
-
creationDate
The date and time the image was created.
- Returns:
- The date and time the image was created.
-
hasProductCodes
public final boolean hasProductCodes()For responses, this returns true if the service returned a value for the ProductCodes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
productCodes
Any product codes associated with the AMI.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasProductCodes()method.- Returns:
- Any product codes associated with the AMI.
-
architecture
The architecture of the image.
If the service returns an enum value that is not available in the current SDK version,
architecturewill returnArchitectureValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromarchitectureAsString().- Returns:
- The architecture of the image.
- See Also:
-
architectureAsString
The architecture of the image.
If the service returns an enum value that is not available in the current SDK version,
architecturewill returnArchitectureValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromarchitectureAsString().- Returns:
- The architecture of the image.
- See Also:
-
imageType
The type of image.
If the service returns an enum value that is not available in the current SDK version,
imageTypewill returnImageTypeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromimageTypeAsString().- Returns:
- The type of image.
- See Also:
-
imageTypeAsString
The type of image.
If the service returns an enum value that is not available in the current SDK version,
imageTypewill returnImageTypeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromimageTypeAsString().- Returns:
- The type of image.
- See Also:
-
kernelId
The kernel associated with the image, if any. Only applicable for machine images.
- Returns:
- The kernel associated with the image, if any. Only applicable for machine images.
-
ramdiskId
The RAM disk associated with the image, if any. Only applicable for machine images.
- Returns:
- The RAM disk associated with the image, if any. Only applicable for machine images.
-
platform
This value is set to
windowsfor Windows AMIs; otherwise, it is blank.If the service returns an enum value that is not available in the current SDK version,
platformwill returnPlatformValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromplatformAsString().- Returns:
- This value is set to
windowsfor Windows AMIs; otherwise, it is blank. - See Also:
-
platformAsString
This value is set to
windowsfor Windows AMIs; otherwise, it is blank.If the service returns an enum value that is not available in the current SDK version,
platformwill returnPlatformValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromplatformAsString().- Returns:
- This value is set to
windowsfor Windows AMIs; otherwise, it is blank. - See Also:
-
publicLaunchPermissions
Indicates whether the image has public launch permissions. The value is
trueif this image has public launch permissions orfalseif it has only implicit and explicit launch permissions.- Returns:
- Indicates whether the image has public launch permissions. The value is
trueif this image has public launch permissions orfalseif it has only implicit and explicit launch permissions.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Image.Builder,Image> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-