drg_route_rules
Creates, updates, deletes, gets or lists a drg_route_rules resource.
Overview​
| Name | drg_route_rules |
| Type | Resource |
| Id | oci.network.drg_route_rules |
Fields​
The following fields are returned by SELECT queries:
- list
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 />
| Name | Datatype | Description |
|---|---|---|
id | string | The Oracle-assigned ID of the DRG route rule. |
attributes | object | Additional properties for the route, computed by the service. |
destination | string | Represents 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. |
destinationType | string | The 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) |
isBlackhole | boolean | Indicates that if the next hop attachment does not exist, so traffic for this route is discarded without notification. |
isConflict | boolean | Indicates that the route was not imported due to a conflict between route rules. |
nextHopDrgAttachmentId | string | The [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. |
routeProvenance | string | The 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) |
routeType | string | You 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | drgRouteTableId, region | limit, page, routeType | Lists the route rules in the specified DRG route table. |
update | update | drgRouteTableId, region | Updates 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.
| Name | Datatype | Description |
|---|---|---|
drgRouteTableId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. |
region | string | OCI 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) |
limit | integer | For 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 |
page | string | For 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). |
routeType | string | Static 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​
- list
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​
- update
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;