key_stores
Creates, updates, deletes, gets or lists a key_stores resource.
Overview​
| Name | key_stores |
| Type | Resource |
| Id | oci.database.key_stores |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The key store.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the key store. |
associatedDatabases | array | List of databases associated with the key store. |
associatedLongTermBackupCount | integer | Indicates the number of long term backups of Autonomous AI Databases associated with this backup destination. |
associatedLongTermBackups | array | List of long term backups of Autonomous AI Databases associated with this backup destination.The maximum associated number of long term backup listed here would be 1024. |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
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 key store. 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 key store. (ACTIVE, DELETED) |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time that the key store was created. |
typeDetails | object | Key store type details. |
Details of the Key Store.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the key store. |
associatedDatabases | array | List of databases associated with the key store. |
associatedLongTermBackupCount | integer | Indicates the number of long term backups of Autonomous AI Databases associated with this backup destination. |
associatedLongTermBackups | array | List of long term backups of Autonomous AI Databases associated with this backup destination.The maximum associated number of long term backup listed here would be 1024. |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
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 key store. 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 key store. (ACTIVE, DELETED) |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time that the key store was created. |
typeDetails | object | Key store type details. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | keyStoreId, region | opc-request-id | Gets information about the specified key store.<br /> |
list | select | compartmentId, region | limit, page, opc-request-id | Gets a list of key stores in the specified compartment.<br /> |
create | insert | region, compartmentId, displayName, typeDetails | opc-retry-token, opc-request-id | Creates a Key Store.<br /> |
update | update | keyStoreId, region | if-match, opc-request-id | Edit the key store.<br /> |
delete | delete | keyStoreId, region | if-match, opc-request-id | Deletes a key store.<br /> |
change_compartment | exec | keyStoreId, region, compartmentId | opc-retry-token, opc-request-id, if-match | Move the key store resource to the specified compartment.<br />For more information about moving key stores, see<br />[Moving Database Resources to a Different Compartment](/Content/Database/Concepts/databaseoverview.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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The compartment [OCID](/Content/General/Concepts/identifiers.htm). |
keyStoreId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the key store. |
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 | 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. |
SELECT examples​
- get
- list
Gets information about the specified key store.<br />
SELECT
id,
associatedDatabases,
associatedLongTermBackupCount,
associatedLongTermBackups,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
typeDetails
FROM oci.database.key_stores
WHERE keyStoreId = '{{ keyStoreId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Gets a list of key stores in the specified compartment.<br />
SELECT
id,
associatedDatabases,
associatedLongTermBackupCount,
associatedLongTermBackups,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
typeDetails
FROM oci.database.key_stores
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
;
INSERT examples​
- create
- Manifest
Creates a Key Store.<br />
INSERT INTO oci.database.key_stores (
compartmentId,
definedTags,
displayName,
freeformTags,
typeDetails,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ typeDetails }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
associatedDatabases,
associatedLongTermBackupCount,
associatedLongTermBackups,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
typeDetails
;
# Description fields are for documentation purposes
- name: key_stores
props:
- name: region
value: "{{ region }}"
description: Required parameter for the key_stores resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
- 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 key store. 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: typeDetails
description: |
Key store type details.
value:
type: "{{ type }}"
- 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
Edit the key store.<br />
UPDATE oci.database.key_stores
SET
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}',
typeDetails = '{{ typeDetails }}'
WHERE
keyStoreId = '{{ keyStoreId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
associatedDatabases,
associatedLongTermBackupCount,
associatedLongTermBackups,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
typeDetails;
DELETE examples​
- delete
Deletes a key store.<br />
DELETE FROM oci.database.key_stores
WHERE keyStoreId = '{{ keyStoreId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;
Lifecycle Methods​
- change_compartment
Move the key store resource to the specified compartment.<br />For more information about moving key stores, see<br />[Moving Database Resources to a Different Compartment](/Content/Database/Concepts/databaseoverview.htm#moveRes).<br />
EXEC oci.database.key_stores.change_compartment
@keyStoreId='{{ keyStoreId }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}',
@if-match='{{ if-match }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;