secret_bundles
Creates, updates, deletes, gets or lists a secret_bundles resource.
Overview​
| Name | secret_bundles |
| Type | Resource |
| Id | oci.secrets.secret_bundles |
Fields​
The following fields are returned by SELECT queries:
- get
A secret bundle.
| Name | Datatype | Description |
|---|---|---|
metadata | object | Customer-provided contextual metadata for the secret. |
secretBundleContent | object | The contents of the secret. (x-example: {<br /> "contentType": "BASE64"<br />}<br />) |
secretId | string | The OCID of the secret. |
stages | array | A list of possible rotation states for the secret version. |
timeCreated | string (date-time) | The time when the secret bundle was created. |
timeOfDeletion | string (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 |
timeOfExpiry | string (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 |
versionName | string | The name of the secret version. Labels are unique across the different versions of a particular secret. |
versionNumber | integer (int64) | The version number of the secret. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | secretId, region | opc-request-id, versionNumber, secretVersionName, stage | 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 /> |
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) |
secretId | string | The OCID of the secret. |
opc-request-id | string | Unique identifier for the request. |
secretVersionName | string | 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 | string | The rotation state of the secret version. |
versionNumber | integer (int64) | The version number of the secret. |
SELECT examples​
- get
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 }}'
;