drgs
Creates, updates, deletes, gets or lists a drgs resource.
Overview​
| Name | drgs |
| Type | Resource |
| Id | oci.network.drgs |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The DRG was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The DRG's Oracle ID ([OCID](/iaas/Content/General/Concepts/identifiers.htm)). |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the DRG. |
defaultDrgRouteTables | object | The default DRG route table for this DRG. Each network type has a default DRG route table. You can update a network type to use a different DRG route table, but each network type must have a default DRG route table. You cannot delete a default DRG route table. |
defaultExportDrgRouteDistributionId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this DRG's default export route distribution for the DRG attachments. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The DRG's current state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
timeCreated | string (date-time) | The date and time the DRG was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
A dynamic routing gateway (DRG) is a virtual router that provides a path for private<br />network traffic between networks. You use it with other Networking<br />Service components to create a connection to your on-premises network using [Site-to-Site VPN](/iaas/Content/Network/Tasks/managingIPsec.htm) or a connection that uses<br />[FastConnect](/iaas/Content/Network/Concepts/fastconnect.htm). For more information, see<br />[Networking Overview](/iaas/Content/Network/Concepts/overview.htm).<br /><br />To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,<br />talk to an administrator. If you're an administrator who needs to write policies to give users access, see<br />[Getting Started with Policies](/iaas/Content/Identity/Concepts/policygetstarted.htm).<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The DRG's Oracle ID ([OCID](/iaas/Content/General/Concepts/identifiers.htm)). |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the DRG. |
defaultDrgRouteTables | object | The default DRG route table for this DRG. Each network type has a default DRG route table. You can update a network type to use a different DRG route table, but each network type must have a default DRG route table. You cannot delete a default DRG route table. |
defaultExportDrgRouteDistributionId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this DRG's default export route distribution for the DRG attachments. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The DRG's current state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
timeCreated | string (date-time) | The date and time the DRG was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | drgId, region | Gets the specified DRG's information. | |
list | select | compartmentId, region | limit, page | Lists the DRGs in the specified compartment.<br /> |
create | insert | region, compartmentId | opc-retry-token | Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information,<br />see [Dynamic Routing Gateways (DRGs)](/iaas/Content/Network/Tasks/managingDRGs.htm).<br /><br />For the purposes of access control, you must provide the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want<br />the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN,<br />the DRG attachment, or other Networking Service components. If you're not sure which compartment<br />to use, put the DRG in the same compartment as the VCN. For more information about compartments<br />and access control, see [Overview of the IAM Service](/iaas/Content/Identity/Concepts/overview.htm).<br />For information about OCIDs, see [Resource Identifiers](/iaas/Content/General/Concepts/identifiers.htm).<br /><br />You may optionally specify a display name for the DRG, otherwise a default is provided.<br />It does not have to be unique, and you can change it. Avoid entering confidential information.<br /> |
update | update | drgId, region | if-match | Updates the specified DRG's display name or tags. Avoid entering confidential information.<br /> |
delete | delete | drgId, region | if-match | Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise<br />network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous<br />operation. The DRG's lifecycleState will change to TERMINATING temporarily until the DRG is completely<br />removed.<br /> |
get_all_drg_attachments | exec | drgId, region | opc-request-id, limit, page, attachmentType, isCrossTenancy | Returns a complete list of DRG attachments that belong to a particular DRG.<br /> |
upgrade_drg | exec | drgId, region | opc-request-id, opc-retry-token | Upgrades the DRG. After upgrade, you can control routing inside your DRG<br />via DRG attachments, route distributions, and DRG route tables.<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 |
|---|---|---|
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment. |
drgId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG. |
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) |
attachmentType | string | The type for the network resource attached to the DRG. |
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. |
isCrossTenancy | boolean | Whether the DRG attachment lives in a different tenancy than the DRG. |
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 |
opc-request-id | string | Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
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). |
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). |
SELECT examples​
- get
- list
Gets the specified DRG's information.
SELECT
id,
compartmentId,
defaultDrgRouteTables,
defaultExportDrgRouteDistributionId,
definedTags,
displayName,
freeformTags,
lifecycleState,
timeCreated
FROM oci.network.drgs
WHERE drgId = '{{ drgId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the DRGs in the specified compartment.<br />
SELECT
id,
compartmentId,
defaultDrgRouteTables,
defaultExportDrgRouteDistributionId,
definedTags,
displayName,
freeformTags,
lifecycleState,
timeCreated
FROM oci.network.drgs
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
;
INSERT examples​
- create
- Manifest
Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information,<br />see [Dynamic Routing Gateways (DRGs)](/iaas/Content/Network/Tasks/managingDRGs.htm).<br /><br />For the purposes of access control, you must provide the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want<br />the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN,<br />the DRG attachment, or other Networking Service components. If you're not sure which compartment<br />to use, put the DRG in the same compartment as the VCN. For more information about compartments<br />and access control, see [Overview of the IAM Service](/iaas/Content/Identity/Concepts/overview.htm).<br />For information about OCIDs, see [Resource Identifiers](/iaas/Content/General/Concepts/identifiers.htm).<br /><br />You may optionally specify a display name for the DRG, otherwise a default is provided.<br />It does not have to be unique, and you can change it. Avoid entering confidential information.<br />
INSERT INTO oci.network.drgs (
compartmentId,
definedTags,
displayName,
freeformTags,
region,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
defaultDrgRouteTables,
defaultExportDrgRouteDistributionId,
definedTags,
displayName,
freeformTags,
lifecycleState,
timeCreated
;
# Description fields are for documentation purposes
- name: drgs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the drgs resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the DRG.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name. Does not have to be unique, and it's changeable.
Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-form tags for this resource. Each tag is a simple key-value pair with no
predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: 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).
description: 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).
UPDATE examples​
- update
Updates the specified DRG's display name or tags. Avoid entering confidential information.<br />
UPDATE oci.network.drgs
SET
defaultDrgRouteTables = '{{ defaultDrgRouteTables }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
drgId = '{{ drgId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
defaultDrgRouteTables,
defaultExportDrgRouteDistributionId,
definedTags,
displayName,
freeformTags,
lifecycleState,
timeCreated;
DELETE examples​
- delete
Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise<br />network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous<br />operation. The DRG's lifecycleState will change to TERMINATING temporarily until the DRG is completely<br />removed.<br />
DELETE FROM oci.network.drgs
WHERE drgId = '{{ drgId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- get_all_drg_attachments
- upgrade_drg
Returns a complete list of DRG attachments that belong to a particular DRG.<br />
EXEC oci.network.drgs.get_all_drg_attachments
@drgId='{{ drgId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@limit='{{ limit }}',
@page='{{ page }}',
@attachmentType='{{ attachmentType }}',
@isCrossTenancy={{ isCrossTenancy }}
;
Upgrades the DRG. After upgrade, you can control routing inside your DRG<br />via DRG attachments, route distributions, and DRG route tables.<br />
EXEC oci.network.drgs.upgrade_drg
@drgId='{{ drgId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
;