REST Resource: projects.locations.connections

Resource: Connection

Message describing Connection object

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "deleteTime": string,
  "labels": {
    string: string,
    ...
  },
  "installationState": {
    object (InstallationState)
  },
  "disabled": boolean,
  "reconciling": boolean,
  "annotations": {
    string: string,
    ...
  },
  "etag": string,
  "uid": string,

  // Union field connection_config can be only one of the following:
  "githubConfig": {
    object (GitHubConfig)
  }
  // End of list of possible types for union field connection_config.
}
Fields
name

string

Identifier. The resource name of the connection, in the format projects/{project}/locations/{location}/connections/{connectionId}.

createTime

string (Timestamp format)

Output only. [Output only] Create timestamp

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. [Output only] Update timestamp

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

deleteTime

string (Timestamp format)

Output only. [Output only] Delete timestamp

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. Labels as key value pairs

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

installationState

object (InstallationState)

Output only. Installation state of the Connection.

disabled

boolean

Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.

reconciling

boolean

Output only. Set to true when the connection is being set up or updated in the background.

annotations

map (key: string, value: string)

Optional. Allows clients to store small amounts of arbitrary data.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

etag

string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

uid

string

Output only. A system-assigned unique identifier for a the GitRepositoryLink.

Union field connection_config. Configuration for the connection depending on the type of provider. connection_config can be only one of the following:
githubConfig

object (GitHubConfig)

Configuration for connections to github.com.

GitHubConfig

Configuration for connections to github.com.

JSON representation
{
  "githubApp": enum (GitHubApp),
  "authorizerCredential": {
    object (OAuthCredential)
  },
  "appInstallationId": string,
  "installationUri": string
}
Fields
githubApp

enum (GitHubApp)

Required. Immutable. The GitHub Application that was installed to the GitHub user or organization.

authorizerCredential

object (OAuthCredential)

Optional. OAuth credential of the account that authorized the GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the GitHub App of this config.

appInstallationId

string (int64 format)

Optional. GitHub App installation id.

installationUri

string

Output only. The URI to navigate to in order to manage the installation associated with this GitHubConfig.

GitHubApp

Represents the various GitHub Applications that can be installed to a GitHub user or organization and used with Developer Connect.

Enums
GIT_HUB_APP_UNSPECIFIED GitHub App not specified.
DEVELOPER_CONNECT The Developer Connect GitHub Application.
FIREBASE The Firebase GitHub Application.

OAuthCredential

Represents an OAuth token of the account that authorized the Connection, and associated metadata.

JSON representation
{
  "oauthTokenSecretVersion": string,
  "username": string
}
Fields
oauthTokenSecretVersion

string

Required. A SecretManager resource containing the OAuth token that authorizes the connection. Format: projects/*/secrets/*/versions/*.

username

string

Output only. The username associated with this token.

InstallationState

Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.

JSON representation
{
  "stage": enum (Stage),
  "message": string,
  "actionUri": string
}
Fields
stage

enum (Stage)

Output only. Current step of the installation process.

message

string

Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.

actionUri

string

Output only. Link to follow for next action. Empty string if the installation is already complete.

Stage

Stage of the installation process.

Enums
STAGE_UNSPECIFIED No stage specified.
PENDING_CREATE_APP Only for GitHub Enterprise. An App creation has been requested. The user needs to confirm the creation in their GitHub enterprise host.
PENDING_USER_OAUTH User needs to authorize the GitHub (or Enterprise) App via OAuth.
PENDING_INSTALL_APP User needs to follow the link to install the GitHub (or Enterprise) App.
COMPLETE Installation process has been completed.

Methods

create

Creates a new Connection in a given project and location.

delete

Deletes a single Connection.

fetchGitHubInstallations

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.

fetchLinkableGitRepositories

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

get

Gets details of a single Connection.

list

Lists Connections in a given project and location.

patch

Updates the parameters of a single Connection.