Secrets Functions

Package: DBMS_CLOUD_OCI_SC_SECRETS

GET_SECRET_BUNDLE Function

Gets a secret bundle that matches either the specified `stage`, `secretVersionName`, or `versionNumber` parameter. If none of these parameters are provided, the bundle for the secret version marked as `CURRENT` will be returned.

Syntax

FUNCTION get_secret_bundle (
  secret_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  version_number number DEFAULT NULL,
  secret_version_name varchar2 DEFAULT NULL,
  stage varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_sc_secrets_get_secret_bundle_response_t;

Parameters

Parameter Description

secret_id

(required) The OCID of the secret.

opc_request_id

(optional) Unique identifier for the request.

version_number

(optional) The version number of the secret.

secret_version_name

(optional) The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)

stage

(optional) The rotation state of the secret version.

Allowed values are: 'CURRENT', 'PENDING', 'LATEST', 'PREVIOUS', 'DEPRECATED'

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://secrets.vaults.{region}.oci.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

GET_SECRET_BUNDLE_BY_NAME Function

Gets a secret bundle by secret name and vault ID, and secret version that matches either the specified `stage`, `secretVersionName`, or `versionNumber` parameter. If none of these parameters are provided, the bundle for the secret version marked as `CURRENT` is returned.

Syntax

FUNCTION get_secret_bundle_by_name (
  secret_name varchar2,
  vault_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  version_number number DEFAULT NULL,
  secret_version_name varchar2 DEFAULT NULL,
  stage varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_sc_secrets_get_secret_bundle_by_name_response_t;

Parameters

Parameter Description

secret_name

(required) A user-friendly name for the secret. Secret names are unique within a vault. Secret names are case-sensitive.

vault_id

(required) The OCID of the vault that contains the secret.

opc_request_id

(optional) Unique identifier for the request.

version_number

(optional) The version number of the secret.

secret_version_name

(optional) The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)

stage

(optional) The rotation state of the secret version.

Allowed values are: 'CURRENT', 'PENDING', 'LATEST', 'PREVIOUS', 'DEPRECATED'

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://secrets.vaults.{region}.oci.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

LIST_SECRET_BUNDLE_VERSIONS Function

Lists all secret bundle versions for the specified secret.

Syntax

FUNCTION list_secret_bundle_versions (
  secret_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  sort_by varchar2 DEFAULT NULL,
  sort_order varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_sc_secrets_list_secret_bundle_versions_response_t;

Parameters

Parameter Description

secret_id

(required) The OCID of the secret.

opc_request_id

(optional) Unique identifier for the request.

limit

(optional) The maximum number of items to return in a paginated \"List\" call. For information about pagination, see List Pagination.

page

(optional) The value of the `opc-next-page` response header from the previous \"List\" call. For information about pagination, see List Pagination.

sort_by

(optional) The field to sort by. You can specify only one sort order. The default order for `VERSION_NUMBER` is descending.

Allowed values are: 'VERSION_NUMBER'

sort_order

(optional) The sort order to use, either ascending (`ASC`) or descending (`DESC`).

Allowed values are: 'ASC', 'DESC'

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://secrets.vaults.{region}.oci.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.