GCP.DeveloperConnect reference
AccountConnector
Section titled “AccountConnector”Source:
src/GCP/DeveloperConnect/AccountConnector.ts
A Developer Connect account connector — the OAuth configuration that lets users connect their SCM accounts (GitHub, GitLab, Google, …) to Google Cloud.
Changing accountConnectorId, location, systemProviderId, or
immutable custom-OAuth host fields (hostUri, tokenUri, authUri,
scmProvider) replaces the connector. Labels, annotations, scopes,
and proxyConfig update in place.
AccountConnector: Creating an Account Connector
Section titled “AccountConnector: Creating an Account Connector”GitHub system provider
const github = yield* GCP.DeveloperConnect.AccountConnector("Github", { providerOauthConfig: { systemProviderId: "GITHUB", scopes: ["repo"], },});Explicit id, labels, and proxy
const github = yield* GCP.DeveloperConnect.AccountConnector("Github", { accountConnectorId: "app-github", location: "us-central1", providerOauthConfig: { systemProviderId: "GITHUB", scopes: ["repo", "read:user"], }, proxyConfig: { enabled: true }, labels: { env: "prod" },});AccountConnector: Updating an Account Connector
Section titled “AccountConnector: Updating an Account Connector”// Same logical id as before; only the changed props differ.const github = yield* GCP.DeveloperConnect.AccountConnector("Github", { accountConnectorId: "app-github", providerOauthConfig: { systemProviderId: "GITHUB", scopes: ["repo"], }, labels: { env: "prod", team: "platform" }, proxyConfig: { enabled: true },});Connection
Section titled “Connection”Source:
src/GCP/DeveloperConnect/Connection.ts
A Developer Connect connection to a source-control host (GitHub, GitHub Enterprise, GitLab, Bitbucket, or Secure Source Manager).
Changing connectionId, location, SCM kind, githubApp, or
immutable host fields (hostUri, workspace,
webhookSecretSecretVersion, SSM instance) replaces the
connection. disabled, labels, annotations, credentials, and
gitProxyConfig update in place.
Connection: Creating a Connection
Section titled “Connection: Creating a Connection”Generated GitHub connection
const github = yield* GCP.DeveloperConnect.Connection("Github", { githubConfig: { githubApp: "DEVELOPER_CONNECT" },});Named GitHub connection with labels
const github = yield* GCP.DeveloperConnect.Connection("Github", { connectionId: "app-github", location: "us-central1", labels: { env: "prod" }, githubConfig: { githubApp: "DEVELOPER_CONNECT" },});Connection: Disabling a Connection
Section titled “Connection: Disabling a Connection”const github = yield* GCP.DeveloperConnect.Connection("Github", { connectionId: "app-github", githubConfig: { githubApp: "DEVELOPER_CONNECT" }, disabled: true,});ConnectionsGitRepositoryLink
Section titled “ConnectionsGitRepositoryLink”Source:
src/GCP/DeveloperConnect/ConnectionsGitRepositoryLink.ts
A Developer Connect git repository link — associates a remote Git
repository with a Connection so webhooks and clone tokens
can be issued.
Changing gitRepositoryLinkId, connection, location, cloneUri,
labels, or annotations replaces the link. There is no update API;
every user-facing field is immutable.
ConnectionsGitRepositoryLink: Creating a Git Repository Link
Section titled “ConnectionsGitRepositoryLink: Creating a Git Repository Link”Generated name
const github = yield* GCP.DeveloperConnect.Connection("Github", { githubConfig: { githubApp: "DEVELOPER_CONNECT" },});const source = yield* GCP.DeveloperConnect.ConnectionsGitRepositoryLink( "Source", { connection: github.name, cloneUri: "https://github.com/{owner}/{repo}.git", },);Named link with labels
const source = yield* GCP.DeveloperConnect.ConnectionsGitRepositoryLink( "Source", { connection: github.name, gitRepositoryLinkId: "app-source", cloneUri: "https://github.com/{owner}/{repo}.git", labels: { env: "prod" }, },);ConnectionsGitRepositoryLink: Fetching Git Refs
Section titled “ConnectionsGitRepositoryLink: Fetching Git Refs”const fetchGitRefs = yield* GCP.DeveloperConnect.FetchGitRefs(source);const { refNames } = yield* fetchGitRefs({ refType: "BRANCH" });ConnectionsGitRepositoryLink: Cloning with a Token
Section titled “ConnectionsGitRepositoryLink: Cloning with a Token”const fetchReadToken = yield* GCP.DeveloperConnect.FetchReadToken(source);const { token } = yield* fetchReadToken();FetchGitRefs
Section titled “FetchGitRefs”Source:
src/GCP/DeveloperConnect/FetchGitRefs.ts
Runtime binding for Developer Connect gitRepositoryLinks.fetchGitRefs.
Bind this operation to a ConnectionsGitRepositoryLink in a
Function/Action init phase. Provide FetchGitRefsHttp.
FetchGitRefs: Listing Branches
Section titled “FetchGitRefs: Listing Branches”Fetch branch names
const fetchGitRefs = yield* GCP.DeveloperConnect.FetchGitRefs(source);const { refNames } = yield* fetchGitRefs({ refType: "BRANCH" });Fetch tags
const { refNames } = yield* fetchGitRefs({ refType: "TAG", pageSize: 50 });FetchGitRefsHttp
Section titled “FetchGitRefsHttp”Source:
src/GCP/DeveloperConnect/FetchGitRefsHttp.tsKind: Layer · Provides:GCP.DeveloperConnect.FetchGitRefs
HTTP implementation of FetchGitRefs.
FetchReadToken
Section titled “FetchReadToken”Source:
src/GCP/DeveloperConnect/FetchReadToken.ts
Runtime binding for Developer Connect gitRepositoryLinks.fetchReadToken.
Bind this operation to a ConnectionsGitRepositoryLink in a
Function/Action init phase. Provide FetchReadTokenHttp.
Returns a short-lived token that can clone the remote Git repository.
FetchReadToken: Fetching a Read Token
Section titled “FetchReadToken: Fetching a Read Token”const fetchReadToken = yield* GCP.DeveloperConnect.FetchReadToken(source);const { token, expirationTime } = yield* fetchReadToken();FetchReadTokenHttp
Section titled “FetchReadTokenHttp”Source:
src/GCP/DeveloperConnect/FetchReadTokenHttp.tsKind: Layer · Provides:GCP.DeveloperConnect.FetchReadToken
HTTP implementation of FetchReadToken.
FetchReadWriteToken
Section titled “FetchReadWriteToken”Source:
src/GCP/DeveloperConnect/FetchReadWriteToken.ts
Runtime binding for Developer Connect
gitRepositoryLinks.fetchReadWriteToken.
Bind this operation to a ConnectionsGitRepositoryLink in a
Function/Action init phase. Provide FetchReadWriteTokenHttp.
Returns a short-lived token that can clone and push to the remote
Git repository.
FetchReadWriteToken: Fetching a Read/Write Token
Section titled “FetchReadWriteToken: Fetching a Read/Write Token”const fetchReadWriteToken = yield* GCP.DeveloperConnect.FetchReadWriteToken( source,);const { token, expirationTime } = yield* fetchReadWriteToken();FetchReadWriteTokenHttp
Section titled “FetchReadWriteTokenHttp”Source:
src/GCP/DeveloperConnect/FetchReadWriteTokenHttp.tsKind: Layer · Provides:GCP.DeveloperConnect.FetchReadWriteToken
HTTP implementation of FetchReadWriteToken.
InsightsConfig
Section titled “InsightsConfig”Source:
src/GCP/DeveloperConnect/InsightsConfig.ts
A Developer Connect InsightsConfig — the SDLC event hub that ties an App Hub application, runtime environments, and deployed artifacts together.
Changing insightsConfigId, location, appHubApplication, or
projects replaces the config. Labels, annotations, and artifact configs
update in place.
InsightsConfig: Creating an Insights Config
Section titled “InsightsConfig: Creating an Insights Config”Generated name
const insights = yield* GCP.DeveloperConnect.InsightsConfig("Sdlc", { projects: { projectIds: ["{project}"] }, labels: { env: "prod" },});App Hub application and artifacts
const insights = yield* GCP.DeveloperConnect.InsightsConfig("Sdlc", { insightsConfigId: "app-sdlc", appHubApplication: application.name, artifactConfigs: [ { uri: "us-docker.pkg.dev/{project}/{repo}/image", googleArtifactRegistry: { projectId: "{project}", artifactRegistryPackage: "image", }, }, ], labels: { env: "prod" },});InsightsConfig: Updating an Insights Config
Section titled “InsightsConfig: Updating an Insights Config”// Same logical id as before; only the changed props differ.const insights = yield* GCP.DeveloperConnect.InsightsConfig("Sdlc", { insightsConfigId: "app-sdlc", projects: { projectIds: ["{project}"] }, labels: { env: "prod", team: "platform" },});