Viewing operations with Serverless Containers resources
All actions with Serverless Containers resources are logged as a list of operations. Each operation gets its own unique ID.
Getting a list of operations
You can get a list of operations for a specific resource. The steps below describe how you can do this for a container. The same steps apply to other resources as well.
-
In the management console
, open the folder with the container. -
Select Serverless Containers.
-
In the left-hand panel, select
Containers. -
Select the container you need.
-
Go to the
Operations panel for the selected container.You will see the list of operations with the selected container.
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 the list of operations for the Serverless Containers resource, run this command:
yc serverless <resource_type> list-operations <resource_name_or_ID>
Example
Getting a list of operations for a container:
yc serverless container list-operations epdplu8jn7sr********
Result:
+----------------------+---------------------+----------------------+---------------------+--------+------------------+
| ID | CREATED AT | CREATED BY | MODIFIED AT | STATUS | DESCRIPTION |
+----------------------+---------------------+----------------------+---------------------+--------+------------------+
| bba1fu790ass******** | 2024-06-21 10:56:42 | aje9k8luj4qf******** | 2024-06-21 10:56:42 | DONE | Update container |
| bbaogemlt3jf******** | 2024-06-21 10:51:57 | aje9k8luj4qf******** | 2024-06-21 10:51:57 | DONE | Create container |
+----------------------+---------------------+----------------------+---------------------+--------+------------------+
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 serverless container list-operations <resource_name_or_ID> --format yaml
Result:
- id: bba1fu790ass********
description: Update container
created_at: "2024-06-21T10:56:42.746Z"
created_by: aje9k8luj4qf********
modified_at: "2024-06-21T10:56:42.763Z"
done: true
metadata:
'@type': type.googleapis.com/yandex.cloud.serverless.containers.v1.UpdateContainerMetadata
container_id: bbaqss6v9qv9********
response:
'@type': type.googleapis.com/google.protobuf.Empty
value: {}
...
Use the listOperations REST API method for the relevant resource or the <service>/ListOperations gRPC API call.
For example, for a container, use either the listOperations REST API method for the Container resource or the ContainerService/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: bbaogemlt3jf******** description: Create container created_at: "2024-06-21T10:51:57.338Z" created_by: aje9k8luj4qf******** modified_at: "2024-06-21T10:51:57.881Z" done: true metadata: '@type': type.googleapis.com/yandex.cloud.serverless.containers.v1.CreateContainerMetadata container_id: bbaqss6v9qv9******** response: '@type': type.googleapis.com/yandex.cloud.serverless.containers.v1.Container id: bbaqss6v9qv9******** folder_id: b1g681qpemb4******** created_at: "2024-06-21T10:51:57.350Z" name: simple-container url: https://bbaqss6v9qv9********.containers.yandexcloud.net/ status: ACTIVEUse the OperationService/Get gRPC API call.