@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class Subnet extends 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.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
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
ExplicitlySetBmcModel.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take
ExplicitlySetBmcModel.__explicitlySet__
into account. The constructor, on the other hand, does not set ExplicitlySetBmcModel.__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) |
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()
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 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() |
Subnet.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"availabilityDomain","cidrBlock","compartmentId","definedTags","dhcpOptionsId","displayName","dnsLabel","freeformTags","id","ipv6CidrBlock","ipv6PublicCidrBlock","ipv6VirtualRouterIp","lifecycleState","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, 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 Subnet.Builder toBuilder()
public String getAvailabilityDomain()
The subnet’s availability domain.
Example: Uocm:PHX-AD-1
public String getCidrBlock()
The subnet’s CIDR block.
Example: 10.0.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.
Example: {"foo-namespace": {"bar-key": "value"}}
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](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm).
Example: subnet123
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"}
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. IPv6 addressing is supported for all commercial and government 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](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm).
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 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:00:00:00:01
public String toString()
toString
in class ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class ExplicitlySetBmcModel
public int hashCode()
hashCode
in class ExplicitlySetBmcModel
Copyright © 2016–2023. All rights reserved.