Skip to main content

secret_bundles

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

Overview​

Namesecret_bundles
TypeResource
Idoci.secrets.secret_bundles

Fields​

The following fields are returned by SELECT queries:

A secret bundle.

NameDatatypeDescription
metadataobjectCustomer-provided contextual metadata for the secret.
secretBundleContentobjectThe contents of the secret. (x-example: {<br /> "contentType": "BASE64"<br />}<br />)
secretIdstringThe OCID of the secret.
stagesarrayA list of possible rotation states for the secret version.
timeCreatedstring (date-time)The time when the secret bundle was created.
timeOfDeletionstring (date-time)An optional property indicating when to delete the secret version, expressed in [RFC 3339](https:​//tools.ietf.org/html/rfc3339) timestamp format. Example: 2019-04-03T21:10:29.600Z
timeOfExpirystring (date-time)An optional property indicating when the secret version will expire, expressed in [RFC 3339](https:​//tools.ietf.org/html/rfc3339) timestamp format. Example: 2019-04-03T21:10:29.600Z
versionNamestringThe name of the secret version. Labels are unique across the different versions of a particular secret.
versionNumberinteger (int64)The version number of the secret.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsecretId, regionopc-request-id, versionNumber, secretVersionName, stageGets a secret bundle that matches either the specified stage, secretVersionName, or versionNumber parameter.<br />If none of these parameters are provided, the bundle for the secret version marked as CURRENT will be returned.<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
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)
secretIdstringThe OCID of the secret.
opc-request-idstringUnique identifier for the request.
secretVersionNamestringThe 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.)
stagestringThe rotation state of the secret version.
versionNumberinteger (int64)The version number of the secret.

SELECT examples​

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

SELECT
metadata,
secretBundleContent,
secretId,
stages,
timeCreated,
timeOfDeletion,
timeOfExpiry,
versionName,
versionNumber
FROM oci.secrets.secret_bundles
WHERE secretId = '{{ secretId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND versionNumber = '{{ versionNumber }}'
AND secretVersionName = '{{ secretVersionName }}'
AND stage = '{{ stage }}'
;