volume_kms_keys
Creates, updates, deletes, gets or lists a volume_kms_keys resource.
Overview​
| Name | volume_kms_keys |
| Type | Resource |
| Id | oci.block_storage.volume_kms_keys |
Fields​
The following fields are returned by SELECT queries:
- get
The OCID of the Vault service master encryption key associated with this volume.
| Name | Datatype | Description |
|---|---|---|
kmsKeyId | string | The OCID of the Vault service key assigned to this volume. If the volume is not using Vault service, then the kmsKeyId will be a null string. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | volumeId, region | if-match | Gets the Vault service encryption key assigned to the specified volume.<br /> |
update | update | volumeId, region | if-match | Updates the specified volume with a new Key Management master encryption key.<br /> |
delete | delete | volumeId, region | if-match | Removes the specified volume's assigned Vault service encryption key.<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 |
|---|---|---|
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) |
volumeId | string | The OCID of the volume. |
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. |
SELECT examples​
- get
Gets the Vault service encryption key assigned to the specified volume.<br />
SELECT
kmsKeyId
FROM oci.block_storage.volume_kms_keys
WHERE volumeId = '{{ volumeId }}' -- required
AND region = '{{ region }}' -- required
AND if-match = '{{ if-match }}'
;
UPDATE examples​
- update
Updates the specified volume with a new Key Management master encryption key.<br />
UPDATE oci.block_storage.volume_kms_keys
SET
kmsKeyId = '{{ kmsKeyId }}'
WHERE
volumeId = '{{ volumeId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
kmsKeyId;
DELETE examples​
- delete
Removes the specified volume's assigned Vault service encryption key.<br />
DELETE FROM oci.block_storage.volume_kms_keys
WHERE volumeId = '{{ volumeId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;