Skip to content

GCP.Apim reference

Source: src/GCP/Apim/ObservationJob.ts

An API Observation job — configuration that collects data about APIs from attached observation sources. Jobs have no labels, description, or patch API; Alchemy stamps ownership into generated ids (alch-) so list / nuke can find them. Identity, location, and sources replace the resource. enabled is synced in place.

ObservationJob: Creating an Observation Job

Section titled “ObservationJob: Creating an Observation Job”

Disabled job with a source

const job = yield* GCP.Apim.ObservationJob("Shadow", {
sources: [source.name],
});

Enable collection

const job = yield* GCP.Apim.ObservationJob("Shadow", {
sources: [source.name],
enabled: true,
});

Source: src/GCP/Apim/ObservationSource.ts

An API Observation source — configuration for collecting traffic from Cloud Load Balancers in a VPC. Sources have no labels, description, or update API; Alchemy stamps ownership into generated ids (alch-) so list / nuke can find them. Identity, location, and GCLB network config replace the resource.

ObservationSource: Creating an Observation Source

Section titled “ObservationSource: Creating an Observation Source”
const source = yield* GCP.Apim.ObservationSource("Edge", {
gclbObservationSource: {
pscNetworkConfigs: [
{
network: network.selfLink,
subnetwork: subnet.selfLink,
},
],
},
});