REST Resource: projects.locations.repositories

Resource: Repository

Represents a Dataform Git repository.

JSON representation
{
  "name": string,
  "createTime": string,
  "displayName": string,
  "gitRemoteSettings": {
    object (GitRemoteSettings)
  },
  "npmrcEnvironmentVariablesSecretVersion": string,
  "workspaceCompilationOverrides": {
    object (WorkspaceCompilationOverrides)
  },
  "labels": {
    string: string,
    ...
  },
  "setAuthenticatedUserAdmin": boolean,
  "serviceAccount": string,
  "kmsKeyName": string,
  "dataEncryptionState": {
    object (DataEncryptionState)
  }
}
Fields
name

string

Identifier. The repository's name.

createTime

string (Timestamp format)

Output only. The timestamp of when the repository was created.

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".

displayName

string

Optional. The repository's user-friendly name.

gitRemoteSettings

object (GitRemoteSettings)

Optional. If set, configures this repository to be linked to a Git remote.

npmrcEnvironmentVariablesSecretVersion

string

Optional. The name of the Secret Manager secret version to be used to interpolate variables into the .npmrc file for package installation operations. Must be in the format projects/*/secrets/*/versions/*. The file itself must be in a JSON format.

workspaceCompilationOverrides

object (WorkspaceCompilationOverrides)

Optional. If set, fields of workspaceCompilationOverrides override the default compilation settings that are specified in dataform.json when creating workspace-scoped compilation results. See documentation for WorkspaceCompilationOverrides for more information.

labels

map (key: string, value: string)

Optional. Repository user labels.

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

setAuthenticatedUserAdmin

boolean

Optional. Input only. If set to true, the authenticated user will be granted the roles/dataform.admin role on the created repository. To modify access to the created repository later apply setIamPolicy from https://cloud.google.com/dataform/reference/rest#rest-resource:-v1beta1.projects.locations.repositories

serviceAccount

string

Optional. The service account to run workflow invocations under.

kmsKeyName

string

Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}

dataEncryptionState

object (DataEncryptionState)

Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key.

GitRemoteSettings

Controls Git remote configuration for a repository.

JSON representation
{
  "url": string,
  "defaultBranch": string,
  "authenticationTokenSecretVersion": string,
  "sshAuthenticationConfig": {
    object (SshAuthenticationConfig)
  },
  "tokenStatus": enum (TokenStatus)
}
Fields
url

string

Required. The Git remote's URL.

defaultBranch

string

Required. The Git remote's default branch name.

authenticationTokenSecretVersion

string

Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format projects/*/secrets/*/versions/*.

sshAuthenticationConfig

object (SshAuthenticationConfig)

Optional. Authentication fields for remote uris using SSH protocol.

tokenStatus
(deprecated)

enum (TokenStatus)

Output only. Deprecated: The field does not contain any token status information. Instead use https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus

SshAuthenticationConfig

Configures fields for performing SSH authentication.

JSON representation
{
  "userPrivateKeySecretVersion": string,
  "hostPublicKey": string
}
Fields
userPrivateKeySecretVersion

string

Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format projects/*/secrets/*/versions/*.

hostPublicKey

string

Required. Content of a public SSH key to verify an identity of a remote Git host.

TokenStatus

Enums
TOKEN_STATUS_UNSPECIFIED Default value. This value is unused.
NOT_FOUND The token could not be found in Secret Manager (or the Dataform Service Account did not have permission to access it).
INVALID The token could not be used to authenticate against the Git remote.
VALID The token was used successfully to authenticate against the Git remote.

WorkspaceCompilationOverrides

Configures workspace compilation overrides for a repository. Primarily used by the UI (console.cloud.google.com). schemaSuffix and tablePrefix can have a special expression - ${workspaceName}, which refers to the workspace name from which the compilation results will be created. API callers are expected to resolve the expression in these overrides and provide them explicitly in codeCompilationConfig (https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.compilationResults#codecompilationconfig) when creating workspace-scoped compilation results.

JSON representation
{
  "defaultDatabase": string,
  "schemaSuffix": string,
  "tablePrefix": string
}
Fields
defaultDatabase

string

Optional. The default database (Google Cloud project ID).

schemaSuffix

string

Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.

tablePrefix

string

Optional. The prefix that should be prepended to all table names.

Methods

commit

Applies a Git commit to a Repository.

computeAccessTokenStatus

Computes a Repository's Git access token status.

create

Creates a new Repository in a given project and location.

delete

Deletes a single Repository.

fetchHistory

Fetches a Repository's history of commits.

fetchRemoteBranches

Fetches a Repository's remote branches.

get

Fetches a single Repository.

getIamPolicy

Gets the access control policy for a resource.

list

Lists Repositories in a given project and location.

patch

Updates a single Repository.

queryDirectoryContents

Returns the contents of a given Repository directory.

readFile

Returns the contents of a file (inside a Repository).

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.