Skip to main content

drg_route_rules

Creates, updates, deletes, gets or lists a drg_route_rules resource.

Overview​

Namedrg_route_rules
TypeResource
Idoci.network.drg_route_rules

Fields​

The following fields are returned by SELECT queries:

A DRG route rule is a mapping between a destination IP address range and a DRG attachment.<br />The map is used to route matching packets. Traffic will be routed across the attachments using Equal-cost multi-path routing (ECMP)<br />if there are multiple rules with identical destinations and none of the rules conflict.<br />

NameDatatypeDescription
idstringThe Oracle-assigned ID of the DRG route rule.
attributesobjectAdditional properties for the route, computed by the service.
destinationstringRepresents the range of IP addresses to match against when routing traffic. Potential values: * An IP address range (IPv4 or IPv6) in CIDR notation. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56. * When you're setting up a security rule for traffic destined for a particular Service through a service gateway, this is the cidrBlock value associated with that [Service](#/en/iaas/20160918/Service/). For example: oci-phx-objectstorage.
destinationTypestringThe type of destination for the rule. Allowed values: * 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](#/en/iaas/latest/Service/) (the rule is for traffic destined for a particular Service through a service gateway). (CIDR_BLOCK, SERVICE_CIDR_BLOCK)
isBlackholebooleanIndicates that if the next hop attachment does not exist, so traffic for this route is discarded without notification.
isConflictbooleanIndicates that the route was not imported due to a conflict between route rules.
nextHopDrgAttachmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the next hop DRG attachment responsible for reaching the network destination. A value of BLACKHOLE means traffic for this route is discarded without notification.
routeProvenancestringThe earliest origin of a route. If a route is advertised to a DRG through an IPsec tunnel attachment, and is propagated to peered DRGs via RPC attachments, the route's provenance in the peered DRGs remains IPSEC_TUNNEL, because that is the earliest origin. No routes with a provenance IPSEC_TUNNEL or VIRTUAL_CIRCUIT will be exported to IPsec tunnel or virtual circuit attachments, regardless of the attachment's export distribution. (STATIC, VCN, VIRTUAL_CIRCUIT, IPSEC_TUNNEL)
routeTypestringYou can specify static routes for the DRG route table using the API. The DRG learns dynamic routes from the DRG attachments using various routing protocols. (STATIC, DYNAMIC)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdrgRouteTableId, regionlimit, page, routeTypeLists the route rules in the specified DRG route table.
updateupdatedrgRouteTableId, regionUpdates one or more route rules in the specified DRG route table.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
drgRouteTableIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
routeTypestringStatic routes are specified through the DRG route table API. Dynamic routes are learned by the DRG from the DRG attachments through various routing protocols.

SELECT examples​

Lists the route rules in the specified DRG route table.

SELECT
id,
attributes,
destination,
destinationType,
isBlackhole,
isConflict,
nextHopDrgAttachmentId,
routeProvenance,
routeType
FROM oci.network.drg_route_rules
WHERE drgRouteTableId = '{{ drgRouteTableId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND routeType = '{{ routeType }}'
;

UPDATE examples​

Updates one or more route rules in the specified DRG route table.<br />

UPDATE oci.network.drg_route_rules
SET
routeRules = '{{ routeRules }}'
WHERE
drgRouteTableId = '{{ drgRouteTableId }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
attributes,
destination,
destinationType,
isBlackhole,
isConflict,
nextHopDrgAttachmentId,
routeProvenance,
routeType;