@googleapis/cloudbuild
Version:
1,135 lines (1,126 loc) • 204 kB
text/typescript
// Copyright 2020 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
import {
OAuth2Client,
JWT,
Compute,
UserRefreshClient,
BaseExternalAccountClient,
GaxiosResponseWithHTTP2,
GoogleConfigurable,
createAPIRequest,
MethodOptions,
StreamMethodOptions,
GlobalOptions,
GoogleAuth,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
import {Readable} from 'stream';
export namespace cloudbuild_v2 {
export interface Options extends GlobalOptions {
version: 'v2';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| BaseExternalAccountClient
| GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Cloud Build API
*
* Creates and manages builds on Google Cloud Platform.
*
* @example
* ```js
* const {google} = require('googleapis');
* const cloudbuild = google.cloudbuild('v2');
* ```
*/
export class Cloudbuild {
context: APIRequestContext;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this.context = {
_options: options || {},
google,
};
this.projects = new Resource$Projects(this.context);
}
}
/**
* Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.
*/
export interface Schema$AuditConfig {
/**
* The configuration for logging of each type of permission.
*/
auditLogConfigs?: Schema$AuditLogConfig[];
/**
* Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
*/
service?: string | null;
}
/**
* Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
*/
export interface Schema$AuditLogConfig {
/**
* Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
*/
exemptedMembers?: string[] | null;
/**
* The log type that this config enables.
*/
logType?: string | null;
}
/**
* Message for creating repositoritories in batch.
*/
export interface Schema$BatchCreateRepositoriesRequest {
/**
* Required. The request messages specifying the repositories to create.
*/
requests?: Schema$CreateRepositoryRequest[];
}
/**
* Message for response of creating repositories in batch.
*/
export interface Schema$BatchCreateRepositoriesResponse {
/**
* Repository resources created.
*/
repositories?: Schema$Repository[];
}
/**
* Associates `members`, or principals, with a `role`.
*/
export interface Schema$Binding {
/**
* The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
condition?: Schema$Expr;
/**
* Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid\}.svc.id.goog[{namespace\}/{kubernetes-sa\}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/group/{group_id\}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/x`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/group/{group_id\}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/x`: All identities in a workload identity pool. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
*/
members?: string[] | null;
/**
* Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
*/
role?: string | null;
}
/**
* Configuration for connections to Bitbucket Cloud.
*/
export interface Schema$BitbucketCloudConfig {
/**
* Required. An access token with the `webhook`, `repository`, `repository:admin` and `pullrequest` scope access. It can be either a workspace, project or repository access token. It's recommended to use a system account to generate these credentials.
*/
authorizerCredential?: Schema$UserCredential;
/**
* Required. An access token with the `repository` access. It can be either a workspace, project or repository access token. It's recommended to use a system account to generate the credentials.
*/
readAuthorizerCredential?: Schema$UserCredential;
/**
* Required. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/x/secrets/x/versions/x`.
*/
webhookSecretSecretVersion?: string | null;
/**
* Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.
*/
workspace?: string | null;
}
/**
* Configuration for connections to Bitbucket Data Center.
*/
export interface Schema$BitbucketDataCenterConfig {
/**
* Required. A http access token with the `REPO_ADMIN` scope access.
*/
authorizerCredential?: Schema$UserCredential;
/**
* Required. The URI of the Bitbucket Data Center instance or cluster this connection is for.
*/
hostUri?: string | null;
/**
* Required. A http access token with the `REPO_READ` access.
*/
readAuthorizerCredential?: Schema$UserCredential;
/**
* Output only. Version of the Bitbucket Data Center running on the `host_uri`.
*/
serverVersion?: string | null;
/**
* Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center. This should only be set if the Bitbucket Data Center is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the Bitbucket Data Center will be made over the public internet.
*/
serviceDirectoryConfig?: Schema$GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig;
/**
* Optional. SSL certificate to use for requests to the Bitbucket Data Center.
*/
sslCa?: string | null;
/**
* Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/x/secrets/x/versions/x`.
*/
webhookSecretSecretVersion?: string | null;
}
/**
* The request message for Operations.CancelOperation.
*/
export interface Schema$CancelOperationRequest {}
/**
* ChildStatusReference is used to point to the statuses of individual TaskRuns and Runs within this PipelineRun.
*/
export interface Schema$ChildStatusReference {
/**
* Name is the name of the TaskRun or Run this is referencing.
*/
name?: string | null;
/**
* PipelineTaskName is the name of the PipelineTask this is referencing.
*/
pipelineTaskName?: string | null;
/**
* Output only. Type of the child reference.
*/
type?: string | null;
/**
* WhenExpressions is the list of checks guarding the execution of the PipelineTask
*/
whenExpressions?: Schema$WhenExpression[];
}
/**
* A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, Bitbucket Cloud or GitLab.
*/
export interface Schema$Connection {
/**
* Optional. Allows clients to store small amounts of arbitrary data.
*/
annotations?: {[key: string]: string} | null;
/**
* Configuration for connections to Bitbucket Cloud.
*/
bitbucketCloudConfig?: Schema$BitbucketCloudConfig;
/**
* Configuration for connections to Bitbucket Data Center.
*/
bitbucketDataCenterConfig?: Schema$BitbucketDataCenterConfig;
/**
* Output only. Server assigned timestamp for when the connection was created.
*/
createTime?: string | null;
/**
* 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.
*/
disabled?: boolean | null;
/**
* 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.
*/
etag?: string | null;
/**
* Configuration for connections to github.com.
*/
githubConfig?: Schema$GitHubConfig;
/**
* Configuration for connections to an instance of GitHub Enterprise.
*/
githubEnterpriseConfig?: Schema$GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig;
/**
* Configuration for connections to gitlab.com or an instance of GitLab Enterprise.
*/
gitlabConfig?: Schema$GoogleDevtoolsCloudbuildV2GitLabConfig;
/**
* Output only. Installation state of the Connection.
*/
installationState?: Schema$InstallationState;
/**
* Immutable. The resource name of the connection, in the format `projects/{project\}/locations/{location\}/connections/{connection_id\}`.
*/
name?: string | null;
/**
* Output only. Set to true when the connection is being set up or updated in the background.
*/
reconciling?: boolean | null;
/**
* Output only. Server assigned timestamp for when the connection was updated.
*/
updateTime?: string | null;
}
/**
* Message for creating a Repository.
*/
export interface Schema$CreateRepositoryRequest {
/**
* 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.
*/
parent?: string | null;
/**
* Required. The repository to create.
*/
repository?: Schema$Repository;
/**
* 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 -._~%!$&'()*+,;=@.
*/
repositoryId?: string | null;
}
/**
* EmbeddedTask defines a Task that is embedded in a Pipeline.
*/
export interface Schema$EmbeddedTask {
/**
* User annotations. See https://google.aip.dev/128#annotations
*/
annotations?: {[key: string]: string} | null;
/**
* Spec to instantiate this TaskRun.
*/
taskSpec?: Schema$TaskSpec;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {}
/**
* Represents an empty Volume source.
*/
export interface Schema$EmptyDirVolumeSource {}
/**
* Environment variable.
*/
export interface Schema$EnvVar {
/**
* Name of the environment variable.
*/
name?: string | null;
/**
* Value of the environment variable.
*/
value?: string | null;
}
/**
* ExecAction describes a "run in container" action.
*/
export interface Schema$ExecAction {
/**
* Optional. Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. +optional
*/
command?: string[] | null;
}
/**
* Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
*/
export interface Schema$Expr {
/**
* Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
*/
description?: string | null;
/**
* Textual representation of an expression in Common Expression Language syntax.
*/
expression?: string | null;
/**
* Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
*/
location?: string | null;
/**
* Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
*/
title?: string | null;
}
/**
* Response for fetching git refs
*/
export interface Schema$FetchGitRefsResponse {
/**
* A token identifying a page of results the server should return.
*/
nextPageToken?: string | null;
/**
* Name of the refs fetched.
*/
refNames?: string[] | null;
}
/**
* Response message for FetchLinkableRepositories.
*/
export interface Schema$FetchLinkableRepositoriesResponse {
/**
* A token identifying a page of results the server should return.
*/
nextPageToken?: string | null;
/**
* repositories ready to be created.
*/
repositories?: Schema$Repository[];
}
/**
* Message for fetching SCM read token.
*/
export interface Schema$FetchReadTokenRequest {}
/**
* Message for responding to get read token.
*/
export interface Schema$FetchReadTokenResponse {
/**
* Expiration timestamp. Can be empty if unknown or non-expiring.
*/
expirationTime?: string | null;
/**
* The token content.
*/
token?: string | null;
}
/**
* Message for fetching SCM read/write token.
*/
export interface Schema$FetchReadWriteTokenRequest {}
/**
* Message for responding to get read/write token.
*/
export interface Schema$FetchReadWriteTokenResponse {
/**
* Expiration timestamp. Can be empty if unknown or non-expiring.
*/
expirationTime?: string | null;
/**
* The token content.
*/
token?: string | null;
}
/**
* Configuration for connections to github.com.
*/
export interface Schema$GitHubConfig {
/**
* Optional. GitHub App installation id.
*/
appInstallationId?: string | null;
/**
* Optional. OAuth credential of the account that authorized the Cloud Build GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the Cloud Build GitHub App.
*/
authorizerCredential?: Schema$OAuthCredential;
}
/**
* Conditions defines a readiness condition for a Knative resource.
*/
export interface Schema$GoogleDevtoolsCloudbuildV2Condition {
/**
* LastTransitionTime is the last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string | null;
/**
* A human readable message indicating details about the transition.
*/
message?: string | null;
/**
* The reason for the condition's last transition.
*/
reason?: string | null;
/**
* Severity with which to treat failures of this type of condition.
*/
severity?: string | null;
/**
* Status of the condition.
*/
status?: string | null;
/**
* Type of condition.
*/
type?: string | null;
}
/**
* Configuration for connections to an instance of GitHub Enterprise.
*/
export interface Schema$GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig {
/**
* Required. API Key used for authentication of webhook events.
*/
apiKey?: string | null;
/**
* Optional. Id of the GitHub App created from the manifest.
*/
appId?: string | null;
/**
* Optional. ID of the installation of the GitHub App.
*/
appInstallationId?: string | null;
/**
* Optional. The URL-friendly name of the GitHub App.
*/
appSlug?: string | null;
/**
* Required. The URI of the GitHub Enterprise host this connection is for.
*/
hostUri?: string | null;
/**
* Optional. SecretManager resource containing the private key of the GitHub App, formatted as `projects/x/secrets/x/versions/x`.
*/
privateKeySecretVersion?: string | null;
/**
* Output only. GitHub Enterprise version installed at the host_uri.
*/
serverVersion?: string | null;
/**
* Optional. Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet.
*/
serviceDirectoryConfig?: Schema$GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig;
/**
* Optional. SSL certificate to use for requests to GitHub Enterprise.
*/
sslCa?: string | null;
/**
* Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/x/secrets/x/versions/x`.
*/
webhookSecretSecretVersion?: string | null;
}
/**
* Configuration for connections to gitlab.com or an instance of GitLab Enterprise.
*/
export interface Schema$GoogleDevtoolsCloudbuildV2GitLabConfig {
/**
* Required. A GitLab personal access token with the `api` scope access.
*/
authorizerCredential?: Schema$UserCredential;
/**
* Optional. The URI of the GitLab Enterprise host this connection is for. If not specified, the default value is https://gitlab.com.
*/
hostUri?: string | null;
/**
* Required. A GitLab personal access token with the minimum `read_api` scope access.
*/
readAuthorizerCredential?: Schema$UserCredential;
/**
* Output only. Version of the GitLab Enterprise server running on the `host_uri`.
*/
serverVersion?: string | null;
/**
* Optional. Configuration for using Service Directory to privately connect to a GitLab Enterprise server. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet.
*/
serviceDirectoryConfig?: Schema$GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig;
/**
* Optional. SSL certificate to use for requests to GitLab Enterprise.
*/
sslCa?: string | null;
/**
* Required. Immutable. SecretManager resource containing the webhook secret of a GitLab Enterprise project, formatted as `projects/x/secrets/x/versions/x`.
*/
webhookSecretSecretVersion?: string | null;
}
/**
* Represents the metadata of the long-running operation.
*/
export interface Schema$GoogleDevtoolsCloudbuildV2OperationMetadata {
/**
* Output only. API version used to start the operation.
*/
apiVersion?: string | null;
/**
* Output only. The time the operation was created.
*/
createTime?: string | null;
/**
* Output only. The time the operation finished running.
*/
endTime?: string | null;
/**
* Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
*/
requestedCancellation?: boolean | null;
/**
* Output only. Human-readable status of the operation, if any.
*/
statusMessage?: string | null;
/**
* Output only. Server-defined resource path for the target of the operation.
*/
target?: string | null;
/**
* Output only. Name of the verb executed by the operation.
*/
verb?: string | null;
}
/**
* ServiceDirectoryConfig represents Service Directory configuration for a connection.
*/
export interface Schema$GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig {
/**
* Required. The Service Directory service name. Format: projects/{project\}/locations/{location\}/namespaces/{namespace\}/services/{service\}.
*/
service?: string | null;
}
/**
* Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
*/
export interface Schema$HttpBody {
/**
* The HTTP Content-Type header value specifying the content type of the body.
*/
contentType?: string | null;
/**
* The HTTP request/response body as raw binary.
*/
data?: string | null;
/**
* Application specific response metadata. Must be set in the first response for streaming APIs.
*/
extensions?: Array<{[key: string]: any}> | null;
}
/**
* Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.
*/
export interface Schema$InstallationState {
/**
* Output only. Link to follow for next action. Empty string if the installation is already complete.
*/
actionUri?: string | null;
/**
* Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.
*/
message?: string | null;
/**
* Output only. Current step of the installation process.
*/
stage?: string | null;
}
/**
* Message for response to listing Connections.
*/
export interface Schema$ListConnectionsResponse {
/**
* The list of Connections.
*/
connections?: Schema$Connection[];
/**
* A token identifying a page of results the server should return.
*/
nextPageToken?: string | null;
/**
* Locations that could not be reached.
*/
unreachable?: string[] | null;
}
/**
* The response message for Locations.ListLocations.
*/
export interface Schema$ListLocationsResponse {
/**
* A list of locations that matches the specified filter in the request.
*/
locations?: Schema$Location[];
/**
* The standard List next-page token.
*/
nextPageToken?: string | null;
}
/**
* Message for response to listing Repositories.
*/
export interface Schema$ListRepositoriesResponse {
/**
* A token identifying a page of results the server should return.
*/
nextPageToken?: string | null;
/**
* The list of Repositories.
*/
repositories?: Schema$Repository[];
/**
* Locations that could not be reached.
*/
unreachable?: string[] | null;
}
/**
* A resource that represents a Google Cloud location.
*/
export interface Schema$Location {
/**
* The friendly name for this location, typically a nearby city name. For example, "Tokyo".
*/
displayName?: string | null;
/**
* Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\}
*/
labels?: {[key: string]: string} | null;
/**
* The canonical id for this location. For example: `"us-east1"`.
*/
locationId?: string | null;
/**
* Service-specific metadata. For example the available capacity at the given location.
*/
metadata?: {[key: string]: any} | null;
/**
* Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"`
*/
name?: string | null;
}
/**
* Represents an OAuth token of the account that authorized the Connection, and associated metadata.
*/
export interface Schema$OAuthCredential {
/**
* Optional. A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/x/secrets/x/versions/x`.
*/
oauthTokenSecretVersion?: string | null;
/**
* Output only. The username associated to this token.
*/
username?: string | null;
}
/**
* This resource represents a long-running operation that is the result of a network API call.
*/
export interface Schema$Operation {
/**
* If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
*/
done?: boolean | null;
/**
* The error result of the operation in case of failure or cancellation.
*/
error?: Schema$Status;
/**
* Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
*/
metadata?: {[key: string]: any} | null;
/**
* The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`.
*/
name?: string | null;
/**
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*/
response?: {[key: string]: any} | null;
}
/**
* Represents the metadata of the long-running operation.
*/
export interface Schema$OperationMetadata {
/**
* Output only. API version used to start the operation.
*/
apiVersion?: string | null;
/**
* Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
*/
cancelRequested?: boolean | null;
/**
* Output only. The time the operation was created.
*/
createTime?: string | null;
/**
* Output only. The time the operation finished running.
*/
endTime?: string | null;
/**
* Output only. Human-readable status of the operation, if any.
*/
statusDetail?: string | null;
/**
* Output only. Server-defined resource path for the target of the operation.
*/
target?: string | null;
/**
* Output only. Name of the verb executed by the operation.
*/
verb?: string | null;
}
/**
* Param defined with name and value. PipelineRef can be used to refer to a specific instance of a Pipeline.
*/
export interface Schema$Param {
/**
* Name of the parameter.
*/
name?: string | null;
/**
* Value of the parameter.
*/
value?: Schema$ParamValue;
}
/**
* ParamSpec defines parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.
*/
export interface Schema$ParamSpec {
/**
* The default value a parameter takes if no input value is supplied
*/
default?: Schema$ParamValue;
/**
* Description of the ParamSpec
*/
description?: string | null;
/**
* Name of the ParamSpec
*/
name?: string | null;
/**
* Type of ParamSpec
*/
type?: string | null;
}
/**
* Parameter value.
*/
export interface Schema$ParamValue {
/**
* Value of the parameter if type is array.
*/
arrayVal?: string[] | null;
/**
* Optional. Value of the parameter if type is object.
*/
objectVal?: {[key: string]: string} | null;
/**
* Value of the parameter if type is string.
*/
stringVal?: string | null;
/**
* Type of parameter.
*/
type?: string | null;
}
/**
* PipelineRef can be used to refer to a specific instance of a Pipeline.
*/
export interface Schema$PipelineRef {
/**
* Optional. Name of the Pipeline.
*/
name?: string | null;
/**
* Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
*/
params?: Schema$Param[];
/**
* Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource.
*/
resolver?: string | null;
}
/**
* A value produced by a Pipeline.
*/
export interface Schema$PipelineResult {
/**
* Output only. Description of the result.
*/
description?: string | null;
/**
* Output only. Name of the result.
*/
name?: string | null;
/**
* Output only. The type of data that the result holds.
*/
type?: string | null;
/**
* Output only. Value of the result.
*/
value?: Schema$ResultValue;
}
/**
* Message describing PipelineRun object
*/
export interface Schema$PipelineRun {
/**
* User annotations. See https://google.aip.dev/128#annotations
*/
annotations?: {[key: string]: string} | null;
/**
* Output only. List of TaskRun and Run names and PipelineTask names for children of this PipelineRun.
*/
childReferences?: Schema$ChildStatusReference[];
/**
* Output only. Time the pipeline completed.
*/
completionTime?: string | null;
/**
* Output only. Kubernetes Conditions convention for PipelineRun status and error.
*/
conditions?: Schema$GoogleDevtoolsCloudbuildV2Condition[];
/**
* Output only. Time at which the request to create the `PipelineRun` was received.
*/
createTime?: string | null;
/**
* Needed for declarative-friendly resources.
*/
etag?: string | null;
/**
* Output only. FinallyStartTime is when all non-finally tasks have been completed and only finally tasks are being executed. +optional
*/
finallyStartTime?: string | null;
/**
* Output only. GCB default params.
*/
gcbParams?: {[key: string]: string} | null;
/**
* Output only. The `PipelineRun` name with format `projects/{project\}/locations/{location\}/pipelineRuns/{pipeline_run\}`
*/
name?: string | null;
/**
* Params is a list of parameter names and values.
*/
params?: Schema$Param[];
/**
* PipelineRef refer to a specific instance of a Pipeline.
*/
pipelineRef?: Schema$PipelineRef;
/**
* Pipelinerun status the user can provide. Used for cancellation.
*/
pipelineRunStatus?: string | null;
/**
* PipelineSpec defines the desired state of Pipeline.
*/
pipelineSpec?: Schema$PipelineSpec;
/**
* Output only. Inline pipelineSpec yaml string, used by workflow run requests.
*/
pipelineSpecYaml?: string | null;
/**
* Optional. Provenance configuration.
*/
provenance?: Schema$Provenance;
/**
* Output only. The `Record` of this `PipelineRun`. Format: `projects/{project\}/locations/{location\}/results/{result_id\}/records/{record_id\}`
*/
record?: string | null;
/**
* Output only. The exact PipelineSpec used to instantiate the run.
*/
resolvedPipelineSpec?: Schema$PipelineSpec;
/**
* Optional. Output only. List of results written out by the pipeline's containers
*/
results?: Schema$PipelineRunResult[];
/**
* Optional. Security configuration.
*/
security?: Schema$Security;
/**
* Service account used in the Pipeline. Deprecated; please use security.service_account instead.
*/
serviceAccount?: string | null;
/**
* Output only. List of tasks that were skipped due to when expressions evaluating to false.
*/
skippedTasks?: Schema$SkippedTask[];
/**
* Output only. Time the pipeline is actually started.
*/
startTime?: string | null;
/**
* Time after which the Pipeline times out. Currently three keys are accepted in the map pipeline, tasks and finally with Timeouts.pipeline \>= Timeouts.tasks + Timeouts.finally
*/
timeouts?: Schema$TimeoutFields;
/**
* Output only. A unique identifier for the `PipelineRun`.
*/
uid?: string | null;
/**
* Output only. Time at which the request to update the `PipelineRun` was received.
*/
updateTime?: string | null;
/**
* Optional. Worker configuration.
*/
worker?: Schema$Worker;
/**
* Output only. The WorkerPool used to run this PipelineRun.
*/
workerPool?: string | null;
/**
* Output only. The Workflow used to create this PipelineRun.
*/
workflow?: string | null;
/**
* Workspaces is a list of WorkspaceBindings from volumes to workspaces.
*/
workspaces?: Schema$WorkspaceBinding[];
}
/**
* PipelineRunResult used to describe the results of a pipeline
*/
export interface Schema$PipelineRunResult {
/**
* Output only. Name of the TaskRun
*/
name?: string | null;
/**
* Output only. Value of the result.
*/
value?: Schema$ResultValue;
}
/**
* PipelineSpec defines the desired state of Pipeline.
*/
export interface Schema$PipelineSpec {
/**
* List of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline.
*/
finallyTasks?: Schema$PipelineTask[];
/**
* Output only. auto-generated yaml that is output only for display purpose for workflows using pipeline_spec, used by UI/gcloud cli for Workflows.
*/
generatedYaml?: string | null;
/**
* List of parameters.
*/
params?: Schema$ParamSpec[];
/**
* Optional. Output only. List of results written out by the pipeline's containers
*/
results?: Schema$PipelineResult[];
/**
* List of Tasks that execute when this Pipeline is run.
*/
tasks?: Schema$PipelineTask[];
/**
* Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.
*/
workspaces?: Schema$PipelineWorkspaceDeclaration[];
}
/**
* PipelineTask defines a task in a Pipeline.
*/
export interface Schema$PipelineTask {
/**
* Name of the task.
*/
name?: string | null;
/**
* Params is a list of parameter names and values.
*/
params?: Schema$Param[];
/**
* Retries represents how many times this task should be retried in case of task failure.
*/
retries?: number | null;
/**
* RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.)
*/
runAfter?: string[] | null;
/**
* Reference to a specific instance of a task.
*/
taskRef?: Schema$TaskRef;
/**
* Spec to instantiate this TaskRun.
*/
taskSpec?: Schema$EmbeddedTask;
/**
* Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be less than 24h.
*/
timeout?: string | null;
/**
* Conditions that need to be true for the task to run.
*/
whenExpressions?: Schema$WhenExpression[];
/**
* Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
*/
workspaces?: Schema$WorkspacePipelineTaskBinding[];
}
/**
* Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.
*/
export interface Schema$PipelineWorkspaceDeclaration {
/**
* Description is a human readable string describing how the workspace will be used in the Pipeline.
*/
description?: string | null;
/**
* Name is the name of a workspace to be provided by a PipelineRun.
*/
name?: string | null;
/**
* Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required.
*/
optional?: boolean | null;
}
/**
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
*/
export interface Schema$Policy {
/**
* Specifies cloud audit logging configuration for this policy.
*/
auditConfigs?: Schema$AuditConfig[];
/**
* Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
*/
bindings?: Schema$Binding[];
/**
* `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
*/
etag?: string | null;
/**
* Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM al