drg_route_distributions
Creates, updates, deletes, gets or lists a drg_route_distributions resource.
Overview​
| Name | drg_route_distributions |
| Type | Resource |
| Id | oci.network.drg_route_distributions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The route distribution was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The route distribution'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 route distribution. |
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. |
distributionType | string | Whether this distribution defines how routes get imported into route tables or exported through DRG attachments. (IMPORT, EXPORT) |
drgId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG that contains this route distribution. |
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 route distribution's current state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
timeCreated | string (date-time) | The date and time the route distribution was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
A route distribution establishes how routes get imported into DRG route tables and exported through the DRG attachments.<br /><br />A route distribution is a list of statements. Each statement consists of a set of matches, all of which must be True for the statement's action to take place. Each statement determines which routes are propagated.<br /><br />You can assign a route distribution as a route table's import distribution. The statements in an import<br />route distribution specify how how incoming route advertisements through a referenced attachment or all attachments of a certain type are inserted into the route table.<br /><br />You can assign a route distribution as a DRG attachment's export distribution unless the<br />attachment has the type VCN. Exporting routes through a VCN attachment is unsupported. Export<br />route distribution statements specify how routes in a DRG attachment's assigned table are<br />advertised out through the attachment. When a DRG is created, a route distribution is created<br />with a single ACCEPT statement with match criteria MATCH_ALL. By default, all DRG attachments<br />(except for those of type VCN), are assigned this distribution. You can't create a new export route distribution, one is created for you when the DRG is created.<br /><br /><br />The two auto-generated DRG route tables (one as the default for VCN attachments, and the other for all other types of attachments)<br />are each assigned an auto generated import route distribution. The default VCN table's import distribution has a single statement with match criteria MATCH_ALL to import routes from<br />each DRG attachment type. The other table's import distribution has a statement to import routes from attachments with the VCN type.<br /><br />The route distribution is always in the same compartment as the DRG.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The route distribution'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 route distribution. |
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. |
distributionType | string | Whether this distribution defines how routes get imported into route tables or exported through DRG attachments. (IMPORT, EXPORT) |
drgId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG that contains this route distribution. |
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 route distribution's current state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
timeCreated | string (date-time) | The date and time the route distribution 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 | drgRouteDistributionId, region | Gets the specified route distribution's information. | |
list | select | drgId, region | limit, page, displayName, sortBy, sortOrder, lifecycleState | Lists the route distributions in the specified DRG.<br /><br />To retrieve the statements in a distribution, use the<br />ListDrgRouteDistributionStatements operation.<br /> |
create | insert | region, drgId, distributionType | opc-retry-token | Creates a new route distribution for the specified DRG.<br />Assign the route distribution as an import distribution to a DRG route table using the UpdateDrgRouteTable or CreateDrgRouteTable operations.<br />Assign the route distribution as an export distribution to a DRG attachment<br />using the UpdateDrgAttachment or CreateDrgAttachment operations.<br /> |
update | update | drgRouteDistributionId, region | if-match | Updates the specified route distribution<br /> |
delete | delete | drgRouteDistributionId, region | if-match | Deletes the specified route distribution. You can't delete a route distribution currently in use by a DRG attachment or DRG route table.<br /><br />Remove the DRG route distribution from a DRG attachment or DRG route table by using the "RemoveExportDrgRouteDistribution" or "RemoveImportDrgRouteDistribution' operations.<br /> |
add_drg_route_distribution_statements | exec | drgRouteDistributionId, region, statements | Adds one or more route distribution statements to the specified route distribution.<br /> | |
remove_drg_route_distribution_statements | exec | drgRouteDistributionId, region | Removes one or more route distribution statements from the specified route distribution's map.<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 |
|---|---|---|
drgId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG. |
drgRouteDistributionId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. |
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) |
displayName | string | A filter to return only resources that match the given display name exactly. |
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. |
lifecycleState | string | A filter that only returns resources that match the specified lifecycle state. The value is case insensitive. |
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-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). |
sortBy | string | The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. |
SELECT examples​
- get
- list
Gets the specified route distribution's information.
SELECT
id,
compartmentId,
definedTags,
displayName,
distributionType,
drgId,
freeformTags,
lifecycleState,
timeCreated
FROM oci.network.drg_route_distributions
WHERE drgRouteDistributionId = '{{ drgRouteDistributionId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the route distributions in the specified DRG.<br /><br />To retrieve the statements in a distribution, use the<br />ListDrgRouteDistributionStatements operation.<br />
SELECT
id,
compartmentId,
definedTags,
displayName,
distributionType,
drgId,
freeformTags,
lifecycleState,
timeCreated
FROM oci.network.drg_route_distributions
WHERE drgId = '{{ drgId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND displayName = '{{ displayName }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
;
INSERT examples​
- create
- Manifest
Creates a new route distribution for the specified DRG.<br />Assign the route distribution as an import distribution to a DRG route table using the UpdateDrgRouteTable or CreateDrgRouteTable operations.<br />Assign the route distribution as an export distribution to a DRG attachment<br />using the UpdateDrgAttachment or CreateDrgAttachment operations.<br />
INSERT INTO oci.network.drg_route_distributions (
definedTags,
displayName,
distributionType,
drgId,
freeformTags,
region,
opc-retry-token
)
SELECT
'{{ definedTags }}',
'{{ displayName }}',
'{{ distributionType }}' /* required */,
'{{ drgId }}' /* required */,
'{{ freeformTags }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
distributionType,
drgId,
freeformTags,
lifecycleState,
timeCreated
;
# Description fields are for documentation purposes
- name: drg_route_distributions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the drg_route_distributions resource.
- 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: distributionType
value: "{{ distributionType }}"
description: |
States that this distribution defines how routes get imported into route tables.
valid_values: ['IMPORT']
- name: drgId
value: "{{ drgId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG the DRG route table belongs to.
- 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 route distribution<br />
UPDATE oci.network.drg_route_distributions
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
drgRouteDistributionId = '{{ drgRouteDistributionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
distributionType,
drgId,
freeformTags,
lifecycleState,
timeCreated;
DELETE examples​
- delete
Deletes the specified route distribution. You can't delete a route distribution currently in use by a DRG attachment or DRG route table.<br /><br />Remove the DRG route distribution from a DRG attachment or DRG route table by using the "RemoveExportDrgRouteDistribution" or "RemoveImportDrgRouteDistribution' operations.<br />
DELETE FROM oci.network.drg_route_distributions
WHERE drgRouteDistributionId = '{{ drgRouteDistributionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- add_drg_route_distribution_statements
- remove_drg_route_distribution_statements
Adds one or more route distribution statements to the specified route distribution.<br />
EXEC oci.network.drg_route_distributions.add_drg_route_distribution_statements
@drgRouteDistributionId='{{ drgRouteDistributionId }}' --required,
@region='{{ region }}' --required
@@json=
'{
"statements": "{{ statements }}"
}'
;
Removes one or more route distribution statements from the specified route distribution's map.<br />
EXEC oci.network.drg_route_distributions.remove_drg_route_distribution_statements
@drgRouteDistributionId='{{ drgRouteDistributionId }}' --required,
@region='{{ region }}' --required
@@json=
'{
"statementIds": "{{ statementIds }}"
}'
;