Skip to main content

local_peering_gateways

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

Overview​

Namelocal_peering_gateways
TypeResource
Idoci.network.local_peering_gateways

Fields​

The following fields are returned by SELECT queries:

The local peering gateway was retrieved.

NameDatatypeDescription
idstringThe LPG's Oracle ID ([OCID](/iaas/Content/General/Concepts/identifiers.htm)).
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the LPG.
definedTagsobjectDefined 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"}}
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTagsobjectFree-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"}
isCrossTenancyPeeringbooleanWhether the VCN at the other end of the peering is in a different tenancy. Example: false
lifecycleStatestringThe LPG's current lifecycle state. (PROVISIONING, AVAILABLE, TERMINATING, TERMINATED)
peerAdvertisedCidrstringThe 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
peerAdvertisedCidrDetailsarrayThe 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]
peerIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the peered LPG.
peeringStatusstringWhether 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)
peeringStatusDetailsstringAdditional information regarding the peering status, if applicable.
routeTableIdstringThe [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).
securityAttributesobject[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"}}}
timeCreatedstring (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
vcnIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN that uses the LPG.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlocalPeeringGatewayId, regionGets the specified local peering gateway's information.
listselectcompartmentId, regionlimit, page, vcnIdLists 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 />
createinsertregion, compartmentId, vcnIdopc-retry-tokenCreates a new local peering gateway (LPG) for the specified VCN.<br />
updateupdatelocalPeeringGatewayId, regionif-matchUpdates the specified local peering gateway (LPG).<br />
deletedeletelocalPeeringGatewayId, regionif-matchDeletes 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_compartmentexeclocalPeeringGatewayId, region, compartmentIdopc-request-id, opc-retry-tokenMoves 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_gatewaysexeclocalPeeringGatewayId, region, peerIdConnects 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.

NameDatatypeDescription
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
localPeeringGatewayIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway.
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)
if-matchstringFor 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.
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
opc-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA 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).
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).
vcnIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VCN.

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

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​

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 }}"
}'
;