GCP.SiteVerification reference
WebResource
Section titled “WebResource”Source:
src/GCP/SiteVerification/WebResource.ts
A Google Site Verification web resource (verified site or domain).
Site Verification has no labels or description field, so Alchemy
stamps ownership into generated identifiers under
alchemy-site-verification.test for list / nuke. User-provided
identifiers are identity — they are not rewritten — and are not
listed for nuke unless they contain that host. identifier and
siteType are identity (changing either replaces the resource).
owners update in place via webResource.update.
Place the verification token from getWebResourceToken on
the site or domain before the first reconcile. Insert checks that
token; it fails with BadRequest if Google cannot find it. Creating
web resources as a service account requires a user OAuth token with
the https://www.googleapis.com/auth/siteverification scope (or
domain-wide delegation).
WebResource: Creating a Web Resource
Section titled “WebResource: Creating a Web Resource”Verify a site with a FILE token
const token = yield* GCP.SiteVerification.getWebResourceToken({ identifier: "https://www.example.com/", siteType: "SITE", verificationMethod: "FILE",});// Place token.token as a file at the site root, then:const site = yield* GCP.SiteVerification.WebResource("Docs", { identifier: "https://www.example.com/", siteType: "SITE", verificationMethod: "FILE",});Verify a domain with DNS TXT
const token = yield* GCP.SiteVerification.getWebResourceToken({ identifier: "example.com", siteType: "INET_DOMAIN", verificationMethod: "DNS_TXT",});const domain = yield* GCP.SiteVerification.WebResource("Apex", { identifier: "example.com", siteType: "INET_DOMAIN", verificationMethod: "DNS_TXT",});WebResource: Updating Owners
Section titled “WebResource: Updating Owners”Re-declare the same logical id with changed props; the engine keeps the physical resource and updates it in place.
const site = yield* GCP.SiteVerification.WebResource("Docs", { identifier: "https://www.example.com/", siteType: "SITE", owners: ["admin@example.com", "teammate@example.com"],});