Interface Image.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<Image.Builder,Image>
,SdkBuilder<Image.Builder,Image>
,SdkPojo
- Enclosing class:
- Image
public static interface Image.Builder extends SdkPojo, CopyableBuilder<Image.Builder,Image>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Image.Builder
architecture(String architecture)
The architecture of the image.Image.Builder
architecture(ArchitectureValues architecture)
The architecture of the image.Image.Builder
blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Any block device mapping entries.Image.Builder
blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
Any block device mapping entries.Image.Builder
blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Any block device mapping entries.Image.Builder
bootMode(String bootMode)
The boot mode of the image.Image.Builder
bootMode(BootModeValues bootMode)
The boot mode of the image.Image.Builder
creationDate(String creationDate)
The date and time the image was created.Image.Builder
deprecationTime(String deprecationTime)
The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ.Image.Builder
description(String description)
The description of the AMI that was provided during image creation.Image.Builder
enaSupport(Boolean enaSupport)
Specifies whether enhanced networking with ENA is enabled.Image.Builder
hypervisor(String hypervisor)
The hypervisor type of the image.Image.Builder
hypervisor(HypervisorType hypervisor)
The hypervisor type of the image.Image.Builder
imageId(String imageId)
The ID of the AMI.Image.Builder
imageLocation(String imageLocation)
The location of the AMI.Image.Builder
imageOwnerAlias(String imageOwnerAlias)
The Amazon Web Services account alias (for example,amazon
,self
) or the Amazon Web Services account ID of the AMI owner.Image.Builder
imageType(String imageType)
The type of image.Image.Builder
imageType(ImageTypeValues imageType)
The type of image.Image.Builder
imdsSupport(String imdsSupport)
Ifv2.0
, it indicates that IMDSv2 is specified in the AMI.Image.Builder
imdsSupport(ImdsSupportValues imdsSupport)
Ifv2.0
, it indicates that IMDSv2 is specified in the AMI.Image.Builder
kernelId(String kernelId)
The kernel associated with the image, if any.Image.Builder
name(String name)
The name of the AMI that was provided during image creation.Image.Builder
ownerId(String ownerId)
The ID of the Amazon Web Services account that owns the image.Image.Builder
platform(String platform)
This value is set towindows
for Windows AMIs; otherwise, it is blank.Image.Builder
platform(PlatformValues platform)
This value is set towindows
for Windows AMIs; otherwise, it is blank.Image.Builder
platformDetails(String platformDetails)
The platform details associated with the billing code of the AMI.Image.Builder
productCodes(Collection<ProductCode> productCodes)
Any product codes associated with the AMI.Image.Builder
productCodes(Consumer<ProductCode.Builder>... productCodes)
Any product codes associated with the AMI.Image.Builder
productCodes(ProductCode... productCodes)
Any product codes associated with the AMI.Image.Builder
publicLaunchPermissions(Boolean publicLaunchPermissions)
Indicates whether the image has public launch permissions.Image.Builder
ramdiskId(String ramdiskId)
The RAM disk associated with the image, if any.Image.Builder
rootDeviceName(String rootDeviceName)
The device name of the root device volume (for example,/dev/sda1
).Image.Builder
rootDeviceType(String rootDeviceType)
The type of root device used by the AMI.Image.Builder
rootDeviceType(DeviceType rootDeviceType)
The type of root device used by the AMI.Image.Builder
sourceInstanceId(String sourceInstanceId)
The ID of the instance that the AMI was created from if the AMI was created using CreateImage.Image.Builder
sriovNetSupport(String sriovNetSupport)
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.Image.Builder
state(String state)
The current state of the AMI.Image.Builder
state(ImageState state)
The current state of the AMI.default Image.Builder
stateReason(Consumer<StateReason.Builder> stateReason)
The reason for the state change.Image.Builder
stateReason(StateReason stateReason)
The reason for the state change.Image.Builder
tags(Collection<Tag> tags)
Any tags assigned to the image.Image.Builder
tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the image.Image.Builder
tags(Tag... tags)
Any tags assigned to the image.Image.Builder
tpmSupport(String tpmSupport)
If the image is configured for NitroTPM support, the value isv2.0
.Image.Builder
tpmSupport(TpmSupportValues tpmSupport)
If the image is configured for NitroTPM support, the value isv2.0
.Image.Builder
usageOperation(String usageOperation)
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.Image.Builder
virtualizationType(String virtualizationType)
The type of virtualization of the AMI.Image.Builder
virtualizationType(VirtualizationType virtualizationType)
The type of virtualization of the AMI.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
architecture
Image.Builder architecture(String architecture)
The architecture of the image.
- Parameters:
architecture
- The architecture of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ArchitectureValues
,ArchitectureValues
-
architecture
Image.Builder architecture(ArchitectureValues architecture)
The architecture of the image.
- Parameters:
architecture
- The architecture of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ArchitectureValues
,ArchitectureValues
-
creationDate
Image.Builder creationDate(String creationDate)
The date and time the image was created.
- Parameters:
creationDate
- The date and time the image was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageId
Image.Builder imageId(String imageId)
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageLocation
Image.Builder imageLocation(String imageLocation)
The location of the AMI.
- Parameters:
imageLocation
- The location of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageType
Image.Builder imageType(String imageType)
The type of image.
- Parameters:
imageType
- The type of image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageTypeValues
,ImageTypeValues
-
imageType
Image.Builder imageType(ImageTypeValues imageType)
The type of image.
- Parameters:
imageType
- The type of image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageTypeValues
,ImageTypeValues
-
kernelId
Image.Builder kernelId(String kernelId)
The kernel associated with the image, if any. Only applicable for machine images.
- Parameters:
kernelId
- The kernel associated with the image, if any. Only applicable for machine images.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ownerId
Image.Builder ownerId(String ownerId)
The ID of the Amazon Web Services account that owns the image.
- Parameters:
ownerId
- The ID of the Amazon Web Services account that owns the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
platform
Image.Builder platform(String platform)
This value is set to
windows
for Windows AMIs; otherwise, it is blank.- Parameters:
platform
- This value is set towindows
for Windows AMIs; otherwise, it is blank.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PlatformValues
,PlatformValues
-
platform
Image.Builder platform(PlatformValues platform)
This value is set to
windows
for Windows AMIs; otherwise, it is blank.- Parameters:
platform
- This value is set towindows
for Windows AMIs; otherwise, it is blank.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PlatformValues
,PlatformValues
-
platformDetails
Image.Builder platformDetails(String 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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
usageOperation
Image.Builder usageOperation(String usageOperation)
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
usageOperation
corresponds 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.- Parameters:
usageOperation
- The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.usageOperation
corresponds 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:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
Image.Builder productCodes(Collection<ProductCode> productCodes)
Any product codes associated with the AMI.
- Parameters:
productCodes
- Any product codes associated with the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
Image.Builder productCodes(ProductCode... productCodes)
Any product codes associated with the AMI.
- Parameters:
productCodes
- Any product codes associated with the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
Image.Builder productCodes(Consumer<ProductCode.Builder>... productCodes)
Any product codes associated with the AMI.
This is a convenience method that creates an instance of theProductCode.Builder
avoiding the need to create one manually viaProductCode.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#productCodes(List
.) - Parameters:
productCodes
- a consumer that will call methods onProductCode.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#productCodes(java.util.Collection
)
-
ramdiskId
Image.Builder ramdiskId(String ramdiskId)
The RAM disk associated with the image, if any. Only applicable for machine images.
- Parameters:
ramdiskId
- The RAM disk associated with the image, if any. Only applicable for machine images.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
state
Image.Builder state(String 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.- Parameters:
state
- The current state of the AMI. If the state isavailable
, the image is successfully registered and can be used to launch an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageState
,ImageState
-
state
Image.Builder state(ImageState 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.- Parameters:
state
- The current state of the AMI. If the state isavailable
, the image is successfully registered and can be used to launch an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageState
,ImageState
-
blockDeviceMappings
Image.Builder blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Any block device mapping entries.
- Parameters:
blockDeviceMappings
- Any block device mapping entries.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockDeviceMappings
Image.Builder blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Any block device mapping entries.
- Parameters:
blockDeviceMappings
- Any block device mapping entries.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockDeviceMappings
Image.Builder blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
Any block device mapping entries.
This is a convenience method that creates an instance of theBlockDeviceMapping.Builder
avoiding the need to create one manually viaBlockDeviceMapping.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#blockDeviceMappings(List
.) - Parameters:
blockDeviceMappings
- a consumer that will call methods onBlockDeviceMapping.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#blockDeviceMappings(java.util.Collection
)
-
description
Image.Builder description(String description)
The description of the AMI that was provided during image creation.
- Parameters:
description
- The description of the AMI that was provided during image creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
enaSupport
Image.Builder enaSupport(Boolean enaSupport)
Specifies whether enhanced networking with ENA is enabled.
- Parameters:
enaSupport
- Specifies whether enhanced networking with ENA is enabled.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
hypervisor
Image.Builder hypervisor(String hypervisor)
The hypervisor type of the image. Only
xen
is supported.ovm
is not supported.- Parameters:
hypervisor
- The hypervisor type of the image. Onlyxen
is supported.ovm
is not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
HypervisorType
,HypervisorType
-
hypervisor
Image.Builder hypervisor(HypervisorType hypervisor)
The hypervisor type of the image. Only
xen
is supported.ovm
is not supported.- Parameters:
hypervisor
- The hypervisor type of the image. Onlyxen
is supported.ovm
is not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
HypervisorType
,HypervisorType
-
imageOwnerAlias
Image.Builder imageOwnerAlias(String imageOwnerAlias)
The Amazon Web Services account alias (for example,
amazon
,self
) or the Amazon Web Services account ID of the AMI owner.- Parameters:
imageOwnerAlias
- The Amazon Web Services account alias (for example,amazon
,self
) or the Amazon Web Services account ID of the AMI owner.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
name
Image.Builder name(String name)
The name of the AMI that was provided during image creation.
- Parameters:
name
- The name of the AMI that was provided during image creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
rootDeviceName
Image.Builder rootDeviceName(String rootDeviceName)
The device name of the root device volume (for example,
/dev/sda1
).- Parameters:
rootDeviceName
- The device name of the root device volume (for example,/dev/sda1
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
rootDeviceType
Image.Builder rootDeviceType(String rootDeviceType)
The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
- Parameters:
rootDeviceType
- The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DeviceType
,DeviceType
-
rootDeviceType
Image.Builder rootDeviceType(DeviceType rootDeviceType)
The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.
- Parameters:
rootDeviceType
- The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DeviceType
,DeviceType
-
sriovNetSupport
Image.Builder sriovNetSupport(String sriovNetSupport)
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
- Parameters:
sriovNetSupport
- Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateReason
Image.Builder stateReason(StateReason stateReason)
The reason for the state change.
- Parameters:
stateReason
- The reason for the state change.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateReason
default Image.Builder stateReason(Consumer<StateReason.Builder> stateReason)
The reason for the state change.
This is a convenience method that creates an instance of theStateReason.Builder
avoiding the need to create one manually viaStateReason.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tostateReason(StateReason)
.- Parameters:
stateReason
- a consumer that will call methods onStateReason.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
stateReason(StateReason)
-
tags
Image.Builder tags(Collection<Tag> tags)
Any tags assigned to the image.
- Parameters:
tags
- Any tags assigned to the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Image.Builder tags(Tag... tags)
Any tags assigned to the image.
- Parameters:
tags
- Any tags assigned to the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Image.Builder tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the image.
This is a convenience method that creates an instance of theTag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#tags(List
.) - Parameters:
tags
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tags(java.util.Collection
)
-
virtualizationType
Image.Builder virtualizationType(String virtualizationType)
The type of virtualization of the AMI.
- Parameters:
virtualizationType
- The type of virtualization of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VirtualizationType
,VirtualizationType
-
virtualizationType
Image.Builder virtualizationType(VirtualizationType virtualizationType)
The type of virtualization of the AMI.
- Parameters:
virtualizationType
- The type of virtualization of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VirtualizationType
,VirtualizationType
-
bootMode
Image.Builder bootMode(String bootMode)
The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
- Parameters:
bootMode
- The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
BootModeValues
,BootModeValues
-
bootMode
Image.Builder bootMode(BootModeValues bootMode)
The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.
- Parameters:
bootMode
- The boot mode of the image. For more information, see Boot modes in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
BootModeValues
,BootModeValues
-
tpmSupport
Image.Builder tpmSupport(String 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.- Parameters:
tpmSupport
- If the image is configured for NitroTPM support, the value isv2.0
. For more information, see NitroTPM in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TpmSupportValues
,TpmSupportValues
-
tpmSupport
Image.Builder tpmSupport(TpmSupportValues 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.- Parameters:
tpmSupport
- If the image is configured for NitroTPM support, the value isv2.0
. For more information, see NitroTPM in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TpmSupportValues
,TpmSupportValues
-
deprecationTime
Image.Builder deprecationTime(String 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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
imdsSupport
Image.Builder imdsSupport(String imdsSupport)
If
v2.0
, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokens
automatically set torequired
so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimit
is set to2
. For more information, see Configure the AMI in the Amazon EC2 User Guide.- Parameters:
imdsSupport
- Ifv2.0
, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokens
automatically set torequired
so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimit
is set to2
. For more information, see Configure the AMI in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImdsSupportValues
,ImdsSupportValues
-
imdsSupport
Image.Builder imdsSupport(ImdsSupportValues imdsSupport)
If
v2.0
, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokens
automatically set torequired
so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimit
is set to2
. For more information, see Configure the AMI in the Amazon EC2 User Guide.- Parameters:
imdsSupport
- Ifv2.0
, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokens
automatically set torequired
so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimit
is set to2
. For more information, see Configure the AMI in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImdsSupportValues
,ImdsSupportValues
-
sourceInstanceId
Image.Builder sourceInstanceId(String 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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
publicLaunchPermissions
Image.Builder publicLaunchPermissions(Boolean publicLaunchPermissions)
Indicates whether the image has public launch permissions. The value is
true
if this image has public launch permissions orfalse
if it has only implicit and explicit launch permissions.- Parameters:
publicLaunchPermissions
- Indicates whether the image has public launch permissions. The value istrue
if this image has public launch permissions orfalse
if it has only implicit and explicit launch permissions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-