Viewing operations with a secret
All actions with Yandex Lockbox resources are logged as a list of operations. Each operation is assigned a 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 command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder 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, information about operations is provided as text. To get detailed information, specify the yaml
or json
output data format using the --format
flag:
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 detailed information about an operation
-
Get a list of operations for the resource.
-
Copy the ID of the operation.
-
Get detailed information about the operation:
CLIAPIIf you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter.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: true
Use the OperationService/Get gRPC API call.