@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.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 Subnet.Builder.__explicitlySet__
. The hashCode()
and equals(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
).
Modifier and Type | Class and Description |
---|---|
static class |
Subnet.Builder |
static class |
Subnet.LifecycleState
The subnet’s current state.
|
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
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,
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.
|
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,
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.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"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)
public static Subnet.Builder builder()
Create a new builder.
public Subnet.Builder toBuilder()
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: 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,
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.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 IP address space. The subnet size is always /64. See IPv6 Addresses.
Example: 2001:0db8:0123:1111::/64
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.
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 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
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 com.oracle.bmc.http.client.internal.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 com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public int hashCode()
hashCode
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Copyright © 2016–2024. All rights reserved.