Viewing operations with a secret
The system logs all actions with Yandex Lockbox resources as a list of operations. Each operation gets its own unique ID.
Getting a list of operations
- In the management console
, select the folder the secret belongs to. - In the list of services, select Lockbox.
- In the left-hand menu, select Secrets.
- Click the name of the secret you need.
- In the left-hand panel, select Operations.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To get a list of operations for a secret, run this command:
yc lockbox secret list-operations <secret_name_or_ID>
Result:
+----------------------+---------------------+----------------------+---------------------+--------+---------------+
| ID | CREATED AT | CREATED BY | MODIFIED AT | STATUS | DESCRIPTION |
+----------------------+---------------------+----------------------+---------------------+--------+---------------+
| e6qj8hr2mfoj******** | 2024-03-27 02:47:03 | aje9k8luj4qf******** | 2024-03-27 02:47:03 | DONE | Update secret |
| e6q4145hccpl******** | 2024-03-27 02:46:40 | aje9k8luj4qf******** | 2024-03-27 02:46:40 | DONE | Update secret |
+----------------------+---------------------+----------------------+---------------------+--------+---------------+
By default, operation information is displayed as text. To get more detailed information, specify the yaml or json output data format using the --format parameter:
yc lockbox secret list-operations <secret_name_or_ID> --format yaml
Result:
- id: e6qj8hr2mfoj********
description: Update secret
created_at: "2024-03-27T02:47:03.482004186Z"
created_by: aje9k8luj4qf********
modified_at: "2024-03-27T02:47:03.482036369Z"
done: true
metadata:
'@type': type.googleapis.com/yandex.cloud.lockbox.v1.UpdateSecretMetadata
secret_id: e6qnva6ntl66********
response:
'@type': type.googleapis.com/google.protobuf.Empty
value: {}
- id: e6q4145hccpl********
description: Update secret
created_at: "2024-03-27T02:46:40.035110019Z"
created_by: aje9k8luj4qf********
modified_at: "2024-03-27T02:46:40.035138179Z"
done: true
metadata:
'@type': type.googleapis.com/yandex.cloud.lockbox.v1.UpdateSecretMetadata
secret_id: e6qnva6ntl66********
response:
'@type': type.googleapis.com/google.protobuf.Empty
value: {}
Use either the listOperations REST API method for the Secret resource or the SecretService/ListOperations gRPC API call.
Getting operation details
-
Get a list of operations for the resource.
-
Copy the operation ID.
-
Get operation details:
CLIAPIIf you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the
yc config set folder-id <folder_ID>command. You can also set a different folder for any specific command using the--folder-nameor--folder-idparameter.Run this command:
yc operation get <operation_ID>Result:
id: e6qj8hr2mfoj******** description: Update secret created_at: "2024-03-27T02:47:03.482Z" created_by: aje9k8luj4qf******** modified_at: "2024-03-27T02:47:03.482Z" done: true metadata: '@type': type.googleapis.com/yandex.cloud.lockbox.v1.UpdateSecretMetadata secret_id: e6qnva6ntl66******** response: '@type': type.googleapis.com/yandex.cloud.lockbox.v1.Secret id: e6qnva6ntl66******** folder_id: b1g681qpemb4******** created_at: "2024-03-27T02:45:05.184Z" name: top-secret labels: key2: value2 status: ACTIVE current_version: id: e6qo5a6imnm0******** secret_id: e6qnva6ntl66******** created_at: "2024-03-27T02:45:05.184Z" status: ACTIVE payload_entry_keys: - key deletion_protection: trueUse the OperationService/Get gRPC API call.