Skip to main content

cpes

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

Overview​

Namecpes
TypeResource
Idoci.network.cpes

Fields​

The following fields are returned by SELECT queries:

The CPE was retrieved.

NameDatatypeDescription
idstringThe CPE's Oracle ID (OCID).
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the CPE.
cpeDeviceShapeIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the CPE's device type. The Networking service maintains a general list of CPE device types (for example, Cisco ASA). For each type, Oracle provides CPE configuration content that can help a network engineer configure the CPE. The [OCID](/iaas/Content/General/Concepts/identifiers.htm) uniquely identifies the type of device. To get the OCIDs for the device types on the list, see [ListCpeDeviceShapes](#/en/iaas/latest/CpeDeviceShapeSummary/ListCpeDeviceShapes). For information about how to generate CPE configuration content for a CPE device type, see: * [GetCpeDeviceConfigContent](#/en/iaas/latest/Cpe/GetCpeDeviceConfigContent) * [GetIpsecCpeDeviceConfigContent](#/en/iaas/latest/IPSecConnection/GetIpsecCpeDeviceConfigContent) * [GetTunnelCpeDeviceConfigContent](#/en/iaas/latest/TunnelCpeDeviceConfig/GetTunnelCpeDeviceConfigContent) * [GetTunnelCpeDeviceConfig](#/en/iaas/latest/TunnelCpeDeviceConfig/GetTunnelCpeDeviceConfig)
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"}
ipAddressstringThe public IP address of the on-premises router.
isPrivatebooleanIndicates whether this CPE is of type private or not.
timeCreatedstring (date-time)The date and time the CPE 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcpeId, regionGets the specified CPE's information.
listselectcompartmentId, regionlimit, pageLists the customer-premises equipment objects (CPEs) in the specified compartment.<br />
createinsertregion, compartmentId, ipAddressopc-retry-tokenCreates a new virtual customer-premises equipment (CPE) object in the specified compartment. For<br />more information, see [Site-to-Site VPN Overview](/iaas/Content/Network/Tasks/overviewIPsec.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 CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec<br />connection or other Networking Service components. If you're not sure which compartment to<br />use, put the CPE in the same compartment as the DRG. For more information about<br />compartments 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 must provide the public IP address of your on-premises router. See<br />[CPE Configuration](/iaas/Content/Network/Tasks/configuringCPE.htm).<br /><br />You may optionally specify a display name for the CPE, otherwise a default is provided. It does not have to<br />be unique, and you can change it. Avoid entering confidential information.<br />
updateupdatecpeId, regionif-matchUpdates the specified CPE's display name or tags.<br />Avoid entering confidential information.<br />
deletedeletecpeId, regionif-matchDeletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous<br />operation. The CPE's lifecycleState will change to TERMINATING temporarily until the CPE is completely<br />removed.<br />
change_compartmentexeccpeId, region, compartmentIdopc-request-id, opc-retry-tokenMoves a CPE object 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 />

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.
cpeIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the CPE.
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).

SELECT examples​

Gets the specified CPE's information.

SELECT
id,
compartmentId,
cpeDeviceShapeId,
definedTags,
displayName,
freeformTags,
ipAddress,
isPrivate,
timeCreated
FROM oci.network.cpes
WHERE cpeId = '{{ cpeId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For<br />more information, see [Site-to-Site VPN Overview](/iaas/Content/Network/Tasks/overviewIPsec.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 CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec<br />connection or other Networking Service components. If you're not sure which compartment to<br />use, put the CPE in the same compartment as the DRG. For more information about<br />compartments 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 must provide the public IP address of your on-premises router. See<br />[CPE Configuration](/iaas/Content/Network/Tasks/configuringCPE.htm).<br /><br />You may optionally specify a display name for the CPE, otherwise a default is provided. It does not have to<br />be unique, and you can change it. Avoid entering confidential information.<br />

INSERT INTO oci.network.cpes (
compartmentId,
cpeDeviceShapeId,
definedTags,
displayName,
freeformTags,
ipAddress,
isPrivate,
region,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ cpeDeviceShapeId }}',
'{{ definedTags }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ ipAddress }}' /* required */,
{{ isPrivate }},
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
cpeDeviceShapeId,
definedTags,
displayName,
freeformTags,
ipAddress,
isPrivate,
timeCreated
;

UPDATE examples​

Updates the specified CPE's display name or tags.<br />Avoid entering confidential information.<br />

UPDATE oci.network.cpes
SET
cpeDeviceShapeId = '{{ cpeDeviceShapeId }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
cpeId = '{{ cpeId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
cpeDeviceShapeId,
definedTags,
displayName,
freeformTags,
ipAddress,
isPrivate,
timeCreated;

DELETE examples​

Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous<br />operation. The CPE's lifecycleState will change to TERMINATING temporarily until the CPE is completely<br />removed.<br />

DELETE FROM oci.network.cpes
WHERE cpeId = '{{ cpeId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;

Lifecycle Methods​

Moves a CPE object 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.cpes.change_compartment
@cpeId='{{ cpeId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;