@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class Subnet extends Object
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.
Warning:* Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Note: Objects should always be created or deserialized using the Subnet.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 the Subnet.Builder
, which maintain a set of all explicitly set fields called __explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take __explicitlySet__
into account. The constructor, on the other hand, does not set __explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
Subnet.Builder |
static class |
Subnet.LifecycleState
The subnet’s current state.
|
Constructor and 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,
String ipv6PublicCidrBlock,
String ipv6VirtualRouterIp,
Subnet.LifecycleState lifecycleState,
Boolean prohibitPublicIpOnVnic,
String routeTableId,
List<String> securityListIds,
String subnetDomainName,
Date timeCreated,
String vcnId,
String virtualRouterIp,
String virtualRouterMac)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static Subnet.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
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,
bminstance-1.subnet123.vcn1.oraclevcn.com ). |
Map<String,String> |
getFreeformTags()
Free-form tags for this resource.
|
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 private IP address space.
|
String |
getIpv6PublicCidrBlock()
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet’s public IP address space.
|
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 |
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() |
String |
toString() |
@ConstructorProperties(value={"availabilityDomain","cidrBlock","compartmentId","definedTags","dhcpOptionsId","displayName","dnsLabel","freeformTags","id","ipv6CidrBlock","ipv6PublicCidrBlock","ipv6VirtualRouterIp","lifecycleState","prohibitPublicIpOnVnic","routeTableId","securityListIds","subnetDomainName","timeCreated","vcnId","virtualRouterIp","virtualRouterMac"}) @Deprecated 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, String ipv6PublicCidrBlock, String ipv6VirtualRouterIp, Subnet.LifecycleState lifecycleState, Boolean prohibitPublicIpOnVnic, String routeTableId, List<String> securityListIds, String subnetDomainName, Date timeCreated, String vcnId, String virtualRouterIp, String virtualRouterMac)
public static Subnet.Builder builder()
Create a new builder.
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
public String getCidrBlock()
The subnet’s CIDR block.
Example: 172.16.1.0/24
public String getCompartmentId()
The OCID of the compartment containing the subnet.
public Map<String,Map<String,Object>> getDefinedTags()
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
public String getDhcpOptionsId()
The OCID of the set of DHCP options that the subnet uses.
public String getDisplayName()
A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
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, bminstance-1.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.
Example: subnet123
public Map<String,String> getFreeformTags()
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
public String getId()
The subnet’s Oracle ID (OCID).
public String getIpv6CidrBlock()
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet’s private IP address space. The subnet size is always /64. Note that IPv6 addressing is currently supported only in certain regions. See IPv6 Addresses.
Example: 2001:0db8:0123:1111::/64
public String getIpv6PublicCidrBlock()
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet’s public IP address space. The subnet size is always /64. The left 48 bits are inherited from the ipv6PublicCidrBlock
of the Vcn
, and the remaining 16 bits are from the subnet’s ipv6CidrBlock
.
Example: 2001:0db8:0123:1111::/64
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
public Subnet.LifecycleState getLifecycleState()
The subnet’s current state.
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
public String getRouteTableId()
The OCID of the route table that the subnet uses.
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.
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.
Example: subnet123.vcn1.oraclevcn.com
public Date getTimeCreated()
The date and time the subnet was created, in the format defined by RFC3339.
Example: 2016-08-25T21:10:29.600Z
public String getVcnId()
The OCID of the VCN the subnet is in.
public String getVirtualRouterIp()
The IP address of the virtual router.
Example: 10.0.14.1
public String getVirtualRouterMac()
The MAC address of the virtual router.
Example: 00:00:17:B6:4D:DD
Copyright © 2016–2020. All rights reserved.