CreateVcn
/20160918/vcns
Specify a list of one or more IPv4 CIDR blocks that meet the following criteria:
Note: The CIDR block cannot be changed after the VCN is created.
Oracle recommends that you use one of the private IP address ranges specified in RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16).
You can add a DNS label for the VCN. A DNS label is required if you want the instances to use the interent and VCN resolver option for DNS in the VCN.
The VCN comes with a default route table, default security list, and default set of DHCP options. The OCID for each of these resources is returned in the response. You cannot delete these default objects, but you can change their rules.
You can optionally specify a display name for the VCN. If you do not, a default display name is provided. The display name does not need to be unique, and you can change it. Avoid entering confidential information.
The VCN and subnets that you create are not accessible until you attach an internet gateway.
Request
- application/json
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
object
-
byoipv6CidrDetails:
array byoipv6CidrDetails
Unique Items Required:
true
The list of BYOIPv6 OCIDs and BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges. -
cidrBlock:
string
Minimum Length:
1
Maximum Length:32
Deprecated. Do not set this value. Use cidrBlocks instead. -
cidrBlocks:
array cidrBlocks
Maximum Number of Items:
5
Unique Items Required:true
The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria: - The CIDR blocks must be valid. - They must not overlap with each other or with the on-premises network CIDR block. - The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. Important: Do not specify a value for cidrBlock. Use this parameter instead. -
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment to contain the VCN. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace.
-
displayName:
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information. -
dnsLabel:
string
Minimum Length:
1
Maximum Length:15
A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet'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). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. You must set this value if you want instances to be able to use hostnames to resolve other instances in the VCN. Otherwise the Internet and VCN Resolver will not work. Example: vcn1 -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
ipv6CidrBlock:
string
Minimum Length:
1
Maximum Length:45
To be deprecated. -
ipv6PrivateCidrBlocks:
array ipv6PrivateCidrBlocks
Unique Items Required:
true
The list of one or more ULA or Private IPv6 CIDR blocks for the vcn that meets the following criteria: - The CIDR blocks must be valid. - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a vcn. Important: Do not specify a value for ipv6CidrBlock. Use this parameter instead. -
isIpv6Enabled:
boolean
Whether IPv6 is enabled for the VCN. Default is false. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to false. Example: true
-
isOracleGuaAllocationEnabled:
boolean
Default Value:
true
Specifies whether to skip Oracle allocated IPv6 GUA. By default, Oracle will allocate one GUA of /56 size for an IPv6 enabled VCN.
array
true
-
Array of:
object Byoipv6CidrDetails
The list of one or more BYOIPv6 CIDR blocks for the VCN that meets the following criteria: - The CIDR must from a BYOIPv6 range. - The IPv6 CIDR blocks must be valid. - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a VCN.
array
5
true
-
Array of:
string
Minimum Length:
1
Maximum Length:32
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
object
array
true
-
Array of:
string
Minimum Length:
1
Maximum Length:45
object
-
byoipv6RangeId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the ByoipRange resource to which the CIDR block belongs. -
ipv6CidrBlock(required):
string
Minimum Length:
1
Maximum Length:45
An IPv6 CIDR block required to create a VCN with a BYOIP prefix. It could be the whole CIDR block identified in byoipv6RangeId, or a subrange. Example: 2001:0db8:0123::/48
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
Response
- application/json
200 Response
-
etag: string
For optimistic concurrency control. See if-match.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
byoipv6CidrBlocks:
array byoipv6CidrBlocks
Unique Items Required:
true
The list of BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges. -
cidrBlock(required):
string
Minimum Length:
1
Maximum Length:32
Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16 -
cidrBlocks(required):
array cidrBlocks
Maximum Number of Items:
5
Unique Items Required:true
The list of IPv4 CIDR blocks the VCN will use. -
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment containing the VCN. -
defaultDhcpOptionsId:
string
Minimum Length:
1
Maximum Length:255
The OCID for the VCN's default set of DHCP options. -
defaultRouteTableId:
string
Minimum Length:
1
Maximum Length:255
The OCID for the VCN's default route table. -
defaultSecurityListId:
string
Minimum Length:
1
Maximum Length:255
The OCID for the VCN's default security list. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace.
-
displayName:
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information. -
dnsLabel:
string
Minimum Length:
1
Maximum Length:15
A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet'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. The value cannot be changed. The absence of this parameter means the Internet and VCN Resolver will not work for this VCN. Example: vcn1 -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
id(required):
string
Minimum Length:
1
Maximum Length:255
The VCN's OCID. -
ipv6CidrBlock:
string
Minimum Length:
1
Maximum Length:45
To be deprecated. -
ipv6CidrBlocks:
array ipv6CidrBlocks
Maximum Number of Items:
1
Unique Items Required:true
For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56. -
ipv6PrivateCidrBlocks:
array ipv6PrivateCidrBlocks
Unique Items Required:
true
For an IPv6-enabled VCN, this is the list of Private IPv6 CIDR blocks for the VCN's IP address space. -
ipv6PublicCidrBlock:
string
Minimum Length:
1
Maximum Length:45
To be deprecated. -
lifecycleState(required):
string
Allowed Values:
[ "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING" ]
The VCN's current state. -
timeCreated:
string(date-time)
The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
-
vcnDomainName:
string
Minimum Length:
1
Maximum Length:253
The VCN's domain name, which consists of the VCN's DNS label, and the domain. Example: vcn1.oraclevcn.com
array
true
-
Array of:
string
Minimum Length:
1
Maximum Length:45
array
5
true
-
Array of:
string
Minimum Length:
1
Maximum Length:32
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
object
array
1
true
-
Array of:
string
Minimum Length:
1
Maximum Length:45
array
true
-
Array of:
string
Minimum Length:
1
Maximum Length:45
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
400 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
401 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload