console_histories
Creates, updates, deletes, gets or lists a console_histories resource.
Overview​
| Name | console_histories |
| Type | Resource |
| Id | oci.database.console_histories |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The console history information was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the console history. |
compartmentId | string | The OCID of the compartment containing the console history. |
dbNodeId | string | The OCID of the database node. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the console history. The name does not need to be unique. |
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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the console history. (REQUESTED, GETTING_HISTORY, SUCCEEDED, FAILED, DELETED, DELETING) |
timeCreated | string (date-time) | The date and time the console history was created. |
The list of console histories was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the console history. |
compartmentId | string | The OCID of the compartment containing the console history. |
dbNodeId | string | The OCID of the database node. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The user-friendly name for the console history. The name does not need to be unique. |
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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the console history. (REQUESTED, GETTING_HISTORY, SUCCEEDED, FAILED, DELETED, DELETING) |
timeCreated | string (date-time) | The date and time the console history was created. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | dbNodeId, consoleHistoryId, region | opc-request-id | Gets information about the specified database node console history.<br /> |
list | select | dbNodeId, region | limit, page, opc-request-id, sortBy, sortOrder, lifecycleState, displayName | Lists the console histories for the specified database node.<br /> |
create | insert | dbNodeId, region, displayName | opc-retry-token, opc-request-id | Captures the most recent serial console data (up to a megabyte) for the specified database node.<br /> |
update | update | dbNodeId, consoleHistoryId, region | if-match, opc-request-id | Updates the specified database node console history.<br /> |
delete | delete | dbNodeId, consoleHistoryId, region | if-match, opc-request-id | Deletes the specified database node console history.<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 |
|---|---|---|
consoleHistoryId | string | The OCID of the console history. |
dbNodeId | string | The database node [OCID](/Content/General/Concepts/identifiers.htm). |
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 entire display name given. The match is not case sensitive. |
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 to return only resources that match the given lifecycle state exactly. |
limit | integer | The maximum number of items to return per page. |
opc-request-id | string | Unique identifier for the request. |
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 | The pagination token to continue listing from. |
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. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
SELECT examples​
- get
- list
Gets information about the specified database node console history.<br />
SELECT
id,
compartmentId,
dbNodeId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
timeCreated
FROM oci.database.console_histories
WHERE dbNodeId = '{{ dbNodeId }}' -- required
AND consoleHistoryId = '{{ consoleHistoryId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists the console histories for the specified database node.<br />
SELECT
id,
compartmentId,
dbNodeId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
timeCreated
FROM oci.database.console_histories
WHERE dbNodeId = '{{ dbNodeId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
AND displayName = '{{ displayName }}'
;
INSERT examples​
- create
- Manifest
Captures the most recent serial console data (up to a megabyte) for the specified database node.<br />
INSERT INTO oci.database.console_histories (
definedTags,
displayName,
freeformTags,
dbNodeId,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ dbNodeId }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
compartmentId,
dbNodeId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
timeCreated
;
# Description fields are for documentation purposes
- name: console_histories
props:
- name: dbNodeId
value: "{{ dbNodeId }}"
description: Required parameter for the console_histories resource.
- name: region
value: "{{ region }}"
description: Required parameter for the console_histories 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](/Content/General/Concepts/resourcetags.htm).
- name: displayName
value: "{{ displayName }}"
description: |
The user-friendly name for the console history. The name does not need to be unique.
- 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](/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).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request.
description: Unique identifier for the request.
UPDATE examples​
- update
Updates the specified database node console history.<br />
UPDATE oci.database.console_histories
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
dbNodeId = '{{ dbNodeId }}' --required
AND consoleHistoryId = '{{ consoleHistoryId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
compartmentId,
dbNodeId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
timeCreated;
DELETE examples​
- delete
Deletes the specified database node console history.<br />
DELETE FROM oci.database.console_histories
WHERE dbNodeId = '{{ dbNodeId }}' --required
AND consoleHistoryId = '{{ consoleHistoryId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;