Elenca le emittenti nella regione

Recupera un elenco di reti VMware Engine definite nella regione specificata.

Esempio di codice

Python

Per effettuare l'autenticazione in VMware Engine, configura le Credenziali predefinite dell'applicazione. Per ulteriori informazioni, consulta Configura l'autenticazione per un ambiente di sviluppo locale.

from typing import Iterable

from google.cloud import vmwareengine_v1


def list_networks(
    project_id: str, region: str
) -> Iterable[vmwareengine_v1.VmwareEngineNetwork]:
    """
    Retrieves a list of VMware Engine networks defined in given region.

    Args:
        project_id: name of the project you want to use.
        region: name of the region for which you want to list networks.

    Returns:
        An iterable collection containing the VMWareEngineNetworks.
    """
    client = vmwareengine_v1.VmwareEngineClient()

    return client.list_vmware_engine_networks(
        parent=f"projects/{project_id}/locations/{region}"
    )

Passaggi successivi

Per cercare e filtrare gli esempi di codice per altri prodotti Google Cloud , consulta il browser degli esempi diGoogle Cloud .