Skip to main content

key_stores

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

Overview​

Namekey_stores
TypeResource
Idoci.database.key_stores

Fields​

The following fields are returned by SELECT queries:

The key store.<br />

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the key store.
associatedDatabasesarrayList of databases associated with the key store.
associatedLongTermBackupCountintegerIndicates the number of long term backups of Autonomous AI Databases associated with this backup destination.
associatedLongTermBackupsarrayList 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.
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
displayNamestringThe user-friendly name for the key store. The name does not need to be unique.
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](/Content/General/Concepts/resourcetags.htm). Example: &#123;"Department": "Finance"&#125;
lifecycleDetailsstringAdditional information about the current lifecycle state.
lifecycleStatestringThe current state of the key store. (ACTIVE, DELETED)
systemTagsobjectSystem tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
timeCreatedstring (date-time)The date and time that the key store was created.
typeDetailsobjectKey store type details.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkeyStoreId, regionopc-request-idGets information about the specified key store.<br />
listselectcompartmentId, regionlimit, page, opc-request-idGets a list of key stores in the specified compartment.<br />
createinsertregion, compartmentId, displayName, typeDetailsopc-retry-token, opc-request-idCreates a Key Store.<br />
updateupdatekeyStoreId, regionif-match, opc-request-idEdit the key store.<br />
deletedeletekeyStoreId, regionif-match, opc-request-idDeletes a key store.<br />
change_compartmentexeckeyStoreId, region, compartmentIdopc-retry-token, opc-request-id, if-matchMove 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.

NameDatatypeDescription
compartmentIdstringThe compartment [OCID](/Content/General/Concepts/identifiers.htm).
keyStoreIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the key store.
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.
limitintegerThe maximum number of items to return per page.
opc-request-idstringUnique identifier for the request.
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).
pagestringThe pagination token to continue listing from.

SELECT examples​

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

INSERT examples​

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
;

UPDATE examples​

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​

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​

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