Menghapus jaringan lama

Menghapus Jaringan VMWare lama.

Contoh kode

Python

Untuk melakukan autentikasi ke VMware Engine, siapkan Kredensial Default Aplikasi. Untuk mengetahui informasi selengkapnya, baca Menyiapkan autentikasi untuk lingkungan pengembangan lokal.

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"
    )

Langkah selanjutnya

Untuk menelusuri dan memfilter contoh kode untuk produk Google Cloud lainnya, lihat browser contoh Google Cloud.