CreateVcn

post

/20160918/vcns

Create a new virtual cloud network (VCN) in the specified compartment. The VCN does not need to be in the same compartment as the subnets or other Networking Service components.

Specify a list of one or more IPv4 CIDR blocks that meet the following criteria:

  • The CIDR blocks must be valid.
  • The CIDR blocks 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.
  • The number of private IPs within a VCN must not exceed 64,000.

    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

    Supported Media Types
    Header Parameters
    • 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).
    Body ()
    Details for creating a new VCN.
    Root Schema : CreateVcnDetails
    Type: object
    Show Source
    • byoipv6CidrDetails
      Unique Items Required: true
      The list of BYOIPv6 OCIDs and BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges.
    • Minimum Length: 1
      Maximum Length: 32
      Deprecated. Do not set this value. Use cidrBlocks instead.
    • 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.
    • Minimum Length: 1
      Maximum Length: 255
      The OCID of the compartment to contain the VCN.
    • definedTags
      Additional Properties Allowed: additionalProperties
      Defined tags for this resource. Each key is predefined and scoped to a namespace.
    • Minimum Length: 1
      Maximum Length: 255
      A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information.
    • 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
      Additional Properties Allowed: additionalProperties
      Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
    • Minimum Length: 1
      Maximum Length: 45
      To be deprecated.
    • 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.
    • 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
    • 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.
    Nested Schema : byoipv6CidrDetails
    Type: array
    Unique Items Required: true
    The list of BYOIPv6 OCIDs and BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges.
    Show Source
    • 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.
    Nested Schema : cidrBlocks
    Type: array
    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.
    Show Source
    Nested Schema : definedTags
    Type: object
    Additional Properties Allowed
    Show Source
    Defined tags for this resource. Each key is predefined and scoped to a namespace.
    Nested Schema : freeformTags
    Type: object
    Additional Properties Allowed
    Show Source
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
    Nested Schema : ipv6PrivateCidrBlocks
    Type: array
    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.
    Show Source
    Nested Schema : Byoipv6CidrDetails
    Type: object
    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.
    Show Source
    • Minimum Length: 1
      Maximum Length: 255
      The OCID of the ByoipRange resource to which the CIDR block belongs.
    • 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
    Nested Schema : additionalProperties
    Type: object
    Additional Properties Allowed
    Show Source
    Key-value pair representing a defined tag key and value, scoped to a namespace.
    Nested Schema : additionalProperties
    Type: object
    The value of the tag. Only the String type is supported.
    Back to Top

    Response

    Supported Media Types

    200 Response

    The VCN was created.
    Headers
    • For optimistic concurrency control. See if-match.
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Vcn
    Type: object
    A virtual cloud network (VCN).
    Show Source
    • byoipv6CidrBlocks
      Unique Items Required: true
      The list of BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges.
    • Minimum Length: 1
      Maximum Length: 32
      Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    • cidrBlocks
      Maximum Number of Items: 5
      Unique Items Required: true
      The list of IPv4 CIDR blocks the VCN will use.
    • Minimum Length: 1
      Maximum Length: 255
      The OCID of the compartment containing the VCN.
    • Minimum Length: 1
      Maximum Length: 255
      The OCID for the VCN's default set of DHCP options.
    • Minimum Length: 1
      Maximum Length: 255
      The OCID for the VCN's default route table.
    • Minimum Length: 1
      Maximum Length: 255
      The OCID for the VCN's default security list.
    • definedTags
      Additional Properties Allowed: additionalProperties
      Defined tags for this resource. Each key is predefined and scoped to a namespace.
    • Minimum Length: 1
      Maximum Length: 255
      A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information.
    • 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
      Additional Properties Allowed: additionalProperties
      Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
    • Minimum Length: 1
      Maximum Length: 255
      The VCN's OCID.
    • Minimum Length: 1
      Maximum Length: 45
      To be deprecated.
    • 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
      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.
    • Minimum Length: 1
      Maximum Length: 45
      To be deprecated.
    • Allowed Values: [ "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", "UPDATING" ]
      The VCN's current state.
    • 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
    • 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
    Nested Schema : byoipv6CidrBlocks
    Type: array
    Unique Items Required: true
    The list of BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges.
    Show Source
    Nested Schema : cidrBlocks
    Type: array
    Maximum Number of Items: 5
    Unique Items Required: true
    The list of IPv4 CIDR blocks the VCN will use.
    Show Source
    Nested Schema : definedTags
    Type: object
    Additional Properties Allowed
    Show Source
    Defined tags for this resource. Each key is predefined and scoped to a namespace.
    Nested Schema : freeformTags
    Type: object
    Additional Properties Allowed
    Show Source
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
    Nested Schema : ipv6CidrBlocks
    Type: array
    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.
    Show Source
    Nested Schema : ipv6PrivateCidrBlocks
    Type: array
    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.
    Show Source
    Nested Schema : additionalProperties
    Type: object
    Additional Properties Allowed
    Show Source
    Key-value pair representing a defined tag key and value, scoped to a namespace.
    Nested Schema : additionalProperties
    Type: object
    The value of the tag. Only the String type is supported.

    400 Response

    Bad Request
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    401 Response

    Unauthorized
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    404 Response

    Not Found
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    409 Response

    Conflict
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    500 Response

    Internal Server Error
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source

    Default Response

    An error has occurred.
    Headers
    • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
    Body ()
    Root Schema : Error
    Type: object
    The properties that define an error.
    Show Source
    Back to Top