com.pulumi.aws.ec2.outputs.GetAmiResult Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.ec2.outputs;
import com.pulumi.aws.ec2.outputs.GetAmiBlockDeviceMapping;
import com.pulumi.aws.ec2.outputs.GetAmiFilter;
import com.pulumi.aws.ec2.outputs.GetAmiProductCode;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class GetAmiResult {
/**
* @return OS architecture of the AMI (ie: `i386` or `x86_64`).
*
*/
private String architecture;
/**
* @return ARN of the AMI.
*
*/
private String arn;
/**
* @return Set of objects with block device mappings of the AMI.
*
*/
private List blockDeviceMappings;
/**
* @return Boot mode of the image.
*
*/
private String bootMode;
/**
* @return Date and time the image was created.
*
*/
private String creationDate;
/**
* @return Date and time when the image will be deprecated.
*
*/
private String deprecationTime;
/**
* @return Description of the AMI that was provided during image
* creation.
*
*/
private String description;
/**
* @return Whether enhanced networking with ENA is enabled.
*
*/
private Boolean enaSupport;
private @Nullable List executableUsers;
private @Nullable List filters;
/**
* @return Hypervisor type of the image.
*
*/
private String hypervisor;
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
private String id;
/**
* @return ID of the AMI. Should be the same as the resource `id`.
*
*/
private String imageId;
/**
* @return Location of the AMI.
*
*/
private String imageLocation;
/**
* @return AWS account alias (for example, `amazon`, `self`) or
* the AWS account ID of the AMI owner.
*
*/
private String imageOwnerAlias;
/**
* @return Type of image.
*
*/
private String imageType;
/**
* @return Instance Metadata Service (IMDS) support mode for the image. Set to `v2.0` if instances ran from this image enforce IMDSv2.
*
*/
private String imdsSupport;
private @Nullable Boolean includeDeprecated;
/**
* @return Kernel associated with the image, if any. Only applicable
* for machine images.
*
*/
private String kernelId;
private @Nullable Boolean mostRecent;
/**
* @return Name of the AMI that was provided during image creation.
*
*/
private String name;
private @Nullable String nameRegex;
/**
* @return AWS account ID of the image owner.
*
*/
private String ownerId;
private @Nullable List owners;
/**
* @return Value is Windows for `Windows` AMIs; otherwise blank.
*
*/
private String platform;
/**
* @return Platform details associated with the billing code of the AMI.
*
*/
private String platformDetails;
/**
* @return Any product codes associated with the AMI.
* * `product_codes.#.product_code_id` - The product code.
* * `product_codes.#.product_code_type` - The type of product code.
*
*/
private List productCodes;
/**
* @return `true` if the image has public launch permissions.
*
*/
private Boolean public_;
/**
* @return RAM disk associated with the image, if any. Only applicable
* for machine images.
*
*/
private String ramdiskId;
/**
* @return Device name of the root device.
*
*/
private String rootDeviceName;
/**
* @return Type of root device (ie: `ebs` or `instance-store`).
*
*/
private String rootDeviceType;
/**
* @return Snapshot id associated with the root device, if any
* (only applies to `ebs` root devices).
*
*/
private String rootSnapshotId;
/**
* @return Whether enhanced networking is enabled.
*
*/
private String sriovNetSupport;
/**
* @return Current state of the AMI. If the state is `available`, the image
* is successfully registered and can be used to launch an instance.
*
*/
private String state;
/**
* @return Describes a state change. Fields are `UNSET` if not available.
*
*/
private Map stateReason;
/**
* @return Any tags assigned to the image.
* * `tags.#.key` - Key name of the tag.
* * `tags.#.value` - Value of the tag.
*
*/
private Map tags;
/**
* @return If the image is configured for NitroTPM support, the value is `v2.0`.
*
*/
private String tpmSupport;
/**
* @return Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
*
*/
private String usageOperation;
/**
* @return Type of virtualization of the AMI (ie: `hvm` or
* `paravirtual`).
*
*/
private String virtualizationType;
private GetAmiResult() {}
/**
* @return OS architecture of the AMI (ie: `i386` or `x86_64`).
*
*/
public String architecture() {
return this.architecture;
}
/**
* @return ARN of the AMI.
*
*/
public String arn() {
return this.arn;
}
/**
* @return Set of objects with block device mappings of the AMI.
*
*/
public List blockDeviceMappings() {
return this.blockDeviceMappings;
}
/**
* @return Boot mode of the image.
*
*/
public String bootMode() {
return this.bootMode;
}
/**
* @return Date and time the image was created.
*
*/
public String creationDate() {
return this.creationDate;
}
/**
* @return Date and time when the image will be deprecated.
*
*/
public String deprecationTime() {
return this.deprecationTime;
}
/**
* @return Description of the AMI that was provided during image
* creation.
*
*/
public String description() {
return this.description;
}
/**
* @return Whether enhanced networking with ENA is enabled.
*
*/
public Boolean enaSupport() {
return this.enaSupport;
}
public List executableUsers() {
return this.executableUsers == null ? List.of() : this.executableUsers;
}
public List filters() {
return this.filters == null ? List.of() : this.filters;
}
/**
* @return Hypervisor type of the image.
*
*/
public String hypervisor() {
return this.hypervisor;
}
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
public String id() {
return this.id;
}
/**
* @return ID of the AMI. Should be the same as the resource `id`.
*
*/
public String imageId() {
return this.imageId;
}
/**
* @return Location of the AMI.
*
*/
public String imageLocation() {
return this.imageLocation;
}
/**
* @return AWS account alias (for example, `amazon`, `self`) or
* the AWS account ID of the AMI owner.
*
*/
public String imageOwnerAlias() {
return this.imageOwnerAlias;
}
/**
* @return Type of image.
*
*/
public String imageType() {
return this.imageType;
}
/**
* @return Instance Metadata Service (IMDS) support mode for the image. Set to `v2.0` if instances ran from this image enforce IMDSv2.
*
*/
public String imdsSupport() {
return this.imdsSupport;
}
public Optional includeDeprecated() {
return Optional.ofNullable(this.includeDeprecated);
}
/**
* @return Kernel associated with the image, if any. Only applicable
* for machine images.
*
*/
public String kernelId() {
return this.kernelId;
}
public Optional mostRecent() {
return Optional.ofNullable(this.mostRecent);
}
/**
* @return Name of the AMI that was provided during image creation.
*
*/
public String name() {
return this.name;
}
public Optional nameRegex() {
return Optional.ofNullable(this.nameRegex);
}
/**
* @return AWS account ID of the image owner.
*
*/
public String ownerId() {
return this.ownerId;
}
public List owners() {
return this.owners == null ? List.of() : this.owners;
}
/**
* @return Value is Windows for `Windows` AMIs; otherwise blank.
*
*/
public String platform() {
return this.platform;
}
/**
* @return Platform details associated with the billing code of the AMI.
*
*/
public String platformDetails() {
return this.platformDetails;
}
/**
* @return Any product codes associated with the AMI.
* * `product_codes.#.product_code_id` - The product code.
* * `product_codes.#.product_code_type` - The type of product code.
*
*/
public List productCodes() {
return this.productCodes;
}
/**
* @return `true` if the image has public launch permissions.
*
*/
public Boolean public_() {
return this.public_;
}
/**
* @return RAM disk associated with the image, if any. Only applicable
* for machine images.
*
*/
public String ramdiskId() {
return this.ramdiskId;
}
/**
* @return Device name of the root device.
*
*/
public String rootDeviceName() {
return this.rootDeviceName;
}
/**
* @return Type of root device (ie: `ebs` or `instance-store`).
*
*/
public String rootDeviceType() {
return this.rootDeviceType;
}
/**
* @return Snapshot id associated with the root device, if any
* (only applies to `ebs` root devices).
*
*/
public String rootSnapshotId() {
return this.rootSnapshotId;
}
/**
* @return Whether enhanced networking is enabled.
*
*/
public String sriovNetSupport() {
return this.sriovNetSupport;
}
/**
* @return Current state of the AMI. If the state is `available`, the image
* is successfully registered and can be used to launch an instance.
*
*/
public String state() {
return this.state;
}
/**
* @return Describes a state change. Fields are `UNSET` if not available.
*
*/
public Map stateReason() {
return this.stateReason;
}
/**
* @return Any tags assigned to the image.
* * `tags.#.key` - Key name of the tag.
* * `tags.#.value` - Value of the tag.
*
*/
public Map tags() {
return this.tags;
}
/**
* @return If the image is configured for NitroTPM support, the value is `v2.0`.
*
*/
public String tpmSupport() {
return this.tpmSupport;
}
/**
* @return Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
*
*/
public String usageOperation() {
return this.usageOperation;
}
/**
* @return Type of virtualization of the AMI (ie: `hvm` or
* `paravirtual`).
*
*/
public String virtualizationType() {
return this.virtualizationType;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetAmiResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String architecture;
private String arn;
private List blockDeviceMappings;
private String bootMode;
private String creationDate;
private String deprecationTime;
private String description;
private Boolean enaSupport;
private @Nullable List executableUsers;
private @Nullable List filters;
private String hypervisor;
private String id;
private String imageId;
private String imageLocation;
private String imageOwnerAlias;
private String imageType;
private String imdsSupport;
private @Nullable Boolean includeDeprecated;
private String kernelId;
private @Nullable Boolean mostRecent;
private String name;
private @Nullable String nameRegex;
private String ownerId;
private @Nullable List owners;
private String platform;
private String platformDetails;
private List productCodes;
private Boolean public_;
private String ramdiskId;
private String rootDeviceName;
private String rootDeviceType;
private String rootSnapshotId;
private String sriovNetSupport;
private String state;
private Map stateReason;
private Map tags;
private String tpmSupport;
private String usageOperation;
private String virtualizationType;
public Builder() {}
public Builder(GetAmiResult defaults) {
Objects.requireNonNull(defaults);
this.architecture = defaults.architecture;
this.arn = defaults.arn;
this.blockDeviceMappings = defaults.blockDeviceMappings;
this.bootMode = defaults.bootMode;
this.creationDate = defaults.creationDate;
this.deprecationTime = defaults.deprecationTime;
this.description = defaults.description;
this.enaSupport = defaults.enaSupport;
this.executableUsers = defaults.executableUsers;
this.filters = defaults.filters;
this.hypervisor = defaults.hypervisor;
this.id = defaults.id;
this.imageId = defaults.imageId;
this.imageLocation = defaults.imageLocation;
this.imageOwnerAlias = defaults.imageOwnerAlias;
this.imageType = defaults.imageType;
this.imdsSupport = defaults.imdsSupport;
this.includeDeprecated = defaults.includeDeprecated;
this.kernelId = defaults.kernelId;
this.mostRecent = defaults.mostRecent;
this.name = defaults.name;
this.nameRegex = defaults.nameRegex;
this.ownerId = defaults.ownerId;
this.owners = defaults.owners;
this.platform = defaults.platform;
this.platformDetails = defaults.platformDetails;
this.productCodes = defaults.productCodes;
this.public_ = defaults.public_;
this.ramdiskId = defaults.ramdiskId;
this.rootDeviceName = defaults.rootDeviceName;
this.rootDeviceType = defaults.rootDeviceType;
this.rootSnapshotId = defaults.rootSnapshotId;
this.sriovNetSupport = defaults.sriovNetSupport;
this.state = defaults.state;
this.stateReason = defaults.stateReason;
this.tags = defaults.tags;
this.tpmSupport = defaults.tpmSupport;
this.usageOperation = defaults.usageOperation;
this.virtualizationType = defaults.virtualizationType;
}
@CustomType.Setter
public Builder architecture(String architecture) {
if (architecture == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "architecture");
}
this.architecture = architecture;
return this;
}
@CustomType.Setter
public Builder arn(String arn) {
if (arn == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "arn");
}
this.arn = arn;
return this;
}
@CustomType.Setter
public Builder blockDeviceMappings(List blockDeviceMappings) {
if (blockDeviceMappings == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "blockDeviceMappings");
}
this.blockDeviceMappings = blockDeviceMappings;
return this;
}
public Builder blockDeviceMappings(GetAmiBlockDeviceMapping... blockDeviceMappings) {
return blockDeviceMappings(List.of(blockDeviceMappings));
}
@CustomType.Setter
public Builder bootMode(String bootMode) {
if (bootMode == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "bootMode");
}
this.bootMode = bootMode;
return this;
}
@CustomType.Setter
public Builder creationDate(String creationDate) {
if (creationDate == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "creationDate");
}
this.creationDate = creationDate;
return this;
}
@CustomType.Setter
public Builder deprecationTime(String deprecationTime) {
if (deprecationTime == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "deprecationTime");
}
this.deprecationTime = deprecationTime;
return this;
}
@CustomType.Setter
public Builder description(String description) {
if (description == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "description");
}
this.description = description;
return this;
}
@CustomType.Setter
public Builder enaSupport(Boolean enaSupport) {
if (enaSupport == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "enaSupport");
}
this.enaSupport = enaSupport;
return this;
}
@CustomType.Setter
public Builder executableUsers(@Nullable List executableUsers) {
this.executableUsers = executableUsers;
return this;
}
public Builder executableUsers(String... executableUsers) {
return executableUsers(List.of(executableUsers));
}
@CustomType.Setter
public Builder filters(@Nullable List filters) {
this.filters = filters;
return this;
}
public Builder filters(GetAmiFilter... filters) {
return filters(List.of(filters));
}
@CustomType.Setter
public Builder hypervisor(String hypervisor) {
if (hypervisor == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "hypervisor");
}
this.hypervisor = hypervisor;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder imageId(String imageId) {
if (imageId == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "imageId");
}
this.imageId = imageId;
return this;
}
@CustomType.Setter
public Builder imageLocation(String imageLocation) {
if (imageLocation == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "imageLocation");
}
this.imageLocation = imageLocation;
return this;
}
@CustomType.Setter
public Builder imageOwnerAlias(String imageOwnerAlias) {
if (imageOwnerAlias == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "imageOwnerAlias");
}
this.imageOwnerAlias = imageOwnerAlias;
return this;
}
@CustomType.Setter
public Builder imageType(String imageType) {
if (imageType == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "imageType");
}
this.imageType = imageType;
return this;
}
@CustomType.Setter
public Builder imdsSupport(String imdsSupport) {
if (imdsSupport == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "imdsSupport");
}
this.imdsSupport = imdsSupport;
return this;
}
@CustomType.Setter
public Builder includeDeprecated(@Nullable Boolean includeDeprecated) {
this.includeDeprecated = includeDeprecated;
return this;
}
@CustomType.Setter
public Builder kernelId(String kernelId) {
if (kernelId == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "kernelId");
}
this.kernelId = kernelId;
return this;
}
@CustomType.Setter
public Builder mostRecent(@Nullable Boolean mostRecent) {
this.mostRecent = mostRecent;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder nameRegex(@Nullable String nameRegex) {
this.nameRegex = nameRegex;
return this;
}
@CustomType.Setter
public Builder ownerId(String ownerId) {
if (ownerId == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "ownerId");
}
this.ownerId = ownerId;
return this;
}
@CustomType.Setter
public Builder owners(@Nullable List owners) {
this.owners = owners;
return this;
}
public Builder owners(String... owners) {
return owners(List.of(owners));
}
@CustomType.Setter
public Builder platform(String platform) {
if (platform == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "platform");
}
this.platform = platform;
return this;
}
@CustomType.Setter
public Builder platformDetails(String platformDetails) {
if (platformDetails == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "platformDetails");
}
this.platformDetails = platformDetails;
return this;
}
@CustomType.Setter
public Builder productCodes(List productCodes) {
if (productCodes == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "productCodes");
}
this.productCodes = productCodes;
return this;
}
public Builder productCodes(GetAmiProductCode... productCodes) {
return productCodes(List.of(productCodes));
}
@CustomType.Setter("public")
public Builder public_(Boolean public_) {
if (public_ == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "public_");
}
this.public_ = public_;
return this;
}
@CustomType.Setter
public Builder ramdiskId(String ramdiskId) {
if (ramdiskId == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "ramdiskId");
}
this.ramdiskId = ramdiskId;
return this;
}
@CustomType.Setter
public Builder rootDeviceName(String rootDeviceName) {
if (rootDeviceName == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "rootDeviceName");
}
this.rootDeviceName = rootDeviceName;
return this;
}
@CustomType.Setter
public Builder rootDeviceType(String rootDeviceType) {
if (rootDeviceType == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "rootDeviceType");
}
this.rootDeviceType = rootDeviceType;
return this;
}
@CustomType.Setter
public Builder rootSnapshotId(String rootSnapshotId) {
if (rootSnapshotId == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "rootSnapshotId");
}
this.rootSnapshotId = rootSnapshotId;
return this;
}
@CustomType.Setter
public Builder sriovNetSupport(String sriovNetSupport) {
if (sriovNetSupport == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "sriovNetSupport");
}
this.sriovNetSupport = sriovNetSupport;
return this;
}
@CustomType.Setter
public Builder state(String state) {
if (state == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "state");
}
this.state = state;
return this;
}
@CustomType.Setter
public Builder stateReason(Map stateReason) {
if (stateReason == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "stateReason");
}
this.stateReason = stateReason;
return this;
}
@CustomType.Setter
public Builder tags(Map tags) {
if (tags == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "tags");
}
this.tags = tags;
return this;
}
@CustomType.Setter
public Builder tpmSupport(String tpmSupport) {
if (tpmSupport == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "tpmSupport");
}
this.tpmSupport = tpmSupport;
return this;
}
@CustomType.Setter
public Builder usageOperation(String usageOperation) {
if (usageOperation == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "usageOperation");
}
this.usageOperation = usageOperation;
return this;
}
@CustomType.Setter
public Builder virtualizationType(String virtualizationType) {
if (virtualizationType == null) {
throw new MissingRequiredPropertyException("GetAmiResult", "virtualizationType");
}
this.virtualizationType = virtualizationType;
return this;
}
public GetAmiResult build() {
final var _resultValue = new GetAmiResult();
_resultValue.architecture = architecture;
_resultValue.arn = arn;
_resultValue.blockDeviceMappings = blockDeviceMappings;
_resultValue.bootMode = bootMode;
_resultValue.creationDate = creationDate;
_resultValue.deprecationTime = deprecationTime;
_resultValue.description = description;
_resultValue.enaSupport = enaSupport;
_resultValue.executableUsers = executableUsers;
_resultValue.filters = filters;
_resultValue.hypervisor = hypervisor;
_resultValue.id = id;
_resultValue.imageId = imageId;
_resultValue.imageLocation = imageLocation;
_resultValue.imageOwnerAlias = imageOwnerAlias;
_resultValue.imageType = imageType;
_resultValue.imdsSupport = imdsSupport;
_resultValue.includeDeprecated = includeDeprecated;
_resultValue.kernelId = kernelId;
_resultValue.mostRecent = mostRecent;
_resultValue.name = name;
_resultValue.nameRegex = nameRegex;
_resultValue.ownerId = ownerId;
_resultValue.owners = owners;
_resultValue.platform = platform;
_resultValue.platformDetails = platformDetails;
_resultValue.productCodes = productCodes;
_resultValue.public_ = public_;
_resultValue.ramdiskId = ramdiskId;
_resultValue.rootDeviceName = rootDeviceName;
_resultValue.rootDeviceType = rootDeviceType;
_resultValue.rootSnapshotId = rootSnapshotId;
_resultValue.sriovNetSupport = sriovNetSupport;
_resultValue.state = state;
_resultValue.stateReason = stateReason;
_resultValue.tags = tags;
_resultValue.tpmSupport = tpmSupport;
_resultValue.usageOperation = usageOperation;
_resultValue.virtualizationType = virtualizationType;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy