GCP.NetworkManagement reference
ConnectivityTest
Section titled “ConnectivityTest”Source:
packages/gcp/src/NetworkManagement/ConnectivityTest.ts
A Network Management Connectivity Test (reachability analysis).
Changing testId or location replaces the test. Endpoints,
protocol, related projects, round-trip, firewall bypass, description,
and labels update in place. Create runs analysis as part of the
long-running operation.
ConnectivityTest: Creating a ConnectivityTest
Section titled “ConnectivityTest: Creating a ConnectivityTest”IP-to-IP TCP test
const test = yield* GCP.NetworkManagement.ConnectivityTest("DnsPath", { source: { ipAddress: "10.0.0.1", networkType: "GCP_NETWORK", network: "projects/my-project/global/networks/app-vpc", }, destination: { ipAddress: "10.0.0.2", port: 443 }, protocol: "TCP", labels: { env: "prod" },});Named test with round trip
const test = yield* GCP.NetworkManagement.ConnectivityTest("DnsPath", { testId: "app-dns-path", source: { ipAddress: "8.8.8.8", networkType: "NON_GCP_NETWORK" }, destination: { ipAddress: "1.1.1.1", port: 443 }, protocol: "TCP", roundTrip: true, description: "public dns path",});ConnectivityTest: Looking up an existing connectivity test
Section titled “ConnectivityTest: Looking up an existing connectivity test”ConnectivityTest.lookup references a connectivity test Alchemy doesn’t
manage (created in the console or by another stack). It is read during
plan/deploy, never created, updated or deleted, and binds like a declared
connectivity test.
const connectivityTest = GCP.NetworkManagement.ConnectivityTest.lookup({ testId: "my-test",});NetworkMonitoringProvider
Section titled “NetworkMonitoringProvider”Source:
packages/gcp/src/NetworkManagement/NetworkMonitoringProvider.ts
A Network Intelligence Center Network Monitoring Provider.
The API has no labels, description, or patch method. Identity is the
id, location, and provider type; changing any of them replaces the
provider. Alchemy stamps ownership into the generated id so list /
nuke can find leaked rows.
NetworkMonitoringProvider: Creating a NetworkMonitoringProvider
Section titled “NetworkMonitoringProvider: Creating a NetworkMonitoringProvider”External provider
const provider = yield* GCP.NetworkManagement.NetworkMonitoringProvider( "AppNeta", { providerType: "EXTERNAL" },);Named provider
const provider = yield* GCP.NetworkManagement.NetworkMonitoringProvider( "AppNeta", { networkMonitoringProviderId: "app-neta", location: "global", providerType: "EXTERNAL", },);NetworkMonitoringProvider: Looking up an existing network monitoring provider
Section titled “NetworkMonitoringProvider: Looking up an existing network monitoring provider”NetworkMonitoringProvider.lookup references a network monitoring
provider Alchemy doesn’t manage (created in the console or by another
stack). It is read during plan/deploy, never created, updated or deleted,
and binds like a declared network monitoring provider.
const networkMonitoringProvider = GCP.NetworkManagement.NetworkMonitoringProvider.lookup({ networkMonitoringProviderId: "my-network-monitoring-provider",});OrganizationsVpcFlowLogsConfig
Section titled “OrganizationsVpcFlowLogsConfig”Source:
packages/gcp/src/NetworkManagement/OrganizationsVpcFlowLogsConfig.ts
An organization-level VPC Flow Logs configuration.
Organization configs apply across the organization when no target resource is set. Changing the id, organization, location, or target replaces the config. Description, labels, state, sampling, metadata, cross-project annotations, and the export filter update in place.
OrganizationsVpcFlowLogsConfig: Creating an Organization VpcFlowLogsConfig
Section titled “OrganizationsVpcFlowLogsConfig: Creating an Organization VpcFlowLogsConfig”Organization-wide logs
const logs = yield* GCP.NetworkManagement.OrganizationsVpcFlowLogsConfig( "OrgLogs", { aggregationInterval: "INTERVAL_1_MIN", labels: { env: "prod" }, },);Named org config
const logs = yield* GCP.NetworkManagement.OrganizationsVpcFlowLogsConfig( "OrgLogs", { vpcFlowLogsConfigId: "org-vpc-logs", organization: "123456789", description: "org vpc flow logs", crossProjectMetadata: "CROSS_PROJECT_METADATA_ENABLED", },);OrganizationsVpcFlowLogsConfig: Looking up an existing organizations vpc flow logs config
Section titled “OrganizationsVpcFlowLogsConfig: Looking up an existing organizations vpc flow logs config”OrganizationsVpcFlowLogsConfig.lookup references an organizations vpc
flow logs config Alchemy doesn’t manage (created in the console or by
another stack). It is read during plan/deploy, never created, updated or
deleted, and binds like a declared organizations vpc flow logs config.
const organizationsVpcFlowLogsConfig = GCP.NetworkManagement.OrganizationsVpcFlowLogsConfig.lookup({ vpcFlowLogsConfigId: "my-vpc-flow-logs-config",});VpcFlowLogsConfig
Section titled “VpcFlowLogsConfig”Source:
packages/gcp/src/NetworkManagement/VpcFlowLogsConfig.ts
A project-level VPC Flow Logs configuration.
Project configs require exactly one target (network, subnet,
interconnectAttachment, or vpnTunnel). Changing the id, location,
or target resource replaces the config. Description, labels, state,
sampling, metadata, and the export filter update in place. Creating
with state=DISABLED is rejected by the API, so Alchemy creates
ENABLED and then patches.
VpcFlowLogsConfig: Creating a VpcFlowLogsConfig
Section titled “VpcFlowLogsConfig: Creating a VpcFlowLogsConfig”Log an entire VPC
const network = yield* GCP.Compute.Network("AppVpc", { autoCreateSubnetworks: false,});const logs = yield* GCP.NetworkManagement.VpcFlowLogsConfig("VpcLogs", { network: network.selfLink ?? network.networkName, labels: { env: "prod" },});Named config with sampling
const logs = yield* GCP.NetworkManagement.VpcFlowLogsConfig("VpcLogs", { vpcFlowLogsConfigId: "app-vpc-logs", network: "projects/my-project/global/networks/app-vpc", aggregationInterval: "INTERVAL_1_MIN", flowSampling: 0.5, description: "app vpc flow logs",});VpcFlowLogsConfig: Looking up an existing vpc flow logs config
Section titled “VpcFlowLogsConfig: Looking up an existing vpc flow logs config”VpcFlowLogsConfig.lookup references a vpc flow logs config Alchemy
doesn’t manage (created in the console or by another stack). It is read
during plan/deploy, never created, updated or deleted, and binds like a
declared vpc flow logs config.
const vpcFlowLogsConfig = GCP.NetworkManagement.VpcFlowLogsConfig.lookup({ vpcFlowLogsConfigId: "my-vpc-flow-logs-config",});