GCP.SaasServiceManagement reference
Release
Section titled “Release”Source:
src/GCP/SaasServiceManagement/Release.ts
An App Lifecycle Manager release — a version of a UnitKind packaged as an OCI blueprint.
releaseId, location, unitKind, and blueprint.package replace
the release. Input variable defaults, upgrade constraints, labels,
and annotations update in place.
Release: Creating a Release
Section titled “Release: Creating a Release”const release = yield* GCP.SaasServiceManagement.Release("V1", { unitKind: kind.name, blueprint: { package: "us-central1-docker.pkg.dev/proj/blueprints/store:v1" }, labels: { env: "prod" },});Release: Updating a Release
Section titled “Release: Updating a Release”const release = yield* GCP.SaasServiceManagement.Release("V1", { releaseId: release.releaseId, unitKind: kind.name, blueprint: { package: "us-central1-docker.pkg.dev/proj/blueprints/store:v1" }, inputVariableDefaults: [{ variable: "region", type: "STRING", value: "us-central1" }],});Rollout
Section titled “Rollout”Source:
src/GCP/SaasServiceManagement/Rollout.ts
An App Lifecycle Manager rollout — one execution of a RolloutKind against a Release (or FlagRelease).
rolloutId, location, rolloutKind, release, and flagRelease
replace the rollout. Unit filter, strategy override, control action,
labels, and annotations update in place. Requests to pause or cancel
are only accepted while the rollout is non-terminal.
Rollout: Creating a Rollout
Section titled “Rollout: Creating a Rollout”const rollout = yield* GCP.SaasServiceManagement.Rollout("Wave1", { rolloutKind: kind.name, release: release.name, labels: { env: "prod" },});Rollout: Updating a Rollout
Section titled “Rollout: Updating a Rollout”const rollout = yield* GCP.SaasServiceManagement.Rollout("Wave1", { rolloutId: rollout.rolloutId, rolloutKind: kind.name, release: release.name, control: { action: "ROLLOUT_ACTION_PAUSE" },});RolloutKind
Section titled “RolloutKind”Source:
src/GCP/SaasServiceManagement/RolloutKind.ts
An App Lifecycle Manager rollout kind — the policy a Rollout follows when upgrading units of a UnitKind.
rolloutKindId, location, and unitKind replace the rollout kind.
Strategy, error budget, unit filter, pacing, labels, and annotations
update in place.
RolloutKind: Creating a RolloutKind
Section titled “RolloutKind: Creating a RolloutKind”const kind = yield* GCP.SaasServiceManagement.RolloutKind("Wave", { unitKind: storeKind.name, rolloutOrchestrationStrategy: "Google.Cloud.Simple.AllAtOnce", labels: { env: "prod" },});RolloutKind: Updating a RolloutKind
Section titled “RolloutKind: Updating a RolloutKind”const kind = yield* GCP.SaasServiceManagement.RolloutKind("Wave", { rolloutKindId: kind.rolloutKindId, unitKind: storeKind.name, errorBudget: { allowedCount: 1, allowedPercentage: 5 },});Source:
src/GCP/SaasServiceManagement/Saa.ts
An App Lifecycle Manager SaaS product definition.
A SaaS is the producer-side product that Tenants, UnitKinds, and
Units hang off. saasId and location replace the resource.
locations, labels, and annotations update in place.
Saa: Creating a SaaS
Section titled “Saa: Creating a SaaS”Generated name
const product = yield* GCP.SaasServiceManagement.Saa("Inventory", { locations: [{ name: "us-central1" }],});Named SaaS with labels
const product = yield* GCP.SaasServiceManagement.Saa("Inventory", { saasId: "inventory", locations: [{ name: "us-central1" }, { name: "europe-west1" }], labels: { env: "prod" },});Saa: Updating a SaaS
Section titled “Saa: Updating a SaaS”const product = yield* GCP.SaasServiceManagement.Saa("Inventory", { saasId: "inventory", locations: [{ name: "us-central1" }, { name: "us-east1" }], labels: { env: "prod", role: "saas" },});Tenant
Section titled “Tenant”Source:
src/GCP/SaasServiceManagement/Tenant.ts
An App Lifecycle Manager tenant — the producer-side instance of a SaaS created for one consumer.
tenantId, location, saas, and consumerResource replace the
tenant. Labels and annotations update in place.
Tenant: Creating a Tenant
Section titled “Tenant: Creating a Tenant”const product = yield* GCP.SaasServiceManagement.Saa("Inventory", { locations: [{ name: "us-central1" }],});const tenant = yield* GCP.SaasServiceManagement.Tenant("Acme", { saas: product.name, labels: { env: "prod" },});Tenant: Updating a Tenant
Section titled “Tenant: Updating a Tenant”const tenant = yield* GCP.SaasServiceManagement.Tenant("Acme", { tenantId: "acme", saas: product.name, labels: { env: "prod", customer: "acme" },});Source:
src/GCP/SaasServiceManagement/Unit.ts
An App Lifecycle Manager unit — one deployable instance of a UnitKind.
A unit is actuated by a blueprint engine (Terraform, Helm, …) under
the hood. unitId, location, unitKind, tenant, and
managementMode replace the unit. Maintenance pins, labels, and
annotations update in place.
Unit: Creating a Unit
Section titled “Unit: Creating a Unit”const unit = yield* GCP.SaasServiceManagement.Unit("Store1", { unitKind: kind.name, tenant: tenant.name, managementMode: "MANAGEMENT_MODE_USER", labels: { env: "prod" },});Unit: Updating a Unit
Section titled “Unit: Updating a Unit”const unit = yield* GCP.SaasServiceManagement.Unit("Store1", { unitId: unit.unitId, unitKind: kind.name, maintenance: { pinnedUntilTime: "2030-01-01T00:00:00Z" },});UnitKind
Section titled “UnitKind”Source:
src/GCP/SaasServiceManagement/UnitKind.ts
An App Lifecycle Manager unit kind — the blueprint family that Units of a SaaS share.
Units of the same kind follow the same release model and are typically
rolled out together. unitKindId, location, saas, and
dependencies replace the unit kind. Default release, mappings,
labels, and annotations update in place.
UnitKind: Creating a UnitKind
Section titled “UnitKind: Creating a UnitKind”const product = yield* GCP.SaasServiceManagement.Saa("Inventory", { locations: [{ name: "us-central1" }],});const kind = yield* GCP.SaasServiceManagement.UnitKind("Store", { saas: product.name, labels: { env: "prod" },});UnitKind: Updating a UnitKind
Section titled “UnitKind: Updating a UnitKind”const kind = yield* GCP.SaasServiceManagement.UnitKind("Store", { unitKindId: kind.unitKindId, saas: product.name, defaultRelease: release.name, labels: { env: "prod" },});UnitOperation
Section titled “UnitOperation”Source:
src/GCP/SaasServiceManagement/UnitOperation.ts
An App Lifecycle Manager unit operation — one provision, upgrade, deprovision, or flag-update of a Unit.
unitOperationId, location, unit, and the chosen operation type
replace the resource. cancel, labels, and annotations update in
place. Only one mutating unit operation runs on a unit at a time.
UnitOperation: Creating a UnitOperation
Section titled “UnitOperation: Creating a UnitOperation”Provision a unit
const op = yield* GCP.SaasServiceManagement.UnitOperation("Provision", { unit: unit.name, provision: { release: release.name }, labels: { env: "prod" },});Deprovision
const op = yield* GCP.SaasServiceManagement.UnitOperation("Teardown", { unit: unit.name, deprovision: true,});UnitOperation: Updating a UnitOperation
Section titled “UnitOperation: Updating a UnitOperation”const op = yield* GCP.SaasServiceManagement.UnitOperation("Provision", { unitOperationId: op.unitOperationId, unit: unit.name, provision: { release: release.name }, cancel: true,});