Cloud Build API (cloudbuild:v2)

2023-09-06

20 new methods | New API

Additions

    Methods
  • cloudbuild.projects.locations.connections.create

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameter Order: parent

      Description: Creates a Connection.

      Path: v2/{+parent}/connections

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections

      Parameters:

        connectionId

          Type: string

          Description: Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.

          Location: query

        parent

          Pattern: ^projects/[^/]+/locations/[^/]+$

          Type: string

          Location: path

          Description: Required. Project and location where the connection will be created. Format: `projects/*/locations/*`.

          Required: Yes

      HTTP Method: POST

  • cloudbuild.projects.locations.connections.list

      Parameter Order: parent

      Description: Lists Connections in a given project and location.

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections

      Path: v2/{+parent}/connections

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameters:

        pageToken

          Type: string

          Description: Page start.

          Location: query

        parent

          Type: string

          Description: Required. The parent, which owns this collection of Connections. Format: `projects/*/locations/*`.

          Required: Yes

          Location: path

          Pattern: ^projects/[^/]+/locations/[^/]+$

        pageSize

          Type: integer

          Format: int32

          Description: Number of results to return in the list.

          Location: query

      HTTP Method: GET

  • cloudbuild.projects.locations.connections.delete

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}

      Path: v2/{+name}

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Deletes a single connection.

      HTTP Method: DELETE

      Parameters:

        name

          Type: string

          Location: path

          Description: Required. The name of the Connection to delete. Format: `projects/*/locations/*/connections/*`.

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

        validateOnly

          Description: If set, validate the request, but do not actually post it.

          Type: boolean

          Location: query

        etag

          Description: The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned.

          Type: string

          Location: query

  • cloudbuild.projects.locations.connections.getIamPolicy

      Description: Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

      Parameter Order: resource

      Path: v2/{+resource}:getIamPolicy

      Scopes: https://www.googleapis.com/auth/cloud-platform

      HTTP Method: GET

      Parameters:

        resource

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Required: Yes

          Type: string

          Location: path

          Description: REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

        options.requestedPolicyVersion

          Description: Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

          Location: query

          Type: integer

          Format: int32

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy

  • cloudbuild.projects.locations.connections.patch

      Parameters:

        name

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Location: path

          Description: Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.

          Type: string

        updateMask

          Description: The list of fields to be updated.

          Location: query

          Format: google-fieldmask

          Type: string

        etag

          Type: string

          Location: query

          Description: The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned.

        allowMissing

          Type: boolean

          Location: query

          Description: If set to true, and the connection is not found a new connection will be created. In this situation `update_mask` is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties).

      Path: v2/{+name}

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Updates a single connection.

      HTTP Method: PATCH

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}

      Parameter Order: name

  • cloudbuild.projects.locations.connections.fetchLinkableRepositories

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:fetchLinkableRepositories

      Parameters:

        connection

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Type: string

          Location: path

          Description: Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`.

        pageSize

          Format: int32

          Type: integer

          Location: query

          Description: Number of results to return in the list. Default to 20.

        pageToken

          Type: string

          Description: Page start.

          Location: query

      Description: FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.

      Path: v2/{+connection}:fetchLinkableRepositories

      Parameter Order: connection

      HTTP Method: GET

  • cloudbuild.projects.locations.connections.processWebhook

      Description: ProcessWebhook is called by the external SCM for notifying of events.

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections:processWebhook

      Path: v2/{+parent}/connections:processWebhook

      HTTP Method: POST

      Parameter Order: parent

      Parameters:

        parent

          Type: string

          Required: Yes

          Location: path

          Description: Required. Project and location where the webhook will be received. Format: `projects/*/locations/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+$

        webhookKey

          Type: string

          Location: query

          Description: Arbitrary additional key to find the maching repository for a webhook event if needed.

  • cloudbuild.projects.locations.connections.setIamPolicy

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy

      Parameters:

        resource

          Location: path

          Type: string

          Description: REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Required: Yes

      HTTP Method: POST

      Path: v2/{+resource}:setIamPolicy

      Parameter Order: resource

  • cloudbuild.projects.locations.connections.get

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}

      Parameters:

        name

          Location: path

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Type: string

          Description: Required. The name of the Connection to retrieve. Format: `projects/*/locations/*/connections/*`.

          Required: Yes

      Description: Gets details of a single connection.

      Scopes: https://www.googleapis.com/auth/cloud-platform

      HTTP Method: GET

      Parameter Order: name

      Path: v2/{+name}

  • cloudbuild.projects.locations.connections.testIamPermissions

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions

      Description: Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameter Order: resource

      HTTP Method: POST

      Parameters:

        resource

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Required: Yes

          Location: path

          Type: string

          Description: REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

      Path: v2/{+resource}:testIamPermissions

  • cloudbuild.projects.locations.connections.repositories.create

      Path: v2/{+parent}/repositories

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories

      HTTP Method: POST

      Description: Creates a Repository.

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameters:

        parent

          Required: Yes

          Type: string

          Location: path

          Description: Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

        repositoryId

          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 -._~%!$&'()*+,;=@.

          Type: string

          Location: query

      Parameter Order: parent

  • cloudbuild.projects.locations.connections.repositories.batchCreate

      Path: v2/{+parent}/repositories:batchCreate

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories:batchCreate

      Description: Creates multiple repositories inside a connection.

      Parameters:

        parent

          Required: Yes

          Description: Required. The connection to contain all the repositories being created. Format: projects/*/locations/*/connections/* The parent field in the CreateRepositoryRequest messages must either be empty or match this field.

          Type: string

          Location: path

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

      HTTP Method: POST

      Parameter Order: parent

      Scopes: https://www.googleapis.com/auth/cloud-platform

  • cloudbuild.projects.locations.connections.repositories.delete

      Path: v2/{+name}

      Description: Deletes a single repository.

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameters:

        name

          Location: path

          Type: string

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$

          Description: Required. The name of the Repository to delete. Format: `projects/*/locations/*/connections/*/repositories/*`.

        etag

          Location: query

          Type: string

          Description: The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned.

        validateOnly

          Type: boolean

          Location: query

          Description: If set, validate the request, but do not actually post it.

      HTTP Method: DELETE

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}

      Parameter Order: name

  • cloudbuild.projects.locations.connections.repositories.get

      Parameter Order: name

      HTTP Method: GET

      Parameters:

        name

          Required: Yes

          Description: Required. The name of the Repository to retrieve. Format: `projects/*/locations/*/connections/*/repositories/*`.

          Type: string

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$

          Location: path

      Description: Gets details of a single repository.

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Path: v2/{+name}

  • cloudbuild.projects.locations.connections.repositories.accessReadToken

      Scopes: https://www.googleapis.com/auth/cloud-platform

      HTTP Method: POST

      Path: v2/{+repository}:accessReadToken

      Parameters:

        repository

          Location: path

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$

          Type: string

          Required: Yes

          Description: Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.

      Parameter Order: repository

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadToken

      Description: Fetches read token of a given repository.

  • cloudbuild.projects.locations.connections.repositories.list

      Parameter Order: parent

      Parameters:

        parent

          Required: Yes

          Location: path

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+$

          Type: string

          Description: Required. The parent, which owns this collection of Repositories. Format: `projects/*/locations/*/connections/*`.

        pageToken

          Description: Page start.

          Location: query

          Type: string

        pageSize

          Type: integer

          Description: Number of results to return in the list.

          Format: int32

          Location: query

        filter

          Description: A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. `remote_uri:"https://github.com*"`.

          Type: string

          Location: query

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories

      Path: v2/{+parent}/repositories

      HTTP Method: GET

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Lists Repositories in a given connection.

  • cloudbuild.projects.locations.connections.repositories.accessReadWriteToken

      Parameter Order: repository

      Parameters:

        repository

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$

          Description: Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.

          Location: path

          Type: string

      Description: Fetches read/write token of a given repository.

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadWriteToken

      HTTP Method: POST

      Path: v2/{+repository}:accessReadWriteToken

  • cloudbuild.projects.locations.connections.repositories.fetchGitRefs

      Parameters:

        pageToken

          Description: Optional. Page start.

          Type: string

          Location: query

        refType

          Enum:

        • REF_TYPE_UNSPECIFIED
        • TAG
        • BRANCH
        • Location: query

          Enum Descriptions:

        • No type specified.
        • To fetch tags.
        • To fetch branches.
        • Description: Type of refs to fetch

          Type: string

        pageSize

          Format: int32

          Location: query

          Type: integer

          Description: Optional. Number of results to return in the list. Default to 100.

        repository

          Description: Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$

          Location: path

          Type: string

      Path: v2/{+repository}:fetchGitRefs

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:fetchGitRefs

      Parameter Order: repository

      HTTP Method: GET

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Fetch the list of branches or tags for a given repository.

  • cloudbuild.projects.locations.operations.cancel

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel

      Parameters:

        name

          Location: path

          Required: Yes

          Pattern: ^projects/[^/]+/locations/[^/]+/operations/[^/]+$

          Description: The name of the operation resource to be cancelled.

          Type: string

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameter Order: name

      Path: v2/{+name}:cancel

      Description: Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.

      HTTP Method: POST

  • cloudbuild.projects.locations.operations.get

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Parameter Order: name

      HTTP Method: GET

      Flat Path: v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}

      Description: Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

      Parameters:

        name

          Type: string

          Pattern: ^projects/[^/]+/locations/[^/]+/operations/[^/]+$

          Required: Yes

          Description: The name of the operation resource.

          Location: path

      Path: v2/{+name}