From 7e7ae1a24c343a620e50f26e0bf46e96b6563d7c Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 26 Oct 2023 01:56:32 -0700 Subject: [PATCH] feat: Support for ReleaseConfigs feat: Support for WorkflowConfigs feat: Support new first-party repository methods for committing, listing/reading files, and fetching history feat: Support new ComputeRepositoryAccessTokenStatus repository method feat: Support SSH based git authentication configuration feat: Support workspace compilation override fields feat: Support NPMRC environment variables feat: Support labels on repositories feat: Support custom service account repository configuration docs: several comments reformatted fix: rearrange several messages, thus changing field types PiperOrigin-RevId: 576787262 --- google/cloud/dataform/v1beta1/BUILD.bazel | 24 +- google/cloud/dataform/v1beta1/dataform.proto | 1221 ++++++++++++++--- .../v1beta1/dataform_grpc_service_config.json | 35 +- .../dataform/v1beta1/dataform_v1beta1.yaml | 35 +- 4 files changed, 1070 insertions(+), 245 deletions(-) diff --git a/google/cloud/dataform/v1beta1/BUILD.bazel b/google/cloud/dataform/v1beta1/BUILD.bazel index 9f1a9306baafd..99f75fff0dee2 100644 --- a/google/cloud/dataform/v1beta1/BUILD.bazel +++ b/google/cloud/dataform/v1beta1/BUILD.bazel @@ -28,9 +28,11 @@ proto_library( "//google/api:client_proto", "//google/api:field_behavior_proto", "//google/api:resource_proto", + "//google/rpc:status_proto", "//google/type:interval_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", ], ) @@ -75,9 +77,9 @@ java_gapic_library( rest_numeric_enums = True, service_yaml = "dataform_v1beta1.yaml", test_deps = [ - ":dataform_java_grpc", "//google/cloud/location:location_java_grpc", "//google/iam/v1:iam_java_grpc", + ":dataform_java_grpc", ], transport = "grpc+rest", deps = [ @@ -127,6 +129,7 @@ go_proto_library( protos = [":dataform_proto"], deps = [ "//google/api:annotations_go_proto", + "//google/rpc:status_go_proto", "//google/type:interval_go_proto", ], ) @@ -167,6 +170,7 @@ load( "@com_google_googleapis_imports//:imports.bzl", "py_gapic_assembly_pkg", "py_gapic_library", + "py_test", ) py_gapic_library( @@ -176,6 +180,19 @@ py_gapic_library( rest_numeric_enums = True, service_yaml = "dataform_v1beta1.yaml", transport = "grpc+rest", + deps = [ + "//google/iam/v1:iam_policy_py_proto", + ], +) + +py_test( + name = "dataform_py_gapic_test", + srcs = [ + "dataform_py_gapic_pytest.py", + "dataform_py_gapic_test.py", + ], + legacy_create_init = False, + deps = [":dataform_py_gapic"], ) # Open Source Packages @@ -209,7 +226,9 @@ php_gapic_library( rest_numeric_enums = True, service_yaml = "dataform_v1beta1.yaml", transport = "grpc+rest", - deps = [":dataform_php_proto"], + deps = [ + ":dataform_php_proto", + ], ) # Open Source Packages @@ -317,6 +336,7 @@ load( csharp_proto_library( name = "dataform_csharp_proto", + extra_opts = [], deps = [":dataform_proto"], ) diff --git a/google/cloud/dataform/v1beta1/dataform.proto b/google/cloud/dataform/v1beta1/dataform.proto index 466459c30926c..afdf707879d4d 100644 --- a/google/cloud/dataform/v1beta1/dataform.proto +++ b/google/cloud/dataform/v1beta1/dataform.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.Dataform.V1Beta1"; @@ -40,10 +42,12 @@ option (google.api.resource_definition) = { // tables in BigQuery. service Dataform { option (google.api.default_host) = "dataform.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists Repositories in a given project and location. - rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + rpc ListRepositories(ListRepositoriesRequest) + returns (ListRepositoriesResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/repositories" }; @@ -77,15 +81,63 @@ service Dataform { } // Deletes a single Repository. - rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + rpc DeleteRepository(DeleteRepositoryRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/repositories/*}" }; option (google.api.method_signature) = "name"; } + // Applies a Git commit to a Repository. The Repository must not have a value + // for `git_remote_settings.url`. + rpc CommitRepositoryChanges(CommitRepositoryChangesRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*}:commit" + body: "*" + }; + } + + // Returns the contents of a file (inside a Repository). The Repository + // must not have a value for `git_remote_settings.url`. + rpc ReadRepositoryFile(ReadRepositoryFileRequest) + returns (ReadRepositoryFileResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:readFile" + }; + } + + // Returns the contents of a given Repository directory. The Repository must + // not have a value for `git_remote_settings.url`. + rpc QueryRepositoryDirectoryContents(QueryRepositoryDirectoryContentsRequest) + returns (QueryRepositoryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents" + }; + } + + // Fetches a Repository's history of commits. The Repository must not have a + // value for `git_remote_settings.url`. + rpc FetchRepositoryHistory(FetchRepositoryHistoryRequest) + returns (FetchRepositoryHistoryResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchHistory" + }; + } + + // Computes a Repository's Git access token status. + rpc ComputeRepositoryAccessTokenStatus( + ComputeRepositoryAccessTokenStatusRequest) + returns (ComputeRepositoryAccessTokenStatusResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus" + }; + } + // Fetches a Repository's remote branches. - rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) + returns (FetchRemoteBranchesResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" }; @@ -125,7 +177,8 @@ service Dataform { } // Installs dependency NPM packages (inside a Workspace). - rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + rpc InstallNpmPackages(InstallNpmPackagesRequest) + returns (InstallNpmPackagesResponse) { option (google.api.http) = { post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" body: "*" @@ -149,21 +202,24 @@ service Dataform { } // Fetches Git statuses for the files in a Workspace. - rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) + returns (FetchFileGitStatusesResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" }; } // Fetches Git ahead/behind against a remote branch. - rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) + returns (FetchGitAheadBehindResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" }; } // Applies a Git commit for uncommitted files in a Workspace. - rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" body: "*" @@ -171,7 +227,8 @@ service Dataform { } // Performs a Git reset for uncommitted files in a Workspace. - rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" body: "*" @@ -186,7 +243,8 @@ service Dataform { } // Returns the contents of a given Workspace directory. - rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) + returns (QueryDirectoryContentsResponse) { option (google.api.http) = { get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" }; @@ -248,8 +306,54 @@ service Dataform { }; } + // Lists ReleaseConfigs in a given Repository. + rpc ListReleaseConfigs(ListReleaseConfigsRequest) + returns (ListReleaseConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single ReleaseConfig. + rpc GetReleaseConfig(GetReleaseConfigRequest) returns (ReleaseConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ReleaseConfig in a given Repository. + rpc CreateReleaseConfig(CreateReleaseConfigRequest) returns (ReleaseConfig) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs" + body: "release_config" + }; + option (google.api.method_signature) = + "parent,release_config,release_config_id"; + } + + // Updates a single ReleaseConfig. + rpc UpdateReleaseConfig(UpdateReleaseConfigRequest) returns (ReleaseConfig) { + option (google.api.http) = { + patch: "/v1beta1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}" + body: "release_config" + }; + option (google.api.method_signature) = "release_config,update_mask"; + } + + // Deletes a single ReleaseConfig. + rpc DeleteReleaseConfig(DeleteReleaseConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + // Lists CompilationResults in a given Repository. - rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + rpc ListCompilationResults(ListCompilationResultsRequest) + returns (ListCompilationResultsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" }; @@ -257,7 +361,8 @@ service Dataform { } // Fetches a single CompilationResult. - rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + rpc GetCompilationResult(GetCompilationResultRequest) + returns (CompilationResult) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" }; @@ -265,7 +370,8 @@ service Dataform { } // Creates a new CompilationResult in a given project and location. - rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + rpc CreateCompilationResult(CreateCompilationResultRequest) + returns (CompilationResult) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" body: "compilation_result" @@ -274,14 +380,63 @@ service Dataform { } // Returns CompilationResultActions in a given CompilationResult. - rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) + returns (QueryCompilationResultActionsResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" }; } + // Lists WorkflowConfigs in a given Repository. + rpc ListWorkflowConfigs(ListWorkflowConfigsRequest) + returns (ListWorkflowConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowConfig. + rpc GetWorkflowConfig(GetWorkflowConfigRequest) returns (WorkflowConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowConfig in a given Repository. + rpc CreateWorkflowConfig(CreateWorkflowConfigRequest) + returns (WorkflowConfig) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs" + body: "workflow_config" + }; + option (google.api.method_signature) = + "parent,workflow_config,workflow_config_id"; + } + + // Updates a single WorkflowConfig. + rpc UpdateWorkflowConfig(UpdateWorkflowConfigRequest) + returns (WorkflowConfig) { + option (google.api.http) = { + patch: "/v1beta1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}" + body: "workflow_config" + }; + option (google.api.method_signature) = "workflow_config,update_mask"; + } + + // Deletes a single WorkflowConfig. + rpc DeleteWorkflowConfig(DeleteWorkflowConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + // Lists WorkflowInvocations in a given Repository. - rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) + returns (ListWorkflowInvocationsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" }; @@ -289,7 +444,8 @@ service Dataform { } // Fetches a single WorkflowInvocation. - rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) + returns (WorkflowInvocation) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" }; @@ -297,7 +453,8 @@ service Dataform { } // Creates a new WorkflowInvocation in a given Repository. - rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) + returns (WorkflowInvocation) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" body: "workflow_invocation" @@ -306,7 +463,8 @@ service Dataform { } // Deletes a single WorkflowInvocation. - rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" }; @@ -314,7 +472,8 @@ service Dataform { } // Requests cancellation of a running WorkflowInvocation. - rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" body: "*" @@ -322,7 +481,8 @@ service Dataform { } // Returns WorkflowInvocationActions in a given WorkflowInvocation. - rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) + returns (QueryWorkflowInvocationActionsResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" }; @@ -338,7 +498,23 @@ message Repository { // Controls Git remote configuration for a repository. message GitRemoteSettings { - // Indicates the status of a Git authentication token. + // Configures fields for performing SSH authentication. + message SshAuthenticationConfig { + // 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/*`. + string user_private_key_secret_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. Content of a public SSH key to verify an identity of a remote + // Git host. + string host_public_key = 2 [(google.api.field_behavior) = REQUIRED]; + } + enum TokenStatus { // Default value. This value is unused. TOKEN_STATUS_UNSPECIFIED = 0; @@ -360,25 +536,90 @@ message Repository { // Required. The Git remote's default branch name. string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The name of the Secret Manager secret version to use as an + // 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/*`. string authentication_token_secret_version = 3 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "secretmanager.googleapis.com/SecretVersion" } ]; - // Output only. Indicates the status of the Git access token. - TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Authentication fields for remote uris using SSH protocol. + SshAuthenticationConfig ssh_authentication_config = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // 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 + TokenStatus token_status = 4 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Configures workspace compilation overrides for a repository. + // Primarily used by the UI (`console.cloud.google.com`). + // `schema_suffix` and `table_prefix` 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 + // `code_compilation_config` + // (https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.compilationResults#codecompilationconfig) + // when creating workspace-scoped compilation results. + message WorkspaceCompilationOverrides { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery + // dataset ID) names. + string schema_suffix = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 3 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The repository's name. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The repository's user-friendly name. + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If set, configures this repository to be linked to a Git remote. - GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; + GitRemoteSettings git_remote_settings = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string npmrc_environment_variables_secret_version = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Optional. If set, fields of `workspace_compilation_overrides` override the + // default compilation settings that are specified in dataform.json when + // creating workspace-scoped compilation results. See documentation for + // `WorkspaceCompilationOverrides` for more information. + WorkspaceCompilationOverrides workspace_compilation_overrides = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Repository user labels. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // 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 + bool set_authenticated_user_admin = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // Optional. The service account to run workflow invocations under. + string service_account = 10 [(google.api.field_behavior) = OPTIONAL]; } // `ListRepositories` request message. @@ -392,9 +633,9 @@ message ListRepositoriesRequest { } ]; - // Optional. Maximum number of repositories to return. The server may return fewer - // items than requested. If unspecified, the server will pick an appropriate - // default. + // Optional. Maximum number of repositories to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListRepositories` call. @@ -404,9 +645,9 @@ message ListRepositoriesRequest { // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. This field only supports ordering by `name`. If unspecified, the server - // will choose the ordering. If specified, the default order is ascending for - // the `name` field. + // Optional. This field only supports ordering by `name`. If unspecified, the + // server will choose the ordering. If specified, the default order is + // ascending for the `name` field. string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter for the returned list. @@ -439,8 +680,8 @@ message GetRepositoryRequest { // `CreateRepository` request message. message CreateRepositoryRequest { - // Required. The location in which to create the repository. Must be in the format - // `projects/*/locations/*`. + // Required. The location in which to create the repository. Must be in the + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -451,16 +692,17 @@ message CreateRepositoryRequest { // Required. The repository to create. Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the repository, which will become the final component of - // the repository's resource name. + // Required. The ID to use for the repository, which will become the final + // component of the repository's resource name. string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; } // `UpdateRepository` request message. message UpdateRepositoryRequest { - // Optional. Specifies the fields to be updated in the repository. If left unset, - // all fields will be updated. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Specifies the fields to be updated in the repository. If left + // unset, all fields will be updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; // Required. The repository to update. Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; @@ -482,6 +724,206 @@ message DeleteRepositoryRequest { bool force = 2; } +// `CommitRepositoryChanges` request message. +message CommitRepositoryChangesRequest { + // Represents a single file operation to the repository. + message FileOperation { + // Represents the write file operation (for files added or modified). + message WriteFile { + // The file's contents. + bytes contents = 1; + } + + // Represents the delete file operation. + message DeleteFile {} + + oneof operation { + // Represents the write operation. + WriteFile write_file = 1; + + // Represents the delete operation. + DeleteFile delete_file = 2; + } + } + + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The changes to commit to the repository. + CommitMetadata commit_metadata = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit SHA which must be the repository's current HEAD before + // applying this commit; otherwise this request will fail. If unset, no + // validation on the current HEAD commit SHA is performed. + string required_head_commit_sha = 4 [(google.api.field_behavior) = OPTIONAL]; + + // A map to the path of the file to the operation. The path is the full file + // path including filename, from repository root. + map file_operations = 3; +} + +// `ReadRepositoryFile` request message. +message ReadRepositoryFileRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. The commit SHA for the commit to read from. If unset, the file + // will be read from HEAD. + string commit_sha = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Full file path to read including filename, from repository root. + string path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadRepositoryFile` response message. +message ReadRepositoryFileResponse { + // The file's contents. + bytes contents = 1; +} + +// `QueryRepositoryDirectoryContents` request message. +message QueryRepositoryDirectoryContentsRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. The Commit SHA for the commit to query from. If unset, the + // directory will be queried from HEAD. + string commit_sha = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The directory's full path including directory name, relative to + // root. If left unset, the root is used. + string path = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous + // `QueryRepositoryDirectoryContents` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `QueryRepositoryDirectoryContents` must match the call that provided the + // page token. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryRepositoryDirectoryContents` response message. +message QueryRepositoryDirectoryContentsResponse { + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `FetchRepositoryHistory` request message. +message FetchRepositoryHistoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of commits to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `FetchRepositoryHistory` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `FetchRepositoryHistory` + // must match the call that provided the page token. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchRepositoryHistory` response message. +message FetchRepositoryHistoryResponse { + // A list of commit logs, ordered by 'git log' default order. + repeated CommitLogEntry commits = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single commit log. +message CommitLogEntry { + // Commit timestamp. + google.protobuf.Timestamp commit_time = 1; + + // The commit SHA for this commit log entry. + string commit_sha = 2; + + // The commit author for this commit log entry. + CommitAuthor author = 3; + + // The commit message for this commit log entry. + string commit_message = 4; +} + +// Represents a Dataform Git commit. +message CommitMetadata { + // Required. The commit's author. + CommitAuthor author = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ComputeRepositoryAccessTokenStatus` request message. +message ComputeRepositoryAccessTokenStatusRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `ComputeRepositoryAccessTokenStatus` response message. +message ComputeRepositoryAccessTokenStatusResponse { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Indicates the status of the Git access token. + TokenStatus token_status = 1; +} + // `FetchRemoteBranches` request message. message FetchRemoteBranchesRequest { // Required. The repository's name. @@ -521,9 +963,9 @@ message ListWorkspacesRequest { } ]; - // Optional. Maximum number of workspaces to return. The server may return fewer - // items than requested. If unspecified, the server will pick an appropriate - // default. + // Optional. Maximum number of workspaces to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListWorkspaces` call. @@ -533,9 +975,9 @@ message ListWorkspacesRequest { // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. This field only supports ordering by `name`. If unspecified, the server - // will choose the ordering. If specified, the default order is ascending for - // the `name` field. + // Optional. This field only supports ordering by `name`. If unspecified, the + // server will choose the ordering. If specified, the default order is + // ascending for the `name` field. string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter for the returned list. @@ -568,8 +1010,8 @@ message GetWorkspaceRequest { // `CreateWorkspace` request message. message CreateWorkspaceRequest { - // Required. The repository in which to create the workspace. Must be in the format - // `projects/*/locations/*/repositories/*`. + // Required. The repository in which to create the workspace. Must be in the + // format `projects/*/locations/*/repositories/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -580,8 +1022,8 @@ message CreateWorkspaceRequest { // Required. The workspace to create. Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the workspace, which will become the final component of - // the workspace's resource name. + // Required. The ID to use for the workspace, which will become the final + // component of the workspace's resource name. string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -615,12 +1057,12 @@ message PullGitCommitsRequest { } ]; - // Optional. The name of the branch in the Git remote from which to pull commits. - // If left unset, the repository's default branch name will be used. + // Optional. The name of the branch in the Git remote from which to pull + // commits. If left unset, the repository's default branch name will be used. string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. The author of any merge commit which may be created as a result of merging - // fetched Git commits into this workspace. + // Required. The author of any merge commit which may be created as a result + // of merging fetched Git commits into this workspace. CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -634,8 +1076,9 @@ message PushGitCommitsRequest { } ]; - // Optional. The name of the branch in the Git remote to which commits should be pushed. - // If left unset, the repository's default branch name will be used. + // Optional. The name of the branch in the Git remote to which commits should + // be pushed. If left unset, the repository's default branch name will be + // used. string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -694,9 +1137,9 @@ message FetchGitAheadBehindRequest { } ]; - // Optional. The name of the branch in the Git remote against which this workspace - // should be compared. If left unset, the repository's default branch name - // will be used. + // Optional. The name of the branch in the Git remote against which this + // workspace should be compared. If left unset, the repository's default + // branch name will be used. string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -725,8 +1168,8 @@ message CommitWorkspaceChangesRequest { // Optional. The commit's message. string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Full file paths to commit including filename, rooted at workspace root. If - // left empty, all files will be committed. + // Optional. Full file paths to commit including filename, rooted at workspace + // root. If left empty, all files will be committed. repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -740,8 +1183,8 @@ message ResetWorkspaceChangesRequest { } ]; - // Optional. Full file paths to reset back to their committed state including filename, - // rooted at workspace root. If left empty, all files will be reset. + // Optional. Full file paths to reset back to their committed state including + // filename, rooted at workspace root. If left empty, all files will be reset. repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set to true, untracked files will be deleted. @@ -758,7 +1201,8 @@ message FetchFileDiffRequest { } ]; - // Required. The file's full path including filename, relative to the workspace root. + // Required. The file's full path including filename, relative to the + // workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -778,8 +1222,8 @@ message QueryDirectoryContentsRequest { } ]; - // Optional. The directory's full path including directory name, relative to the - // workspace root. If left unset, the workspace root is used. + // Optional. The directory's full path including directory name, relative to + // the workspace root. If left unset, the workspace root is used. string path = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Maximum number of paths to return. The server may return fewer @@ -787,8 +1231,8 @@ message QueryDirectoryContentsRequest { // default. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Page token received from a previous `QueryDirectoryContents` call. - // Provide this to retrieve the subsequent page. + // Optional. Page token received from a previous `QueryDirectoryContents` + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to // `QueryDirectoryContents` must match the call that provided the page @@ -798,17 +1242,6 @@ message QueryDirectoryContentsRequest { // `QueryDirectoryContents` response message. message QueryDirectoryContentsResponse { - // Represents a single entry in a workspace directory. - message DirectoryEntry { - oneof entry { - // A file in the directory. - string file = 1; - - // A child directory in the directory. - string directory = 2; - } - } - // List of entries in the directory. repeated DirectoryEntry directory_entries = 1; @@ -817,6 +1250,17 @@ message QueryDirectoryContentsResponse { string next_page_token = 2; } +// Represents a single entry in a directory. +message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } +} + // `MakeDirectory` request message. message MakeDirectoryRequest { // Required. The workspace's name. @@ -827,15 +1271,13 @@ message MakeDirectoryRequest { } ]; - // Required. The directory's full path including directory name, relative to the - // workspace root. + // Required. The directory's full path including directory name, relative to + // the workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; } // `MakeDirectory` response message. -message MakeDirectoryResponse { - -} +message MakeDirectoryResponse {} // `RemoveDirectory` request message. message RemoveDirectoryRequest { @@ -847,8 +1289,8 @@ message RemoveDirectoryRequest { } ]; - // Required. The directory's full path including directory name, relative to the - // workspace root. + // Required. The directory's full path including directory name, relative to + // the workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -862,19 +1304,17 @@ message MoveDirectoryRequest { } ]; - // Required. The directory's full path including directory name, relative to the - // workspace root. + // Required. The directory's full path including directory name, relative to + // the workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The new path for the directory including directory name, rooted at - // workspace root. + // Required. The new path for the directory including directory name, rooted + // at workspace root. string new_path = 3 [(google.api.field_behavior) = REQUIRED]; } // `MoveDirectory` response message. -message MoveDirectoryResponse { - -} +message MoveDirectoryResponse {} // `ReadFile` request message. message ReadFileRequest { @@ -886,7 +1326,8 @@ message ReadFileRequest { } ]; - // Required. The file's full path including filename, relative to the workspace root. + // Required. The file's full path including filename, relative to the + // workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -906,7 +1347,8 @@ message RemoveFileRequest { } ]; - // Required. The file's full path including filename, relative to the workspace root. + // Required. The file's full path including filename, relative to the + // workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -920,17 +1362,17 @@ message MoveFileRequest { } ]; - // Required. The file's full path including filename, relative to the workspace root. + // Required. The file's full path including filename, relative to the + // workspace root. string path = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The file's new path including filename, relative to the workspace root. + // Required. The file's new path including filename, relative to the workspace + // root. string new_path = 3 [(google.api.field_behavior) = REQUIRED]; } // `MoveFile` response message. -message MoveFileResponse { - -} +message MoveFileResponse {} // `WriteFile` request message. message WriteFileRequest { @@ -950,9 +1392,7 @@ message WriteFileRequest { } // `WriteFile` response message. -message WriteFileResponse { - -} +message WriteFileResponse {} // `InstallNpmPackages` request message. message InstallNpmPackagesRequest { @@ -966,48 +1406,175 @@ message InstallNpmPackagesRequest { } // `InstallNpmPackages` response message. -message InstallNpmPackagesResponse { - -} +message InstallNpmPackagesResponse {} -// Represents the result of compiling a Dataform project. -message CompilationResult { +// Represents a Dataform release configuration. +message ReleaseConfig { option (google.api.resource) = { - type: "dataform.googleapis.com/CompilationResult" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + type: "dataform.googleapis.com/ReleaseConfig" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/releaseConfigs/{release_config}" }; - // Configures various aspects of Dataform code compilation. - message CodeCompilationConfig { - // Optional. The default database (Google Cloud project ID). - string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + // A record of an attempt to create a compilation result for this release + // config. + message ScheduledReleaseRecord { + // The timestamp of this release attempt. + google.protobuf.Timestamp release_time = 1; + + oneof result { + // The name of the created compilation result, if one was successfully + // created. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [(google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + }]; + + // The error status encountered upon this attempt to create the + // compilation result, if the attempt was unsuccessful. + google.rpc.Status error_status = 3; + } + } + + // Output only. The release config's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The default schema (BigQuery dataset ID). - string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + // Required. Git commit/tag/branch name at which the repository should be + // compiled. Must exist in the remote repository. Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, fields of `code_compilation_config` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional schedule (in cron format) for automatic creation of + // compilation results. + string cron_schedule = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left + // unspecified, the default is UTC. + string time_zone = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Records of the 10 most recent scheduled release attempts, + // ordered in in descending order of `release_time`. Updated whenever + // automatic creation of a compilation result is triggered by cron_schedule. + repeated ScheduledReleaseRecord recent_scheduled_release_records = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The name of the currently released compilation result for this + // release config. This value is updated when a compilation result is created + // from this release config, or when this resource is updated by API call + // (perhaps to roll back to an earlier release). The compilation result must + // have been created using this release config. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string release_compilation_result = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} - // Optional. The default BigQuery location to use. Defaults to "US". - // See the BigQuery docs for a full list of locations: - // https://cloud.google.com/bigquery/docs/locations. - string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; +// `ListReleaseConfigs` request message. +message ListReleaseConfigsRequest { + // Required. The repository in which to list release configs. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; - // Optional. The default schema (BigQuery dataset ID) for assertions. - string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Maximum number of release configs to return. The server may + // return fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. User-defined variables that are made available to project code during - // compilation. - map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Page token received from a previous `ListReleaseConfigs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListReleaseConfigs` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} - // Optional. The suffix that should be appended to all database (Google Cloud project - // ID) names. - string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; +// `ListReleaseConfigs` response message. +message ListReleaseConfigsResponse { + // List of release configs. + repeated ReleaseConfig release_configs = 1; - // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) - // names. - string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; - // Optional. The prefix that should be prepended to all table names. - string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; - } + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetReleaseConfig` request message. +message GetReleaseConfigRequest { + // Required. The release config's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/ReleaseConfig" + } + ]; +} + +// `CreateReleaseConfig` request message. +message CreateReleaseConfigRequest { + // Required. The repository in which to create the release config. Must be in + // the format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The release config to create. + ReleaseConfig release_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the release config, which will become the final + // component of the release config's resource name. + string release_config_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateReleaseConfig` request message. +message UpdateReleaseConfigRequest { + // Optional. Specifies the fields to be updated in the release config. If left + // unset, all fields will be updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The release config to update. + ReleaseConfig release_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteReleaseConfig` request message. +message DeleteReleaseConfigRequest { + // Required. The release config's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/ReleaseConfig" + } + ]; +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; // An error encountered when attempting to compile a Dataform project. message CompilationError { @@ -1017,11 +1584,12 @@ message CompilationResult { // Output only. The error's full stack trace. string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The path of the file where this error occurred, if available, relative to - // the project root. + // Output only. The path of the file where this error occurred, if + // available, relative to the project root. string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The identifier of the action where this error occurred, if available. + // Output only. The identifier of the action where this error occurred, if + // available. Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -1029,9 +1597,8 @@ message CompilationResult { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; oneof source { - // Immutable. Git commit/tag/branch name at which the repository should be compiled. - // Must exist in the remote repository. - // Examples: + // Immutable. Git commit/tag/branch name at which the repository should be + // compiled. Must exist in the remote repository. Examples: // - a commit SHA: `12ade345` // - a tag: `tag1` // - a branch name: `branch1` @@ -1045,23 +1612,73 @@ message CompilationResult { type: "dataform.googleapis.com/Workspace" } ]; + + // Immutable. The name of the release config to compile. The release + // config's 'current_compilation_result' field will be updated to this + // compilation result. Must be in the format + // `projects/*/locations/*/repositories/*/releaseConfigs/*`. + string release_config = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/ReleaseConfig" + } + ]; } - // Immutable. If set, fields of `code_compilation_overrides` override the default + // Immutable. If set, fields of `code_compilation_config` override the default // compilation settings that are specified in dataform.json. - CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + CodeCompilationConfig code_compilation_config = 4 + [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The fully resolved Git commit SHA of the code that was + // compiled. Not set for compilation results whose source is a workspace. + string resolved_git_commit_sha = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The version of `@dataform/core` that was used for compilation. string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Errors encountered during project compilation. - repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated CompilationError compilation_errors = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configures various aspects of Dataform code compilation. +message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code + // during compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud + // project ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery + // dataset ID) names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; } // `ListCompilationResults` request message. message ListCompilationResultsRequest { - // Required. The repository in which to list compilation results. Must be in the - // format `projects/*/locations/*/repositories/*`. + // Required. The repository in which to list compilation results. Must be in + // the format `projects/*/locations/*/repositories/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1069,13 +1686,13 @@ message ListCompilationResultsRequest { } ]; - // Optional. Maximum number of compilation results to return. The server may return - // fewer items than requested. If unspecified, the server will pick an + // Optional. Maximum number of compilation results to return. The server may + // return fewer items than requested. If unspecified, the server will pick an // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Page token received from a previous `ListCompilationResults` call. - // Provide this to retrieve the subsequent page. + // Optional. Page token received from a previous `ListCompilationResults` + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListCompilationResults` // must match the call that provided the page token. @@ -1108,8 +1725,8 @@ message GetCompilationResultRequest { // `CreateCompilationResult` request message. message CreateCompilationResultRequest { - // Required. The repository in which to create the compilation result. Must be in the - // format `projects/*/locations/*/repositories/*`. + // Required. The repository in which to create the compilation result. Must be + // in the format `projects/*/locations/*/repositories/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1118,7 +1735,8 @@ message CreateCompilationResultRequest { ]; // Required. The compilation result to create. - CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; + CompilationResult compilation_result = 2 + [(google.api.field_behavior) = REQUIRED]; } // Represents an action identifier. If the action writes output, the output @@ -1350,21 +1968,22 @@ message QueryCompilationResultActionsRequest { } ]; - // Optional. Maximum number of compilation results to return. The server may return - // fewer items than requested. If unspecified, the server will pick an + // Optional. Maximum number of compilation results to return. The server may + // return fewer items than requested. If unspecified, the server will pick an // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Page token received from a previous `QueryCompilationResultActions` call. - // Provide this to retrieve the subsequent page. + // Optional. Page token received from a previous + // `QueryCompilationResultActions` call. Provide this to retrieve the + // subsequent page. // // When paginating, all other parameters provided to // `QueryCompilationResultActions` must match the call that provided the page // token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Optional filter for the returned list. Filtering is only currently - // supported on the `file_path` field. + // Optional. Optional filter for the returned list. Filtering is only + // currently supported on the `file_path` field. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1378,34 +1997,190 @@ message QueryCompilationResultActionsResponse { string next_page_token = 2; } -// Represents a single invocation of a compilation result. -message WorkflowInvocation { +// Represents a Dataform workflow configuration. +message WorkflowConfig { option (google.api.resource) = { - type: "dataform.googleapis.com/WorkflowInvocation" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + type: "dataform.googleapis.com/WorkflowConfig" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowConfigs/{workflow_config}" }; - // Includes various configuration options for this workflow invocation. - // If both `included_targets` and `included_tags` are unset, all actions - // will be included. - message InvocationConfig { - // Immutable. The set of action identifiers to include. - repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + // A record of an attempt to create a workflow invocation for this workflow + // config. + message ScheduledExecutionRecord { + // The timestamp of this execution attempt. + google.protobuf.Timestamp execution_time = 1; + + oneof result { + // The name of the created workflow invocation, if one was successfully + // created. Must be in the format + // `projects/*/locations/*/repositories/*/workflowInvocations/*`. + string workflow_invocation = 2 [(google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + }]; + + // The error status encountered upon this attempt to create the + // workflow invocation, if the attempt was unsuccessful. + google.rpc.Status error_status = 3; + } + } - // Immutable. The set of tags to include. - repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + // Output only. The workflow config's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Immutable. When set to true, transitive dependencies of included actions will be - // executed. - bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + // Required. The name of the release config whose release_compilation_result + // should be executed. Must be in the format + // `projects/*/locations/*/repositories/*/releaseConfigs/*`. + string release_config = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/ReleaseConfig" + } + ]; - // Immutable. When set to true, transitive dependents of included actions will be - // executed. - bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + // Optional. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional schedule (in cron format) for automatic execution of + // this workflow config. + string cron_schedule = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left + // unspecified, the default is UTC. + string time_zone = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Records of the 10 most recent scheduled execution attempts, + // ordered in in descending order of `execution_time`. Updated whenever + // automatic creation of a workflow invocation is triggered by cron_schedule. + repeated ScheduledExecutionRecord recent_scheduled_execution_records = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} - // Immutable. When set to true, any incremental tables will be fully refreshed. - bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; - } +// Includes various configuration options for a workflow invocation. +// If both `included_targets` and `included_tags` are unset, all actions +// will be included. +message InvocationConfig { + // Optional. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, transitive dependencies of included actions + // will be executed. + bool transitive_dependencies_included = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, transitive dependents of included actions will + // be executed. + bool transitive_dependents_included = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The service account to run workflow invocations under. + string service_account = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowConfigs` request message. +message ListWorkflowConfigsRequest { + // Required. The repository in which to list workflow configs. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow configs to return. The server may + // return fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowConfigs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowConfigs` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowConfigs` response message. +message ListWorkflowConfigsResponse { + // List of workflow configs. + repeated WorkflowConfig workflow_configs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkflowConfig` request message. +message GetWorkflowConfigRequest { + // Required. The workflow config's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowConfig" + } + ]; +} + +// `CreateWorkflowConfig` request message. +message CreateWorkflowConfigRequest { + // Required. The repository in which to create the workflow config. Must be in + // the format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow config to create. + WorkflowConfig workflow_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workflow config, which will become the + // final component of the workflow config's resource name. + string workflow_config_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateWorkflowConfig` request message. +message UpdateWorkflowConfigRequest { + // Optional. Specifies the fields to be updated in the workflow config. If + // left unset, all fields will be updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The workflow config to update. + WorkflowConfig workflow_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowConfig` request message. +message DeleteWorkflowConfigRequest { + // Required. The workflow config's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowConfig" + } + ]; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; // Represents the current state of a workflow invocation. enum State { @@ -1432,29 +2207,43 @@ message WorkflowInvocation { // Output only. The workflow invocation's name. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Immutable. The name of the compilation result to compile. Must be in the format - // `projects/*/locations/*/repositories/*/compilationResults/*`. - string compilation_result = 2 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "dataform.googleapis.com/CompilationResult" - } - ]; + oneof compilation_source { + // Immutable. The name of the compilation result to use for this invocation. + // Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. The name of the workflow config to invoke. Must be in the + // format `projects/*/locations/*/repositories/*/workflowConfigs/*`. + string workflow_config = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowConfig" + } + ]; + } // Immutable. If left unset, a default InvocationConfig will be used. - InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + InvocationConfig invocation_config = 3 + [(google.api.field_behavior) = IMMUTABLE]; // Output only. This workflow invocation's current state. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This workflow invocation's timing details. - google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.type.Interval invocation_timing = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // `ListWorkflowInvocations` request message. message ListWorkflowInvocationsRequest { - // Required. The parent resource of the WorkflowInvocation type. Must be in the - // format `projects/*/locations/*/repositories/*`. + // Required. The parent resource of the WorkflowInvocation type. Must be in + // the format `projects/*/locations/*/repositories/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1462,17 +2251,25 @@ message ListWorkflowInvocationsRequest { } ]; - // Optional. Maximum number of workflow invocations to return. The server may return - // fewer items than requested. If unspecified, the server will pick an + // Optional. Maximum number of workflow invocations to return. The server may + // return fewer items than requested. If unspecified, the server will pick an // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Page token received from a previous `ListWorkflowInvocations` call. - // Provide this to retrieve the subsequent page. + // Optional. Page token received from a previous `ListWorkflowInvocations` + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListWorkflowInvocations` // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the + // server will choose the ordering. If specified, the default order is + // ascending for the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } // `ListWorkflowInvocations` response message. @@ -1501,8 +2298,8 @@ message GetWorkflowInvocationRequest { // `CreateWorkflowInvocation` request message. message CreateWorkflowInvocationRequest { - // Required. The repository in which to create the workflow invocation. Must be in the - // format `projects/*/locations/*/repositories/*`. + // Required. The repository in which to create the workflow invocation. Must + // be in the format `projects/*/locations/*/repositories/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1511,7 +2308,8 @@ message CreateWorkflowInvocationRequest { ]; // Required. The workflow invocation resource to create. - WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; + WorkflowInvocation workflow_invocation = 2 + [(google.api.field_behavior) = REQUIRED]; } // `DeleteWorkflowInvocation` request message. @@ -1538,7 +2336,7 @@ message CancelWorkflowInvocationRequest { // Represents a single action in a workflow invocation. message WorkflowInvocationAction { - // Represents the current state of an workflow invocation action. + // Represents the current state of a workflow invocation action. enum State { // The action has not yet been considered for invocation. PENDING = 0; @@ -1570,17 +2368,19 @@ message WorkflowInvocationAction { string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Output only. This action's identifier. Unique within the workflow invocation. + // Output only. This action's identifier. Unique within the workflow + // invocation. Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The action's identifier if the project had been compiled without any - // overrides configured. Unique within the compilation result. + // Output only. The action's identifier if the project had been compiled + // without any overrides configured. Unique within the compilation result. Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This action's current state. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If and only if action's state is FAILED a failure reason is set. + // Output only. If and only if action's state is FAILED a failure reason is + // set. string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This action's timing details. @@ -1588,10 +2388,12 @@ message WorkflowInvocationAction { // CANCELLED, FAILED] state. // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] // state. - google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.type.Interval invocation_timing = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow action's bigquery action details. - BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + BigQueryAction bigquery_action = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // `QueryWorkflowInvocationActions` request message. @@ -1604,13 +2406,14 @@ message QueryWorkflowInvocationActionsRequest { } ]; - // Optional. Maximum number of workflow invocations to return. The server may return - // fewer items than requested. If unspecified, the server will pick an + // Optional. Maximum number of workflow invocations to return. The server may + // return fewer items than requested. If unspecified, the server will pick an // appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. - // Provide this to retrieve the subsequent page. + // Optional. Page token received from a previous + // `QueryWorkflowInvocationActions` call. Provide this to retrieve the + // subsequent page. // // When paginating, all other parameters provided to // `QueryWorkflowInvocationActions` must match the call that provided the page diff --git a/google/cloud/dataform/v1beta1/dataform_grpc_service_config.json b/google/cloud/dataform/v1beta1/dataform_grpc_service_config.json index 959bf4c182fbf..8b83947dafc5a 100644 --- a/google/cloud/dataform/v1beta1/dataform_grpc_service_config.json +++ b/google/cloud/dataform/v1beta1/dataform_grpc_service_config.json @@ -1,26 +1,15 @@ { - "methodConfig": [{ - "name": [ - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "ListRepositories" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "GetRepository" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "ListWorkspaces" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "GetWorkspace" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "ListCompilationResults" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "GetCompilationResult" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "CreateCompilationResult" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "QueryCompilationResultActions" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "CreateWorkflowInvocation" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "CancelWorkflowInvocation" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "ListWorkflowInvocations" }, - { "service": "google.cloud.dataform.v1beta1.DataformService", "method": "GetWorkflowInvocation" } - ], - "timeout": "60s", - "retryPolicy": { - "maxAttempts": 5, - "initialBackoff": "1s", - "maxBackoff": "10s", - "backoffMultiplier": 1.3, - "retryableStatusCodes": ["UNAVAILABLE"] + "methodConfig": [ + { + "name": [{ "service": "google.cloud.dataform.v1beta1.DataformService" }], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } } - }] + ] } diff --git a/google/cloud/dataform/v1beta1/dataform_v1beta1.yaml b/google/cloud/dataform/v1beta1/dataform_v1beta1.yaml index b3a2a999fac50..d2d082ff42359 100644 --- a/google/cloud/dataform/v1beta1/dataform_v1beta1.yaml +++ b/google/cloud/dataform/v1beta1/dataform_v1beta1.yaml @@ -9,6 +9,9 @@ apis: - name: google.iam.v1.IAMPolicy documentation: + summary: |- + Service to develop, version control, and operationalize SQL pipelines in + BigQuery. rules: - selector: google.cloud.location.Locations.GetLocation description: Gets information about a location. @@ -39,23 +42,33 @@ documentation: permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. -backend: - rules: - - selector: 'google.cloud.dataform.v1beta1.Dataform.*' - deadline: 60.0 - - selector: google.cloud.location.Locations.GetLocation - deadline: 60.0 - - selector: google.cloud.location.Locations.ListLocations - deadline: 60.0 - - selector: 'google.iam.v1.IAMPolicy.*' - deadline: 60.0 - http: rules: - selector: google.cloud.location.Locations.GetLocation get: '/v1beta1/{name=projects/*/locations/*}' - selector: google.cloud.location.Locations.ListLocations get: '/v1beta1/{name=projects/*}/locations' + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + get: '/v1beta1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy' + additional_bindings: + - get: '/v1beta1/{resource=projects/*/locations/*/collections/*}:getIamPolicy' + - get: '/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:getIamPolicy' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1beta1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:setIamPolicy' + body: '*' + - post: '/v1beta1/{resource=projects/*/locations/*/collections/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1beta1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions' + body: '*' + additional_bindings: + - post: '/v1beta1/{resource=projects/*/locations/*/collections/*}:testIamPermissions' + body: '*' + - post: '/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:testIamPermissions' + body: '*' authentication: rules: