All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.ec2.outputs.GetSubnetResult 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.GetSubnetFilter;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class GetSubnetResult {
    /**
     * @return ARN of the subnet.
     * 
     */
    private String arn;
    /**
     * @return Whether an IPv6 address is assigned on creation.
     * 
     */
    private Boolean assignIpv6AddressOnCreation;
    private String availabilityZone;
    private String availabilityZoneId;
    /**
     * @return Available IP addresses of the subnet.
     * 
     */
    private Integer availableIpAddressCount;
    private String cidrBlock;
    /**
     * @return Identifier of customer owned IPv4 address pool.
     * 
     */
    private String customerOwnedIpv4Pool;
    private Boolean defaultForAz;
    /**
     * @return Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
     * 
     */
    private Boolean enableDns64;
    /**
     * @return Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
     * 
     */
    private Integer enableLniAtDeviceIndex;
    /**
     * @return Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
     * 
     */
    private Boolean enableResourceNameDnsARecordOnLaunch;
    /**
     * @return Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
     * 
     */
    private Boolean enableResourceNameDnsAaaaRecordOnLaunch;
    private @Nullable List filters;
    private String id;
    private String ipv6CidrBlock;
    /**
     * @return Association ID of the IPv6 CIDR block.
     * 
     */
    private String ipv6CidrBlockAssociationId;
    /**
     * @return Whether this is an IPv6-only subnet.
     * 
     */
    private Boolean ipv6Native;
    /**
     * @return Whether customer owned IP addresses are assigned on network interface creation.
     * 
     */
    private Boolean mapCustomerOwnedIpOnLaunch;
    /**
     * @return Whether public IP addresses are assigned on instance launch.
     * 
     */
    private Boolean mapPublicIpOnLaunch;
    /**
     * @return ARN of the Outpost.
     * 
     */
    private String outpostArn;
    /**
     * @return ID of the AWS account that owns the subnet.
     * 
     */
    private String ownerId;
    /**
     * @return The type of hostnames assigned to instances in the subnet at launch.
     * 
     */
    private String privateDnsHostnameTypeOnLaunch;
    private String state;
    private Map tags;
    private String vpcId;

    private GetSubnetResult() {}
    /**
     * @return ARN of the subnet.
     * 
     */
    public String arn() {
        return this.arn;
    }
    /**
     * @return Whether an IPv6 address is assigned on creation.
     * 
     */
    public Boolean assignIpv6AddressOnCreation() {
        return this.assignIpv6AddressOnCreation;
    }
    public String availabilityZone() {
        return this.availabilityZone;
    }
    public String availabilityZoneId() {
        return this.availabilityZoneId;
    }
    /**
     * @return Available IP addresses of the subnet.
     * 
     */
    public Integer availableIpAddressCount() {
        return this.availableIpAddressCount;
    }
    public String cidrBlock() {
        return this.cidrBlock;
    }
    /**
     * @return Identifier of customer owned IPv4 address pool.
     * 
     */
    public String customerOwnedIpv4Pool() {
        return this.customerOwnedIpv4Pool;
    }
    public Boolean defaultForAz() {
        return this.defaultForAz;
    }
    /**
     * @return Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
     * 
     */
    public Boolean enableDns64() {
        return this.enableDns64;
    }
    /**
     * @return Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
     * 
     */
    public Integer enableLniAtDeviceIndex() {
        return this.enableLniAtDeviceIndex;
    }
    /**
     * @return Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
     * 
     */
    public Boolean enableResourceNameDnsARecordOnLaunch() {
        return this.enableResourceNameDnsARecordOnLaunch;
    }
    /**
     * @return Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
     * 
     */
    public Boolean enableResourceNameDnsAaaaRecordOnLaunch() {
        return this.enableResourceNameDnsAaaaRecordOnLaunch;
    }
    public List filters() {
        return this.filters == null ? List.of() : this.filters;
    }
    public String id() {
        return this.id;
    }
    public String ipv6CidrBlock() {
        return this.ipv6CidrBlock;
    }
    /**
     * @return Association ID of the IPv6 CIDR block.
     * 
     */
    public String ipv6CidrBlockAssociationId() {
        return this.ipv6CidrBlockAssociationId;
    }
    /**
     * @return Whether this is an IPv6-only subnet.
     * 
     */
    public Boolean ipv6Native() {
        return this.ipv6Native;
    }
    /**
     * @return Whether customer owned IP addresses are assigned on network interface creation.
     * 
     */
    public Boolean mapCustomerOwnedIpOnLaunch() {
        return this.mapCustomerOwnedIpOnLaunch;
    }
    /**
     * @return Whether public IP addresses are assigned on instance launch.
     * 
     */
    public Boolean mapPublicIpOnLaunch() {
        return this.mapPublicIpOnLaunch;
    }
    /**
     * @return ARN of the Outpost.
     * 
     */
    public String outpostArn() {
        return this.outpostArn;
    }
    /**
     * @return ID of the AWS account that owns the subnet.
     * 
     */
    public String ownerId() {
        return this.ownerId;
    }
    /**
     * @return The type of hostnames assigned to instances in the subnet at launch.
     * 
     */
    public String privateDnsHostnameTypeOnLaunch() {
        return this.privateDnsHostnameTypeOnLaunch;
    }
    public String state() {
        return this.state;
    }
    public Map tags() {
        return this.tags;
    }
    public String vpcId() {
        return this.vpcId;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(GetSubnetResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String arn;
        private Boolean assignIpv6AddressOnCreation;
        private String availabilityZone;
        private String availabilityZoneId;
        private Integer availableIpAddressCount;
        private String cidrBlock;
        private String customerOwnedIpv4Pool;
        private Boolean defaultForAz;
        private Boolean enableDns64;
        private Integer enableLniAtDeviceIndex;
        private Boolean enableResourceNameDnsARecordOnLaunch;
        private Boolean enableResourceNameDnsAaaaRecordOnLaunch;
        private @Nullable List filters;
        private String id;
        private String ipv6CidrBlock;
        private String ipv6CidrBlockAssociationId;
        private Boolean ipv6Native;
        private Boolean mapCustomerOwnedIpOnLaunch;
        private Boolean mapPublicIpOnLaunch;
        private String outpostArn;
        private String ownerId;
        private String privateDnsHostnameTypeOnLaunch;
        private String state;
        private Map tags;
        private String vpcId;
        public Builder() {}
        public Builder(GetSubnetResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.arn = defaults.arn;
    	      this.assignIpv6AddressOnCreation = defaults.assignIpv6AddressOnCreation;
    	      this.availabilityZone = defaults.availabilityZone;
    	      this.availabilityZoneId = defaults.availabilityZoneId;
    	      this.availableIpAddressCount = defaults.availableIpAddressCount;
    	      this.cidrBlock = defaults.cidrBlock;
    	      this.customerOwnedIpv4Pool = defaults.customerOwnedIpv4Pool;
    	      this.defaultForAz = defaults.defaultForAz;
    	      this.enableDns64 = defaults.enableDns64;
    	      this.enableLniAtDeviceIndex = defaults.enableLniAtDeviceIndex;
    	      this.enableResourceNameDnsARecordOnLaunch = defaults.enableResourceNameDnsARecordOnLaunch;
    	      this.enableResourceNameDnsAaaaRecordOnLaunch = defaults.enableResourceNameDnsAaaaRecordOnLaunch;
    	      this.filters = defaults.filters;
    	      this.id = defaults.id;
    	      this.ipv6CidrBlock = defaults.ipv6CidrBlock;
    	      this.ipv6CidrBlockAssociationId = defaults.ipv6CidrBlockAssociationId;
    	      this.ipv6Native = defaults.ipv6Native;
    	      this.mapCustomerOwnedIpOnLaunch = defaults.mapCustomerOwnedIpOnLaunch;
    	      this.mapPublicIpOnLaunch = defaults.mapPublicIpOnLaunch;
    	      this.outpostArn = defaults.outpostArn;
    	      this.ownerId = defaults.ownerId;
    	      this.privateDnsHostnameTypeOnLaunch = defaults.privateDnsHostnameTypeOnLaunch;
    	      this.state = defaults.state;
    	      this.tags = defaults.tags;
    	      this.vpcId = defaults.vpcId;
        }

        @CustomType.Setter
        public Builder arn(String arn) {
            if (arn == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "arn");
            }
            this.arn = arn;
            return this;
        }
        @CustomType.Setter
        public Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) {
            if (assignIpv6AddressOnCreation == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "assignIpv6AddressOnCreation");
            }
            this.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation;
            return this;
        }
        @CustomType.Setter
        public Builder availabilityZone(String availabilityZone) {
            if (availabilityZone == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "availabilityZone");
            }
            this.availabilityZone = availabilityZone;
            return this;
        }
        @CustomType.Setter
        public Builder availabilityZoneId(String availabilityZoneId) {
            if (availabilityZoneId == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "availabilityZoneId");
            }
            this.availabilityZoneId = availabilityZoneId;
            return this;
        }
        @CustomType.Setter
        public Builder availableIpAddressCount(Integer availableIpAddressCount) {
            if (availableIpAddressCount == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "availableIpAddressCount");
            }
            this.availableIpAddressCount = availableIpAddressCount;
            return this;
        }
        @CustomType.Setter
        public Builder cidrBlock(String cidrBlock) {
            if (cidrBlock == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "cidrBlock");
            }
            this.cidrBlock = cidrBlock;
            return this;
        }
        @CustomType.Setter
        public Builder customerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
            if (customerOwnedIpv4Pool == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "customerOwnedIpv4Pool");
            }
            this.customerOwnedIpv4Pool = customerOwnedIpv4Pool;
            return this;
        }
        @CustomType.Setter
        public Builder defaultForAz(Boolean defaultForAz) {
            if (defaultForAz == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "defaultForAz");
            }
            this.defaultForAz = defaultForAz;
            return this;
        }
        @CustomType.Setter
        public Builder enableDns64(Boolean enableDns64) {
            if (enableDns64 == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "enableDns64");
            }
            this.enableDns64 = enableDns64;
            return this;
        }
        @CustomType.Setter
        public Builder enableLniAtDeviceIndex(Integer enableLniAtDeviceIndex) {
            if (enableLniAtDeviceIndex == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "enableLniAtDeviceIndex");
            }
            this.enableLniAtDeviceIndex = enableLniAtDeviceIndex;
            return this;
        }
        @CustomType.Setter
        public Builder enableResourceNameDnsARecordOnLaunch(Boolean enableResourceNameDnsARecordOnLaunch) {
            if (enableResourceNameDnsARecordOnLaunch == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "enableResourceNameDnsARecordOnLaunch");
            }
            this.enableResourceNameDnsARecordOnLaunch = enableResourceNameDnsARecordOnLaunch;
            return this;
        }
        @CustomType.Setter
        public Builder enableResourceNameDnsAaaaRecordOnLaunch(Boolean enableResourceNameDnsAaaaRecordOnLaunch) {
            if (enableResourceNameDnsAaaaRecordOnLaunch == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "enableResourceNameDnsAaaaRecordOnLaunch");
            }
            this.enableResourceNameDnsAaaaRecordOnLaunch = enableResourceNameDnsAaaaRecordOnLaunch;
            return this;
        }
        @CustomType.Setter
        public Builder filters(@Nullable List filters) {

            this.filters = filters;
            return this;
        }
        public Builder filters(GetSubnetFilter... filters) {
            return filters(List.of(filters));
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder ipv6CidrBlock(String ipv6CidrBlock) {
            if (ipv6CidrBlock == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "ipv6CidrBlock");
            }
            this.ipv6CidrBlock = ipv6CidrBlock;
            return this;
        }
        @CustomType.Setter
        public Builder ipv6CidrBlockAssociationId(String ipv6CidrBlockAssociationId) {
            if (ipv6CidrBlockAssociationId == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "ipv6CidrBlockAssociationId");
            }
            this.ipv6CidrBlockAssociationId = ipv6CidrBlockAssociationId;
            return this;
        }
        @CustomType.Setter
        public Builder ipv6Native(Boolean ipv6Native) {
            if (ipv6Native == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "ipv6Native");
            }
            this.ipv6Native = ipv6Native;
            return this;
        }
        @CustomType.Setter
        public Builder mapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch) {
            if (mapCustomerOwnedIpOnLaunch == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "mapCustomerOwnedIpOnLaunch");
            }
            this.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch;
            return this;
        }
        @CustomType.Setter
        public Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) {
            if (mapPublicIpOnLaunch == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "mapPublicIpOnLaunch");
            }
            this.mapPublicIpOnLaunch = mapPublicIpOnLaunch;
            return this;
        }
        @CustomType.Setter
        public Builder outpostArn(String outpostArn) {
            if (outpostArn == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "outpostArn");
            }
            this.outpostArn = outpostArn;
            return this;
        }
        @CustomType.Setter
        public Builder ownerId(String ownerId) {
            if (ownerId == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "ownerId");
            }
            this.ownerId = ownerId;
            return this;
        }
        @CustomType.Setter
        public Builder privateDnsHostnameTypeOnLaunch(String privateDnsHostnameTypeOnLaunch) {
            if (privateDnsHostnameTypeOnLaunch == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "privateDnsHostnameTypeOnLaunch");
            }
            this.privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunch;
            return this;
        }
        @CustomType.Setter
        public Builder state(String state) {
            if (state == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "state");
            }
            this.state = state;
            return this;
        }
        @CustomType.Setter
        public Builder tags(Map tags) {
            if (tags == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "tags");
            }
            this.tags = tags;
            return this;
        }
        @CustomType.Setter
        public Builder vpcId(String vpcId) {
            if (vpcId == null) {
              throw new MissingRequiredPropertyException("GetSubnetResult", "vpcId");
            }
            this.vpcId = vpcId;
            return this;
        }
        public GetSubnetResult build() {
            final var _resultValue = new GetSubnetResult();
            _resultValue.arn = arn;
            _resultValue.assignIpv6AddressOnCreation = assignIpv6AddressOnCreation;
            _resultValue.availabilityZone = availabilityZone;
            _resultValue.availabilityZoneId = availabilityZoneId;
            _resultValue.availableIpAddressCount = availableIpAddressCount;
            _resultValue.cidrBlock = cidrBlock;
            _resultValue.customerOwnedIpv4Pool = customerOwnedIpv4Pool;
            _resultValue.defaultForAz = defaultForAz;
            _resultValue.enableDns64 = enableDns64;
            _resultValue.enableLniAtDeviceIndex = enableLniAtDeviceIndex;
            _resultValue.enableResourceNameDnsARecordOnLaunch = enableResourceNameDnsARecordOnLaunch;
            _resultValue.enableResourceNameDnsAaaaRecordOnLaunch = enableResourceNameDnsAaaaRecordOnLaunch;
            _resultValue.filters = filters;
            _resultValue.id = id;
            _resultValue.ipv6CidrBlock = ipv6CidrBlock;
            _resultValue.ipv6CidrBlockAssociationId = ipv6CidrBlockAssociationId;
            _resultValue.ipv6Native = ipv6Native;
            _resultValue.mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch;
            _resultValue.mapPublicIpOnLaunch = mapPublicIpOnLaunch;
            _resultValue.outpostArn = outpostArn;
            _resultValue.ownerId = ownerId;
            _resultValue.privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunch;
            _resultValue.state = state;
            _resultValue.tags = tags;
            _resultValue.vpcId = vpcId;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy