instance_console_connections
Creates, updates, deletes, gets or lists an instance_console_connections resource.
Overview​
| Name | instance_console_connections |
| Type | Resource |
| Id | oci.compute.instance_console_connections |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The instance console connection was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the console connection. |
compartmentId | string | The OCID of the compartment to contain the console connection. |
connectionString | string | The SSH connection string for the console connection. |
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"}} |
fingerprint | string | The SSH public key's fingerprint for client authentication to the console connection. |
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"} |
instanceId | string | The OCID of the instance the console connection connects to. |
lifecycleState | string | The current state of the console connection. (ACTIVE, CREATING, DELETED, DELETING, FAILED) |
serviceHostKeyFingerprint | string | The SSH public key's fingerprint for the console connection service host. |
vncConnectionString | string | The SSH connection string for the SSH tunnel used to connect to the console connection over VNC. |
The InstanceConsoleConnection API provides you with console access to Compute instances,<br />enabling you to troubleshoot malfunctioning instances remotely.<br /><br />For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](/iaas/Content/Compute/References/serialconsole.htm).<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the console connection. |
compartmentId | string | The OCID of the compartment to contain the console connection. |
connectionString | string | The SSH connection string for the console connection. |
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"}} |
fingerprint | string | The SSH public key's fingerprint for client authentication to the console connection. |
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"} |
instanceId | string | The OCID of the instance the console connection connects to. |
lifecycleState | string | The current state of the console connection. (ACTIVE, CREATING, DELETED, DELETING, FAILED) |
serviceHostKeyFingerprint | string | The SSH public key's fingerprint for the console connection service host. |
vncConnectionString | string | The SSH connection string for the SSH tunnel used to connect to the console connection over VNC. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | instanceConsoleConnectionId, region | Gets the specified instance console connection's information. | |
list | select | compartmentId, region | instanceId, limit, page | Lists the console connections for the specified compartment or instance.<br /><br />For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](/iaas/Content/Compute/References/serialconsole.htm).<br /> |
create | insert | region, instanceId, publicKey | opc-retry-token | Creates a new console connection to the specified instance.<br />After the console connection has been created and is available,<br />you connect to the console using SSH.<br /><br />For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](/iaas/Content/Compute/References/serialconsole.htm).<br /> |
update | update | instanceConsoleConnectionId, region | opc-request-id, if-match | Updates the defined tags and free-form tags for the specified instance console connection. |
delete | delete | instanceConsoleConnectionId, region | if-match | Deletes the specified instance console connection. |
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. |
instanceConsoleConnectionId | string | The OCID of the instance console connection. |
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. |
instanceId | string | The OCID of the instance. |
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 instance console connection's information.
SELECT
id,
compartmentId,
connectionString,
definedTags,
fingerprint,
freeformTags,
instanceId,
lifecycleState,
serviceHostKeyFingerprint,
vncConnectionString
FROM oci.compute.instance_console_connections
WHERE instanceConsoleConnectionId = '{{ instanceConsoleConnectionId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the console connections for the specified compartment or instance.<br /><br />For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](/iaas/Content/Compute/References/serialconsole.htm).<br />
SELECT
id,
compartmentId,
connectionString,
definedTags,
fingerprint,
freeformTags,
instanceId,
lifecycleState,
serviceHostKeyFingerprint,
vncConnectionString
FROM oci.compute.instance_console_connections
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND instanceId = '{{ instanceId }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
;
INSERT examples​
- create
- Manifest
Creates a new console connection to the specified instance.<br />After the console connection has been created and is available,<br />you connect to the console using SSH.<br /><br />For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](/iaas/Content/Compute/References/serialconsole.htm).<br />
INSERT INTO oci.compute.instance_console_connections (
definedTags,
freeformTags,
instanceId,
publicKey,
region,
opc-retry-token
)
SELECT
'{{ definedTags }}',
'{{ freeformTags }}',
'{{ instanceId }}' /* required */,
'{{ publicKey }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
connectionString,
definedTags,
fingerprint,
freeformTags,
instanceId,
lifecycleState,
serviceHostKeyFingerprint,
vncConnectionString
;
# Description fields are for documentation purposes
- name: instance_console_connections
props:
- name: region
value: "{{ region }}"
description: Required parameter for the instance_console_connections 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: 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: instanceId
value: "{{ instanceId }}"
description: |
The OCID of the instance to create the console connection to.
- name: publicKey
value: "{{ publicKey }}"
description: |
The SSH public key used to authenticate the console connection.
- 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 defined tags and free-form tags for the specified instance console connection.
UPDATE oci.compute.instance_console_connections
SET
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}'
WHERE
instanceConsoleConnectionId = '{{ instanceConsoleConnectionId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
connectionString,
definedTags,
fingerprint,
freeformTags,
instanceId,
lifecycleState,
serviceHostKeyFingerprint,
vncConnectionString;
DELETE examples​
- delete
Deletes the specified instance console connection.
DELETE FROM oci.compute.instance_console_connections
WHERE instanceConsoleConnectionId = '{{ instanceConsoleConnectionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;