CreateRouteTable
post
/20160918/routeTables
Create a new route table for the specified VCN. Include at least one route rule for the new route table.
Provide the OCID of the compartment where you want the route table to reside. The route table does not need to be in the same compartment as the VCN, subnets, or other Networking Service components. If you are not sure which compartment to use, put the route table in the same compartment as the VCN.
You may optionally specify a display name for the route table. 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.
Request
Supported Media Types
- application/json
Header Parameters
-
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).
Details for creating a new route table.
Root Schema : CreateRouteTableDetails
Type:
Show Source
object
-
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment to contain the route table. -
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. -
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"}
-
isEcmpEnabled:
boolean
Indicates whether ECMP is enabled or not on the route table.
-
routeRules(required):
array routeRules
The collection of rules used for routing destination IPs to network devices.
-
vcnId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the VCN the route table belongs to.
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
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 : routeRules
Type:
array
The collection of rules used for routing destination IPs to network devices.
Show Source
-
Array of:
object RouteRule
A mapping between a destination IP address range and a virtual device to route matching packets to (a target).
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only the String type is supported.
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.
Nested Schema : RouteRule
Type:
object
A mapping between a destination IP address range and a virtual device to route matching packets to (a target).
Show Source
-
cidrBlock:
string
Minimum Length:
9
Maximum Length:18
Deprecated. Instead use destination and destinationType. Requests that include both cidrBlock and destination will be rejected. A destination IP address range in CIDR notation. Matching packets will be routed to the indicated network entity (the target). Cannot be an IPv6 CIDR. Example: 0.0.0.0/0 -
description:
string
Minimum Length:
1
Maximum Length:255
An optional description of your choice for the rule. -
destination:
string
Minimum Length:
1
Maximum Length:255
This is the range of IP addresses used for matching when routing traffic. This value is required if you provide a destinationType. The following values are allowed:- IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56. If you set this to an IPv6 CIDR, the route rule's target can only be a DRG or internet gateway.
- The cidrBlock value for a Service, if you're setting up a route rule for traffic destined for a particular Service through a service gateway.
-
destinationType:
string
Default Value:
CIDR_BLOCK
Allowed Values:[ "CIDR_BLOCK", "SERVICE_CIDR_BLOCK" ]
Type of destination for the rule. This value is required if you provide a destination. The following values are allowed:- CIDR_BLOCK: If the rule's destination is an IP address range in CIDR notation.
- SERVICE_CIDR_BLOCK: If the rule's destination is the cidrBlock value for a Service (the rule is for traffic destined for a particular Service through a service gateway).
-
networkEntityId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID for the route rule's target. -
routeType:
string
Allowed Values:
[ "STATIC", "LOCAL" ]
A route rule can be STATIC if manually added to the Route Table, LOCAL if added by OCI to the Route Table.
Response
Supported Media Types
- application/json
200 Response
The route table was created.
Headers
-
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.
Root Schema : RouteTable
Type:
object
A collection of RouteRule objects, which are used to route packets based on destination IP to a particular network entity.
Show Source
-
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment containing the route table. -
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. -
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 route table's OCID. -
isEcmpEnabled:
boolean
Indicates whether or not ECMP is enabled on the route table.
-
lifecycleState(required):
string
Allowed Values:
[ "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" ]
The route table's current state. -
routeRules(required):
array routeRules
The collection of rules for routing destination IPs to network devices.
-
timeCreated:
string(date-time)
The date and time the route table was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
-
vcnId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the VCN the route table list belongs to.
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
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 : routeRules
Type:
array
The collection of rules for routing destination IPs to network devices.
Show Source
-
Array of:
object RouteRule
A mapping between a destination IP address range and a virtual device to route matching packets to (a target).
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only the String type is supported.
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.
Nested Schema : RouteRule
Type:
object
A mapping between a destination IP address range and a virtual device to route matching packets to (a target).
Show Source
-
cidrBlock:
string
Minimum Length:
9
Maximum Length:18
Deprecated. Instead use destination and destinationType. Requests that include both cidrBlock and destination will be rejected. A destination IP address range in CIDR notation. Matching packets will be routed to the indicated network entity (the target). Cannot be an IPv6 CIDR. Example: 0.0.0.0/0 -
description:
string
Minimum Length:
1
Maximum Length:255
An optional description of your choice for the rule. -
destination:
string
Minimum Length:
1
Maximum Length:255
This is the range of IP addresses used for matching when routing traffic. This value is required if you provide a destinationType. The following values are allowed:- IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56. If you set this to an IPv6 CIDR, the route rule's target can only be a DRG or internet gateway.
- The cidrBlock value for a Service, if you're setting up a route rule for traffic destined for a particular Service through a service gateway.
-
destinationType:
string
Default Value:
CIDR_BLOCK
Allowed Values:[ "CIDR_BLOCK", "SERVICE_CIDR_BLOCK" ]
Type of destination for the rule. This value is required if you provide a destination. The following values are allowed:- CIDR_BLOCK: If the rule's destination is an IP address range in CIDR notation.
- SERVICE_CIDR_BLOCK: If the rule's destination is the cidrBlock value for a Service (the rule is for traffic destined for a particular Service through a service gateway).
-
networkEntityId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID for the route rule's target. -
routeType:
string
Allowed Values:
[ "STATIC", "LOCAL" ]
A route rule can be STATIC if manually added to the Route Table, LOCAL if added by OCI to the Route Table.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
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