[Yandex Cloud documentation](../../index.md) > [Yandex Cloud Desktop](../index.md) > [Step-by-step guides](index.md) > Viewing operations with resources

# Viewing Cloud Desktop resource operations

The system logs all actions with Cloud Desktop resources as a list of operations. Each operation gets its own unique ID.

## Getting a list of operations {#get-operations}

{% list tabs group=instructions %}

- Management console {#console}

  You can get a list of operations for a specific resource. The steps below explain how to do this for a [desktop](../concepts/desktops-and-groups.md). The same steps apply to other resources as well.

  1. In the [management console](https://console.yandex.cloud), open the folder containing the desktop.
  1. Navigate to **Cloud Desktop**.
  1. In the left-hand panel, select ![image](../../_assets/console-icons/display.svg) **Desktops**.
  1. Select the desktop you need.
  1. Navigate to the ![image](../../_assets/console-icons/list-check.svg) **Operations** panel for the selected desktop.

     This will open the list of operations with the desktop.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To get the list of operations for the Cloud Desktop resource, run this command:

  ```bash
  yc desktops <resource_type> list-operations <resource_name_or_ID>
  ```

  **Example**

  Getting a list of operations for a desktop:

  ```bash
  yc desktops desktop list-operations e3v7nfkhn0q4********
  ```

  Result:

  ```text
  +----------------------+---------------------+----------------------+---------------------+---------+-----------------+
  |          ID          |     CREATED AT      |      CREATED BY      |     MODIFIED AT     | STATUS  |   DESCRIPTION   |
  +----------------------+---------------------+----------------------+---------------------+---------+-----------------+
  | e3vlaf6r4241******** | 2024-05-14 17:55:00 | aje9k8luj4qf******** | 2024-05-14 17:55:00 | RUNNING | Restart desktop |
  | e3vns4mmfsal******** | 2024-05-14 17:41:14 | aje9k8luj4qf******** | 2024-05-14 17:45:17 | DONE    | Create desktop  |
  +----------------------+---------------------+----------------------+---------------------+---------+-----------------+
  ```

  By default, information about operations is output as text. To get more details, use `--format` to specify the `yaml` or `json` output format:

  ```bash
  yc desktops desktop list-operations e3v7nfkhn0q4******** --format yaml
  ```

  Result:

  ```text
  - id: e3vlaf6r4241********
    description: Restart desktop
    created_at: "2024-05-14T17:55:00.742136402Z"
    created_by: aje9k8luj4qf********
    modified_at: "2024-05-14T17:55:00.742136402Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.clouddesktop.v1.api.RestartDesktopMetadata
      desktop_id: e3v7nfkhn0q4********
  - id: e3vns4mmfsal********
    description: Create desktop
    created_at: "2024-05-14T17:41:14.076Z"
    created_by: aje9k8luj4qf********
    modified_at: "2024-05-14T17:45:17.355765714Z"
    done: true
    metadata:
      '@type': type.googleapis.com/yandex.cloud.clouddesktop.v1.api.CreateDesktopMetadata
      desktop_id: e3v7nfkhn0q4********
  ```

- API {#api}

  Use the [listOperations](../api-ref/Desktop/listOperations.md) REST API method for the [Desktop](../api-ref/Desktop/index.md) resource or the [DesktopService/ListOperations](../api-ref/grpc/Desktop/listOperations.md) gRPC API call.

{% endlist %}

## Getting operation details {#get-operations-info}

1. [Get the list of operations](#get-operations) for the resource.
1. Copy the operation ID.
1. Get the operation details:

    {% list tabs group=instructions %}

    - CLI {#cli}

      If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

      The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

      Run this command:

      ```bash
      yc operation get <operation_ID>
      ```

      Result:

      ```text
      id: e3vlaf6r4241********
      description: Restart desktop
      created_at: "2024-05-14T17:55:00.742Z"
      created_by: aje9k8luj4qf********
      modified_at: "2024-05-14T17:57:47.065Z"
      done: true
      metadata:
        '@type': type.googleapis.com/yandex.cloud.clouddesktop.v1.api.RestartDesktopMetadata
        desktop_id: e3v7nfkhn0q4********
      response:
        '@type': type.googleapis.com/yandex.cloud.clouddesktop.v1.api.Desktop
        id: e3v7nfkhn0q4********
        folder_id: b1g681qpemb4********
        desktop_group_id: e3vud47oonha********
        created_at: "2024-05-14T17:41:14.076Z"
        name: my-desktop-group-1fb68746********
        resources:
          memory: "2147483648"
          cores: "2"
          core_fraction: "100"
        network_interfaces:
          - network_id: enpphqi8uvcm********
            subnet_id: e9bmuh93af4v********
        users:
          - subject_id: aje9k8luj4qf********
      ```

    {% endlist %}

#### Useful links {#see-also}

* [Working with operations](../../api-design-guide/concepts/about-async.md)