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

# Viewing operations with Virtual Private Cloud resources

The system logs all actions with Virtual Private Cloud 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}

  To view operations with all the resources, select ![image](../../_assets/operations.svg) **Operations** in the left-hand panel. In the list that opens, you will also see operations for the deleted resources.

  You can get a list of operations for a specific resource. The steps below describe how you can do this for a cloud network. The same steps apply to other resources.

  1. In the [management console](https://console.yandex.cloud), select the folder containing your cloud network.
  1. Navigate to **Virtual Private Cloud**.
  1. Select the network you need.
  1. Go to the ![image](../../_assets/operations.svg) **Operations** panel.

     You will see a list of cloud network operations.

- 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 a list of operations for a Virtual Private Cloud resource, run this command:

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

  **Example**

  Get a list of operations for a cloud network:

  ```bash
  yc vpc network list-operations enpgl5o8te3k********
  ```

  Result:

  ```text
  +----------------------+---------------------+----------------------+---------------------+--------+----------------+
  |          ID          |     CREATED AT      |      CREATED BY      |     MODIFIED AT     | STATUS |  DESCRIPTION   |
  +----------------------+---------------------+----------------------+---------------------+--------+----------------+
  | enp75021agjg******** | 2024-02-01 10:16:51 | ajego134p5h1******** | 2024-02-01 10:16:53 | DONE   | Create network |
  +----------------------+---------------------+----------------------+---------------------+--------+----------------+
  ```

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

  ```bash
  yc vpc network list-operations enpgl5o8te3k******** --format yaml
  ```

  Result:

  ```text
  - id: enp75021agjg********
    description: Create network
    created_at: "2024-02-01T10:16:51.955935138Z"
    created_by: ajego134p5h1********
    modified_at: "2024-02-01T10:16:53.389542083Z"
    done: true
    metadata:
      '@type': type.googleapis.com/yandex.cloud.vpc.v1.CreateNetworkMetadata
      network_id: enpgl5o8te3k********
    response:
      '@type': type.googleapis.com/google.protobuf.Empty
      value: {}
  ```

- API {#api}

  To get a list of operations, use the `listOperations` REST API method for the relevant resource or the `<service>/ListOperations` gRPC API call.

  For example, to obtain a list of operations for a cloud network, use either the [listOperations](../api-ref/Network/listOperations.md) REST API method for the [Network](../api-ref/Network/index.md) resource or the [NetworkService/ListOperations](../api-ref/grpc/Network/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: enp75021agjg********
      description: Create network
      created_at: "2024-02-01T10:16:51.955Z"
      created_by: ajego134p5h1********
      modified_at: "2024-02-01T10:16:53.389Z"
      done: true
      metadata:
        '@type': type.googleapis.com/yandex.cloud.vpc.v1.CreateNetworkMetadata
        network_id: enpgl5o8te3k********
      response:
        '@type': type.googleapis.com/yandex.cloud.vpc.v1.Network
        id: enpgl5o8te3kke6q3psa
        folder_id: b1gmit33ngp3********
        created_at: "2024-02-01T10:16:51Z"
        name: test-network
        default_security_group_id: enp0catll8gm********
        ```

    - API {#api}

      Use the [get](../api-ref/Operation/get.md) REST API method for the [Operation](../api-ref/Operation/index.md) resource or the [OperationService/Get](../api-ref/grpc/Operation/get.md) gRPC API call.

    {% endlist %}

#### See also {#see-also}

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