Viewing Properties for All Secret Versions

View properties for all secret versions using the CLI interface.

Using the CLI

Open a command prompt and run oci secrets secret-bundle get to view the contents and properties of the current secret version:

oci secrets secret-bundle get --secret-id <target_secret_id> --stage <target_secret_version_rotation_state>

For example:


oci secrets secret-bundle get --secret-id ocid1.vaultsecret.oc1.iad.exampleaz5qacpqahuecvbjqzql4qmpbrtd7pprafhivcfik6wuitexample --stage CURRENT

You can also query for a secret with its name and vault ID using the following command:

oci secrets secret-bundle get-secret-bundle-by-name --secret-name target_secret_name --vault-id target_vault_id --stage target_secret_version_rotation_state
For example:
oci secrets secret-bundle get-secret-bundle-by-name --secret-name testSecret --vault-id ocid1.vault.oc1.iad.exampleyaaeuk.examplesuxtdqxczlvygwk4ouq2mhzr223g4o2ojs4o4q4ghmtddlexample --stage CURRENT
Note

Alternatively, you can use the GetSecretBundleByName API.

For a complete list of parameters and values for CLI commands, see KMS CLI Command Reference.