Elimine a rede antiga

Elimina uma rede VMWare antiga.

Exemplo de código

Python

Para se autenticar no VMware Engine, configure as Credenciais padrão da aplicação. Para mais informações, consulte o artigo Configure a autenticação para um ambiente de desenvolvimento local.

from google.api_core import operation
from google.cloud import vmwareengine_v1


def delete_legacy_network(project_id: str, region: str) -> operation.Operation:
    """
    Deletes a legacy VMware Network.

    Args:
        project_id: name of the project hosting the network.
        region: region in which the legacy network is located in.

    Returns:
        An Operation object related to started network deletion operation.
    """
    client = vmwareengine_v1.VmwareEngineClient()
    return client.delete_vmware_engine_network(
        name=f"projects/{project_id}/"
        f"locations/{region}/"
        f"vmwareEngineNetworks/{region}-default"
    )

O que se segue?

Para pesquisar e filtrar exemplos de código para outros Google Cloud produtos, consulte o Google Cloud navegador de exemplos.