Class Subnet
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.vnmonitoring.model.Subnet
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class Subnet extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
A logical subdivision of a VCN.Each subnet consists of a contiguous range of IP addresses that do not overlap with other subnets in the VCN. Example: 172.16.1.0/24. For more information, see Overview of the Networking Service and VCNs and Subnets.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
Note: Objects should always be created or deserialized using theSubnet.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theSubnet.Builder
, which maintain a set of all explicitly set fields calledSubnet.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Subnet.Builder
static class
Subnet.LifecycleState
The subnet’s current state.
-
Constructor Summary
Constructors Constructor Description Subnet(String availabilityDomain, String cidrBlock, String compartmentId, Map<String,Map<String,Object>> definedTags, String dhcpOptionsId, String displayName, String dnsLabel, Map<String,String> freeformTags, String id, String ipv6CidrBlock, List<String> ipv6CidrBlocks, String ipv6VirtualRouterIp, Subnet.LifecycleState lifecycleState, Boolean prohibitInternetIngress, Boolean prohibitPublicIpOnVnic, String routeTableId, List<String> securityListIds, String subnetDomainName, Date timeCreated, String vcnId, String virtualRouterIp, String virtualRouterMac)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Subnet.Builder
builder()
Create a new builder.boolean
equals(Object o)
String
getAvailabilityDomain()
The subnet’s availability domain.String
getCidrBlock()
The subnet’s CIDR block.String
getCompartmentId()
The OCID of the compartment containing the subnet.Map<String,Map<String,Object>>
getDefinedTags()
Defined tags for this resource.String
getDhcpOptionsId()
The OCID of the set of DHCP options that the subnet uses.String
getDisplayName()
A user-friendly name.String
getDnsLabel()
A DNS label for the subnet, used in conjunction with the VNIC’s hostname and VCN’s DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com).Map<String,String>
getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope.String
getId()
The subnet’s Oracle ID (OCID).String
getIpv6CidrBlock()
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet’s IP address space.List<String>
getIpv6CidrBlocks()
The list of all IPv6 CIDR blocks (Oracle allocated IPv6 GUA, ULA or private IPv6 CIDR blocks, BYOIPv6 CIDR blocks) for the subnet.String
getIpv6VirtualRouterIp()
For an IPv6-enabled subnet, this is the IPv6 address of the virtual router.Subnet.LifecycleState
getLifecycleState()
The subnet’s current state.Boolean
getProhibitInternetIngress()
Whether to disallow ingress internet traffic to VNICs within this subnet.Boolean
getProhibitPublicIpOnVnic()
Whether VNICs within this subnet can have public IP addresses.String
getRouteTableId()
The OCID of the route table that the subnet uses.List<String>
getSecurityListIds()
The OCIDs of the security list or lists that the subnet uses.String
getSubnetDomainName()
The subnet’s domain name, which consists of the subnet’s DNS label, the VCN’s DNS label, and the oraclevcn.com domain.Date
getTimeCreated()
The date and time the subnet was created, in the format defined by RFC3339.String
getVcnId()
The OCID of the VCN the subnet is in.String
getVirtualRouterIp()
The IP address of the virtual router.String
getVirtualRouterMac()
The MAC address of the virtual router.int
hashCode()
Subnet.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
Subnet
@Deprecated @ConstructorProperties({"availabilityDomain","cidrBlock","compartmentId","definedTags","dhcpOptionsId","displayName","dnsLabel","freeformTags","id","ipv6CidrBlock","ipv6CidrBlocks","ipv6VirtualRouterIp","lifecycleState","prohibitInternetIngress","prohibitPublicIpOnVnic","routeTableId","securityListIds","subnetDomainName","timeCreated","vcnId","virtualRouterIp","virtualRouterMac"}) public Subnet(String availabilityDomain, String cidrBlock, String compartmentId, Map<String,Map<String,Object>> definedTags, String dhcpOptionsId, String displayName, String dnsLabel, Map<String,String> freeformTags, String id, String ipv6CidrBlock, List<String> ipv6CidrBlocks, String ipv6VirtualRouterIp, Subnet.LifecycleState lifecycleState, Boolean prohibitInternetIngress, Boolean prohibitPublicIpOnVnic, String routeTableId, List<String> securityListIds, String subnetDomainName, Date timeCreated, String vcnId, String virtualRouterIp, String virtualRouterMac)
Deprecated.
-
-
Method Detail
-
builder
public static Subnet.Builder builder()
Create a new builder.
-
toBuilder
public Subnet.Builder toBuilder()
-
getAvailabilityDomain
public String getAvailabilityDomain()
The subnet’s availability domain.This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets.
Example: Uocm:PHX-AD-1
- Returns:
- the value
-
getCidrBlock
public String getCidrBlock()
The subnet’s CIDR block.Example: 10.0.1.0/24
- Returns:
- the value
-
getCompartmentId
public String getCompartmentId()
The OCID of the compartment containing the subnet.- Returns:
- the value
-
getDefinedTags
public Map<String,Map<String,Object>> getDefinedTags()
Defined tags for this resource.Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}
- Returns:
- the value
-
getDhcpOptionsId
public String getDhcpOptionsId()
The OCID of the set of DHCP options that the subnet uses.- Returns:
- the value
-
getDisplayName
public String getDisplayName()
A user-friendly name.Does not have to be unique, and it’s changeable. Avoid entering confidential information.
- Returns:
- the value
-
getDnsLabel
public String getDnsLabel()
A DNS label for the subnet, used in conjunction with the VNIC’s hostname and VCN’s DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com).Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed.
The absence of this parameter means the Internet and VCN Resolver will not resolve hostnames of instances in this subnet.
For more information, see [DNS in Your Virtual Cloud Network](https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm).
Example: subnet123
- Returns:
- the value
-
getFreeformTags
public Map<String,String> getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope.Exists for cross-compatibility only. Example: {“bar-key”: “value”}
- Returns:
- the value
-
getIpv6CidrBlock
public String getIpv6CidrBlock()
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet’s IP address space.The subnet size is always /64. See IPv6 Addresses.
Example: 2001:0db8:0123:1111::/64
- Returns:
- the value
-
getIpv6CidrBlocks
public List<String> getIpv6CidrBlocks()
The list of all IPv6 CIDR blocks (Oracle allocated IPv6 GUA, ULA or private IPv6 CIDR blocks, BYOIPv6 CIDR blocks) for the subnet.- Returns:
- the value
-
getIpv6VirtualRouterIp
public String getIpv6VirtualRouterIp()
For an IPv6-enabled subnet, this is the IPv6 address of the virtual router.Example: 2001:0db8:0123:1111:89ab:cdef:1234:5678
- Returns:
- the value
-
getLifecycleState
public Subnet.LifecycleState getLifecycleState()
The subnet’s current state.- Returns:
- the value
-
getProhibitInternetIngress
public Boolean getProhibitInternetIngress()
Whether to disallow ingress internet traffic to VNICs within this subnet.Defaults to false.
For IPV4, prohibitInternetIngress behaves similarly to prohibitPublicIpOnVnic. If it is set to false, VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the assignPublicIp flag in
CreateVnicDetails
). If prohibitInternetIngress is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a privatesubnet).For IPv6, if prohibitInternetIngress is set to true, internet access is not allowed for any IPv6s assigned to VNICs in the subnet. Otherwise, ingress internet traffic is allowed by default.
Example: true
- Returns:
- the value
-
getProhibitPublicIpOnVnic
public Boolean getProhibitPublicIpOnVnic()
Whether VNICs within this subnet can have public IP addresses.Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the assignPublicIp flag in
CreateVnicDetails
). If prohibitPublicIpOnVnic is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it’s a private subnet).Example: true
- Returns:
- the value
-
getRouteTableId
public String getRouteTableId()
The OCID of the route table that the subnet uses.- Returns:
- the value
-
getSecurityListIds
public List<String> getSecurityListIds()
The OCIDs of the security list or lists that the subnet uses.Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- Returns:
- the value
-
getSubnetDomainName
public String getSubnetDomainName()
The subnet’s domain name, which consists of the subnet’s DNS label, the VCN’s DNS label, and the oraclevcn.com domain.For more information, see [DNS in Your Virtual Cloud Network](https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm).
Example: subnet123.vcn1.oraclevcn.com
- Returns:
- the value
-
getTimeCreated
public Date getTimeCreated()
The date and time the subnet was created, in the format defined by RFC3339.Example: 2016-08-25T21:10:29.600Z
- Returns:
- the value
-
getVirtualRouterIp
public String getVirtualRouterIp()
The IP address of the virtual router.Example: 10.0.14.1
- Returns:
- the value
-
getVirtualRouterMac
public String getVirtualRouterMac()
The MAC address of the virtual router.Example: 00:00:00:00:00:01
- Returns:
- the value
-
toString
public String toString()
- Overrides:
toString
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-