From c95c0f85950b6f69de19a28c5f0c6c8d9e282240 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Thu, 21 Nov 2024 16:39:13 -0500 Subject: [PATCH 01/15] Add terraform GitHub Enterprise, GitLab, and GitLab Enterprise to Developer Connect. Promote to GA --- .../products/developerconnect/Connection.yaml | 547 ++++++++++++------ .../developerconnect/GitRepositoryLink.yaml | 240 ++++---- mmv1/products/developerconnect/product.yaml | 13 +- ...veloper_connect_connection_github.tf.tmpl} | 1 - ...oper_connect_connection_github_doc.tf.tmpl | 4 - ...nnect_connection_github_enterprise.tf.tmpl | 12 + ...t_connection_github_enterprise_doc.tf.tmpl | 42 ++ ...eveloper_connect_connection_gitlab.tf.tmpl | 10 + ...oper_connect_connection_gitlab_doc.tf.tmpl | 11 + ...nnect_connection_gitlab_enterprise.tf.tmpl | 12 + ...t_connection_gitlab_enterprise_doc.tf.tmpl | 12 + ...connect_git_repository_link_github.tf.tmpl | 2 - ...ect_git_repository_link_github_doc.tf.tmpl | 1 - ..._repository_link_github_enterprise.tf.tmpl | 23 + ...ository_link_github_enterprise_doc.tf.tmpl | 46 ++ ...connect_git_repository_link_gitlab.tf.tmpl | 20 + ...ect_git_repository_link_gitlab_doc.tf.tmpl | 19 + ..._repository_link_gitlab_enterprise.tf.tmpl | 21 + ...ository_link_gitlab_enterprise_doc.tf.tmpl | 19 + 19 files changed, 745 insertions(+), 310 deletions(-) rename mmv1/templates/terraform/examples/{developer_connect_connection_basic.tf.tmpl => developer_connect_connection_github.tf.tmpl} (94%) create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 1366e08e794d..58f8a6e8375b 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -12,211 +12,390 @@ # limitations under the License. --- -name: 'Connection' -description: | - A connection to a GitHub App installation. -min_version: 'beta' -docs: -id_format: 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/connections' -self_link: 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/connections?connectionId={{connection_id}}' -update_verb: 'PATCH' +name: Connection +description: A connection for GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. +base_url: projects/{{project}}/locations/{{location}}/connections update_mask: true +self_link: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} +create_url: projects/{{project}}/locations/{{location}}/connections?connectionId={{connection_id}} +update_verb: PATCH +id_format: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{connection_id}}' -timeouts: - insert_minutes: 20 - update_minutes: 20 - delete_minutes: 20 -autogen_async: true -async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' - operation: - base_url: '{{op_id}}' - path: 'name' - wait_ms: 1000 - result: - path: 'response' - resource_inside_response: true - error: - path: 'error' - message: 'message' -custom_code: +- projects/{{project}}/locations/{{location}}/connections/{{connection_id}} examples: - - name: 'developer_connect_connection_basic' + - name: 'developer_connect_connection_github' primary_resource_id: 'my-connection' primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' - min_version: 'beta' vars: - connection_name: 'tf-test-connection' + connection_name: 'tf-test-connection' - name: 'developer_connect_connection_github_doc' - min_version: 'beta' exclude_test: true + - name: 'developer_connect_connection_github_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + host_uri_name: 'https://devconnect-terraform.com' + - name: 'developer_connect_connection_github_enterprise_doc' + exclude_test: true + - name: 'developer_connect_connection_gitlab' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_cred: 'glpat-some-read-auth-credential' + auth_cred: 'glpat-some-auth-credential' + - name: 'developer_connect_connection_gitlab_doc' + exclude_test: true + - name: 'developer_connect_connection_gitlab_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + host_uri_name: 'https://devconnect-terraform.com' + webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_cred: 'glpat-some-read-auth-credential' + auth_cred: 'glpat-some-auth-credential' + - name: 'developer_connect_connection_gitlab_enterprise_doc' + exclude_test: true +autogen_async: true +async: + operation: + timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 + base_url: '{{op_id}}' + actions: + - create + - delete + - update + type: OpAsync + result: + resource_inside_response: true + error: {} + include_project: false +autogen_status: Q29ubmVjdGlvbg== parameters: - - name: 'location' - type: String - description: | - Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. - min_version: 'beta' - url_param_only: true - required: true - immutable: true - - name: 'connectionId' +- name: location + type: String + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true +- name: connectionId + type: String + description: |- + Required. Id of the requesting object + If auto-generating Id server-side, remove this field and + connection_id from the method_signature of Create RPC + immutable: true + url_param_only: true + required: true +properties: +- name: githubConfig + type: NestedObject + description: Configuration for connections to github.com. + properties: + - name: installationUri type: String - description: | - Required. Id of the requesting object. If auto-generating Id server-side, - remove this field and connection_id from the method_signature of Create RPC. - min_version: 'beta' - url_param_only: true - required: true + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubConfig. + output: true + - name: githubApp + type: String + description: |- + Required. Immutable. The GitHub Application that was installed to the GitHub user or + organization. + Possible values: + GIT_HUB_APP_UNSPECIFIED + DEVELOPER_CONNECT + FIREBASE immutable: true -properties: - - name: 'githubConfig' + required: true + - name: authorizerCredential type: NestedObject - description: | - Configuration for connections to github.com. - min_version: 'beta' + description: |- + Represents an OAuth token of the account that authorized the Connection, + and associated metadata. properties: - - name: 'githubApp' - type: String - description: | - Required. Immutable. The GitHub Application that was installed to - the GitHub user or organization. - Possible values: - GIT_HUB_APP_UNSPECIFIED - DEVELOPER_CONNECT - FIREBASE" - min_version: 'beta' - required: true - immutable: true - - name: 'authorizerCredential' - type: NestedObject - description: | - Represents an OAuth token of the account that authorized the Connection,and - associated metadata. - min_version: 'beta' - properties: - - name: 'oauthTokenSecretVersion' - type: String - description: | - Required. A SecretManager resource containing the OAuth token - that authorizes the connection. - Format: `projects/*/secrets/*/versions/*`. - min_version: 'beta' - required: true - - name: 'username' - type: String - description: | - Output only. The username associated with this token. - min_version: 'beta' - output: true - - name: 'appInstallationId' - type: String - description: | - Optional. GitHub App installation id. - min_version: 'beta' - - name: 'installationUri' - type: String - description: | - Output only. The URI to navigate to in order to manage the installation - associated with this GitHubConfig. - min_version: 'beta' - output: true - - name: 'name' - type: String - description: | - Identifier. The resource name of the connection, in the format - `projects/{project}/locations/{location}/connections/{connection_id}`. - min_version: 'beta' - output: true - - name: 'createTime' + - name: oauthTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the OAuth token that authorizes + the connection. Format: `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: appInstallationId + type: String + description: Optional. GitHub App installation id. +- name: githubEnterpriseConfig + type: NestedObject + description: Configuration for connections to an instance of GitHub Enterprise. + properties: + - name: appSlug type: String - description: | - Output only. [Output only] Create timestamp - min_version: 'beta' + description: Output only. The URL-friendly name of the GitHub App. output: true - - name: 'updateTime' + - name: privateKeySecretVersion type: String - description: | - Output only. [Output only] Update timestamp - min_version: 'beta' + description: |- + Optional. SecretManager resource containing the private key of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: installationUri + type: String + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubEnterpriseConfig. output: true - - name: 'deleteTime' + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: serverVersion type: String - description: | - Output only. [Output only] Delete timestamp - min_version: 'beta' + description: Output only. GitHub Enterprise version installed at the host_uri. output: true - - name: 'labels' - type: KeyValueLabels - description: | - Optional. Labels as key value pairs - min_version: 'beta' - - name: 'installationState' + - name: sslCaCertificate + type: String + description: Optional. SSL certificate to use for requests to GitHub Enterprise. + - name: hostUri + type: String + description: Required. The URI of the GitHub Enterprise host this connection is for. + required: true + - name: appId + type: String + description: Optional. ID of the GitHub App created from the manifest. + - name: webhookSecretSecretVersion + type: String + description: |- + Optional. SecretManager resource containing the webhook secret of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: appInstallationId + type: String + description: Optional. ID of the installation of the GitHub App. +- name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs +- name: etag + type: String + description: |- + 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. +- name: uid + type: String + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. + output: true +- name: name + type: String + description: |- + Identifier. The resource name of the connection, in the format + `projects/{project}/locations/{location}/connections/{connection_id}`. + output: true +- name: reconciling + type: Boolean + description: |- + Output only. Set to true when the connection is being set up or updated in the + background. + output: true +- name: gitlabEnterpriseConfig + type: NestedObject + description: Configuration for connections to an instance of GitLab Enterprise. + properties: + - name: authorizerCredential type: NestedObject - description: | - Describes stage and necessary actions to be taken by the user to complete the installation. - Used for GitHub and GitHub Enterprise based connections. - min_version: 'beta' + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: sslCaCertificate + type: String + description: |- + Optional. SSL Certificate Authority certificate to use for requests to GitLab + Enterprise instance. + - name: serverVersion + type: String + description: Output only. Version of the GitLab Enterprise server running on the `host_uri`. output: true + - name: hostUri + type: String + description: Required. The URI of the GitLab Enterprise host this connection is for. + required: true + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true properties: - - name: 'stage' - type: String - description: | - Output only. Current step of the installation process. - Possible values: - STAGE_UNSPECIFIED - PENDING_CREATE_APP - PENDING_USER_OAUTH - PENDING_INSTALL_APP - COMPLETE - min_version: 'beta' - output: true - - name: 'message' - type: String - description: | - Output only. Message of what the user should do next to continue - the installation.Empty string if the installation is already complete. - min_version: 'beta' - - name: 'actionUri' - type: String - description: | - Output only. Link to follow for next action. Empty string if the - installation is already complete. - min_version: 'beta' - - name: 'disabled' - type: Boolean - description: - 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. - min_version: 'beta' - - name: 'reconciling' - type: Boolean - description: | - Output only. Set to true when the connection is being set up or updated - in the background. - min_version: 'beta' + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true +- name: updateTime + type: String + description: Output only. [Output only] Update timestamp + output: true +- name: deleteTime + type: String + description: Output only. [Output only] Delete timestamp + output: true +- name: installationState + type: NestedObject + description: |- + Describes stage and necessary actions to be taken by the + user to complete the installation. Used for GitHub and GitHub Enterprise + based connections. + properties: + - name: message + type: String + description: |- + Output only. Message of what the user should do next to continue the installation. + Empty string if the installation is already complete. output: true - - name: 'annotations' - type: KeyValueAnnotations - description: | - Optional. Allows clients to store small amounts of arbitrary data. - min_version: 'beta' - - name: 'etag' - type: String - description: | - 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. - min_version: 'beta' - - name: 'uid' - type: String - description: | - Output only. A system-assigned unique identifier for a the GitRepositoryLink. - min_version: 'beta' + - name: actionUri + type: String + description: |- + Output only. Link to follow for next action. Empty string if the installation is already + complete. output: true + - name: stage + type: String + description: |- + Output only. Current step of the installation process. + Possible values: + STAGE_UNSPECIFIED + PENDING_CREATE_APP + PENDING_USER_OAUTH + PENDING_INSTALL_APP + COMPLETE + output: true +- name: disabled + type: Boolean + description: |- + 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. +- name: annotations + type: KeyValueAnnotations + description: Optional. Allows clients to store small amounts of arbitrary data. +- name: gitlabConfig + type: NestedObject + description: Configuration for connections to gitlab.com. + properties: + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true +- name: createTime + type: String + description: Output only. [Output only] Create timestamp + output: true +- name: cryptoKeyConfig + type: NestedObject + description: |- + The crypto key configuration. This field is used by the Customer-managed + encryption keys (CMEK) feature. + properties: + - name: keyReference + type: String + description: |- + Required. The name of the key which is used to encrypt/decrypt customer data. For key + in Cloud KMS, the key should be in the format of + `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + required: true diff --git a/mmv1/products/developerconnect/GitRepositoryLink.yaml b/mmv1/products/developerconnect/GitRepositoryLink.yaml index 54ea3c39287d..7c43db61a86d 100644 --- a/mmv1/products/developerconnect/GitRepositoryLink.yaml +++ b/mmv1/products/developerconnect/GitRepositoryLink.yaml @@ -12,130 +12,146 @@ # limitations under the License. --- -name: 'GitRepositoryLink' -description: "A git repository link to a parent connection." -min_version: 'beta' -docs: -id_format: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -base_url: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks' -self_link: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -create_url: 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}}' +name: GitRepositoryLink +description: A git repository link to a parent connection. +base_url: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks immutable: true +self_link: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} +create_url: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}} +id_format: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} import_format: - - 'projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}' -timeouts: - insert_minutes: 20 - update_minutes: 20 - delete_minutes: 20 -autogen_async: true -async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' - operation: - base_url: '{{op_id}}' - path: 'name' - wait_ms: 1000 - result: - path: 'response' - resource_inside_response: true - error: - path: 'error' - message: 'message' -custom_code: +- projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} examples: # These tests depend on secrets stored in a separate project, so we prefer not # to show them in the docs. - name: 'developer_connect_git_repository_link_github' primary_resource_id: 'primary' - min_version: 'beta' vars: connection_name: 'my-connection' git_repository_link_name: 'my-repository' exclude_docs: true - name: 'developer_connect_git_repository_link_github_doc' - min_version: 'beta' exclude_test: true + - name: 'developer_connect_git_repository_link_github_enterprise' + primary_resource_id: 'primary' + vars: + connection_name: 'my-connection' + git_repository_link_name: 'my-repository' + host_uri_name: 'https://devconnect-terraform.com' + exclude_docs: true + - name: 'developer_connect_git_repository_link_github_enterprise_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_gitlab' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_cred: 'glpat-some-read-auth-credential' + auth_cred: 'glpat-some-auth-credential' + exclude_docs: true + - name: 'developer_connect_git_repository_link_gitlab_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_gitlab_enterprise' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + host_uri_name: 'https://devconnect-terraform.com' + webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_cred: 'glpat-some-read-auth-credential' + auth_cred: 'glpat-some-auth-credential' + exclude_docs: true + - name: 'developer_connect_git_repository_link_gitlab_enterprise_doc' + exclude_test: true +autogen_async: true +async: + operation: + timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 + base_url: '{{op_id}}' + actions: + - create + - delete + - update + type: OpAsync + result: + resource_inside_response: true + error: {} + include_project: false +autogen_status: R2l0UmVwb3NpdG9yeUxpbms= parameters: - - name: 'location' - type: String - description: - "Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. " - min_version: 'beta' - url_param_only: true - required: true - immutable: true - - name: 'parent_connection' - type: String - description: - "Resource ID segment making up resource `name`. It identifies the resource - within its parent collection as described in https://google.aip.dev/122. See documentation - for resource type `developerconnect.googleapis.com/GitRepositoryLink`. " - min_version: 'beta' - url_param_only: true - required: true - immutable: true - - name: 'gitRepositoryLinkId' - type: String - description: - "Required. The ID to use for the repository, which will become the - final component of\nthe repository's resource name. This ID should be unique in - the connection.\nAllows alphanumeric characters and any of -._~%!$&'()*+,;=@. " - min_version: 'beta' - url_param_only: true - required: true - immutable: true +- name: location + type: String + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true +- name: parent_connection + type: String + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true +- name: gitRepositoryLinkId + type: String + description: |- + Required. The ID to use for the repository, which will become the final component of + the repository's resource name. This ID should be unique in the connection. + Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. + immutable: true + url_param_only: true + required: true properties: - - name: 'name' - type: String - description: "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`. " - min_version: 'beta' - output: true - - name: 'cloneUri' - type: String - description: "Required. Git Clone URI. " - min_version: 'beta' - required: true - - name: 'createTime' - type: String - description: "Output only. [Output only] Create timestamp " - min_version: 'beta' - output: true - - name: 'updateTime' - type: String - description: "Output only. [Output only] Update timestamp " - min_version: 'beta' - output: true - - name: 'deleteTime' - type: String - description: "Output only. [Output only] Delete timestamp " - min_version: 'beta' - output: true - - name: 'labels' - type: KeyValueLabels - description: "Optional. Labels as key value pairs " - min_version: 'beta' - - name: 'etag' - type: String - description: - "Optional. This checksum is computed by the server based on the value - of other\nfields, and may be sent on update and delete requests to ensure the\nclient - has an up-to-date value before proceeding. " - min_version: 'beta' - - name: 'reconciling' - type: Boolean - description: - "Output only. Set to true when the connection is being set up or updated - in the\nbackground. " - min_version: 'beta' - output: true - - name: 'annotations' - type: KeyValueAnnotations - description: "Optional. Allows clients to store small amounts of arbitrary data. " - min_version: 'beta' - - name: 'uid' - type: String - description: "Output only. A system-assigned unique identifier for a the GitRepositoryLink. " - min_version: 'beta' - output: true +- name: cloneUri + type: String + description: Required. Git Clone URI. + required: true +- name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs +- name: annotations + type: KeyValueAnnotations + description: Optional. Allows clients to store small amounts of arbitrary data. +- name: uid + type: String + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. + output: true +- name: name + type: String + description: |- + Identifier. Resource name of the repository, in the format + `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + output: true +- name: updateTime + type: String + description: Output only. [Output only] Update timestamp + output: true +- name: deleteTime + type: String + description: Output only. [Output only] Delete timestamp + output: true +- name: etag + type: String + description: |- + 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. +- name: reconciling + type: Boolean + description: |- + Output only. Set to true when the connection is being set up or updated in the + background. + output: true +- name: webhookId + type: String + description: Output only. External ID of the webhook created for the repository. + output: true +- name: createTime + type: String + description: Output only. [Output only] Create timestamp + output: true diff --git a/mmv1/products/developerconnect/product.yaml b/mmv1/products/developerconnect/product.yaml index 5a32e127e0af..0f848cd77695 100644 --- a/mmv1/products/developerconnect/product.yaml +++ b/mmv1/products/developerconnect/product.yaml @@ -12,10 +12,11 @@ # limitations under the License. --- -name: 'DeveloperConnect' -display_name: 'Developer Connect' -versions: - - name: 'beta' - base_url: 'https://developerconnect.googleapis.com/v1/' +name: DeveloperConnect +display_name: Developer Connect scopes: - - 'https://www.googleapis.com/auth/cloud-platform' +- https://www.googleapis.com/auth/cloud-platform +versions: +- base_url: https://developerconnect.googleapis.com/v1/ + name: ga +caibaseurl: "" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl similarity index 94% rename from mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl rename to mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl index 693baf83874b..97d07f9deacf 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_basic.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github.tf.tmpl @@ -1,5 +1,4 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { - provider = google-beta location = "us-central1" connection_id = "{{index $.Vars "connection_name"}}" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl index 07933b8641b4..4fe608a1bede 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_doc.tf.tmpl @@ -1,6 +1,5 @@ resource "google_secret_manager_secret" "github-token-secret" { - provider = google-beta secret_id = "github-token-secret" replication { @@ -10,7 +9,6 @@ resource "google_secret_manager_secret" "github-token-secret" { resource "google_secret_manager_secret_version" "github-token-secret-version" { - provider = google-beta secret = google_secret_manager_secret.github-token-secret.id secret_data = file("my-github-token.txt") } @@ -25,14 +23,12 @@ data "google_iam_policy" "p4sa-secretAccessor" { resource "google_secret_manager_secret_iam_policy" "policy" { - provider = google-beta secret_id = google_secret_manager_secret.github-token-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "my-connection" diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl new file mode 100644 index 000000000000..44af89ffd01f --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl @@ -0,0 +1,12 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + github_enterprise_config { + host_uri = "{{index $.Vars "host_uri_name"}}" + + authorizer_credential { + oauth_token_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-do-not-change-github-oauthtoken-e0b9e7/versions/1" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..a01ac174ad82 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl @@ -0,0 +1,42 @@ +resource "google_secret_manager_secret" "github-enterprise-token-secret" { + + secret_id = "github-enterprise-token-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "github-enterprise-token-secret-version" { + + secret = google_secret_manager_secret.github-enterprise-token-secret.id + secret_data = file("my-github-enterprise-token.txt") +} + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy" { + + secret_id = google_secret_manager_secret.github-enterprise-token-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + github_enterprise_config { + host_uri = "https://devconnect-terraform.com" + app_installation_id = 123123 + authorizer_credential { + oauth_token_secret_version = google_secret_manager_secret_version.github-enterprise-token-secret-version.id + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl new file mode 100644 index 000000000000..44d24d2f1ef1 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl @@ -0,0 +1,10 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + gitlab_config { + webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" + read_authorizer_credential = "{{index $.Vars "reader_cred"}}" + authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl new file mode 100644 index 000000000000..9e59bc16472d --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -0,0 +1,11 @@ +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_authorizer_credential: 'glpat-some-read-auth-credential' + authorizer_credential: 'glpat-some-auth-credential' + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl new file mode 100644 index 000000000000..8374e5c98e3c --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl @@ -0,0 +1,12 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + host_uri = "{{index $.Vars "host_uri_name"}}" + + gitlab_config { + webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" + read_authorizer_credential = "{{index $.Vars "reader_cred"}}" + authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..6acf339ce1dc --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl @@ -0,0 +1,12 @@ +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + host_uri: 'https://devconnect-terraform.com' + webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_authorizer_credential: 'glpat-some-read-auth-credential' + authorizer_credential: 'glpat-some-auth-credential' + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl index 1c253849206f..d4cb09a4c0f0 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl @@ -1,5 +1,4 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { - provider = google-beta git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.github_conn.connection_id clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" @@ -9,7 +8,6 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}} resource "google_developer_connect_connection" "github_conn" { - provider = google-beta location = "us-central1" connection_id = "{{index $.Vars "connection_name"}}" disabled = false diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl index db9d1943ebb4..63829f055fde 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl @@ -1,5 +1,4 @@ resource "google_secret_manager_secret" "github-token-secret" { - provider = google-beta secret_id = "github-token-secret" replication { diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl new file mode 100644 index 000000000000..1b066772995d --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl @@ -0,0 +1,23 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.github_enterprise_conn.connection_id + clone_uri = "https://devconnect-terraform.com/gcb-developerconnect-robot/tf-demo.git" + location = "us-central1" + annotations = {} +} + +resource "google_developer_connect_connection" "github_enterprise_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + github_enterprise_config { + host_uri = "{{index $.Vars "host_uri_name"}}" + app_installation_id = 49439208 + + authorizer_credential { + oauth_token_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-do-not-change-github-oauthtoken-e0b9e7/versions/1" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..857c11b28cca --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl @@ -0,0 +1,46 @@ +resource "google_secret_manager_secret" "github-enterprise-token-secret" { + secret_id = "github-token-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "github-enterprise-token-secret-version" { + secret = google_secret_manager_secret.github-token-secret.id + secret_data = file("my-github-enterprise-token.txt") +} + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy" { + secret_id = google_secret_manager_secret.github-enterprise-token-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "my-connection" + + github_enterprise_config { + host_uri = "https://devconnect-terraform.com" + app_installation_id = 123123 + authorizer_credential { + oauth_token_secret_version = google_secret_manager_secret_version.github-token-secret-version.id + } + } +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + remote_uri = "https://devconnect-terraform.com/myuser/myrepo.git" +} + diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl new file mode 100644 index 000000000000..8a9b9408cbcf --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl @@ -0,0 +1,20 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.gitlab_conn.connection_id + clone_uri = "https://gitlab.com/gcb-developerconnect-robot/tf-demo.git" + location = "us-central1" + annotations = {} +} + +resource "google_developer_connect_connection" "gitlab_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + gitlab_config { + webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" + read_authorizer_credential = "{{index $.Vars "reader_cred"}}" + authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl new file mode 100644 index 000000000000..b263b6f64232 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl @@ -0,0 +1,19 @@ +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + remote_uri = "https://gitlab.com/myuser/myrepo.git" +} + + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' + read_authorizer_credential: 'glpat-some-read-auth-credential' + authorizer_credential: 'glpat-some-auth-credential' + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl new file mode 100644 index 000000000000..e92e9803efc6 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl @@ -0,0 +1,21 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.gitlab_enterprise_conn.connection_id + clone_uri = "https://gitlab.com/gcb-developerconnect-robot/tf-demo.git" + location = "us-central1" + annotations = {} +} + +resource "google_developer_connect_connection" "gitlab_enterprise_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + gitlab_enterprise_config { + host_uri = "{{index $.Vars "host_uri_name"}}" + webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" + read_authorizer_credential = "{{index $.Vars "reader_cred"}}" + authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl new file mode 100644 index 000000000000..d24327f7ccaa --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl @@ -0,0 +1,19 @@ +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + gitlab_config { + host_uri: "https://devconnect-terraform.com" + webhook_secret_secret_version: "projects/terraform-proj/secrets/webhook-version/versions/latest" + read_authorizer_credential: "glpat-some-read-auth-credential" + authorizer_credential: "glpat-some-auth-credential" + } +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + remote_uri = "https://devconnect-terraform.com/myuser/myrepo.git" +} From 42d47c572e45e920fde02dcd05cf27ed6bb07f6a Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 25 Nov 2024 11:50:33 -0500 Subject: [PATCH 02/15] Add fix for Gitlab connection tests --- .../products/developerconnect/Connection.yaml | 6 +- ...eveloper_connect_connection_gitlab.tf.tmpl | 10 +++- ...oper_connect_connection_gitlab_doc.tf.tmpl | 57 ++++++++++++++++++- 3 files changed, 65 insertions(+), 8 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 58f8a6e8375b..1a42e4bf544b 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -43,9 +43,9 @@ examples: primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: connection_name: 'tf-test-connection' - webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_cred: 'glpat-some-read-auth-credential' - auth_cred: 'glpat-some-auth-credential' + webhook_version: 'projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest' + read_cred: 'projects/devconnect-terraform-proj/secrets/gitlab-read-cred/versions/latest' + auth_cred: 'projects/devconnect-terraform-proj/secrets/gitlab-auth-cred/versions/latest' - name: 'developer_connect_connection_gitlab_doc' exclude_test: true - name: 'developer_connect_connection_gitlab_enterprise' diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl index 44d24d2f1ef1..c3ec513d828d 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl @@ -4,7 +4,13 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { gitlab_config { webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" - read_authorizer_credential = "{{index $.Vars "reader_cred"}}" - authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + + read_authorizer_credential { + user_token_secret_version = "{{index $.Vars "read_cred"}}" + } + + authorizer_credential { + user_token_secret_version = "{{index $.Vars "auth_cred"}}" + } } } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl index 9e59bc16472d..3705fa72a2b1 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -1,11 +1,62 @@ +resource "google_secret_manager_secret" "gitlab-read-cred" { + + secret_id = "gitlab-read-cred" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret" "gitlab-auth-cred" { + + secret_id = "gitlab-auth-cred" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-version" { + + secret = google_secret_manager_secret.gitlab-read-cred.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-version" { + + secret = google_secret_manager_secret.gitlab-auth-cred.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy" { + + secret_id = google_secret_manager_secret.gitlab-read-cred.secret_id + secret_id = google_secret_manager_secret.gitlab-auth-cred.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "my-connection" gitlab_config { - webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_authorizer_credential: 'glpat-some-read-auth-credential' - authorizer_credential: 'glpat-some-auth-credential' + webhook_secret_secret_version: 'projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest' + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred.id' + } + + authorizer_credential { + user_token_secret_version = 'google_secret_manager_secret_version.gitlab-auth-cred.id' + } } } From a9ef9bc765b56ab4ed0e1e996986c68ed369fdce Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 25 Nov 2024 12:32:08 -0500 Subject: [PATCH 03/15] Add fix for Gitlab Connection test --- .../examples/developer_connect_connection_gitlab_doc.tf.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl index 3705fa72a2b1..140aa7d6f3eb 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -52,11 +52,11 @@ resource "google_developer_connect_connection" "my-connection" { webhook_secret_secret_version: 'projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest' read_authorizer_credential { - user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred.id' + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-version.id' } authorizer_credential { - user_token_secret_version = 'google_secret_manager_secret_version.gitlab-auth-cred.id' + user_token_secret_version = 'google_secret_manager_secret_version.gitlab-auth-cred-version.id' } } } From 61d2f7a09eb0d1e39760cc8cd2091d5e4000487a Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 25 Nov 2024 16:09:31 -0500 Subject: [PATCH 04/15] Add fix for Gitlab Connection test --- .../products/developerconnect/Connection.yaml | 3 --- ...eveloper_connect_connection_gitlab.tf.tmpl | 6 +++--- ...oper_connect_connection_gitlab_doc.tf.tmpl | 21 ++++++++++++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 1a42e4bf544b..a2a68ea9968e 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -43,9 +43,6 @@ examples: primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: connection_name: 'tf-test-connection' - webhook_version: 'projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest' - read_cred: 'projects/devconnect-terraform-proj/secrets/gitlab-read-cred/versions/latest' - auth_cred: 'projects/devconnect-terraform-proj/secrets/gitlab-auth-cred/versions/latest' - name: 'developer_connect_connection_gitlab_doc' exclude_test: true - name: 'developer_connect_connection_gitlab_enterprise' diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl index c3ec513d828d..2b3f13cde9a3 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl @@ -3,14 +3,14 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { connection_id = "{{index $.Vars "connection_name"}}" gitlab_config { - webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" + webhook_secret_secret_version = "projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest" read_authorizer_credential { - user_token_secret_version = "{{index $.Vars "read_cred"}}" + user_token_secret_version = "projects/devconnect-terraform-proj/secrets/gitlab-read-cred/versions/latest" } authorizer_credential { - user_token_secret_version = "{{index $.Vars "auth_cred"}}" + user_token_secret_version = "projects/devconnect-terraform-proj/secrets/gitlab-auth-cred/versions/latest" } } } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl index 140aa7d6f3eb..d61d987b6354 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -16,6 +16,15 @@ resource "google_secret_manager_secret" "gitlab-auth-cred" { } } +resource "google_secret_manager_secret" "gitlab-webhook-secret" { + + secret_id = "gitlab-webhook-secret" + + replication { + auto {} + } +} + resource "google_secret_manager_secret_version" "gitlab-read-cred-version" { secret = google_secret_manager_secret.gitlab-read-cred.id @@ -28,6 +37,11 @@ resource "google_secret_manager_secret_version" "gitlab-auth-cred-version" { secret_data = file("my-gitlab-auth-cred.txt") } +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-version" { + + secret = google_secret_manager_secret.gitlab-webhook-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + data "google_iam_policy" "p4sa-secretAccessor" { binding { role = "roles/secretmanager.secretAccessor" @@ -40,6 +54,7 @@ resource "google_secret_manager_secret_iam_policy" "policy" { secret_id = google_secret_manager_secret.gitlab-read-cred.secret_id secret_id = google_secret_manager_secret.gitlab-auth-cred.secret_id + secret_id = google_secret_manager_secret.gitlab-webhook-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } @@ -49,14 +64,14 @@ resource "google_developer_connect_connection" "my-connection" { connection_id = "my-connection" gitlab_config { - webhook_secret_secret_version: 'projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest' + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-version.id read_authorizer_credential { - user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-version.id' + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-version.id } authorizer_credential { - user_token_secret_version = 'google_secret_manager_secret_version.gitlab-auth-cred-version.id' + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-version.id } } } From 10f5d1f15bc28893845be5cc31d8f748fc5b3a86 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Tue, 3 Dec 2024 11:13:33 -0500 Subject: [PATCH 05/15] Add fixes for all tests --- mmv1/products/developerconnect/Connection.yaml | 5 +---- .../developerconnect/GitRepositoryLink.yaml | 18 +++++------------- ...onnect_connection_github_enterprise.tf.tmpl | 6 +----- ...developer_connect_connection_gitlab.tf.tmpl | 6 +++--- ...onnect_connection_gitlab_enterprise.tf.tmpl | 16 +++++++++++----- ..._connect_git_repository_link_github.tf.tmpl | 14 +++++++------- ...t_repository_link_github_enterprise.tf.tmpl | 13 ++++++------- ..._connect_git_repository_link_gitlab.tf.tmpl | 14 ++++++++++---- ...t_repository_link_gitlab_enterprise.tf.tmpl | 17 ++++++++++++----- 9 files changed, 56 insertions(+), 53 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index a2a68ea9968e..de71243db5e2 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -50,10 +50,6 @@ examples: primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: connection_name: 'tf-test-connection' - host_uri_name: 'https://devconnect-terraform.com' - webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_cred: 'glpat-some-read-auth-credential' - auth_cred: 'glpat-some-auth-credential' - name: 'developer_connect_connection_gitlab_enterprise_doc' exclude_test: true autogen_async: true @@ -298,6 +294,7 @@ properties: Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections. + output: true properties: - name: message type: String diff --git a/mmv1/products/developerconnect/GitRepositoryLink.yaml b/mmv1/products/developerconnect/GitRepositoryLink.yaml index 7c43db61a86d..566781898317 100644 --- a/mmv1/products/developerconnect/GitRepositoryLink.yaml +++ b/mmv1/products/developerconnect/GitRepositoryLink.yaml @@ -14,13 +14,13 @@ --- name: GitRepositoryLink description: A git repository link to a parent connection. -base_url: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks +base_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks immutable: true -self_link: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} -create_url: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}} -id_format: projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} +self_link: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} +create_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}} +id_format: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} import_format: -- projects/{{project}}/locations/{{location}}/connections/{{connection}}/gitRepositoryLinks/{{git_repository_link_id}} +- projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} examples: # These tests depend on secrets stored in a separate project, so we prefer not # to show them in the docs. @@ -37,7 +37,6 @@ examples: vars: connection_name: 'my-connection' git_repository_link_name: 'my-repository' - host_uri_name: 'https://devconnect-terraform.com' exclude_docs: true - name: 'developer_connect_git_repository_link_github_enterprise_doc' exclude_test: true @@ -47,9 +46,6 @@ examples: vars: connection_name: 'tf-test-connection' git_repository_link_name: 'my-repository' - webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_cred: 'glpat-some-read-auth-credential' - auth_cred: 'glpat-some-auth-credential' exclude_docs: true - name: 'developer_connect_git_repository_link_gitlab_doc' exclude_test: true @@ -59,10 +55,6 @@ examples: vars: connection_name: 'tf-test-connection' git_repository_link_name: 'my-repository' - host_uri_name: 'https://devconnect-terraform.com' - webhook_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_cred: 'glpat-some-read-auth-credential' - auth_cred: 'glpat-some-auth-credential' exclude_docs: true - name: 'developer_connect_git_repository_link_gitlab_enterprise_doc' exclude_test: true diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl index 44af89ffd01f..6edaf3df9cdf 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl @@ -3,10 +3,6 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { connection_id = "{{index $.Vars "connection_name"}}" github_enterprise_config { - host_uri = "{{index $.Vars "host_uri_name"}}" - - authorizer_credential { - oauth_token_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-do-not-change-github-oauthtoken-e0b9e7/versions/1" - } + host_uri = "https://ghe.proctor-staging-test.com" } } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl index 2b3f13cde9a3..e62e64a88461 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab.tf.tmpl @@ -3,14 +3,14 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { connection_id = "{{index $.Vars "connection_name"}}" gitlab_config { - webhook_secret_secret_version = "projects/devconnect-terraform-proj/secrets/webhook-version/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" read_authorizer_credential { - user_token_secret_version = "projects/devconnect-terraform-proj/secrets/gitlab-read-cred/versions/latest" + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" } authorizer_credential { - user_token_secret_version = "projects/devconnect-terraform-proj/secrets/gitlab-auth-cred/versions/latest" + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" } } } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl index 8374e5c98e3c..dcf4fa7847a2 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise.tf.tmpl @@ -2,11 +2,17 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { location = "us-central1" connection_id = "{{index $.Vars "connection_name"}}" - host_uri = "{{index $.Vars "host_uri_name"}}" + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" - gitlab_config { - webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" - read_authorizer_credential = "{{index $.Vars "reader_cred"}}" - authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } } } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl index d4cb09a4c0f0..31a7f3db8af3 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl @@ -1,15 +1,14 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { - git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.github_conn.connection_id - clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" - location = "us-central1" - annotations = {} + clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" + location = "us-central1" + annotations = {} } - -resource "google_developer_connect_connection" "github_conn" { +resource "google_developer_connect_connection" "github_conn" { location = "us-central1" - connection_id = "{{index $.Vars "connection_name"}}" + connection_id = "{{index $.Vars "connection_name"}}" disabled = false github_config { @@ -21,3 +20,4 @@ resource "google_developer_connect_connection" "github_conn" { } } } + diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl index 1b066772995d..2efa78fc8e73 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl @@ -1,7 +1,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.github_enterprise_conn.connection_id - clone_uri = "https://devconnect-terraform.com/gcb-developerconnect-robot/tf-demo.git" + clone_uri = "https://ghe.proctor-staging-test.com/proctorteam/inarayanan-test.git" location = "us-central1" annotations = {} } @@ -13,11 +13,10 @@ resource "google_developer_connect_connection" "github_enterprise_conn" { disabled = false github_enterprise_config { - host_uri = "{{index $.Vars "host_uri_name"}}" - app_installation_id = 49439208 - - authorizer_credential { - oauth_token_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-do-not-change-github-oauthtoken-e0b9e7/versions/1" - } + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 } } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl index 8a9b9408cbcf..989f85ba3420 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl @@ -1,7 +1,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.gitlab_conn.connection_id - clone_uri = "https://gitlab.com/gcb-developerconnect-robot/tf-demo.git" + clone_uri = "https://gitlab.com/devconnect-eng-team/inarayanan-test.git" location = "us-central1" annotations = {} } @@ -13,8 +13,14 @@ resource "google_developer_connect_connection" "gitlab_conn" { disabled = false gitlab_config { - webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" - read_authorizer_credential = "{{index $.Vars "reader_cred"}}" - authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } } } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl index e92e9803efc6..846e9f5b444f 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl @@ -1,7 +1,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" parent_connection = google_developer_connect_connection.gitlab_enterprise_conn.connection_id - clone_uri = "https://gitlab.com/gcb-developerconnect-robot/tf-demo.git" + clone_uri = "https://gle-us-central1.gcb-test.com/test-group/inarayanan-test.git" location = "us-central1" annotations = {} } @@ -13,9 +13,16 @@ resource "google_developer_connect_connection" "gitlab_enterprise_conn" { disabled = false gitlab_enterprise_config { - host_uri = "{{index $.Vars "host_uri_name"}}" - webhook_secret_secret_version = "{{index $.Vars "webhook_version"}}" - read_authorizer_credential = "{{index $.Vars "reader_cred"}}" - authorizer_credential = "{{index $.Vars "authorizer_cred"}}" + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } } } From 7adb99b60a8edc0715c19c23d77a61a0efafcacc Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Thu, 5 Dec 2024 12:00:12 -0500 Subject: [PATCH 06/15] Add fix for GHE Connection test --- mmv1/products/developerconnect/Connection.yaml | 1 - .../developer_connect_connection_github_enterprise.tf.tmpl | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index de71243db5e2..512b73b6d9f9 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -35,7 +35,6 @@ examples: primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: connection_name: 'tf-test-connection' - host_uri_name: 'https://devconnect-terraform.com' - name: 'developer_connect_connection_github_enterprise_doc' exclude_test: true - name: 'developer_connect_connection_gitlab' diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl index 6edaf3df9cdf..1ded312974f5 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise.tf.tmpl @@ -4,5 +4,9 @@ resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { github_enterprise_config { host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 } } From 3593a30f67bbaf79d71caeb275e4e3503b1c4450 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Sun, 8 Dec 2024 20:10:31 -0500 Subject: [PATCH 07/15] Add update tests --- .../products/developerconnect/Connection.yaml | 2 - ...connect_git_repository_link_github.tf.tmpl | 1 + ..._repository_link_github_enterprise.tf.tmpl | 1 + ...connect_git_repository_link_gitlab.tf.tmpl | 1 + ..._repository_link_gitlab_enterprise.tf.tmpl | 1 + ..._developer_connect_connection_test.go.tmpl | 249 +++++++++++++++++- 6 files changed, 242 insertions(+), 13 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 512b73b6d9f9..e755e134c15f 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -300,13 +300,11 @@ properties: description: |- Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. - output: true - name: actionUri type: String description: |- Output only. Link to follow for next action. Empty string if the installation is already complete. - output: true - name: stage type: String description: |- diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl index 31a7f3db8af3..b673c58bfbb9 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github.tf.tmpl @@ -4,6 +4,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}} clone_uri = "https://github.com/gcb-developerconnect-robot/tf-demo.git" location = "us-central1" annotations = {} + labels = {} } resource "google_developer_connect_connection" "github_conn" { diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl index 2efa78fc8e73..1633252ef757 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise.tf.tmpl @@ -4,6 +4,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}} clone_uri = "https://ghe.proctor-staging-test.com/proctorteam/inarayanan-test.git" location = "us-central1" annotations = {} + labels = {} } resource "google_developer_connect_connection" "github_enterprise_conn" { diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl index 989f85ba3420..d82f50cdeceb 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab.tf.tmpl @@ -4,6 +4,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}} clone_uri = "https://gitlab.com/devconnect-eng-team/inarayanan-test.git" location = "us-central1" annotations = {} + labels = {} } resource "google_developer_connect_connection" "gitlab_conn" { diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl index 846e9f5b444f..567c08694359 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise.tf.tmpl @@ -4,6 +4,7 @@ resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}} clone_uri = "https://gle-us-central1.gcb-test.com/test-group/inarayanan-test.git" location = "us-central1" annotations = {} + labels = {} } resource "google_developer_connect_connection" "gitlab_enterprise_conn" { diff --git a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl index 717d43ef0330..8be6a2ef4eea 100644 --- a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl +++ b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl @@ -1,15 +1,15 @@ package developerconnect_test -{{- if ne $.TargetVersionName "ga" }} import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-provider-google/google/acctest" + ) -func TestAccDeveloperConnectConnection_update(t *testing.T) { +func TestAccDeveloperConnectConnection_developerConnectConnectionGithubUpdate(t *testing.T) { t.Parallel() context := map[string]interface{}{ @@ -18,10 +18,10 @@ func TestAccDeveloperConnectConnection_update(t *testing.T) { acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { - Config: testAccDeveloperConnectConnection_basic(context), + Config: testAccDeveloperConnectConnection_Github(context), }, { ResourceName: "google_developer_connect_connection.my-connection", @@ -30,7 +30,7 @@ func TestAccDeveloperConnectConnection_update(t *testing.T) { ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, }, { - Config: testAccDeveloperConnectConnection_update(context), + Config: testAccDeveloperConnectConnection_GithubUpdate(context), }, { ResourceName: "google_developer_connect_connection.my-connection", @@ -42,10 +42,10 @@ func TestAccDeveloperConnectConnection_update(t *testing.T) { }) } -func testAccDeveloperConnectConnection_basic(context map[string]interface{}) string { - return acctest.Nprintf(` + +func testAccDeveloperConnectConnection_Github(context map[string]interface{}) string { + return acctest.Nprintf(` resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" @@ -61,10 +61,9 @@ resource "google_developer_connect_connection" "my-connection" { } -func testAccDeveloperConnectConnection_update(context map[string]interface{}) string { +func testAccDeveloperConnectConnection_GithubUpdate(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_developer_connect_connection" "my-connection" { - provider = google-beta location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" @@ -80,4 +79,232 @@ resource "google_developer_connect_connection" "my-connection" { `, context) } -{{ end }} + +func TestAccDeveloperConnectConnection_developerConnectConnectionGithubEnterpriseUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GithubEnterprise(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels", "ssl_ca_certificate"}, + }, + { + Config: testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels", "ssl_ca_certificate"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GithubEnterprise(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + github_enterprise_config { + host_uri = "https://ghe.proctor-staging-test.com" + app_id = 864434 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-private-key-f522d2/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 837537 + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_Gitlab(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_GitlabUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_Gitlab(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GitlabUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_config { + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-read-cred-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabEnterpriseUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GitlabEnterprise(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GitlabEnterprise(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + gitlab_enterprise_config { + host_uri = "https://gle-us-central1.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-read-cred-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-auth-cred/versions/latest" + } + } +} +`, context) +} + From 24c628cd699c4b730f425ee24dada1f0d981d2d7 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Fri, 13 Dec 2024 13:50:28 -0500 Subject: [PATCH 08/15] Adding update tests --- .../products/developerconnect/Connection.yaml | 5 +- ..._developer_connect_connection_test.go.tmpl | 144 +++++++++++++++++- 2 files changed, 141 insertions(+), 8 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index e755e134c15f..0c086cc97e45 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -27,7 +27,7 @@ examples: primary_resource_id: 'my-connection' primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: - connection_name: 'tf-test-connection' + connection_name: 'tf-test-connection' - name: 'developer_connect_connection_github_doc' exclude_test: true - name: 'developer_connect_connection_github_enterprise' @@ -189,6 +189,7 @@ properties: 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. + output: true - name: uid type: String description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. @@ -300,11 +301,13 @@ properties: description: |- Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. + output: true - name: actionUri type: String description: |- Output only. Link to follow for next action. Empty string if the installation is already complete. + output: true - name: stage type: String description: |- diff --git a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl index 8be6a2ef4eea..74d15099276e 100644 --- a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl +++ b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl @@ -36,7 +36,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGithubUpdate(t ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, }, }) @@ -66,6 +66,12 @@ func testAccDeveloperConnectConnection_GithubUpdate(context map[string]interface resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } github_config { github_app = "DEVELOPER_CONNECT" @@ -98,7 +104,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGithubEnterpris ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels", "ssl_ca_certificate"}, + ImportStateVerifyIgnore: []string{"connection_id", "labels", "terraform_labels"}, }, { Config: testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context), @@ -107,7 +113,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGithubEnterpris ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels", "ssl_ca_certificate"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, }, }) @@ -136,6 +142,12 @@ func testAccDeveloperConnectConnection_GithubEnterpriseUpdate(context map[string resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } github_enterprise_config { host_uri = "https://ghe.proctor-staging-test.com" @@ -149,6 +161,54 @@ resource "google_developer_connect_connection" "my-connection" { } +func TestAccDeveloperConnectConnection_GhePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GhePrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GhePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + github_enterprise_config { + host_uri = "https://ghe.proctor-private-ca.com" + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIEXTCCA0WgAwIBAgIUANaBCc9j/xdKJHU0sgmv6yE2WCIwDQYJKoZIhvcNAQEL\nBQAwLDEUMBIGA1UEChMLUHJvY3RvciBFbmcxFDASBgNVBAMTC1Byb2N0b3ItZW5n\nMB4XDTIxMDcxNTIwMDcwMloXDTIyMDcxNTIwMDcwMVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMVel7I88DkhwW445BNPBZvJNTV1AreHdz4um4U1\nop2+4L7JeNrUs5SRc0fzeOyOmA9ZzTDu9hBC7zj/sVNUy6cIQGCj32sr5SCAEIat\nnFZlzmVqJPT4J5NAaE37KO5347myTJEBrvpq8az4CtvX0yUzPK0gbUmaSaztVi4o\ndbJLKyv575xCLC/Hu6fIHBDH19eG1Ath9VpuAOkttRRoxu2VqijJZrGqaS+0o+OX\nrLi5HMtZbZjgQB4mc1g3ZDKX/gynxr+CDNaqNOqxuog33Tl5OcOk9DrR3MInaE7F\nyQFuH9mzF64AqOoTf7Tr/eAIz5XVt8K51nk+fSybEfKVwtMCAwEAAaOCAaEwggGd\nMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQU/9dYyqMz\nv9rOMwPZcoIRMDAQCjAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDCB\njQYIKwYBBQUHAQEEgYAwfjB8BggrBgEFBQcwAoZwaHR0cDovL3ByaXZhdGVjYS1j\nb250ZW50LTYxYWEyYzA5LTAwMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9y\nYWdlLmdvb2dsZWFwaXMuY29tLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NhLmNydDAo\nBgNVHREBAf8EHjAcghpnaGUucHJvY3Rvci1wcml2YXRlLWNhLmNvbTCBggYDVR0f\nBHsweTB3oHWgc4ZxaHR0cDovL3ByaXZhdGVjYS1jb250ZW50LTYxYWEyYzA5LTAw\nMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9yYWdlLmdvb2dsZWFwaXMuY29t\nLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NybC5jcmwwDQYJKoZIhvcNAQELBQADggEB\nABo6BQLEZZ+YNiDuv2sRvcxSopQQb7fZjqIA9XOA35pNSKay2SncODnNvfsdRnOp\ncoy25sQSIzWyJ9zWl8DZ6evoOu5csZ2PoFqx5LsIq37w+ZcwD6DM8Zm7JqASxmxx\nGqTF0nHC4Aw8q8aJBeRD3PsSkfN5Q3DP3nTDnLyd0l+yPIkHUbZMoiFHX3BkhCng\nG96mYy/y3t16ghfV9lZkXpD/JK5aiN0bTHCDRc69owgfYiAcAqzBJ9gfZ90MBgzv\ngTTQel5dHg49SYXfnUpTy0HdQLEcoggOF8Q8V+xKdKa6eVbrvjJrkEJmvIQI5iCR\nhNvKR25mx8JUopqEXmONmqU=\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIDSDCCAjCgAwIBAgITMwWN+62nLcgyLa7p+jD1K90g6TANBgkqhkiG9w0BAQsF\nADAsMRQwEgYDVQQKEwtQcm9jdG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcw\nHhcNMjEwNzEyMTM1OTQ0WhcNMzEwNzEwMTM1OTQzWjAsMRQwEgYDVQQKEwtQcm9j\ndG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcwggEiMA0GCSqGSIb3DQEBAQUA\nA4IBDwAwggEKAoIBAQCYqJP5Qt90jIbld2dtuUV/zIkBFsTe4fapJfhBji03xBpN\nO1Yxj/jPSZ67Kdeoy0lEwvc2hL5FQGhIjLMR0mzOyN4fk/DZiA/4tAVi7hJyqpUC\n71JSwp7MwXL1b26CSE1MhcoCqA/E4iZxfJfF/ef4lhmC24UEmu8FEbldoy+6OysB\nRu7dGDwicW5F9h7eSkpGAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-github" + } + } + +} +`, context) +} + + func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabUpdate(t *testing.T) { t.Parallel() @@ -167,7 +227,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabUpdate(t ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, { Config: testAccDeveloperConnectConnection_GitlabUpdate(context), @@ -176,7 +236,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabUpdate(t ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, }, }) @@ -210,6 +270,12 @@ func testAccDeveloperConnectConnection_GitlabUpdate(context map[string]interface resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } gitlab_config { webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-webhook/versions/latest" @@ -226,6 +292,64 @@ resource "google_developer_connect_connection" "my-connection" { `, context) } +func TestAccDeveloperConnectConnection_GlePrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_GlePrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_GlePrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + gitlab_enterprise_config { + host_uri = "https://gle-us.gle-us-private.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/gitlab-enterprise-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gle-private-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/gle-private-api/versions/latest" + } + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIFbjCCA1agAwIBAgIUH+nsWsqagMW9Ld8E9J71yPLPpD8wDQYJKoZIhvcNAQEL\nBQAwJDEiMCAGA1UEAwwZZ2xlLXVzLmdsZS11cy1wcml2YXRlLmNvbTAeFw0yNDEw\nMzExNjQzMjBaFw0zNDEwMjkxNjQzMjBaMCQxIjAgBgNVBAMMGWdsZS11cy5nbGUt\ndXMtcHJpdmF0ZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDL\n+dUU8MHo+Eskx4SSnI1thRIiljgsyJSzSOplaD4lqahFnrG0cB0ovKpyRL4A+0wM\nzVW7W1Pfi8DiEOxxfNo7pEj+0zrzJHHqnzW9kApIlRmO1TBBJ7i9HaVamJ1Od01b\n2WI/pnKFEvNfLQSDQBulhkHZ2McyauDhb1DxefKnVX8ac6qhxtc4IzrezIQuJ18N\nDPtNLUDD4rtU4mIX4lx1yBIplrgypAo1HDbJOwW8OR76MtjAY7ek3K6UCyduQtwy\nmfZ23b3Eg69W10HVMVTy6m5NaGKi/TWy2MJ71hKUQ1+tWIPH5SL7FzYPKL4XXw5W\np61LhIiBAd2tgD41b2cQxhUbVifc1qHtnwNz/tE77M9ySH37rEUIlExzr3D3JV+f\nXjXEXUr9as8GRnS5zhD/opKe7wKbwpYMHhylK1h6XH/sBO7dBajf5xCvpZZBDzrK\nkpTqwHspT7p40WF9d8odjEk/xZKn5LdcDG2I+4U7SVS5e8ud41HUQxJwQx56lKfh\n2WB+zs7nSyMfspTj4doY1OADEC1VQCyGrwlbclKTKmUWrgwQdm38KxDzW5Juyjmm\nzvfsWIlSMdnes0qVVo38N3Jz8/MHCLD79R2veWgA2fbqS3+4h2dRkR7htjaVlJMJ\nt7SwFiG39ic3OZpo+wTkaHlG4CBnbFDueUsOW2wEpQIDAQABo4GXMIGUMB0GA1Ud\nDgQWBBTExgzH2gz9+rJHvlTFPO0AvG88azAfBgNVHSMEGDAWgBTExgzH2gz9+rJH\nvlTFPO0AvG88azAPBgNVHRMBAf8EBTADAQH/MEEGA1UdEQQ6MDiCGWdsZS11cy5n\nbGUtdXMtcHJpdmF0ZS5jb22CGyouZ2xlLXVzLmdsZS11cy1wcml2YXRlLmNvbTAN\nBgkqhkiG9w0BAQsFAAOCAgEAjkd1ZNoekoWrmozD+Ta1OM0zWhv04eqhP8aYzhbd\nXRS+GyF6ifMwfWg9HogkH22ZPT5GszaL5DacSyOUqZgJ905Q6g1EFPnaKmFVHHeC\nzZAhg5oedAzcakZpYwZDSiLuPgsQfwgRnqWIYR8JcIM5bKRZNGyOg8eZ8cKu23A2\nPavL4B3Ra1l93KllKm21rigIhLPIPLoEyxEg9c9oTJF92r0+aRdf2Ln853260Fqf\ncEUWoXhqMGvDv/YEbqDjGQ/Kh7ZWdlIWhcKFOA0gluF7oExjt/MgSitukgg3aaic\n/eXXOrZDNYH7Ve610NUuNlhub1M47Tp7EgjUJVWlsKK84T8ZcZq7Hn4BzioUr95d\nHao6u19HWA/ISM8bwzHaYxscFI4u6phEL0HJzLf4EysEmS0rAnLxyol0apNx6znR\nhXsqxnSexKhXoLqnK1Vuhcg8DsvobXHqg68EGZ7BZ3ycPYaHSWU8Xh3l1gtYkcQ6\nzxXsKIijlpVKuYJvGA3EOMoZu6+2MYF8Tgp3N4sKMvPhqBhsmgxOYF5OkAbGlsUP\nyCYWFDBFHmbhvUu5JpbKuID2CPkBi16EetemvMQ9PGlLq/0fO/BBNkn6TYn9Kvg8\nAyvuONz54uFEAIKPCcZIosa3ml+5/pt+tBhtVzHA6vMxn18IYaNpuTwSxi/+M10K\nRjw=\n-----END CERTIFICATE-----\n" + + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-gle" + } + } + +} +`, context) +} + func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabEnterpriseUpdate(t *testing.T) { t.Parallel() @@ -245,7 +369,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabEnterpris ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, { Config: testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context), @@ -254,7 +378,7 @@ func TestAccDeveloperConnectConnection_developerConnectConnectionGitlabEnterpris ResourceName: "google_developer_connect_connection.my-connection", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "connection_id", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, }, }, }) @@ -290,6 +414,12 @@ func testAccDeveloperConnectConnection_GitlabEnterpriseUpdate(context map[string resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } gitlab_enterprise_config { host_uri = "https://gle-us-central1.gcb-test.com" From dd286eeeb900c4c838ea475d6d3c4bcc3d56cfdc Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 16 Dec 2024 14:27:52 -0500 Subject: [PATCH 09/15] Add fix for GHE and GLE priv connection --- .../resource_developer_connect_connection_test.go.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl index 74d15099276e..ae310c6f6762 100644 --- a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl +++ b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl @@ -196,6 +196,10 @@ resource "google_developer_connect_connection" "my-connection" { github_enterprise_config { host_uri = "https://ghe.proctor-private-ca.com" + app_id = 26 + private_key_secret_version = "projects/devconnect-terraform-creds/secrets/ghe-priv-private-key/versions/latest" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/tf-test-ghe-do-not-change-ghe-webhook-secret-3c806f/versions/latest" + app_installation_id = 24 ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIEXTCCA0WgAwIBAgIUANaBCc9j/xdKJHU0sgmv6yE2WCIwDQYJKoZIhvcNAQEL\nBQAwLDEUMBIGA1UEChMLUHJvY3RvciBFbmcxFDASBgNVBAMTC1Byb2N0b3ItZW5n\nMB4XDTIxMDcxNTIwMDcwMloXDTIyMDcxNTIwMDcwMVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMVel7I88DkhwW445BNPBZvJNTV1AreHdz4um4U1\nop2+4L7JeNrUs5SRc0fzeOyOmA9ZzTDu9hBC7zj/sVNUy6cIQGCj32sr5SCAEIat\nnFZlzmVqJPT4J5NAaE37KO5347myTJEBrvpq8az4CtvX0yUzPK0gbUmaSaztVi4o\ndbJLKyv575xCLC/Hu6fIHBDH19eG1Ath9VpuAOkttRRoxu2VqijJZrGqaS+0o+OX\nrLi5HMtZbZjgQB4mc1g3ZDKX/gynxr+CDNaqNOqxuog33Tl5OcOk9DrR3MInaE7F\nyQFuH9mzF64AqOoTf7Tr/eAIz5XVt8K51nk+fSybEfKVwtMCAwEAAaOCAaEwggGd\nMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQU/9dYyqMz\nv9rOMwPZcoIRMDAQCjAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDCB\njQYIKwYBBQUHAQEEgYAwfjB8BggrBgEFBQcwAoZwaHR0cDovL3ByaXZhdGVjYS1j\nb250ZW50LTYxYWEyYzA5LTAwMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9y\nYWdlLmdvb2dsZWFwaXMuY29tLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NhLmNydDAo\nBgNVHREBAf8EHjAcghpnaGUucHJvY3Rvci1wcml2YXRlLWNhLmNvbTCBggYDVR0f\nBHsweTB3oHWgc4ZxaHR0cDovL3ByaXZhdGVjYS1jb250ZW50LTYxYWEyYzA5LTAw\nMDAtMjJjMi05ZjYyLWQ0ZjU0N2Y4MDIwMC5zdG9yYWdlLmdvb2dsZWFwaXMuY29t\nLzQxNGU4ZTJjZjU2ZWEyYzQxNmM0L2NybC5jcmwwDQYJKoZIhvcNAQELBQADggEB\nABo6BQLEZZ+YNiDuv2sRvcxSopQQb7fZjqIA9XOA35pNSKay2SncODnNvfsdRnOp\ncoy25sQSIzWyJ9zWl8DZ6evoOu5csZ2PoFqx5LsIq37w+ZcwD6DM8Zm7JqASxmxx\nGqTF0nHC4Aw8q8aJBeRD3PsSkfN5Q3DP3nTDnLyd0l+yPIkHUbZMoiFHX3BkhCng\nG96mYy/y3t16ghfV9lZkXpD/JK5aiN0bTHCDRc69owgfYiAcAqzBJ9gfZ90MBgzv\ngTTQel5dHg49SYXfnUpTy0HdQLEcoggOF8Q8V+xKdKa6eVbrvjJrkEJmvIQI5iCR\nhNvKR25mx8JUopqEXmONmqU=\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIDSDCCAjCgAwIBAgITMwWN+62nLcgyLa7p+jD1K90g6TANBgkqhkiG9w0BAQsF\nADAsMRQwEgYDVQQKEwtQcm9jdG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcw\nHhcNMjEwNzEyMTM1OTQ0WhcNMzEwNzEwMTM1OTQzWjAsMRQwEgYDVQQKEwtQcm9j\ndG9yIEVuZzEUMBIGA1UEAxMLUHJvY3Rvci1lbmcwggEiMA0GCSqGSIb3DQEBAQUA\nA4IBDwAwggEKAoIBAQCYqJP5Qt90jIbld2dtuUV/zIkBFsTe4fapJfhBji03xBpN\nO1Yxj/jPSZ67Kdeoy0lEwvc2hL5FQGhIjLMR0mzOyN4fk/DZiA/4tAVi7hJyqpUC\n71JSwp7MwXL1b26CSE1MhcoCqA/E4iZxfJfF/ef4lhmC24UEmu8FEbldoy+6OysB\nRu7dGDwicW5F9h7eSkpGAsCRdJHh65iUx/IH0C4Ux2UZRDZdj6wVbuVu9tb938xF\nyRuVClONoLSn/lwdzeV7hQmBSm8qmfgbNPbYRaNLz3hOpsT+27aDQp2/pxue8hFJ\nd7We3+Lr5O4IL45PBwhVEAiFZqde6d4qViNEB2qTAgMBAAGjYzBhMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkQGTiCkLCmv/Awxdz\n5TAVRmyFfDAfBgNVHSMEGDAWgBTkQGTiCkLCmv/Awxdz5TAVRmyFfDANBgkqhkiG\n9w0BAQsFAAOCAQEAfy5BJsWdx0oWWi7SFg9MbryWjBVPJl93UqACgG0Cgh813O/x\nlDZQhGO/ZFVhHz/WgooE/HgVNoVJTubKLLzz+zCkOB0wa3GMqJDyFjhFmUtd/3VM\nZh0ZQ+JWYsAiZW4VITj5xEn/d/B3xCFWGC1vhvhptEJ8Fo2cE1yM2pzk08NqFWoY\n4FaH0sbxWgyCKwTmtcYDbnx4FYuddryGCIxbYizqUK1dr4DGKeHonhm/d234Ew3x\n3vIBPoHMOfBec/coP1xAf5o+F+MRMO/sQ3tTGgyOH18lwsHo9SmXCrmOwVQPKrEw\nm+A+5TjXLmenyaBhqXa0vkAZYJhWdROhWC0VTA==\n-----END CERTIFICATE-----\n" From 75b0abde2db470cb2bc759019327a1c5ef877b6c Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 16 Dec 2024 18:04:08 -0500 Subject: [PATCH 10/15] Fix breaking changes --- mmv1/products/developerconnect/Connection.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 0c086cc97e45..571991031c61 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -189,7 +189,6 @@ properties: 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. - output: true - name: uid type: String description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. @@ -301,13 +300,11 @@ properties: description: |- Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. - output: true - name: actionUri type: String description: |- Output only. Link to follow for next action. Empty string if the installation is already complete. - output: true - name: stage type: String description: |- From dfe76f6edda87bc2790aaf761cde75875d0a43bf Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 16 Dec 2024 19:13:51 -0500 Subject: [PATCH 11/15] fix yaml formatting --- .../products/developerconnect/Connection.yaml | 590 +++++++++--------- .../developerconnect/GitRepositoryLink.yaml | 146 ++--- mmv1/products/developerconnect/product.yaml | 6 +- 3 files changed, 371 insertions(+), 371 deletions(-) diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 571991031c61..649c916648f4 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -21,13 +21,13 @@ create_url: projects/{{project}}/locations/{{location}}/connections?connectionId update_verb: PATCH id_format: projects/{{project}}/locations/{{location}}/connections/{{connection_id}} import_format: -- projects/{{project}}/locations/{{location}}/connections/{{connection_id}} + - projects/{{project}}/locations/{{location}}/connections/{{connection_id}} examples: - name: 'developer_connect_connection_github' primary_resource_id: 'my-connection' primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' vars: - connection_name: 'tf-test-connection' + connection_name: 'tf-test-connection' - name: 'developer_connect_connection_github_doc' exclude_test: true - name: 'developer_connect_connection_github_enterprise' @@ -60,9 +60,9 @@ async: delete_minutes: 20 base_url: '{{op_id}}' actions: - - create - - delete - - update + - create + - delete + - update type: OpAsync result: resource_inside_response: true @@ -70,323 +70,323 @@ async: include_project: false autogen_status: Q29ubmVjdGlvbg== parameters: -- name: location - type: String - description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - immutable: true - url_param_only: true - required: true -- name: connectionId - type: String - description: |- - Required. Id of the requesting object - If auto-generating Id server-side, remove this field and - connection_id from the method_signature of Create RPC - immutable: true - url_param_only: true - required: true -properties: -- name: githubConfig - type: NestedObject - description: Configuration for connections to github.com. - properties: - - name: installationUri + - name: location type: String - description: |- - Output only. The URI to navigate to in order to manage the installation associated - with this GitHubConfig. - output: true - - name: githubApp + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true + - name: connectionId type: String description: |- - Required. Immutable. The GitHub Application that was installed to the GitHub user or - organization. - Possible values: - GIT_HUB_APP_UNSPECIFIED - DEVELOPER_CONNECT - FIREBASE + Required. Id of the requesting object + If auto-generating Id server-side, remove this field and + connection_id from the method_signature of Create RPC immutable: true + url_param_only: true required: true - - name: authorizerCredential +properties: + - name: githubConfig type: NestedObject - description: |- - Represents an OAuth token of the account that authorized the Connection, - and associated metadata. + description: Configuration for connections to github.com. + properties: + - name: installationUri + type: String + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubConfig. + output: true + - name: githubApp + type: String + description: |- + Required. Immutable. The GitHub Application that was installed to the GitHub user or + organization. + Possible values: + GIT_HUB_APP_UNSPECIFIED + DEVELOPER_CONNECT + FIREBASE + immutable: true + required: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents an OAuth token of the account that authorized the Connection, + and associated metadata. + properties: + - name: oauthTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the OAuth token that authorizes + the connection. Format: `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: appInstallationId + type: String + description: Optional. GitHub App installation id. + - name: githubEnterpriseConfig + type: NestedObject + description: Configuration for connections to an instance of GitHub Enterprise. properties: - - name: oauthTokenSecretVersion - type: String - description: |- - Required. A SecretManager resource containing the OAuth token that authorizes - the connection. Format: `projects/*/secrets/*/versions/*`. - required: true - - name: username - type: String - description: Output only. The username associated with this token. - output: true - - name: appInstallationId + - name: appSlug + type: String + description: Output only. The URL-friendly name of the GitHub App. + output: true + - name: privateKeySecretVersion + type: String + description: |- + Optional. SecretManager resource containing the private key of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: installationUri + type: String + description: |- + Output only. The URI to navigate to in order to manage the installation associated + with this GitHubEnterpriseConfig. + output: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: serverVersion + type: String + description: Output only. GitHub Enterprise version installed at the host_uri. + output: true + - name: sslCaCertificate + type: String + description: Optional. SSL certificate to use for requests to GitHub Enterprise. + - name: hostUri + type: String + description: Required. The URI of the GitHub Enterprise host this connection is for. + required: true + - name: appId + type: String + description: Optional. ID of the GitHub App created from the manifest. + - name: webhookSecretSecretVersion + type: String + description: |- + Optional. SecretManager resource containing the webhook secret of the GitHub App, + formatted as `projects/*/secrets/*/versions/*`. + - name: appInstallationId + type: String + description: Optional. ID of the installation of the GitHub App. + - name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs + - name: etag type: String - description: Optional. GitHub App installation id. -- name: githubEnterpriseConfig - type: NestedObject - description: Configuration for connections to an instance of GitHub Enterprise. - properties: - - name: appSlug + description: |- + 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. + - name: uid type: String - description: Output only. The URL-friendly name of the GitHub App. + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. output: true - - name: privateKeySecretVersion + - name: name type: String description: |- - Optional. SecretManager resource containing the private key of the GitHub App, - formatted as `projects/*/secrets/*/versions/*`. - - name: installationUri - type: String + Identifier. The resource name of the connection, in the format + `projects/{project}/locations/{location}/connections/{connection_id}`. + output: true + - name: reconciling + type: Boolean description: |- - Output only. The URI to navigate to in order to manage the installation associated - with this GitHubEnterpriseConfig. + Output only. Set to true when the connection is being set up or updated in the + background. output: true - - name: serviceDirectoryConfig + - name: gitlabEnterpriseConfig type: NestedObject - description: |- - ServiceDirectoryConfig represents Service Directory configuration for a - connection. + description: Configuration for connections to an instance of GitLab Enterprise. properties: - - name: service - type: String - description: |- - Required. The Service Directory service name. - Format: - projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. - required: true - - name: serverVersion + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: sslCaCertificate + type: String + description: |- + Optional. SSL Certificate Authority certificate to use for requests to GitLab + Enterprise instance. + - name: serverVersion + type: String + description: Output only. Version of the GitLab Enterprise server running on the `host_uri`. + output: true + - name: hostUri + type: String + description: Required. The URI of the GitLab Enterprise host this connection is for. + required: true + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: updateTime type: String - description: Output only. GitHub Enterprise version installed at the host_uri. + description: Output only. [Output only] Update timestamp output: true - - name: sslCaCertificate + - name: deleteTime type: String - description: Optional. SSL certificate to use for requests to GitHub Enterprise. - - name: hostUri - type: String - description: Required. The URI of the GitHub Enterprise host this connection is for. - required: true - - name: appId - type: String - description: Optional. ID of the GitHub App created from the manifest. - - name: webhookSecretSecretVersion - type: String - description: |- - Optional. SecretManager resource containing the webhook secret of the GitHub App, - formatted as `projects/*/secrets/*/versions/*`. - - name: appInstallationId - type: String - description: Optional. ID of the installation of the GitHub App. -- name: labels - type: KeyValueLabels - description: Optional. Labels as key value pairs -- name: etag - type: String - description: |- - 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. -- name: uid - type: String - description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. - output: true -- name: name - type: String - description: |- - Identifier. The resource name of the connection, in the format - `projects/{project}/locations/{location}/connections/{connection_id}`. - output: true -- name: reconciling - type: Boolean - description: |- - Output only. Set to true when the connection is being set up or updated in the - background. - output: true -- name: gitlabEnterpriseConfig - type: NestedObject - description: Configuration for connections to an instance of GitLab Enterprise. - properties: - - name: authorizerCredential - type: NestedObject - description: |- - Represents a personal access token that authorized the Connection, - and associated metadata. - required: true - properties: - - name: userTokenSecretVersion - type: String - description: |- - Required. A SecretManager resource containing the user token that authorizes - the Developer Connect connection. Format: - `projects/*/secrets/*/versions/*`. - required: true - - name: username - type: String - description: Output only. The username associated with this token. - output: true - - name: serviceDirectoryConfig + description: Output only. [Output only] Delete timestamp + output: true + - name: installationState type: NestedObject description: |- - ServiceDirectoryConfig represents Service Directory configuration for a - connection. - properties: - - name: service - type: String - description: |- - Required. The Service Directory service name. - Format: - projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. - required: true - - name: sslCaCertificate - type: String - description: |- - Optional. SSL Certificate Authority certificate to use for requests to GitLab - Enterprise instance. - - name: serverVersion - type: String - description: Output only. Version of the GitLab Enterprise server running on the `host_uri`. + Describes stage and necessary actions to be taken by the + user to complete the installation. Used for GitHub and GitHub Enterprise + based connections. output: true - - name: hostUri - type: String - description: Required. The URI of the GitLab Enterprise host this connection is for. - required: true - - name: webhookSecretSecretVersion - type: String + properties: + - name: message + type: String + description: |- + Output only. Message of what the user should do next to continue the installation. + Empty string if the installation is already complete. + - name: actionUri + type: String + description: |- + Output only. Link to follow for next action. Empty string if the installation is already + complete. + - name: stage + type: String + description: |- + Output only. Current step of the installation process. + Possible values: + STAGE_UNSPECIFIED + PENDING_CREATE_APP + PENDING_USER_OAUTH + PENDING_INSTALL_APP + COMPLETE + output: true + - name: disabled + type: Boolean description: |- - Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, - formatted as `projects/*/secrets/*/versions/*`. This is used to validate - webhooks. - immutable: true - required: true - - name: readAuthorizerCredential + 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. + - name: annotations + type: KeyValueAnnotations + description: Optional. Allows clients to store small amounts of arbitrary data. + - name: gitlabConfig type: NestedObject - description: |- - Represents a personal access token that authorized the Connection, - and associated metadata. - required: true + description: Configuration for connections to gitlab.com. properties: - - name: userTokenSecretVersion - type: String - description: |- - Required. A SecretManager resource containing the user token that authorizes - the Developer Connect connection. Format: - `projects/*/secrets/*/versions/*`. - required: true - - name: username - type: String - description: Output only. The username associated with this token. - output: true -- name: updateTime - type: String - description: Output only. [Output only] Update timestamp - output: true -- name: deleteTime - type: String - description: Output only. [Output only] Delete timestamp - output: true -- name: installationState - type: NestedObject - description: |- - Describes stage and necessary actions to be taken by the - user to complete the installation. Used for GitHub and GitHub Enterprise - based connections. - output: true - properties: - - name: message - type: String - description: |- - Output only. Message of what the user should do next to continue the installation. - Empty string if the installation is already complete. - - name: actionUri - type: String - description: |- - Output only. Link to follow for next action. Empty string if the installation is already - complete. - - name: stage + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, + formatted as `projects/*/secrets/*/versions/*`. This is used to validate + webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: createTime type: String - description: |- - Output only. Current step of the installation process. - Possible values: - STAGE_UNSPECIFIED - PENDING_CREATE_APP - PENDING_USER_OAUTH - PENDING_INSTALL_APP - COMPLETE + description: Output only. [Output only] Create timestamp output: true -- name: disabled - type: Boolean - description: |- - 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. -- name: annotations - type: KeyValueAnnotations - description: Optional. Allows clients to store small amounts of arbitrary data. -- name: gitlabConfig - type: NestedObject - description: Configuration for connections to gitlab.com. - properties: - - name: webhookSecretSecretVersion - type: String - description: |- - Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, - formatted as `projects/*/secrets/*/versions/*`. This is used to validate - webhooks. - immutable: true - required: true - - name: readAuthorizerCredential + - name: cryptoKeyConfig type: NestedObject description: |- - Represents a personal access token that authorized the Connection, - and associated metadata. - required: true + The crypto key configuration. This field is used by the Customer-managed + encryption keys (CMEK) feature. properties: - - name: userTokenSecretVersion - type: String - description: |- - Required. A SecretManager resource containing the user token that authorizes - the Developer Connect connection. Format: - `projects/*/secrets/*/versions/*`. - required: true - - name: username - type: String - description: Output only. The username associated with this token. - output: true - - name: authorizerCredential - type: NestedObject - description: |- - Represents a personal access token that authorized the Connection, - and associated metadata. - required: true - properties: - - name: userTokenSecretVersion - type: String - description: |- - Required. A SecretManager resource containing the user token that authorizes - the Developer Connect connection. Format: - `projects/*/secrets/*/versions/*`. - required: true - - name: username - type: String - description: Output only. The username associated with this token. - output: true -- name: createTime - type: String - description: Output only. [Output only] Create timestamp - output: true -- name: cryptoKeyConfig - type: NestedObject - description: |- - The crypto key configuration. This field is used by the Customer-managed - encryption keys (CMEK) feature. - properties: - - name: keyReference - type: String - description: |- - Required. The name of the key which is used to encrypt/decrypt customer data. For key - in Cloud KMS, the key should be in the format of - `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - required: true + - name: keyReference + type: String + description: |- + Required. The name of the key which is used to encrypt/decrypt customer data. For key + in Cloud KMS, the key should be in the format of + `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + required: true diff --git a/mmv1/products/developerconnect/GitRepositoryLink.yaml b/mmv1/products/developerconnect/GitRepositoryLink.yaml index 566781898317..38025defcb69 100644 --- a/mmv1/products/developerconnect/GitRepositoryLink.yaml +++ b/mmv1/products/developerconnect/GitRepositoryLink.yaml @@ -20,7 +20,7 @@ self_link: projects/{{project}}/locations/{{location}}/connections/{{parent_conn create_url: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks?gitRepositoryLinkId={{git_repository_link_id}} id_format: projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} import_format: -- projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} + - projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} examples: # These tests depend on secrets stored in a separate project, so we prefer not # to show them in the docs. @@ -67,9 +67,9 @@ async: delete_minutes: 20 base_url: '{{op_id}}' actions: - - create - - delete - - update + - create + - delete + - update type: OpAsync result: resource_inside_response: true @@ -77,73 +77,73 @@ async: include_project: false autogen_status: R2l0UmVwb3NpdG9yeUxpbms= parameters: -- name: location - type: String - description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - immutable: true - url_param_only: true - required: true -- name: parent_connection - type: String - description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - immutable: true - url_param_only: true - required: true -- name: gitRepositoryLinkId - type: String - description: |- - Required. The ID to use for the repository, which will become the final component of - the repository's resource name. This ID should be unique in the connection. - Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. - immutable: true - url_param_only: true - required: true + - name: location + type: String + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true + - name: parent_connection + type: String + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + immutable: true + url_param_only: true + required: true + - name: gitRepositoryLinkId + type: String + description: |- + Required. The ID to use for the repository, which will become the final component of + the repository's resource name. This ID should be unique in the connection. + Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. + immutable: true + url_param_only: true + required: true properties: -- name: cloneUri - type: String - description: Required. Git Clone URI. - required: true -- name: labels - type: KeyValueLabels - description: Optional. Labels as key value pairs -- name: annotations - type: KeyValueAnnotations - description: Optional. Allows clients to store small amounts of arbitrary data. -- name: uid - type: String - description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. - output: true -- name: name - type: String - description: |- - Identifier. Resource name of the repository, in the format - `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - output: true -- name: updateTime - type: String - description: Output only. [Output only] Update timestamp - output: true -- name: deleteTime - type: String - description: Output only. [Output only] Delete timestamp - output: true -- name: etag - type: String - description: |- - 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. -- name: reconciling - type: Boolean - description: |- - Output only. Set to true when the connection is being set up or updated in the - background. - output: true -- name: webhookId - type: String - description: Output only. External ID of the webhook created for the repository. - output: true -- name: createTime - type: String - description: Output only. [Output only] Create timestamp - output: true + - name: cloneUri + type: String + description: Required. Git Clone URI. + required: true + - name: labels + type: KeyValueLabels + description: Optional. Labels as key value pairs + - name: annotations + type: KeyValueAnnotations + description: Optional. Allows clients to store small amounts of arbitrary data. + - name: uid + type: String + description: Output only. A system-assigned unique identifier for a the GitRepositoryLink. + output: true + - name: name + type: String + description: |- + Identifier. Resource name of the repository, in the format + `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + output: true + - name: updateTime + type: String + description: Output only. [Output only] Update timestamp + output: true + - name: deleteTime + type: String + description: Output only. [Output only] Delete timestamp + output: true + - name: etag + type: String + description: |- + 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. + - name: reconciling + type: Boolean + description: |- + Output only. Set to true when the connection is being set up or updated in the + background. + output: true + - name: webhookId + type: String + description: Output only. External ID of the webhook created for the repository. + output: true + - name: createTime + type: String + description: Output only. [Output only] Create timestamp + output: true diff --git a/mmv1/products/developerconnect/product.yaml b/mmv1/products/developerconnect/product.yaml index 0f848cd77695..ee8ce01b6678 100644 --- a/mmv1/products/developerconnect/product.yaml +++ b/mmv1/products/developerconnect/product.yaml @@ -15,8 +15,8 @@ name: DeveloperConnect display_name: Developer Connect scopes: -- https://www.googleapis.com/auth/cloud-platform + - 'https://www.googleapis.com/auth/cloud-platform' versions: -- base_url: https://developerconnect.googleapis.com/v1/ - name: ga + - base_url: 'https://developerconnect.googleapis.com/v1/' + name: ga caibaseurl: "" From 0a6f24d3125eec2ee9c77033210946d09ee08d09 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Mon, 16 Dec 2024 20:02:21 -0500 Subject: [PATCH 12/15] Add updated doc examples --- ...t_connection_github_enterprise_doc.tf.tmpl | 47 +++++++--- ...oper_connect_connection_gitlab_doc.tf.tmpl | 62 +++++++------- ...t_connection_gitlab_enterprise_doc.tf.tmpl | 81 ++++++++++++++++-- ...ect_git_repository_link_github_doc.tf.tmpl | 2 +- ...ository_link_github_enterprise_doc.tf.tmpl | 48 ++++++++--- ...ect_git_repository_link_gitlab_doc.tf.tmpl | 85 +++++++++++++++++-- ...ository_link_gitlab_enterprise_doc.tf.tmpl | 83 ++++++++++++++++-- 7 files changed, 332 insertions(+), 76 deletions(-) diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl index a01ac174ad82..456a7d34e8ca 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_github_enterprise_doc.tf.tmpl @@ -1,16 +1,27 @@ -resource "google_secret_manager_secret" "github-enterprise-token-secret" { - - secret_id = "github-enterprise-token-secret" +resource "google_secret_manager_secret" "private-key-secret" { + secret_id = "ghe-pk-secret" replication { auto {} } } -resource "google_secret_manager_secret_version" "github-enterprise-token-secret-version" { +resource "google_secret_manager_secret_version" "private-key-secret-version" { + secret = google_secret_manager_secret.private-key-secret.id + secret_data = file("private-key.pem") +} + +resource "google_secret_manager_secret" "webhook-secret-secret" { + secret_id = "ghe-token-secret" - secret = google_secret_manager_secret.github-enterprise-token-secret.id - secret_data = file("my-github-enterprise-token.txt") + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "webhook-secret-secret-version" { + secret = google_secret_manager_secret.webhook-secret-secret.id + secret_data = "" } data "google_iam_policy" "p4sa-secretAccessor" { @@ -21,22 +32,30 @@ data "google_iam_policy" "p4sa-secretAccessor" { } } -resource "google_secret_manager_secret_iam_policy" "policy" { - - secret_id = google_secret_manager_secret.github-enterprise-token-secret.secret_id +resource "google_secret_manager_secret_iam_policy" "policy-pk" { + secret_id = google_secret_manager_secret.private-key-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } -resource "google_developer_connect_connection" "my-connection" { +resource "google_secret_manager_secret_iam_policy" "policy-whs" { + secret_id = google_secret_manager_secret.webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} +resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "my-connection" github_enterprise_config { - host_uri = "https://devconnect-terraform.com" + host_uri = "https://ghe.com" + private_key_secret_version = google_secret_manager_secret_version.private-key-secret-version.id + webhook_secret_secret_version = google_secret_manager_secret_version.webhook-secret-secret-version.id + app_id = 100 app_installation_id = 123123 - authorizer_credential { - oauth_token_secret_version = google_secret_manager_secret_version.github-enterprise-token-secret-version.id - } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-pk, + google_secret_manager_secret_iam_policy.policy-whs + ] } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl index d61d987b6354..51c2f4714f38 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_doc.tf.tmpl @@ -1,45 +1,36 @@ -resource "google_secret_manager_secret" "gitlab-read-cred" { - +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { secret_id = "gitlab-read-cred" - replication { auto {} } } -resource "google_secret_manager_secret" "gitlab-auth-cred" { +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { secret_id = "gitlab-auth-cred" - replication { auto {} } } -resource "google_secret_manager_secret" "gitlab-webhook-secret" { +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { secret_id = "gitlab-webhook-secret" - replication { auto {} } } -resource "google_secret_manager_secret_version" "gitlab-read-cred-version" { - - secret = google_secret_manager_secret.gitlab-read-cred.id - secret_data = file("my-gitlab-read-cred.txt") -} - -resource "google_secret_manager_secret_version" "gitlab-auth-cred-version" { - - secret = google_secret_manager_secret.gitlab-auth-cred.id - secret_data = file("my-gitlab-auth-cred.txt") -} - -resource "google_secret_manager_secret_version" "gitlab-webhook-secret-version" { - - secret = google_secret_manager_secret.gitlab-webhook-secret.id +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id secret_data = file("my-gitlab-webhook-secret.txt") data "google_iam_policy" "p4sa-secretAccessor" { @@ -50,11 +41,18 @@ data "google_iam_policy" "p4sa-secretAccessor" { } } -resource "google_secret_manager_secret_iam_policy" "policy" { +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} - secret_id = google_secret_manager_secret.gitlab-read-cred.secret_id - secret_id = google_secret_manager_secret.gitlab-auth-cred.secret_id - secret_id = google_secret_manager_secret.gitlab-webhook-secret.secret_id +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } @@ -64,14 +62,20 @@ resource "google_developer_connect_connection" "my-connection" { connection_id = "my-connection" gitlab_config { - webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-version.id + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id read_authorizer_credential { - user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-version.id + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id } authorizer_credential { - user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-version.id + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] } diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl index 6acf339ce1dc..1ff9b798b57a 100644 --- a/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_connection_gitlab_enterprise_doc.tf.tmpl @@ -1,12 +1,83 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "my-connection" - gitlab_config { - host_uri: 'https://devconnect-terraform.com' - webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_authorizer_credential: 'glpat-some-read-auth-credential' - authorizer_credential: 'glpat-some-auth-credential' + gitlab_enterprise_config { + host_uri = "https://gle.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl index 63829f055fde..8f3b566677d5 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_doc.tf.tmpl @@ -41,5 +41,5 @@ resource "google_developer_connect_git_repository_link" "my-repository" { location = "us-central1" git_repository_link_id = "my-repo" parent_connection = google_developer_connect_connection.my-connection.connection_id - remote_uri = "https://github.com/myuser/myrepo.git" + clone_uri = "https://github.com/myuser/myrepo.git" } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl index 857c11b28cca..fbf9a62e188e 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_github_enterprise_doc.tf.tmpl @@ -1,14 +1,27 @@ -resource "google_secret_manager_secret" "github-enterprise-token-secret" { - secret_id = "github-token-secret" +resource "google_secret_manager_secret" "private-key-secret" { + secret_id = "ghe-pk-secret" replication { auto {} } } -resource "google_secret_manager_secret_version" "github-enterprise-token-secret-version" { - secret = google_secret_manager_secret.github-token-secret.id - secret_data = file("my-github-enterprise-token.txt") +resource "google_secret_manager_secret_version" "private-key-secret-version" { + secret = google_secret_manager_secret.private-key-secret.id + secret_data = file("private-key.pem") +} + +resource "google_secret_manager_secret" "webhook-secret-secret" { + secret_id = "ghe-token-secret" + + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "webhook-secret-secret-version" { + secret = google_secret_manager_secret.webhook-secret-secret.id + secret_data = "" } data "google_iam_policy" "p4sa-secretAccessor" { @@ -19,8 +32,13 @@ data "google_iam_policy" "p4sa-secretAccessor" { } } -resource "google_secret_manager_secret_iam_policy" "policy" { - secret_id = google_secret_manager_secret.github-enterprise-token-secret.secret_id +resource "google_secret_manager_secret_iam_policy" "policy-pk" { + secret_id = google_secret_manager_secret.private-key-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-whs" { + secret_id = google_secret_manager_secret.webhook-secret-secret.secret_id policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data } @@ -29,18 +47,22 @@ resource "google_developer_connect_connection" "my-connection" { connection_id = "my-connection" github_enterprise_config { - host_uri = "https://devconnect-terraform.com" + host_uri = "https://ghe.com" + private_key_secret_version = google_secret_manager_secret_version.private-key-secret-version.id + webhook_secret_secret_version = google_secret_manager_secret_version.webhook-secret-secret-version.id + app_id = 100 app_installation_id = 123123 - authorizer_credential { - oauth_token_secret_version = google_secret_manager_secret_version.github-token-secret-version.id - } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-pk, + google_secret_manager_secret_iam_policy.policy-whs + ] } resource "google_developer_connect_git_repository_link" "my-repository" { location = "us-central1" git_repository_link_id = "my-repo" parent_connection = google_developer_connect_connection.my-connection.connection_id - remote_uri = "https://devconnect-terraform.com/myuser/myrepo.git" + clone_uri = "https://ghe.com/myuser/myrepo.git" } - diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl index b263b6f64232..0b56a9bfeecd 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_doc.tf.tmpl @@ -1,10 +1,60 @@ -resource "google_developer_connect_git_repository_link" "my-repository" { - location = "us-central1" - git_repository_link_id = "my-repo" - parent_connection = google_developer_connect_connection.my-connection.connection_id - remote_uri = "https://gitlab.com/myuser/myrepo.git" +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } } +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} resource "google_developer_connect_connection" "my-connection" { @@ -12,8 +62,27 @@ resource "google_developer_connect_connection" "my-connection" { connection_id = "my-connection" gitlab_config { - webhook_secret_secret_version: 'projects/terraform-proj/secrets/webhook-version/versions/latest' - read_authorizer_credential: 'glpat-some-read-auth-credential' - authorizer_credential: 'glpat-some-auth-credential' + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://gitlab.com/myuser/myrepo.git" } diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl index d24327f7ccaa..5e61679d339f 100644 --- a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_gitlab_enterprise_doc.tf.tmpl @@ -1,19 +1,90 @@ +resource "google_secret_manager_secret" "gitlab-read-cred-secret" { + secret_id = "gitlab-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-read-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-read-cred-secret.id + secret_data = file("my-gitlab-read-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-auth-cred-secret" { + secret_id = "gitlab-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-auth-cred-secret-version" { + secret = google_secret_manager_secret.gitlab-auth-cred-secret.id + secret_data = file("my-gitlab-auth-cred.txt") +} + +resource "google_secret_manager_secret" "gitlab-webhook-secret-secret" { + secret_id = "gitlab-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "gitlab-webhook-secret-secret-version" { + secret = google_secret_manager_secret.gitlab-webhook-secret-secret.id + secret_data = file("my-gitlab-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.gitlab-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.gitlab-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.gitlab-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + resource "google_developer_connect_connection" "my-connection" { location = "us-central1" connection_id = "my-connection" - gitlab_config { - host_uri: "https://devconnect-terraform.com" - webhook_secret_secret_version: "projects/terraform-proj/secrets/webhook-version/versions/latest" - read_authorizer_credential: "glpat-some-read-auth-credential" - authorizer_credential: "glpat-some-auth-credential" + gitlab_enterprise_config { + host_uri = "https://gle.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.gitlab-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.gitlab-auth-cred-secret-version.id + } } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] } resource "google_developer_connect_git_repository_link" "my-repository" { location = "us-central1" git_repository_link_id = "my-repo" parent_connection = google_developer_connect_connection.my-connection.connection_id - remote_uri = "https://devconnect-terraform.com/myuser/myrepo.git" + clone_uri = "https://gle.com/myuser/myrepo.git" } From f3282d68bded9151c6b3428140c90b51fbdaed4b Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Wed, 18 Dec 2024 12:59:57 -0500 Subject: [PATCH 13/15] adding new branch for git repository link change --- ...developerconnect_public_openapi3_0_v1.json | 3119 +++++++++++++++++ 1 file changed, 3119 insertions(+) create mode 100644 mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json diff --git a/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json b/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json new file mode 100644 index 000000000000..62ec56a8983c --- /dev/null +++ b/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json @@ -0,0 +1,3119 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Developer Connect API", + "description": "Connect third-party source code management to Google", + "version": "v1", + "x-google-revision": "0" + }, + "servers": [ + { + "url": "https://developerconnect.googleapis.com", + "description": "Global Endpoint" + }, + { + "url": "https://developerconnect.us-central1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-central1" + }, + { + "url": "https://developerconnect.europe-west1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "europe-west1" + }, + { + "url": "https://developerconnect.asia-east1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-east1" + }, + { + "url": "https://developerconnect.asia-east2.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-east2" + }, + { + "url": "https://developerconnect.europe-west4.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "europe-west4" + }, + { + "url": "https://developerconnect.us-east4.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-east4" + }, + { + "url": "https://developerconnect.us-east5.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-east5" + }, + { + "url": "https://developerconnect.asia-southeast1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "asia-southeast1" + }, + { + "url": "https://developerconnect.us-west1.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-west1" + }, + { + "url": "https://developerconnect.us-west2.rep.googleapis.com/", + "description": "Regional Endpoint", + "x-google-endpoint-location": "us-west2" + } + ], + "paths": { + "/v1/projects/{project}/locations/{location}/operations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListOperations", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "The standard list filter.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "The standard list page size.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "The standard list page token.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOperationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/operations/{operation}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetOperation", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + } + }, + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteOperation", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/operations/{operation}:cancel": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "CancelOperation", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of `1`,\ncorresponding to `Code.CANCELLED`.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelOperationRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListConnections", + "description": "Lists Connections in a given project and location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. A token identifying a page of results the server should return.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "Optional. Filtering results", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "description": "Optional. Hint for how to order the results", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListConnectionsResponse" + } + } + } + } + } + }, + "post": { + "tags": ["developerconnect"], + "operationId": "CreateConnection", + "description": "Creates a new Connection in a given project and location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connectionId", + "description": "Required. Id of the requesting object\nIf auto-generating Id server-side, remove this field and\nconnection_id from the method_signature of Create RPC", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionOperation" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetConnection", + "description": "Gets details of a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + } + }, + "patch": { + "tags": ["developerconnect"], + "operationId": "UpdateConnection", + "description": "Updates the parameters of a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "updateMask", + "description": "Required. Field mask is used to specify the fields to be overwritten in the\nConnection resource by the update.\nThe fields specified in the update_mask are relative to the resource, not\nthe full request. A field will be overwritten if it is in the mask. If the\nuser does not provide a mask then all fields will be overwritten.", + "in": "query", + "required": true, + "schema": { + "type": "string", + "pattern": "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$", + "format": "google-fieldmask" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "allowMissing", + "description": "Optional. If set to true, and the connection is not found a new connection\nwill be created. In this situation `update_mask` is ignored.\nThe creation will succeed only if the input connection has all the\nnecessary information (e.g a github_config with both user_oauth_token and\ninstallation_id properties).", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConnectionOperation" + } + } + } + } + } + }, + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteConnection", + "description": "Deletes a single Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "etag", + "description": "Optional. The current etag of the Connection.\nIf an etag is provided and does not match the current etag of the\nConnection, deletion will be blocked and an ABORTED error will be returned.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConnectionOperation" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "CreateGitRepositoryLink", + "description": "Creates a GitRepositoryLink. Upon linking a Git Repository, Developer\nConnect will configure the Git Repository to send webhook events to\nDeveloper Connect. Connections that use Firebase GitHub Application will\nhave events forwarded to the Firebase service. All other Connections will\nhave events forwarded to Cloud Build.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitRepositoryLinkId", + "description": "Required. The ID to use for the repository, which will become the final component of\nthe repository's resource name. This ID should be unique in the connection.\nAllows alphanumeric characters and any of -._~%!$&'()*+,;=@.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Required. The resource being created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + }, + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGitRepositoryLinkOperation" + } + } + } + } + } + }, + "get": { + "tags": ["developerconnect"], + "operationId": "ListGitRepositoryLinks", + "description": "Lists GitRepositoryLinks in a given project, location, and connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. A token identifying a page of results the server should return.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "Optional. Filtering results", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "description": "Optional. Hint for how to order the results", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListGitRepositoryLinksResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "delete": { + "tags": ["developerconnect"], + "operationId": "DeleteGitRepositoryLink", + "description": "Deletes a single GitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestId", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "validateOnly", + "description": "Optional. If set, validate the request, but do not actually post it.", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "etag", + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "x-google-lro" : "true", + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteGitRepositoryLinkOperation" + } + } + } + } + } + }, + "get": { + "tags": ["developerconnect"], + "operationId": "GetGitRepositoryLink", + "description": "Gets details of a single GitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadWriteToken": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "FetchReadWriteToken", + "description": "Fetches read/write token of a given gitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadWriteTokenRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadWriteTokenResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadToken": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "FetchReadToken", + "description": "Fetches read token of a given gitRepositoryLink.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadTokenRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchReadTokenResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchLinkableGitRepositories": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchLinkableGitRepositories", + "description": "FetchLinkableGitRepositories returns a list of git repositories from an SCM\nthat are available to be added to a Connection.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "Optional. Number of results to return in the list. Defaults to 20.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. Page start.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLinkableGitRepositoriesResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchGitHubInstallations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchGitHubInstallations", + "description": "FetchGitHubInstallations returns the list of GitHub Installations that\nare available to be added to a Connection.\nFor github.com, only installations accessible to the authorizer token\nare returned. For GitHub Enterprise, all installations are returned.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchGitHubInstallationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchGitRefs": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "FetchGitRefs", + "description": "Fetch the list of branches or tags for a given repository.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "refType", + "description": "Required. Type of refs to fetch.", + "in": "query", + "required": true, + "schema": { + "type": "string", + "x-google-enum-descriptions": [ + "No type specified.", + "To fetch tags.", + "To fetch branches." + ], + "enum": [ + "REF_TYPE_UNSPECIFIED", + "TAG", + "BRANCH" + ] + } + }, + { + "name": "pageSize", + "description": "Optional. Number of results to return in the list. Default to 20.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "Optional. Page start.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchGitRefsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections:processGitHubEnterpriseWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitHubEnterpriseWebhook", + "description": "ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise\ninstances for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitHubEnterpriseWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabEnterpriseWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitLabEnterpriseWebhook", + "description": "ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise\ninstances for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitLabEnterpriseWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabWebhook": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "post": { + "tags": ["developerconnect"], + "operationId": "ProcessGitLabWebhook", + "description": "ProcessGitLabWebhook is called by the GitLab.com for notifying events.", + "security": [ + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connection", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "gitrepositorylink", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessGitLabWebhookRequest" + } + } + } + }, + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "ListLocations", + "description": "Lists information about the supported locations for this service.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "description": "A filter to narrow down results to a preferred subset.\nThe filtering language accepts strings like `\"displayName=tokyo\"`, and\nis documented in more detail in [AIP-160](https://google.aip.dev/160).", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "description": "The maximum number of results to return.\nIf not set, the service selects a default.", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageToken", + "description": "A page token received from the `next_page_token` field in the response.\nSend that page token to receive the subsequent page.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListLocationsResponse" + } + } + } + } + } + } + }, + "/v1/projects/{project}/locations/{location}": { + "parameters": [ + { "$ref": "#/components/parameters/alt"}, + { "$ref": "#/components/parameters/callback"}, + { "$ref": "#/components/parameters/prettyPrint"}, + { "$ref": "#/components/parameters/_.xgafv"} + ], + "get": { + "tags": ["developerconnect"], + "operationId": "GetLocation", + "description": "Gets information about a location.", + "security": [ + { + "google_oauth_implicit": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "google_oauth_code": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + { + "bearer_auth": [] + } + ], + "parameters": [ + { + "name": "project", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Location" + } + } + } + } + } + } + } + }, + "components": { + "parameters": { + "alt": { + "name": "$alt", + "description": "Data format for response.", + "schema": { + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "x-google-enum-descriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "type": "string" + }, + "in": "query" + }, + "callback": { + "name": "$callback", + "description": "JSONP", + "schema": { + "type": "string" + }, + "in": "query" + }, + "prettyPrint": { + "name": "$prettyPrint", + "description": "Returns response with indentations and line breaks.", + "schema": { + "default": "true", + "type": "boolean" + }, + "in": "query" + }, + "_.xgafv": { + "name": "$.xgafv", + "description": "V1 error format.", + "schema": { + "enum": [ + "1", + "2" + ], + "x-google-enum-descriptions": [ + "v1 error format", + "v2 error format" + ], + "type": "string" + }, + "in": "query" + } + }, + "securitySchemes": { + "google_oauth_implicit": { + "type": "oauth2", + "description": "Google Oauth 2.0 implicit authentication flow.", + "flows": { + "implicit": { + "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "google_oauth_code": { + "type": "oauth2", + "description": "Google Oauth 2.0 authorizationCode authentication flow.", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", + "tokenUrl": "https://oauth2.googleapis.com/token", + "refreshUrl": "https://oauth2.googleapis.com/token", + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "bearer_auth": { + "type": "http", + "description": "Http bearer authentication.", + "scheme": "bearer" + } + }, + "schemas": { + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer", + "format": "int32" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }", + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object" + }, + "ListConnectionsResponse": { + "description": "Message for response to listing Connections", + "type": "object", + "properties": { + "connections": { + "description": "The list of Connection", + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Connection": { + "description": "Message describing Connection object", + "type": "object", + "properties": { + "githubConfig": { + "description": "Configuration for connections to github.com.", + "allOf": [{ + "$ref": "#/components/schemas/GitHubConfig" + }] + }, + "githubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "allOf": [{ + "$ref": "#/components/schemas/GitHubEnterpriseConfig" + }] + }, + "gitlabConfig": { + "description": "Configuration for connections to gitlab.com.", + "allOf": [{ + "$ref": "#/components/schemas/GitLabConfig" + }] + }, + "gitlabEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitLab Enterprise.", + "allOf": [{ + "$ref": "#/components/schemas/GitLabEnterpriseConfig" + }] + }, + "bitbucketDataCenterConfig": { + "description": "Configuration for connections to an instance of Bitbucket Data Center.", + "allOf": [{ + "$ref": "#/components/schemas/BitbucketDataCenterConfig" + }] + }, + "bitbucketCloudConfig": { + "description": "Configuration for connections to an instance of Bitbucket Clouds.", + "allOf": [{ + "$ref": "#/components/schemas/BitbucketCloudConfig" + }] + }, + "name": { + "description": "Identifier. The resource name of the connection, in the format\n`projects/{project}/locations/{location}/connections/{connection_id}`.", + "x-google-identifier": true, + "type": "string" + }, + "createTime": { + "description": "Output only. [Output only] Create timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "updateTime": { + "description": "Output only. [Output only] Update timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "deleteTime": { + "description": "Output only. [Output only] Delete timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "labels": { + "description": "Optional. Labels as key value pairs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "installationState": { + "description": "Output only. Installation state of the Connection.", + "readOnly": true, + "allOf": [{ + "$ref": "#/components/schemas/InstallationState" + }] + }, + "disabled": { + "description": "Optional. If disabled is set to true, functionality is disabled for this connection.\nRepository based API methods and webhooks processing for repositories in\nthis connection will be disabled.", + "type": "boolean" + }, + "reconciling": { + "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", + "readOnly": true, + "type": "boolean" + }, + "annotations": { + "description": "Optional. Allows clients to store small amounts of arbitrary data.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for the Connection.", + "readOnly": true, + "type": "string" + }, + "cryptoKeyConfig": { + "description": "Optional. The crypto key configuration. This field is used by the Customer-Managed\nEncryption Keys (CMEK) feature.", + "allOf": [{ + "$ref": "#/components/schemas/CryptoKeyConfig" + }] + } + } + }, + "GitHubConfig": { + "description": "Configuration for connections to github.com.", + "type": "object", + "properties": { + "githubApp": { + "description": "Required. Immutable. The GitHub Application that was installed to the GitHub user or\norganization.", + "x-google-immutable": true, + "type": "string", + "x-google-enum-descriptions": [ + "GitHub App not specified.", + "The Developer Connect GitHub Application.", + "The Firebase GitHub Application." + ], + "enum": [ + "GIT_HUB_APP_UNSPECIFIED", + "DEVELOPER_CONNECT", + "FIREBASE" + ] + }, + "authorizerCredential": { + "description": "Optional. OAuth credential of the account that authorized the GitHub App.\nIt is recommended to use a robot account instead of a human user account.\nThe OAuth token must be tied to the GitHub App of this config.", + "allOf": [{ + "$ref": "#/components/schemas/OAuthCredential" + }] + }, + "appInstallationId": { + "description": "Optional. GitHub App installation id.", + "type": "string", + "format": "int64" + }, + "installationUri": { + "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubConfig.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "githubApp" + ] + }, + "OAuthCredential": { + "description": "Represents an OAuth token of the account that authorized the Connection,\nand associated metadata.", + "type": "object", + "properties": { + "oauthTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the OAuth token that authorizes\nthe connection. Format: `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated with this token.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "oauthTokenSecretVersion" + ] + }, + "GitHubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the GitHub Enterprise host this connection is for.", + "type": "string" + }, + "appId": { + "description": "Optional. ID of the GitHub App created from the manifest.", + "type": "string", + "format": "int64" + }, + "appSlug": { + "description": "Output only. The URL-friendly name of the GitHub App.", + "readOnly": true, + "type": "string" + }, + "privateKeySecretVersion": { + "description": "Optional. SecretManager resource containing the private key of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Optional. SecretManager resource containing the webhook secret of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "appInstallationId": { + "description": "Optional. ID of the installation of the GitHub App.", + "type": "string", + "format": "int64" + }, + "installationUri": { + "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubEnterpriseConfig.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a GitHub\nEnterprise server. This should only be set if the GitHub Enterprise server\nis hosted on-premises and not reachable by public internet. If this field\nis left empty, calls to the GitHub Enterprise server will be made over the\npublic internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "serverVersion": { + "description": "Output only. GitHub Enterprise version installed at the host_uri.", + "readOnly": true, + "type": "string" + }, + "sslCaCertificate": { + "description": "Optional. SSL certificate to use for requests to GitHub Enterprise.", + "type": "string" + } + }, + "required": [ + "hostUri" + ] + }, + "ServiceDirectoryConfig": { + "description": "ServiceDirectoryConfig represents Service Directory configuration for a\nconnection.", + "type": "object", + "properties": { + "service": { + "description": "Required. The Service Directory service name.\nFormat:\nprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", + "type": "string" + } + }, + "required": [ + "service" + ] + }, + "GitLabConfig": { + "description": "Configuration for connections to gitlab.com.", + "type": "object", + "properties": { + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + } + }, + "required": [ + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "UserCredential": { + "description": "Represents a personal access token that authorized the Connection,\nand associated metadata.", + "type": "object", + "properties": { + "userTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the user token that authorizes\nthe Developer Connect connection. Format:\n`projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated with this token.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "userTokenSecretVersion" + ] + }, + "GitLabEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitLab Enterprise.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the GitLab Enterprise host this connection is for.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a GitLab\nEnterprise instance. This should only be set if the GitLab Enterprise\nserver is hosted on-premises and not reachable by public internet. If this\nfield is left empty, calls to the GitLab Enterprise server will be made\nover the public internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "sslCaCertificate": { + "description": "Optional. SSL Certificate Authority certificate to use for requests to GitLab\nEnterprise instance.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. Version of the GitLab Enterprise server running on the `host_uri`.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "hostUri", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "BitbucketDataCenterConfig": { + "description": "Configuration for connections to an instance of Bitbucket Data Center.", + "type": "object", + "properties": { + "hostUri": { + "description": "Required. The URI of the Bitbucket Data Center host this connection is for.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate webhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. An http access token with the minimum `Repository read` access.\nIt's recommended to use a system account to generate the credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. An http access token with the minimum `Repository admin` scope access. This\nis needed to create webhooks. It's recommended to use a system account to\ngenerate these credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "serviceDirectoryConfig": { + "description": "Optional. Configuration for using Service Directory to privately connect to a\nBitbucket Data Center instance. This should only be set if the Bitbucket\nData Center is hosted on-premises and not reachable by public internet. If\nthis field is left empty, calls to the Bitbucket Data Center will be made\nover the public internet.", + "allOf": [{ + "$ref": "#/components/schemas/ServiceDirectoryConfig" + }] + }, + "sslCaCertificate": { + "description": "Optional. SSL certificate authority to trust when making requests to Bitbucket Data\nCenter.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. Version of the Bitbucket Data Center server running on the `host_uri`.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "hostUri", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "BitbucketCloudConfig": { + "description": "Configuration for connections to an instance of Bitbucket Cloud.", + "type": "object", + "properties": { + "workspace": { + "description": "Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate and create webhooks.", + "x-google-immutable": true, + "type": "string" + }, + "readAuthorizerCredential": { + "description": "Required. An access token with the minimum `repository` access.\nIt can either be a workspace, project or repository access token.\nIt's recommended to use a system account to generate the credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + }, + "authorizerCredential": { + "description": "Required. An access token with the minimum `repository`, `pullrequest` and `webhook`\nscope access. It can either be a workspace, project or repository access\ntoken. This is needed to create webhooks. It's recommended to use a system\naccount to generate these credentials.", + "allOf": [{ + "$ref": "#/components/schemas/UserCredential" + }] + } + }, + "required": [ + "workspace", + "webhookSecretSecretVersion", + "readAuthorizerCredential", + "authorizerCredential" + ] + }, + "InstallationState": { + "description": "Describes stage and necessary actions to be taken by the\nuser to complete the installation. Used for GitHub and GitHub Enterprise\nbased connections.", + "type": "object", + "properties": { + "stage": { + "description": "Output only. Current step of the installation process.", + "readOnly": true, + "type": "string", + "x-google-enum-descriptions": [ + "No stage specified.", + "Only for GitHub Enterprise. An App creation has been requested.\nThe user needs to confirm the creation in their GitHub enterprise host.", + "User needs to authorize the GitHub (or Enterprise) App via OAuth.", + "User needs to follow the link to install the GitHub (or Enterprise) App.", + "Installation process has been completed." + ], + "enum": [ + "STAGE_UNSPECIFIED", + "PENDING_CREATE_APP", + "PENDING_USER_OAUTH", + "PENDING_INSTALL_APP", + "COMPLETE" + ] + }, + "message": { + "description": "Output only. Message of what the user should do next to continue the installation.\nEmpty string if the installation is already complete.", + "readOnly": true, + "type": "string" + }, + "actionUri": { + "description": "Output only. Link to follow for next action. Empty string if the installation is already\ncomplete.", + "readOnly": true, + "type": "string" + } + } + }, + "CryptoKeyConfig": { + "description": "The crypto key configuration. This field is used by the Customer-managed\nencryption keys (CMEK) feature.", + "type": "object", + "properties": { + "keyReference": { + "description": "Required. The name of the key which is used to encrypt/decrypt customer data. For key\nin Cloud KMS, the key should be in the format of\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + } + }, + "required": [ + "keyReference" + ] + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "type": "object", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation\nof the operation. Operations that have been cancelled successfully\nhave google.longrunning.Operation.error value with a\ngoogle.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + } + } + }, + "GitRepositoryLink": { + "description": "Message describing the GitRepositoryLink object", + "type": "object", + "properties": { + "name": { + "description": "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`.", + "x-google-identifier": true, + "type": "string" + }, + "cloneUri": { + "description": "Required. Git Clone URI.", + "type": "string" + }, + "createTime": { + "description": "Output only. [Output only] Create timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "updateTime": { + "description": "Output only. [Output only] Update timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "deleteTime": { + "description": "Output only. [Output only] Delete timestamp", + "readOnly": true, + "type": "string", + "format": "date-time" + }, + "labels": { + "description": "Optional. Labels as key value pairs", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", + "readOnly": true, + "type": "boolean" + }, + "annotations": { + "description": "Optional. Allows clients to store small amounts of arbitrary data.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for the GitRepositoryLink.", + "readOnly": true, + "type": "string" + }, + "webhookId": { + "description": "Output only. External ID of the webhook created for the repository.", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "cloneUri" + ] + }, + "ListGitRepositoryLinksResponse": { + "description": "Message for response to listing GitRepositoryLinks", + "type": "object", + "properties": { + "gitRepositoryLinks": { + "description": "The list of GitRepositoryLinks", + "type": "array", + "items": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FetchReadWriteTokenRequest": { + "description": "Message for fetching SCM read/write token.", + "type": "object" + }, + "FetchReadWriteTokenResponse": { + "description": "Message for responding to get read/write token.", + "type": "object", + "properties": { + "token": { + "description": "The token content.", + "type": "string" + }, + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "type": "string", + "format": "date-time" + }, + "gitUsername": { + "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", + "type": "string" + } + } + }, + "FetchReadTokenRequest": { + "description": "Message for fetching SCM read token.", + "type": "object" + }, + "FetchReadTokenResponse": { + "description": "Message for responding to get read token.", + "type": "object", + "properties": { + "token": { + "description": "The token content.", + "type": "string" + }, + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "type": "string", + "format": "date-time" + }, + "gitUsername": { + "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", + "type": "string" + } + } + }, + "FetchLinkableGitRepositoriesResponse": { + "description": "Response message for FetchLinkableGitRepositories.", + "type": "object", + "properties": { + "linkableGitRepositories": { + "description": "The git repositories that can be linked to the connection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkableGitRepository" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + } + }, + "LinkableGitRepository": { + "description": "LinkableGitRepository represents a git repository that can be linked to a\nconnection.", + "type": "object", + "properties": { + "cloneUri": { + "description": "The clone uri of the repository.", + "type": "string" + } + } + }, + "FetchGitHubInstallationsResponse": { + "description": "Response of fetching github installations.", + "type": "object", + "properties": { + "installations": { + "description": "List of installations available to the OAuth user (for github.com)\nor all the installations (for GitHub enterprise).", + "type": "array", + "items": { + "$ref": "#/components/schemas/Installation" + } + } + } + }, + "Installation": { + "description": "Represents an installation of the GitHub App.", + "type": "object", + "properties": { + "id": { + "description": "ID of the installation in GitHub.", + "type": "string", + "format": "int64" + }, + "name": { + "description": "Name of the GitHub user or organization that owns this installation.", + "type": "string" + }, + "type": { + "description": "Either \"user\" or \"organization\".", + "type": "string" + } + } + }, + "FetchGitRefsResponse": { + "description": "Response for fetching git refs.", + "type": "object", + "properties": { + "refNames": { + "description": "Name of the refs fetched.", + "type": "array", + "items": { + "type": "string" + } + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + } + }, + "ProcessGitHubEnterpriseWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitHubEnterpriseWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", + "type": "object", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "type": "string", + "format": "byte" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "ProcessGitLabEnterpriseWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitLabEnterpriseWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "ProcessGitLabWebhookRequest": { + "description": "RPC request object accepted by the ProcessGitLabWebhook RPC method.", + "type": "object", + "properties": { + "body": { + "description": "Required. HTTP request body.", + "allOf": [{ + "$ref": "#/components/schemas/HttpBody" + }] + } + }, + "required": [ + "body" + ] + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Location" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "displayName": { + "description": "The friendly name for this location, typically a nearby city name.\nFor example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + }, + "BaseOperation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "allOf": [{ + "$ref": "#/components/schemas/Status" + }] + } + } + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "response": { + "description": "The normal, successful response of the operation. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + ] + }, + "CreateConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Connection" + } + } + } + ] + }, + "UpdateConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Connection" + } + } + } + ] + }, + "DeleteConnectionOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Empty" + } + } + } + ] + }, + "CreateGitRepositoryLinkOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/GitRepositoryLink" + } + } + } + ] + }, + "DeleteGitRepositoryLinkOperation": { + "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOperation" + }, + { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/OperationMetadata" + }, + "response": { + "$ref": "#/components/schemas/Empty" + } + } + } + ] + } + } + } + , + "externalDocs": { + "description": "Find more info here.", + "url": "http://cloud.google.com/developer-connect/docs/overview" + } +} From e7bee25fe7da2ff1fc65bd438761da69ee1ebef4 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Wed, 18 Dec 2024 18:22:47 -0500 Subject: [PATCH 14/15] Add bbc and bbdc terraform fields --- .../products/developerconnect/Connection.yaml | 140 +++++++++++ .../developerconnect/GitRepositoryLink.yaml | 18 ++ .../developer_connect_connection_bbdc.tf.tmpl | 18 ++ ...eloper_connect_connection_bbdc_doc.tf.tmpl | 83 +++++++ ...connect_connection_bitbucket_cloud.tf.tmpl | 17 ++ ...ect_connection_bitbucket_cloud_doc.tf.tmpl | 83 +++++++ ...r_connect_git_repository_link_bbdc.tf.tmpl | 29 +++ ...nnect_git_repository_link_bbdc_doc.tf.tmpl | 90 +++++++ ...it_repository_link_bitbucket_cloud.tf.tmpl | 29 +++ ...epository_link_bitbucket_cloud_doc.tf.tmpl | 90 +++++++ ..._developer_connect_connection_test.go.tmpl | 231 ++++++++++++++++++ 11 files changed, 828 insertions(+) create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl create mode 100644 mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl diff --git a/mmv1/products/developerconnect/Connection.yaml b/mmv1/products/developerconnect/Connection.yaml index 649c916648f4..1b7ab4ddbea8 100644 --- a/mmv1/products/developerconnect/Connection.yaml +++ b/mmv1/products/developerconnect/Connection.yaml @@ -51,6 +51,20 @@ examples: connection_name: 'tf-test-connection' - name: 'developer_connect_connection_gitlab_enterprise_doc' exclude_test: true + - name: 'developer_connect_connection_bitbucket_cloud' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_bitbucket_cloud_doc' + exclude_test: true + - name: 'developer_connect_connection_bbdc' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + - name: 'developer_connect_connection_bbdc_doc' + exclude_test: true autogen_async: true async: operation: @@ -279,6 +293,132 @@ properties: type: String description: Output only. The username associated with this token. output: true + - name: bitbucketCloudConfig + type: NestedObject + description: Configuration for connections to an instance of Bitbucket Cloud. + properties: + - name: workspace + type: String + description: Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform. + required: true + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook + events, formatted as `projects/*/secrets/*/versions/*`. This is used to + validate and create webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: bitbucketDataCenterConfig + type: NestedObject + description: Configuration for connections to an instance of Bitbucket Data Center. + properties: + - name: webhookSecretSecretVersion + type: String + description: |- + Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook + events, formatted as `projects/*/secrets/*/versions/*`. This is used to + validate webhooks. + immutable: true + required: true + - name: readAuthorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: authorizerCredential + type: NestedObject + description: |- + Represents a personal access token that authorized the Connection, + and associated metadata. + required: true + properties: + - name: username + type: String + description: Output only. The username associated with this token. + output: true + - name: userTokenSecretVersion + type: String + description: |- + Required. A SecretManager resource containing the user token that authorizes + the Developer Connect connection. Format: + `projects/*/secrets/*/versions/*`. + required: true + - name: serviceDirectoryConfig + type: NestedObject + description: |- + ServiceDirectoryConfig represents Service Directory configuration for a + connection. + properties: + - name: service + type: String + description: |- + Required. The Service Directory service name. + Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + required: true + - name: sslCaCertificate + type: String + description: |- + Optional. SSL certificate authority to trust when making requests to Bitbucket Data + Center. + - name: serverVersion + type: String + description: Output only. Version of the Bitbucket Data Center server running on the `host_uri`. + output: true + - name: hostUri + type: String + description: Required. The URI of the Bitbucket Data Center host this connection is for. + required: true - name: updateTime type: String description: Output only. [Output only] Update timestamp diff --git a/mmv1/products/developerconnect/GitRepositoryLink.yaml b/mmv1/products/developerconnect/GitRepositoryLink.yaml index 38025defcb69..d65ae4f34f2c 100644 --- a/mmv1/products/developerconnect/GitRepositoryLink.yaml +++ b/mmv1/products/developerconnect/GitRepositoryLink.yaml @@ -58,6 +58,24 @@ examples: exclude_docs: true - name: 'developer_connect_git_repository_link_gitlab_enterprise_doc' exclude_test: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud_doc' + exclude_test: true + - name: 'developer_connect_git_repository_link_bbdc' + primary_resource_id: 'my-connection' + primary_resource_name: 'fmt.Sprintf("tf-test-connection%s", context["random_suffix"])' + vars: + connection_name: 'tf-test-connection' + git_repository_link_name: 'my-repository' + exclude_docs: true + - name: 'developer_connect_git_repository_link_bitbucket_cloud_doc' + exclude_test: true autogen_async: true async: operation: diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl new file mode 100644 index 000000000000..266515e11928 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc.tf.tmpl @@ -0,0 +1,18 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl new file mode 100644 index 000000000000..e8a424184423 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bbdc_doc.tf.tmpl @@ -0,0 +1,83 @@ +resource "google_secret_manager_secret" "bbdc-read-cred-secret" { + secret_id = "bbdc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-read-cred-secret.id + secret_data = file("my-bbdc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-auth-cred-secret" { + secret_id = "bbdc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-auth-cred-secret.id + secret_data = file("my-bbdc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-webhook-secret-secret" { + secret_id = "bbdc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbdc-webhook-secret-secret.id + secret_data = file("my-bbdc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbdc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbdc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbdc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + host_uri = "https://bitbucket-test-server.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbdc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl new file mode 100644 index 000000000000..382f5abc2302 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud.tf.tmpl @@ -0,0 +1,17 @@ +resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl new file mode 100644 index 000000000000..3147391380cd --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_connection_bitbucket_cloud_doc.tf.tmpl @@ -0,0 +1,83 @@ +resource "google_secret_manager_secret" "bbc-read-cred-secret" { + secret_id = "bbc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbc-read-cred-secret.id + secret_data = file("my-bbc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-auth-cred-secret" { + secret_id = "bbc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbc-auth-cred-secret.id + secret_data = file("my-bbc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-webhook-secret-secret" { + secret_id = "bbc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbc-webhook-secret-secret.id + secret_data = file("my-bbc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + workspace = "test-workspace" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl new file mode 100644 index 000000000000..75fbe0252e68 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc.tf.tmpl @@ -0,0 +1,29 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.bbdc_conn.connection_id + clone_uri = "https://bitbucket-us-central.gcb-test.com/scm/test/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "bbdc_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl new file mode 100644 index 000000000000..4a72567e7ccd --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bbdc_doc.tf.tmpl @@ -0,0 +1,90 @@ +resource "google_secret_manager_secret" "bbdc-read-cred-secret" { + secret_id = "bbdc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-read-cred-secret.id + secret_data = file("my-bbdc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-auth-cred-secret" { + secret_id = "bbdc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbdc-auth-cred-secret.id + secret_data = file("my-bbdc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbdc-webhook-secret-secret" { + secret_id = "bbdc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbdc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbdc-webhook-secret-secret.id + secret_data = file("my-bbdc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbdc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbdc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbdc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + host_uri = "https://bitbucket-test-server.com" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbdc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbdc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://bitbucket-test-server.com/scm/test/myrepo.git" +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl new file mode 100644 index 000000000000..4904a24e500e --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud.tf.tmpl @@ -0,0 +1,29 @@ +resource "google_developer_connect_git_repository_link" "{{$.PrimaryResourceId}}" { + git_repository_link_id = "{{index $.Vars "git_repository_link_name"}}" + parent_connection = google_developer_connect_connection.bbc_conn.connection_id + clone_uri = "https://bitbucket.org/proctor-test-dc/inarayanan-test.git" + location = "us-central1" + annotations = {} + labels = {} +} + +resource "google_developer_connect_connection" "bbc_conn" { + + location = "us-central1" + connection_id = "{{index $.Vars "connection_name"}}" + disabled = false + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} diff --git a/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl new file mode 100644 index 000000000000..4b06ea8d6ba1 --- /dev/null +++ b/mmv1/templates/terraform/examples/developer_connect_git_repository_link_bitbucket_cloud_doc.tf.tmpl @@ -0,0 +1,90 @@ +resource "google_secret_manager_secret" "bbc-read-cred-secret" { + secret_id = "bbc-read-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-read-cred-secret-version" { + secret = google_secret_manager_secret.bbc-read-cred-secret.id + secret_data = file("my-bbc-read-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-auth-cred-secret" { + secret_id = "bbc-auth-cred" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-auth-cred-secret-version" { + secret = google_secret_manager_secret.bbc-auth-cred-secret.id + secret_data = file("my-bbc-auth-cred.txt") +} + +resource "google_secret_manager_secret" "bbc-webhook-secret-secret" { + secret_id = "bbc-webhook-secret" + replication { + auto {} + } +} + +resource "google_secret_manager_secret_version" "bbc-webhook-secret-secret-version" { + secret = google_secret_manager_secret.bbc-webhook-secret-secret.id + secret_data = file("my-bbc-webhook-secret.txt") + +data "google_iam_policy" "p4sa-secretAccessor" { + binding { + role = "roles/secretmanager.secretAccessor" + // Here, 123456789 is the Google Cloud project number for the project that contains the connection. + members = ["serviceAccount:service-123456789@gcp-sa-devconnect.iam.gserviceaccount.com"] + } +} + +resource "google_secret_manager_secret_iam_policy" "policy-rc" { + secret_id = google_secret_manager_secret.bbc-read-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-ac" { + secret_id = google_secret_manager_secret.bbc-auth-cred-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_secret_manager_secret_iam_policy" "policy-wh" { + secret_id = google_secret_manager_secret.bbc-webhook-secret-secret.secret_id + policy_data = data.google_iam_policy.p4sa-secretAccessor.policy_data +} + +resource "google_developer_connect_connection" "my-connection" { + + location = "us-central1" + connection_id = "my-connection" + + bitbucket_cloud_config { + workspace = "test-workspace" + + webhook_secret_secret_version = google_secret_manager_secret_version.bbc-webhook-secret-secret-version.id + + read_authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-read-cred-secret-version.id + } + + authorizer_credential { + user_token_secret_version = google_secret_manager_secret_version.bbc-auth-cred-secret-version.id + } + } + + depends_on = [ + google_secret_manager_secret_iam_policy.policy-rc, + google_secret_manager_secret_iam_policy.policy-ac, + google_secret_manager_secret_iam_policy.policy-wh + ] +} + +resource "google_developer_connect_git_repository_link" "my-repository" { + location = "us-central1" + git_repository_link_id = "my-repo" + parent_connection = google_developer_connect_connection.my-connection.connection_id + clone_uri = "https://bitbucket.org/test-workspace/myrepo.git" +} diff --git a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl index ae310c6f6762..2c58f64d3ad6 100644 --- a/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl +++ b/mmv1/third_party/terraform/services/developerconnect/resource_developer_connect_connection_test.go.tmpl @@ -442,3 +442,234 @@ resource "google_developer_connect_connection" "my-connection" { `, context) } + +func TestAccDeveloperConnectConnection_developerConnectConnectionBitbucketCloudUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BitbucketCloud(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_BitbucketCloud(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BitbucketCloud(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_BitbucketCloudUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + bitbucket_cloud_config { + workspace = "proctor-test-dc" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-read-token-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func TestAccDeveloperConnectConnection_developerConnectConnectionBitbucketDataCenterUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BitbucketDataCenter(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + { + Config: testAccDeveloperConnectConnection_BitbucketDataCenterUpdate(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BitbucketDataCenter(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} +`, context) +} + + +func testAccDeveloperConnectConnection_BitbucketDataCenterUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + crypto_key_config { + key_reference = "projects/devconnect-terraform-creds/locations/us-central1/keyRings/tf-keyring/cryptoKeys/tf-crypto-key" + } + + bitbucket_data_center_config { + host_uri = "https://bitbucket-us-central.gcb-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-read-token-update/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-auth-token/versions/latest" + } + } +} +`, context) +} + +func TestAccDeveloperConnectConnection_BbdcPrivConnection(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDeveloperConnectConnection_BbdcPrivConnection(context), + }, + { + ResourceName: "google_developer_connect_connection.my-connection", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_id", "location", "terraform_labels"}, + }, + }, + }) +} + + +func testAccDeveloperConnectConnection_BbdcPrivConnection(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_developer_connect_connection" "my-connection" { + location = "us-central1" + connection_id = "tf-test-tf-test-connection%{random_suffix}" + annotations = {} + labels = {} + + bitbucket_data_center_config { + host_uri = "https://private-bitbucket.proctor-test.com" + + webhook_secret_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-webhook/versions/latest" + + read_authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-priv-read-token/versions/latest" + } + + authorizer_credential { + user_token_secret_version = "projects/devconnect-terraform-creds/secrets/bbdc-priv-auth-token/versions/latest" + } + + ssl_ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIDjDCCAnSgAwIBAgIUBh5+3oeT1vmUSS5rSNaFfy6igSAwDQYJKoZIhvcNAQEL\nBQAwVzELMAkGA1UEBhMCVVMxGzAZBgNVBAoMEkdvb2dsZSBDbG91ZCBCdWlsZDEr\nMCkGA1UEAwwicHJpdmF0ZS1iaXRidWNrZXQucHJvY3Rvci10ZXN0LmNvbTAeFw0y\nMzEyMTIyMzI5NTlaFw0yNDEyMTEyMzI5NTlaMFcxCzAJBgNVBAYTAlVTMRswGQYD\nVQQKDBJHb29nbGUgQ2xvdWQgQnVpbGQxKzApBgNVBAMMInByaXZhdGUtYml0YnVj\na2V0LnByb2N0b3ItdGVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQCNfMx4ImGD4imZR64RbmRtpUNmypDokx2/S9kgobmyNvBWeSgRVhOGHGbU\nUgyvENcEg803K8unwF2jF6sdGrocRnIdPpr2tUoViOM2Ss6ds+TD8a2kqBA6+hmQ\nOMJiEIirpGT3Mw1pYTpuLisfIeeuuYssoS5k18kFLZ+Mk6MUSAHCgC8EowUZLGBZ\nagh9OhrjpMSXyidv+2d7FKTh/k3BWffVkDXehjvWjcr47hSvQwqW5m773ewCq0uD\nwxUgO6MAAAxLJz15cjhfvk4ishgSqcp49IZrx+xsNCLbHjPVyGkrL2OhgFaGsQS/\nq6GkXYfJ1sJYrf5Xm1EXbZlQZzJPAgMBAAGjUDBOMC0GA1UdEQQmMCSCInByaXZh\ndGUtYml0YnVja2V0LnByb2N0b3ItdGVzdC5jb20wHQYDVR0OBBYEFISmuuTpHKMB\n+m1h62gEqg1ovC86MA0GCSqGSIb3DQEBCwUAA4IBAQAwIwR6pIum9EZyLtC438Q1\nEgH3SKqbdyMFCkFSBvr4WfFU6ja1pn5ZxzJWt5TRFlI9GMy7BupQrxJGebOiFuUC\noNJpc4QDt9a0/GKh48DGF7uKo9XK33p0v1ahq3ewNT/CUnHewQNX7aXXP1/rL+br\nZPA20XWURUTviMik7DdhaXKQv76K9coI3H74heeBUp+OHKgUkqA3D1QIGNRGOKos\n4z6MyBWVpMUIeJQGtIQBd9CY1hBN231iG1+hdOlOMwgyNVK2GS738r+HbngFo9v4\nh2I1HMUHVcHiPQLqwZ2/OTmTmF1aWCUbhnAvoisu20rHVcGnVIOqMrHYFzdGr3ZQ\n-----END CERTIFICATE-----\n" + + service_directory_config { + service = "projects/devconnect-terraform-creds/locations/us-central1/namespaces/my-namespace/services/terraform-bbdc" + } + } +} +`, context) +} From 8d5b5cdbfba3639383cb3800059ca7fdb893a6d9 Mon Sep 17 00:00:00 2001 From: Ishana Narayanan Date: Wed, 18 Dec 2024 18:30:52 -0500 Subject: [PATCH 15/15] Delete mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json --- ...developerconnect_public_openapi3_0_v1.json | 3119 ----------------- 1 file changed, 3119 deletions(-) delete mode 100644 mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json diff --git a/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json b/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json deleted file mode 100644 index 62ec56a8983c..000000000000 --- a/mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json +++ /dev/null @@ -1,3119 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Developer Connect API", - "description": "Connect third-party source code management to Google", - "version": "v1", - "x-google-revision": "0" - }, - "servers": [ - { - "url": "https://developerconnect.googleapis.com", - "description": "Global Endpoint" - }, - { - "url": "https://developerconnect.us-central1.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "us-central1" - }, - { - "url": "https://developerconnect.europe-west1.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "europe-west1" - }, - { - "url": "https://developerconnect.asia-east1.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "asia-east1" - }, - { - "url": "https://developerconnect.asia-east2.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "asia-east2" - }, - { - "url": "https://developerconnect.europe-west4.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "europe-west4" - }, - { - "url": "https://developerconnect.us-east4.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "us-east4" - }, - { - "url": "https://developerconnect.us-east5.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "us-east5" - }, - { - "url": "https://developerconnect.asia-southeast1.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "asia-southeast1" - }, - { - "url": "https://developerconnect.us-west1.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "us-west1" - }, - { - "url": "https://developerconnect.us-west2.rep.googleapis.com/", - "description": "Regional Endpoint", - "x-google-endpoint-location": "us-west2" - } - ], - "paths": { - "/v1/projects/{project}/locations/{location}/operations": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "ListOperations", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "filter", - "description": "The standard list filter.", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "description": "The standard list page size.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "The standard list page token.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListOperationsResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/operations/{operation}": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "GetOperation", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "operation", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Operation" - } - } - } - } - } - }, - "delete": { - "tags": ["developerconnect"], - "operationId": "DeleteOperation", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "operation", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/operations/{operation}:cancel": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "CancelOperation", - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of `1`,\ncorresponding to `Code.CANCELLED`.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "operation", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CancelOperationRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "ListConnections", - "description": "Lists Connections in a given project and location.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "Optional. A token identifying a page of results the server should return.", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "filter", - "description": "Optional. Filtering results", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "orderBy", - "description": "Optional. Hint for how to order the results", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListConnectionsResponse" - } - } - } - } - } - }, - "post": { - "tags": ["developerconnect"], - "operationId": "CreateConnection", - "description": "Creates a new Connection in a given project and location.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connectionId", - "description": "Required. Id of the requesting object\nIf auto-generating Id server-side, remove this field and\nconnection_id from the method_signature of Create RPC", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "requestId", - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "validateOnly", - "description": "Optional. If set, validate the request, but do not actually post it.", - "in": "query", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "description": "Required. The resource being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Connection" - } - } - } - }, - "x-google-lro" : "true", - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateConnectionOperation" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "GetConnection", - "description": "Gets details of a single Connection.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Connection" - } - } - } - } - } - }, - "patch": { - "tags": ["developerconnect"], - "operationId": "UpdateConnection", - "description": "Updates the parameters of a single Connection.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "updateMask", - "description": "Required. Field mask is used to specify the fields to be overwritten in the\nConnection resource by the update.\nThe fields specified in the update_mask are relative to the resource, not\nthe full request. A field will be overwritten if it is in the mask. If the\nuser does not provide a mask then all fields will be overwritten.", - "in": "query", - "required": true, - "schema": { - "type": "string", - "pattern": "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$", - "format": "google-fieldmask" - } - }, - { - "name": "requestId", - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "allowMissing", - "description": "Optional. If set to true, and the connection is not found a new connection\nwill be created. In this situation `update_mask` is ignored.\nThe creation will succeed only if the input connection has all the\nnecessary information (e.g a github_config with both user_oauth_token and\ninstallation_id properties).", - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "validateOnly", - "description": "Optional. If set, validate the request, but do not actually post it.", - "in": "query", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "description": "Required. The resource being updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Connection" - } - } - } - }, - "x-google-lro" : "true", - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateConnectionOperation" - } - } - } - } - } - }, - "delete": { - "tags": ["developerconnect"], - "operationId": "DeleteConnection", - "description": "Deletes a single Connection.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "requestId", - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "validateOnly", - "description": "Optional. If set, validate the request, but do not actually post it.", - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "etag", - "description": "Optional. The current etag of the Connection.\nIf an etag is provided and does not match the current etag of the\nConnection, deletion will be blocked and an ABORTED error will be returned.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "x-google-lro" : "true", - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteConnectionOperation" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "CreateGitRepositoryLink", - "description": "Creates a GitRepositoryLink. Upon linking a Git Repository, Developer\nConnect will configure the Git Repository to send webhook events to\nDeveloper Connect. Connections that use Firebase GitHub Application will\nhave events forwarded to the Firebase service. All other Connections will\nhave events forwarded to Cloud Build.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitRepositoryLinkId", - "description": "Required. The ID to use for the repository, which will become the final component of\nthe repository's resource name. This ID should be unique in the connection.\nAllows alphanumeric characters and any of -._~%!$&'()*+,;=@.", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "requestId", - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "validateOnly", - "description": "Optional. If set, validate the request, but do not actually post it.", - "in": "query", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "description": "Required. The resource being created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GitRepositoryLink" - } - } - } - }, - "x-google-lro" : "true", - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateGitRepositoryLinkOperation" - } - } - } - } - } - }, - "get": { - "tags": ["developerconnect"], - "operationId": "ListGitRepositoryLinks", - "description": "Lists GitRepositoryLinks in a given project, location, and connection.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "description": "Optional. Requested page size. Server may return fewer items than requested.\nIf unspecified, server will pick an appropriate default.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "Optional. A token identifying a page of results the server should return.", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "filter", - "description": "Optional. Filtering results", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "orderBy", - "description": "Optional. Hint for how to order the results", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListGitRepositoryLinksResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "delete": { - "tags": ["developerconnect"], - "operationId": "DeleteGitRepositoryLink", - "description": "Deletes a single GitRepositoryLink.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "requestId", - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and the\nrequest times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "validateOnly", - "description": "Optional. If set, validate the request, but do not actually post it.", - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "etag", - "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "x-google-lro" : "true", - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteGitRepositoryLinkOperation" - } - } - } - } - } - }, - "get": { - "tags": ["developerconnect"], - "operationId": "GetGitRepositoryLink", - "description": "Gets details of a single GitRepositoryLink.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GitRepositoryLink" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadWriteToken": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "FetchReadWriteToken", - "description": "Fetches read/write token of a given gitRepositoryLink.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchReadWriteTokenRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchReadWriteTokenResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchReadToken": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "FetchReadToken", - "description": "Fetches read token of a given gitRepositoryLink.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchReadTokenRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchReadTokenResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchLinkableGitRepositories": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "FetchLinkableGitRepositories", - "description": "FetchLinkableGitRepositories returns a list of git repositories from an SCM\nthat are available to be added to a Connection.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "description": "Optional. Number of results to return in the list. Defaults to 20.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "Optional. Page start.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchLinkableGitRepositoriesResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}:fetchGitHubInstallations": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "FetchGitHubInstallations", - "description": "FetchGitHubInstallations returns the list of GitHub Installations that\nare available to be added to a Connection.\nFor github.com, only installations accessible to the authorizer token\nare returned. For GitHub Enterprise, all installations are returned.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchGitHubInstallationsResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:fetchGitRefs": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "FetchGitRefs", - "description": "Fetch the list of branches or tags for a given repository.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "refType", - "description": "Required. Type of refs to fetch.", - "in": "query", - "required": true, - "schema": { - "type": "string", - "x-google-enum-descriptions": [ - "No type specified.", - "To fetch tags.", - "To fetch branches." - ], - "enum": [ - "REF_TYPE_UNSPECIFIED", - "TAG", - "BRANCH" - ] - } - }, - { - "name": "pageSize", - "description": "Optional. Number of results to return in the list. Default to 20.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "Optional. Page start.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchGitRefsResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections:processGitHubEnterpriseWebhook": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "ProcessGitHubEnterpriseWebhook", - "description": "ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise\ninstances for notifying events.", - "security": [ - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessGitHubEnterpriseWebhookRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabEnterpriseWebhook": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "ProcessGitLabEnterpriseWebhook", - "description": "ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise\ninstances for notifying events.", - "security": [ - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessGitLabEnterpriseWebhookRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{gitrepositorylink}:processGitLabWebhook": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "post": { - "tags": ["developerconnect"], - "operationId": "ProcessGitLabWebhook", - "description": "ProcessGitLabWebhook is called by the GitLab.com for notifying events.", - "security": [ - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connection", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "gitrepositorylink", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessGitLabWebhookRequest" - } - } - } - }, - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "ListLocations", - "description": "Lists information about the supported locations for this service.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "filter", - "description": "A filter to narrow down results to a preferred subset.\nThe filtering language accepts strings like `\"displayName=tokyo\"`, and\nis documented in more detail in [AIP-160](https://google.aip.dev/160).", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "description": "The maximum number of results to return.\nIf not set, the service selects a default.", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageToken", - "description": "A page token received from the `next_page_token` field in the response.\nSend that page token to receive the subsequent page.", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListLocationsResponse" - } - } - } - } - } - } - }, - "/v1/projects/{project}/locations/{location}": { - "parameters": [ - { "$ref": "#/components/parameters/alt"}, - { "$ref": "#/components/parameters/callback"}, - { "$ref": "#/components/parameters/prettyPrint"}, - { "$ref": "#/components/parameters/_.xgafv"} - ], - "get": { - "tags": ["developerconnect"], - "operationId": "GetLocation", - "description": "Gets information about a location.", - "security": [ - { - "google_oauth_implicit": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "google_oauth_code": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - { - "bearer_auth": [] - } - ], - "parameters": [ - { - "name": "project", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "location", - "description": "Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Location" - } - } - } - } - } - } - } - }, - "components": { - "parameters": { - "alt": { - "name": "$alt", - "description": "Data format for response.", - "schema": { - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "x-google-enum-descriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "type": "string" - }, - "in": "query" - }, - "callback": { - "name": "$callback", - "description": "JSONP", - "schema": { - "type": "string" - }, - "in": "query" - }, - "prettyPrint": { - "name": "$prettyPrint", - "description": "Returns response with indentations and line breaks.", - "schema": { - "default": "true", - "type": "boolean" - }, - "in": "query" - }, - "_.xgafv": { - "name": "$.xgafv", - "description": "V1 error format.", - "schema": { - "enum": [ - "1", - "2" - ], - "x-google-enum-descriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string" - }, - "in": "query" - } - }, - "securitySchemes": { - "google_oauth_implicit": { - "type": "oauth2", - "description": "Google Oauth 2.0 implicit authentication flow.", - "flows": { - "implicit": { - "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - } - } - } - }, - "google_oauth_code": { - "type": "oauth2", - "description": "Google Oauth 2.0 authorizationCode authentication flow.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth", - "tokenUrl": "https://oauth2.googleapis.com/token", - "refreshUrl": "https://oauth2.googleapis.com/token", - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - } - } - } - }, - "bearer_auth": { - "type": "http", - "description": "Http bearer authentication.", - "scheme": "bearer" - } - }, - "schemas": { - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Operation" - } - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - } - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }", - "type": "object" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object" - }, - "ListConnectionsResponse": { - "description": "Message for response to listing Connections", - "type": "object", - "properties": { - "connections": { - "description": "The list of Connection", - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection" - } - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Connection": { - "description": "Message describing Connection object", - "type": "object", - "properties": { - "githubConfig": { - "description": "Configuration for connections to github.com.", - "allOf": [{ - "$ref": "#/components/schemas/GitHubConfig" - }] - }, - "githubEnterpriseConfig": { - "description": "Configuration for connections to an instance of GitHub Enterprise.", - "allOf": [{ - "$ref": "#/components/schemas/GitHubEnterpriseConfig" - }] - }, - "gitlabConfig": { - "description": "Configuration for connections to gitlab.com.", - "allOf": [{ - "$ref": "#/components/schemas/GitLabConfig" - }] - }, - "gitlabEnterpriseConfig": { - "description": "Configuration for connections to an instance of GitLab Enterprise.", - "allOf": [{ - "$ref": "#/components/schemas/GitLabEnterpriseConfig" - }] - }, - "bitbucketDataCenterConfig": { - "description": "Configuration for connections to an instance of Bitbucket Data Center.", - "allOf": [{ - "$ref": "#/components/schemas/BitbucketDataCenterConfig" - }] - }, - "bitbucketCloudConfig": { - "description": "Configuration for connections to an instance of Bitbucket Clouds.", - "allOf": [{ - "$ref": "#/components/schemas/BitbucketCloudConfig" - }] - }, - "name": { - "description": "Identifier. The resource name of the connection, in the format\n`projects/{project}/locations/{location}/connections/{connection_id}`.", - "x-google-identifier": true, - "type": "string" - }, - "createTime": { - "description": "Output only. [Output only] Create timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "updateTime": { - "description": "Output only. [Output only] Update timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "deleteTime": { - "description": "Output only. [Output only] Delete timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "labels": { - "description": "Optional. Labels as key value pairs", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "installationState": { - "description": "Output only. Installation state of the Connection.", - "readOnly": true, - "allOf": [{ - "$ref": "#/components/schemas/InstallationState" - }] - }, - "disabled": { - "description": "Optional. If disabled is set to true, functionality is disabled for this connection.\nRepository based API methods and webhooks processing for repositories in\nthis connection will be disabled.", - "type": "boolean" - }, - "reconciling": { - "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", - "readOnly": true, - "type": "boolean" - }, - "annotations": { - "description": "Optional. Allows clients to store small amounts of arbitrary data.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "etag": { - "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", - "type": "string" - }, - "uid": { - "description": "Output only. A system-assigned unique identifier for the Connection.", - "readOnly": true, - "type": "string" - }, - "cryptoKeyConfig": { - "description": "Optional. The crypto key configuration. This field is used by the Customer-Managed\nEncryption Keys (CMEK) feature.", - "allOf": [{ - "$ref": "#/components/schemas/CryptoKeyConfig" - }] - } - } - }, - "GitHubConfig": { - "description": "Configuration for connections to github.com.", - "type": "object", - "properties": { - "githubApp": { - "description": "Required. Immutable. The GitHub Application that was installed to the GitHub user or\norganization.", - "x-google-immutable": true, - "type": "string", - "x-google-enum-descriptions": [ - "GitHub App not specified.", - "The Developer Connect GitHub Application.", - "The Firebase GitHub Application." - ], - "enum": [ - "GIT_HUB_APP_UNSPECIFIED", - "DEVELOPER_CONNECT", - "FIREBASE" - ] - }, - "authorizerCredential": { - "description": "Optional. OAuth credential of the account that authorized the GitHub App.\nIt is recommended to use a robot account instead of a human user account.\nThe OAuth token must be tied to the GitHub App of this config.", - "allOf": [{ - "$ref": "#/components/schemas/OAuthCredential" - }] - }, - "appInstallationId": { - "description": "Optional. GitHub App installation id.", - "type": "string", - "format": "int64" - }, - "installationUri": { - "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubConfig.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "githubApp" - ] - }, - "OAuthCredential": { - "description": "Represents an OAuth token of the account that authorized the Connection,\nand associated metadata.", - "type": "object", - "properties": { - "oauthTokenSecretVersion": { - "description": "Required. A SecretManager resource containing the OAuth token that authorizes\nthe connection. Format: `projects/*/secrets/*/versions/*`.", - "type": "string" - }, - "username": { - "description": "Output only. The username associated with this token.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "oauthTokenSecretVersion" - ] - }, - "GitHubEnterpriseConfig": { - "description": "Configuration for connections to an instance of GitHub Enterprise.", - "type": "object", - "properties": { - "hostUri": { - "description": "Required. The URI of the GitHub Enterprise host this connection is for.", - "type": "string" - }, - "appId": { - "description": "Optional. ID of the GitHub App created from the manifest.", - "type": "string", - "format": "int64" - }, - "appSlug": { - "description": "Output only. The URL-friendly name of the GitHub App.", - "readOnly": true, - "type": "string" - }, - "privateKeySecretVersion": { - "description": "Optional. SecretManager resource containing the private key of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", - "type": "string" - }, - "webhookSecretSecretVersion": { - "description": "Optional. SecretManager resource containing the webhook secret of the GitHub App,\nformatted as `projects/*/secrets/*/versions/*`.", - "type": "string" - }, - "appInstallationId": { - "description": "Optional. ID of the installation of the GitHub App.", - "type": "string", - "format": "int64" - }, - "installationUri": { - "description": "Output only. The URI to navigate to in order to manage the installation associated\nwith this GitHubEnterpriseConfig.", - "readOnly": true, - "type": "string" - }, - "serviceDirectoryConfig": { - "description": "Optional. Configuration for using Service Directory to privately connect to a GitHub\nEnterprise server. This should only be set if the GitHub Enterprise server\nis hosted on-premises and not reachable by public internet. If this field\nis left empty, calls to the GitHub Enterprise server will be made over the\npublic internet.", - "allOf": [{ - "$ref": "#/components/schemas/ServiceDirectoryConfig" - }] - }, - "serverVersion": { - "description": "Output only. GitHub Enterprise version installed at the host_uri.", - "readOnly": true, - "type": "string" - }, - "sslCaCertificate": { - "description": "Optional. SSL certificate to use for requests to GitHub Enterprise.", - "type": "string" - } - }, - "required": [ - "hostUri" - ] - }, - "ServiceDirectoryConfig": { - "description": "ServiceDirectoryConfig represents Service Directory configuration for a\nconnection.", - "type": "object", - "properties": { - "service": { - "description": "Required. The Service Directory service name.\nFormat:\nprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", - "type": "string" - } - }, - "required": [ - "service" - ] - }, - "GitLabConfig": { - "description": "Configuration for connections to gitlab.com.", - "type": "object", - "properties": { - "webhookSecretSecretVersion": { - "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", - "x-google-immutable": true, - "type": "string" - }, - "readAuthorizerCredential": { - "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "authorizerCredential": { - "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - } - }, - "required": [ - "webhookSecretSecretVersion", - "readAuthorizerCredential", - "authorizerCredential" - ] - }, - "UserCredential": { - "description": "Represents a personal access token that authorized the Connection,\nand associated metadata.", - "type": "object", - "properties": { - "userTokenSecretVersion": { - "description": "Required. A SecretManager resource containing the user token that authorizes\nthe Developer Connect connection. Format:\n`projects/*/secrets/*/versions/*`.", - "type": "string" - }, - "username": { - "description": "Output only. The username associated with this token.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "userTokenSecretVersion" - ] - }, - "GitLabEnterpriseConfig": { - "description": "Configuration for connections to an instance of GitLab Enterprise.", - "type": "object", - "properties": { - "hostUri": { - "description": "Required. The URI of the GitLab Enterprise host this connection is for.", - "type": "string" - }, - "webhookSecretSecretVersion": { - "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project,\nformatted as `projects/*/secrets/*/versions/*`. This is used to validate\nwebhooks.", - "x-google-immutable": true, - "type": "string" - }, - "readAuthorizerCredential": { - "description": "Required. A GitLab personal access token with the minimum `read_api` scope access\nand a minimum role of `reporter`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "authorizerCredential": { - "description": "Required. A GitLab personal access token with the minimum `api` scope access\nand a minimum role of `maintainer`. The GitLab Projects visible to this\nPersonal Access Token will control which Projects Developer Connect has\naccess to.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "serviceDirectoryConfig": { - "description": "Optional. Configuration for using Service Directory to privately connect to a GitLab\nEnterprise instance. This should only be set if the GitLab Enterprise\nserver is hosted on-premises and not reachable by public internet. If this\nfield is left empty, calls to the GitLab Enterprise server will be made\nover the public internet.", - "allOf": [{ - "$ref": "#/components/schemas/ServiceDirectoryConfig" - }] - }, - "sslCaCertificate": { - "description": "Optional. SSL Certificate Authority certificate to use for requests to GitLab\nEnterprise instance.", - "type": "string" - }, - "serverVersion": { - "description": "Output only. Version of the GitLab Enterprise server running on the `host_uri`.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "hostUri", - "webhookSecretSecretVersion", - "readAuthorizerCredential", - "authorizerCredential" - ] - }, - "BitbucketDataCenterConfig": { - "description": "Configuration for connections to an instance of Bitbucket Data Center.", - "type": "object", - "properties": { - "hostUri": { - "description": "Required. The URI of the Bitbucket Data Center host this connection is for.", - "type": "string" - }, - "webhookSecretSecretVersion": { - "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate webhooks.", - "x-google-immutable": true, - "type": "string" - }, - "readAuthorizerCredential": { - "description": "Required. An http access token with the minimum `Repository read` access.\nIt's recommended to use a system account to generate the credentials.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "authorizerCredential": { - "description": "Required. An http access token with the minimum `Repository admin` scope access. This\nis needed to create webhooks. It's recommended to use a system account to\ngenerate these credentials.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "serviceDirectoryConfig": { - "description": "Optional. Configuration for using Service Directory to privately connect to a\nBitbucket Data Center instance. This should only be set if the Bitbucket\nData Center is hosted on-premises and not reachable by public internet. If\nthis field is left empty, calls to the Bitbucket Data Center will be made\nover the public internet.", - "allOf": [{ - "$ref": "#/components/schemas/ServiceDirectoryConfig" - }] - }, - "sslCaCertificate": { - "description": "Optional. SSL certificate authority to trust when making requests to Bitbucket Data\nCenter.", - "type": "string" - }, - "serverVersion": { - "description": "Output only. Version of the Bitbucket Data Center server running on the `host_uri`.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "hostUri", - "webhookSecretSecretVersion", - "readAuthorizerCredential", - "authorizerCredential" - ] - }, - "BitbucketCloudConfig": { - "description": "Configuration for connections to an instance of Bitbucket Cloud.", - "type": "object", - "properties": { - "workspace": { - "description": "Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.", - "type": "string" - }, - "webhookSecretSecretVersion": { - "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook\nevents, formatted as `projects/*/secrets/*/versions/*`. This is used to\nvalidate and create webhooks.", - "x-google-immutable": true, - "type": "string" - }, - "readAuthorizerCredential": { - "description": "Required. An access token with the minimum `repository` access.\nIt can either be a workspace, project or repository access token.\nIt's recommended to use a system account to generate the credentials.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - }, - "authorizerCredential": { - "description": "Required. An access token with the minimum `repository`, `pullrequest` and `webhook`\nscope access. It can either be a workspace, project or repository access\ntoken. This is needed to create webhooks. It's recommended to use a system\naccount to generate these credentials.", - "allOf": [{ - "$ref": "#/components/schemas/UserCredential" - }] - } - }, - "required": [ - "workspace", - "webhookSecretSecretVersion", - "readAuthorizerCredential", - "authorizerCredential" - ] - }, - "InstallationState": { - "description": "Describes stage and necessary actions to be taken by the\nuser to complete the installation. Used for GitHub and GitHub Enterprise\nbased connections.", - "type": "object", - "properties": { - "stage": { - "description": "Output only. Current step of the installation process.", - "readOnly": true, - "type": "string", - "x-google-enum-descriptions": [ - "No stage specified.", - "Only for GitHub Enterprise. An App creation has been requested.\nThe user needs to confirm the creation in their GitHub enterprise host.", - "User needs to authorize the GitHub (or Enterprise) App via OAuth.", - "User needs to follow the link to install the GitHub (or Enterprise) App.", - "Installation process has been completed." - ], - "enum": [ - "STAGE_UNSPECIFIED", - "PENDING_CREATE_APP", - "PENDING_USER_OAUTH", - "PENDING_INSTALL_APP", - "COMPLETE" - ] - }, - "message": { - "description": "Output only. Message of what the user should do next to continue the installation.\nEmpty string if the installation is already complete.", - "readOnly": true, - "type": "string" - }, - "actionUri": { - "description": "Output only. Link to follow for next action. Empty string if the installation is already\ncomplete.", - "readOnly": true, - "type": "string" - } - } - }, - "CryptoKeyConfig": { - "description": "The crypto key configuration. This field is used by the Customer-managed\nencryption keys (CMEK) feature.", - "type": "object", - "properties": { - "keyReference": { - "description": "Required. The name of the key which is used to encrypt/decrypt customer data. For key\nin Cloud KMS, the key should be in the format of\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string" - } - }, - "required": [ - "keyReference" - ] - }, - "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "type": "object", - "properties": { - "createTime": { - "description": "Output only. The time the operation was created.", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "Output only. The time the operation finished running.", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "target": { - "description": "Output only. Server-defined resource path for the target of the operation.", - "readOnly": true, - "type": "string" - }, - "verb": { - "description": "Output only. Name of the verb executed by the operation.", - "readOnly": true, - "type": "string" - }, - "statusMessage": { - "description": "Output only. Human-readable status of the operation, if any.", - "readOnly": true, - "type": "string" - }, - "requestedCancellation": { - "description": "Output only. Identifies whether the user has requested cancellation\nof the operation. Operations that have been cancelled successfully\nhave google.longrunning.Operation.error value with a\ngoogle.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, - "apiVersion": { - "description": "Output only. API version used to start the operation.", - "readOnly": true, - "type": "string" - } - } - }, - "GitRepositoryLink": { - "description": "Message describing the GitRepositoryLink object", - "type": "object", - "properties": { - "name": { - "description": "Identifier. Resource name of the repository, in the format\n`projects/*/locations/*/connections/*/gitRepositoryLinks/*`.", - "x-google-identifier": true, - "type": "string" - }, - "cloneUri": { - "description": "Required. Git Clone URI.", - "type": "string" - }, - "createTime": { - "description": "Output only. [Output only] Create timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "updateTime": { - "description": "Output only. [Output only] Update timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "deleteTime": { - "description": "Output only. [Output only] Delete timestamp", - "readOnly": true, - "type": "string", - "format": "date-time" - }, - "labels": { - "description": "Optional. Labels as key value pairs", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "etag": { - "description": "Optional. This checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.", - "type": "string" - }, - "reconciling": { - "description": "Output only. Set to true when the connection is being set up or updated in the\nbackground.", - "readOnly": true, - "type": "boolean" - }, - "annotations": { - "description": "Optional. Allows clients to store small amounts of arbitrary data.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "uid": { - "description": "Output only. A system-assigned unique identifier for the GitRepositoryLink.", - "readOnly": true, - "type": "string" - }, - "webhookId": { - "description": "Output only. External ID of the webhook created for the repository.", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "cloneUri" - ] - }, - "ListGitRepositoryLinksResponse": { - "description": "Message for response to listing GitRepositoryLinks", - "type": "object", - "properties": { - "gitRepositoryLinks": { - "description": "The list of GitRepositoryLinks", - "type": "array", - "items": { - "$ref": "#/components/schemas/GitRepositoryLink" - } - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "FetchReadWriteTokenRequest": { - "description": "Message for fetching SCM read/write token.", - "type": "object" - }, - "FetchReadWriteTokenResponse": { - "description": "Message for responding to get read/write token.", - "type": "object", - "properties": { - "token": { - "description": "The token content.", - "type": "string" - }, - "expirationTime": { - "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", - "type": "string", - "format": "date-time" - }, - "gitUsername": { - "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", - "type": "string" - } - } - }, - "FetchReadTokenRequest": { - "description": "Message for fetching SCM read token.", - "type": "object" - }, - "FetchReadTokenResponse": { - "description": "Message for responding to get read token.", - "type": "object", - "properties": { - "token": { - "description": "The token content.", - "type": "string" - }, - "expirationTime": { - "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", - "type": "string", - "format": "date-time" - }, - "gitUsername": { - "description": "The git_username to specify when making a git clone with the\ntoken. For example, for GitHub GitRepositoryLinks, this would be\n\"x-access-token\"", - "type": "string" - } - } - }, - "FetchLinkableGitRepositoriesResponse": { - "description": "Response message for FetchLinkableGitRepositories.", - "type": "object", - "properties": { - "linkableGitRepositories": { - "description": "The git repositories that can be linked to the connection.", - "type": "array", - "items": { - "$ref": "#/components/schemas/LinkableGitRepository" - } - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - } - } - }, - "LinkableGitRepository": { - "description": "LinkableGitRepository represents a git repository that can be linked to a\nconnection.", - "type": "object", - "properties": { - "cloneUri": { - "description": "The clone uri of the repository.", - "type": "string" - } - } - }, - "FetchGitHubInstallationsResponse": { - "description": "Response of fetching github installations.", - "type": "object", - "properties": { - "installations": { - "description": "List of installations available to the OAuth user (for github.com)\nor all the installations (for GitHub enterprise).", - "type": "array", - "items": { - "$ref": "#/components/schemas/Installation" - } - } - } - }, - "Installation": { - "description": "Represents an installation of the GitHub App.", - "type": "object", - "properties": { - "id": { - "description": "ID of the installation in GitHub.", - "type": "string", - "format": "int64" - }, - "name": { - "description": "Name of the GitHub user or organization that owns this installation.", - "type": "string" - }, - "type": { - "description": "Either \"user\" or \"organization\".", - "type": "string" - } - } - }, - "FetchGitRefsResponse": { - "description": "Response for fetching git refs.", - "type": "object", - "properties": { - "refNames": { - "description": "Name of the refs fetched.", - "type": "array", - "items": { - "type": "string" - } - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - } - } - }, - "ProcessGitHubEnterpriseWebhookRequest": { - "description": "RPC request object accepted by the ProcessGitHubEnterpriseWebhook RPC method.", - "type": "object", - "properties": { - "body": { - "description": "Required. HTTP request body.", - "allOf": [{ - "$ref": "#/components/schemas/HttpBody" - }] - } - }, - "required": [ - "body" - ] - }, - "HttpBody": { - "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", - "type": "object", - "properties": { - "contentType": { - "description": "The HTTP Content-Type header value specifying the content type of the body.", - "type": "string" - }, - "data": { - "description": "The HTTP request/response body as raw binary.", - "type": "string", - "format": "byte" - }, - "extensions": { - "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "ProcessGitLabEnterpriseWebhookRequest": { - "description": "RPC request object accepted by the ProcessGitLabEnterpriseWebhook RPC method.", - "type": "object", - "properties": { - "body": { - "description": "Required. HTTP request body.", - "allOf": [{ - "$ref": "#/components/schemas/HttpBody" - }] - } - }, - "required": [ - "body" - ] - }, - "ProcessGitLabWebhookRequest": { - "description": "RPC request object accepted by the ProcessGitLabWebhook RPC method.", - "type": "object", - "properties": { - "body": { - "description": "Required. HTTP request body.", - "allOf": [{ - "$ref": "#/components/schemas/HttpBody" - }] - } - }, - "required": [ - "body" - ] - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Location" - } - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - } - }, - "Location": { - "description": "A resource that represents a Google Cloud location.", - "type": "object", - "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" - }, - "displayName": { - "description": "The friendly name for this location, typically a nearby city name.\nFor example, \"Tokyo\".", - "type": "string" - }, - "labels": { - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "BaseOperation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should be a resource name ending with `operations/{unique_id}`.", - "type": "string" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "allOf": [{ - "$ref": "#/components/schemas/Status" - }] - } - } - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "response": { - "description": "The normal, successful response of the operation. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - ] - }, - "CreateConnectionOperation": { - "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/components/schemas/OperationMetadata" - }, - "response": { - "$ref": "#/components/schemas/Connection" - } - } - } - ] - }, - "UpdateConnectionOperation": { - "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/components/schemas/OperationMetadata" - }, - "response": { - "$ref": "#/components/schemas/Connection" - } - } - } - ] - }, - "DeleteConnectionOperation": { - "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/components/schemas/OperationMetadata" - }, - "response": { - "$ref": "#/components/schemas/Empty" - } - } - } - ] - }, - "CreateGitRepositoryLinkOperation": { - "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/components/schemas/OperationMetadata" - }, - "response": { - "$ref": "#/components/schemas/GitRepositoryLink" - } - } - } - ] - }, - "DeleteGitRepositoryLinkOperation": { - "description": "This resource represents a long-running operation where metadata and response fields are strongly typed.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseOperation" - }, - { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/components/schemas/OperationMetadata" - }, - "response": { - "$ref": "#/components/schemas/Empty" - } - } - } - ] - } - } - } - , - "externalDocs": { - "description": "Find more info here.", - "url": "http://cloud.google.com/developer-connect/docs/overview" - } -}