Create Route Table
POST https://iaas.{{region}}.oraclecloud.com/20160918/routeTables
Creates a new route table for the specified VCN. In the request you must also include at least one route rule for the new route table. For information on the number of rules you can have in a route table, see Service Limits. For general information about route tables in your VCN and the types of targets you can use in route rules, see Route Tables.
For the purposes of access control, you must provide the OCID of the compartment where you want the route table to reside. Notice that the route table doesn't have to be in the same compartment as the VCN, subnets, or other Networking Service components. If you're not sure which compartment to use, put the route table in the same compartment as the VCN. For more information about compartments and access control, see Overview of the IAM Service. For information about OCIDs, see Resource Identifiers.
You may optionally specify a display name for the route table, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.
Request Body
{"compartmentId"=>"{{app_compartment_ocid}}", "routeRules"=>[{"destination"=>"0.0.0.0/0", "destinationType"=>"CIDR_BLOCK", "networkEntityId"=>"{{app_internet_gateway_ocid}}", "description"=>"traffic to/from internet"}], "vcnId"=>"{{app_vcn_ocid}}", "displayName"=>"End-to-End API Example - Route Table"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
opc-retry-token | string | 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). | |||
Content-Type | string | ||
Date | string | (Required) Current Date | |
Authorization | string | (Required) Signature Authentication on Authorization header | |
x-content-sha256 | string | (Required) Content sha256 for POST, PUT and PATCH operations |
RESPONSES
status: OK
{"id":"adipisicing occ","compartmentId":"officia aliquip minim Excepteur sit","routeRules":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"lifecycleState":"TERMINATED","vcnId":"aute tempor","definedTags":{},"displayName":"velit amet ipsum reprehenderit","freeformTags":{},"timeCreated":"1954-08-02T20:46:35.521Z"}