local_peering_gateways
Creates, updates, deletes, gets or lists a local_peering_gateways resource.
Overview​
| Name | local_peering_gateways |
| Type | Resource |
| Id | oci.network.local_peering_gateways |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The local peering gateway was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The LPG'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 LPG. |
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"} |
isCrossTenancyPeering | boolean | Whether the VCN at the other end of the peering is in a different tenancy. Example: false |
lifecycleState | string | The LPG's current lifecycle state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
peerAdvertisedCidr | string | The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1 |
peerAdvertisedCidrDetails | array | The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24] |
peerId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the peered LPG. |
peeringStatus | string | Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted. (INVALID, NEW, PEERED, PENDING, REVOKED) |
peeringStatusDetails | string | Additional information regarding the peering status, if applicable. |
routeTableId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG is using. For information about why you would associate a route table with an LPG, see [Transit Routing: Access to Multiple VCNs in Same Region](/iaas/Content/Network/Tasks/transitrouting.htm). |
securityAttributes | object | [Security attributes](/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}} |
timeCreated | string (date-time) | The date and time the LPG was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
vcnId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN that uses the LPG. |
A local peering gateway (LPG) is an object on a VCN that lets that VCN peer<br />with another VCN in the same region. Peering means that the two VCNs can<br />communicate using private IP addresses, but without the traffic traversing the<br />internet or routing through your on-premises network. For more information,<br />see [VCN Peering](/iaas/Content/Network/Tasks/VCNpeering.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 LPG'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 LPG. |
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"} |
isCrossTenancyPeering | boolean | Whether the VCN at the other end of the peering is in a different tenancy. Example: false |
lifecycleState | string | The LPG's current lifecycle state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED) |
peerAdvertisedCidr | string | The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1 |
peerAdvertisedCidrDetails | array | The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24] |
peerId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the peered LPG. |
peeringStatus | string | Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted. (INVALID, NEW, PEERED, PENDING, REVOKED) |
peeringStatusDetails | string | Additional information regarding the peering status, if applicable. |
routeTableId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG is using. For information about why you would associate a route table with an LPG, see [Transit Routing: Access to Multiple VCNs in Same Region](/iaas/Content/Network/Tasks/transitrouting.htm). |
securityAttributes | object | [Security attributes](/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}} |
timeCreated | string (date-time) | The date and time the LPG was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
vcnId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN that uses the LPG. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | localPeeringGatewayId, region | Gets the specified local peering gateway's information. | |
list | select | compartmentId, region | limit, page, vcnId | Lists the local peering gateways (LPGs) for the specified VCN and specified compartment.<br />If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment.<br /> |
create | insert | region, compartmentId, vcnId | opc-retry-token | Creates a new local peering gateway (LPG) for the specified VCN.<br /> |
update | update | localPeeringGatewayId, region | if-match | Updates the specified local peering gateway (LPG).<br /> |
delete | delete | localPeeringGatewayId, region | if-match | Deletes the specified local peering gateway (LPG).<br /><br />This is an asynchronous operation; the local peering gateway's lifecycleState changes to TERMINATING temporarily<br />until the local peering gateway is completely removed.<br /> |
change_compartment | exec | localPeeringGatewayId, region, compartmentId | opc-request-id, opc-retry-token | Moves a local peering gateway into a different compartment within the same tenancy. For information<br />about moving resources between compartments, see<br />[Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br /> |
connect_local_peering_gateways | exec | localPeeringGatewayId, region, peerId | Connects this local peering gateway (LPG) to another one in the same region.<br /><br />This operation must be called by the VCN administrator who is designated as<br />the requestor in the peering relationship. The acceptor must implement<br />an Identity and Access Management (IAM) policy that gives the requestor permission<br />to connect to LPGs in the acceptor's compartment. Without that permission, this<br />operation will fail. For more information, see<br />[VCN Peering](/iaas/Content/Network/Tasks/VCNpeering.htm).<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. |
localPeeringGatewayId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. |
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) |
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. |
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). |
vcnId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN. |
SELECT examples​
- get
- list
Gets the specified local peering gateway's information.
SELECT
id,
compartmentId,
definedTags,
displayName,
freeformTags,
isCrossTenancyPeering,
lifecycleState,
peerAdvertisedCidr,
peerAdvertisedCidrDetails,
peerId,
peeringStatus,
peeringStatusDetails,
routeTableId,
securityAttributes,
timeCreated,
vcnId
FROM oci.network.local_peering_gateways
WHERE localPeeringGatewayId = '{{ localPeeringGatewayId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the local peering gateways (LPGs) for the specified VCN and specified compartment.<br />If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment.<br />
SELECT
id,
compartmentId,
definedTags,
displayName,
freeformTags,
isCrossTenancyPeering,
lifecycleState,
peerAdvertisedCidr,
peerAdvertisedCidrDetails,
peerId,
peeringStatus,
peeringStatusDetails,
routeTableId,
securityAttributes,
timeCreated,
vcnId
FROM oci.network.local_peering_gateways
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND vcnId = '{{ vcnId }}'
;
INSERT examples​
- create
- Manifest
Creates a new local peering gateway (LPG) for the specified VCN.<br />
INSERT INTO oci.network.local_peering_gateways (
compartmentId,
definedTags,
displayName,
freeformTags,
routeTableId,
securityAttributes,
vcnId,
region,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ routeTableId }}',
'{{ securityAttributes }}',
'{{ vcnId }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
freeformTags,
isCrossTenancyPeering,
lifecycleState,
peerAdvertisedCidr,
peerAdvertisedCidrDetails,
peerId,
peeringStatus,
peeringStatusDetails,
routeTableId,
securityAttributes,
timeCreated,
vcnId
;
# Description fields are for documentation purposes
- name: local_peering_gateways
props:
- name: region
value: "{{ region }}"
description: Required parameter for the local_peering_gateways resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the local peering gateway (LPG).
- 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: routeTableId
value: "{{ routeTableId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG will use.
If you don't specify a route table here, the LPG is created without an associated route
table. The Networking service does NOT automatically associate the attached VCN's default route table
with the LPG.
For information about why you would associate a route table with an LPG, see
[Transit Routing: Access to Multiple VCNs in Same Region](/iaas/Content/Network/Tasks/transitrouting.htm).
- name: securityAttributes
value: "{{ securityAttributes }}"
description: |
[Security attributes](/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels
for a resource that can be referenced in a [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/overview.htm)
(ZPR) policy to control access to ZPR-supported resources.
Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}`
- name: vcnId
value: "{{ vcnId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN the LPG belongs to.
- 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 local peering gateway (LPG).<br />
UPDATE oci.network.local_peering_gateways
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
routeTableId = '{{ routeTableId }}',
securityAttributes = '{{ securityAttributes }}'
WHERE
localPeeringGatewayId = '{{ localPeeringGatewayId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
freeformTags,
isCrossTenancyPeering,
lifecycleState,
peerAdvertisedCidr,
peerAdvertisedCidrDetails,
peerId,
peeringStatus,
peeringStatusDetails,
routeTableId,
securityAttributes,
timeCreated,
vcnId;
DELETE examples​
- delete
Deletes the specified local peering gateway (LPG).<br /><br />This is an asynchronous operation; the local peering gateway's lifecycleState changes to TERMINATING temporarily<br />until the local peering gateway is completely removed.<br />
DELETE FROM oci.network.local_peering_gateways
WHERE localPeeringGatewayId = '{{ localPeeringGatewayId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- change_compartment
- connect_local_peering_gateways
Moves a local peering gateway into a different compartment within the same tenancy. For information<br />about moving resources between compartments, see<br />[Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />
EXEC oci.network.local_peering_gateways.change_compartment
@localPeeringGatewayId='{{ localPeeringGatewayId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;
Connects this local peering gateway (LPG) to another one in the same region.<br /><br />This operation must be called by the VCN administrator who is designated as<br />the requestor in the peering relationship. The acceptor must implement<br />an Identity and Access Management (IAM) policy that gives the requestor permission<br />to connect to LPGs in the acceptor's compartment. Without that permission, this<br />operation will fail. For more information, see<br />[VCN Peering](/iaas/Content/Network/Tasks/VCNpeering.htm).<br />
EXEC oci.network.local_peering_gateways.connect_local_peering_gateways
@localPeeringGatewayId='{{ localPeeringGatewayId }}' --required,
@region='{{ region }}' --required
@@json=
'{
"peerId": "{{ peerId }}"
}'
;