CloudBuildClient

CloudBuildClient

Creates and manages builds on Google Cloud Platform.

The main concept used by this API is a Build, which describes the location of the source to build, how to build the source, and where to store the built artifacts, if any.

A user can list previously-requested builds or get builds by their ID to determine the status of the build.

Constructor

new CloudBuildClient(optionsopt, gaxInstanceopt)

Construct an instance of CloudBuildClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new CloudBuildClient({fallback: true}, gax);

Members

apiEndpoint

The DNS address for this API service.

apiEndpoint

The DNS address for this API service - same as servicePath.

port

The port for this API service.

scopes

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

The DNS address for this API service.

Methods

(async) checkApproveBuildProgress(name) → {Promise}

Check the status of the long running operation returned by approveBuild().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the target build.
   *  For example: "projects/{$project_id}/builds/{$build_id}"
   */
  // const name = 'abc123'
  /**
   *  Approval decision and metadata.
   */
  // const approvalResult = {}

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callApproveBuild() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await cloudbuildClient.approveBuild(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callApproveBuild();

(async) checkCreateBuildProgress(name) → {Promise}

Check the status of the long running operation returned by createBuild().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent resource where this build will be created.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the project.
   */
  // const projectId = 'abc123'
  /**
   *  Required. Build resource to create.
   */
  // const build = {}

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callCreateBuild() {
    // Construct request
    const request = {
      projectId,
      build,
    };

    // Run request
    const [operation] = await cloudbuildClient.createBuild(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBuild();

(async) checkCreateWorkerPoolProgress(name) → {Promise}

Check the status of the long running operation returned by createWorkerPool().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource where this worker pool will be created.
   *  Format: `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. `WorkerPool` resource to create.
   */
  // const workerPool = {}
  /**
   *  Required. Immutable. The ID to use for the `WorkerPool`, which will become
   *  the final component of the resource name.
   *  This value should be 1-63 characters, and valid characters
   *  are /[a-z][0-9]-/.
   */
  // const workerPoolId = 'abc123'
  /**
   *  If set, validate the request and preview the response, but do not actually
   *  post it.
   */
  // const validateOnly = true

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callCreateWorkerPool() {
    // Construct request
    const request = {
      parent,
      workerPool,
      workerPoolId,
    };

    // Run request
    const [operation] = await cloudbuildClient.createWorkerPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkerPool();

(async) checkDeleteWorkerPoolProgress(name) → {Promise}

Check the status of the long running operation returned by deleteWorkerPool().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `WorkerPool` to delete.
   *  Format:
   *  `projects/{project}/locations/{location}/workerPools/{workerPool}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, it must match the server's etag on the workerpool
   *  for the request to be processed.
   */
  // const etag = 'abc123'
  /**
   *  If set to true, and the `WorkerPool` is not found, the request will succeed
   *  but no action will be taken on the server.
   */
  // const allowMissing = true
  /**
   *  If set, validate the request and preview the response, but do not actually
   *  post it.
   */
  // const validateOnly = true

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callDeleteWorkerPool() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await cloudbuildClient.deleteWorkerPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkerPool();

(async) checkRetryBuildProgress(name) → {Promise}

Check the status of the long running operation returned by retryBuild().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the `Build` to retry.
   *  Format: `projects/{project}/locations/{location}/builds/{build}`
   */
  // const name = 'abc123'
  /**
   *  Required. ID of the project.
   */
  // const projectId = 'abc123'
  /**
   *  Required. Build ID of the original build.
   */
  // const id = 'abc123'

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callRetryBuild() {
    // Construct request
    const request = {
      projectId,
      id,
    };

    // Run request
    const [operation] = await cloudbuildClient.retryBuild(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRetryBuild();

(async) checkRunBuildTriggerProgress(name) → {Promise}

Check the status of the long running operation returned by runBuildTrigger().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the `Trigger` to run.
   *  Format: `projects/{project}/locations/{location}/triggers/{trigger}`
   */
  // const name = 'abc123'
  /**
   *  Required. ID of the project.
   */
  // const projectId = 'abc123'
  /**
   *  Required. ID of the trigger.
   */
  // const triggerId = 'abc123'
  /**
   *  Source to build against this trigger.
   *  Branch and tag names cannot consist of regular expressions.
   */
  // const source = {}

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callRunBuildTrigger() {
    // Construct request
    const request = {
      projectId,
      triggerId,
    };

    // Run request
    const [operation] = await cloudbuildClient.runBuildTrigger(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRunBuildTrigger();

(async) checkUpdateWorkerPoolProgress(name) → {Promise}

Check the status of the long running operation returned by updateWorkerPool().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The `WorkerPool` to update.
   *  The `name` field is used to identify the `WorkerPool` to update.
   *  Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
   */
  // const workerPool = {}
  /**
   *  A mask specifying which fields in `worker_pool` to update.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the response, but do not actually
   *  post it.
   */
  // const validateOnly = true

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callUpdateWorkerPool() {
    // Construct request
    const request = {
      workerPool,
    };

    // Run request
    const [operation] = await cloudbuildClient.updateWorkerPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkerPool();

close() → {Promise}

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

cryptoKeyPath(project, location, keyring, key) → {string}

Return a fully-qualified cryptoKey resource name string.

Parameters:
Name Type Description
project string
location string
keyring string
key string
Returns:
Type Description
string

Resource name string.

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns:
Type Description
Promise

A promise that resolves to an authenticated service stub.

listBuildTriggersAsync(request, optionsopt) → {Object}

Equivalent to listBuildTriggers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent of the collection of Triggers. Format: projects/{project}/locations/{location}

projectId string

Required. ID of the project for which to list BuildTriggers.

pageSize number

Number of results to return in the list.

pageToken string

Token to provide to skip to a particular spot in the list.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing BuildTrigger. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent of the collection of `Triggers`.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the project for which to list BuildTriggers.
   */
  // const projectId = 'abc123'
  /**
   *  Number of results to return in the list.
   */
  // const pageSize = 1234
  /**
   *  Token to provide to skip to a particular spot in the list.
   */
  // const pageToken = 'abc123'

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callListBuildTriggers() {
    // Construct request
    const request = {
      projectId,
    };

    // Run request
    const iterable = cloudbuildClient.listBuildTriggersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListBuildTriggers();

listBuildTriggersStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent of the collection of Triggers. Format: projects/{project}/locations/{location}

projectId string

Required. ID of the project for which to list BuildTriggers.

pageSize number

Number of results to return in the list.

pageToken string

Token to provide to skip to a particular spot in the list.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing BuildTrigger on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBuildTriggersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBuildsAsync(request, optionsopt) → {Object}

Equivalent to listBuilds, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent of the collection of Builds. Format: projects/{project}/locations/{location}

projectId string

Required. ID of the project.

pageSize number

Number of results to return in the list.

pageToken string

The page token for the next page of Builds.

If unspecified, the first page of results is returned.

If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results.

See https://google.aip.dev/158 for more.

filter string

The raw filter text to constrain the results.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Build. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent of the collection of `Builds`.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the project.
   */
  // const projectId = 'abc123'
  /**
   *  Number of results to return in the list.
   */
  // const pageSize = 1234
  /**
   *  The page token for the next page of Builds.
   *  If unspecified, the first page of results is returned.
   *  If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
   *  In this case, the token should be discarded, and pagination should be
   *  restarted from the first page of results.
   *  See https://google.aip.dev/158 for more.
   */
  // const pageToken = 'abc123'
  /**
   *  The raw filter text to constrain the results.
   */
  // const filter = 'abc123'

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callListBuilds() {
    // Construct request
    const request = {
      projectId,
    };

    // Run request
    const iterable = cloudbuildClient.listBuildsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListBuilds();

listBuildsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent of the collection of Builds. Format: projects/{project}/locations/{location}

projectId string

Required. ID of the project.

pageSize number

Number of results to return in the list.

pageToken string

The page token for the next page of Builds.

If unspecified, the first page of results is returned.

If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results.

See https://google.aip.dev/158 for more.

filter string

The raw filter text to constrain the results.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Build on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBuildsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listWorkerPoolsAsync(request, optionsopt) → {Object}

Equivalent to listWorkerPools, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent of the collection of WorkerPools. Format: projects/{project}/locations/{location}.

pageSize number

The maximum number of WorkerPools to return. The service may return fewer than this value. If omitted, the server will use a sensible default.

pageToken string

A page token, received from a previous ListWorkerPools call. Provide this to retrieve the subsequent page.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing WorkerPool. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent of the collection of `WorkerPools`.
   *  Format: `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of `WorkerPool`s to return. The service may return
   *  fewer than this value. If omitted, the server will use a sensible default.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListWorkerPools` call. Provide this
   *  to retrieve the subsequent page.
   */
  // const pageToken = 'abc123'

  // Imports the Cloudbuild library
  const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1;

  // Instantiates a client
  const cloudbuildClient = new CloudBuildClient();

  async function callListWorkerPools() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = cloudbuildClient.listWorkerPoolsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListWorkerPools();

listWorkerPoolsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent of the collection of WorkerPools. Format: projects/{project}/locations/{location}.

pageSize number

The maximum number of WorkerPools to return. The service may return fewer than this value. If omitted, the server will use a sensible default.

pageToken string

A page token, received from a previous ListWorkerPools call. Provide this to retrieve the subsequent page.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing WorkerPool on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listWorkerPoolsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location) → {string}

Return a fully-qualified location resource name string.

Parameters:
Name Type Description
project string
location string
Returns:
Type Description
string

Resource name string.

matchBuildFromProjectBuildName(projectBuildName) → {string}

Parse the build from ProjectBuild resource.

Parameters:
Name Type Description
projectBuildName string

A fully-qualified path representing project_build resource.

Returns:
Type Description
string

A string representing the build.

matchBuildFromProjectLocationBuildName(projectLocationBuildName) → {string}

Parse the build from ProjectLocationBuild resource.

Parameters:
Name Type Description
projectLocationBuildName string

A fully-qualified path representing project_location_build resource.

Returns:
Type Description
string

A string representing the build.

matchConfigFromProjectConfigName(projectConfigName) → {string}

Parse the config from ProjectConfig resource.

Parameters:
Name Type Description
projectConfigName string

A fully-qualified path representing project_config resource.

Returns:
Type Description
string

A string representing the config.

matchConfigFromProjectLocationConfigName(projectLocationConfigName) → {string}

Parse the config from ProjectLocationConfig resource.

Parameters:
Name Type Description
projectLocationConfigName string

A fully-qualified path representing project_location_config resource.

Returns:
Type Description
string

A string representing the config.

matchConnectionFromRepositoryName(repositoryName) → {string}

Parse the connection from Repository resource.

Parameters:
Name Type Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns:
Type Description
string

A string representing the connection.

matchKeyFromCryptoKeyName(cryptoKeyName) → {string}

Parse the key from CryptoKey resource.

Parameters:
Name Type Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns:
Type Description
string

A string representing the key.

matchKeyringFromCryptoKeyName(cryptoKeyName) → {string}

Parse the keyring from CryptoKey resource.

Parameters:
Name Type Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns:
Type Description
string

A string representing the keyring.

matchLocationFromCryptoKeyName(cryptoKeyName) → {string}

Parse the location from CryptoKey resource.

Parameters:
Name Type Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLocationName(locationName) → {string}

Parse the location from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromProjectLocationBuildName(projectLocationBuildName) → {string}

Parse the location from ProjectLocationBuild resource.

Parameters:
Name Type Description
projectLocationBuildName string

A fully-qualified path representing project_location_build resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromProjectLocationConfigName(projectLocationConfigName) → {string}

Parse the location from ProjectLocationConfig resource.

Parameters:
Name Type Description
projectLocationConfigName string

A fully-qualified path representing project_location_config resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromProjectLocationTriggerName(projectLocationTriggerName) → {string}

Parse the location from ProjectLocationTrigger resource.

Parameters:
Name Type Description
projectLocationTriggerName string

A fully-qualified path representing project_location_trigger resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromRepositoryName(repositoryName) → {string}

Parse the location from Repository resource.

Parameters:
Name Type Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromWorkerPoolName(workerPoolName) → {string}

Parse the location from WorkerPool resource.

Parameters:
Name Type Description
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns:
Type Description
string

A string representing the location.

matchNetworkFromNetworkName(networkName) → {string}

Parse the network from Network resource.

Parameters:
Name Type Description
networkName string

A fully-qualified path representing Network resource.

Returns:
Type Description
string

A string representing the network.

matchProjectFromCryptoKeyName(cryptoKeyName) → {string}

Parse the project from CryptoKey resource.

Parameters:
Name Type Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLocationName(locationName) → {string}

Parse the project from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromNetworkName(networkName) → {string}

Parse the project from Network resource.

Parameters:
Name Type Description
networkName string

A fully-qualified path representing Network resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectBuildName(projectBuildName) → {string}

Parse the project from ProjectBuild resource.

Parameters:
Name Type Description
projectBuildName string

A fully-qualified path representing project_build resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectConfigName(projectConfigName) → {string}

Parse the project from ProjectConfig resource.

Parameters:
Name Type Description
projectConfigName string

A fully-qualified path representing project_config resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectLocationBuildName(projectLocationBuildName) → {string}

Parse the project from ProjectLocationBuild resource.

Parameters:
Name Type Description
projectLocationBuildName string

A fully-qualified path representing project_location_build resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectLocationConfigName(projectLocationConfigName) → {string}

Parse the project from ProjectLocationConfig resource.

Parameters:
Name Type Description
projectLocationConfigName string

A fully-qualified path representing project_location_config resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectLocationTriggerName(projectLocationTriggerName) → {string}

Parse the project from ProjectLocationTrigger resource.

Parameters:
Name Type Description
projectLocationTriggerName string

A fully-qualified path representing project_location_trigger resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectName(projectName) → {string}

Parse the project from Project resource.

Parameters:
Name Type Description
projectName string

A fully-qualified path representing Project resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectTriggerName(projectTriggerName) → {string}

Parse the project from ProjectTrigger resource.

Parameters:
Name Type Description
projectTriggerName string

A fully-qualified path representing project_trigger resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromRepositoryName(repositoryName) → {string}

Parse the project from Repository resource.

Parameters:
Name Type Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSecretVersionName(secretVersionName) → {string}

Parse the project from SecretVersion resource.

Parameters:
Name Type Description
secretVersionName string

A fully-qualified path representing SecretVersion resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromServiceAccountName(serviceAccountName) → {string}

Parse the project from ServiceAccount resource.

Parameters:
Name Type Description
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSubscriptionName(subscriptionName) → {string}

Parse the project from Subscription resource.

Parameters:
Name Type Description
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromTopicName(topicName) → {string}

Parse the project from Topic resource.

Parameters:
Name Type Description
topicName string

A fully-qualified path representing Topic resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromWorkerPoolName(workerPoolName) → {string}

Parse the project from WorkerPool resource.

Parameters:
Name Type Description
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns:
Type Description
string

A string representing the project.

matchRepositoryFromRepositoryName(repositoryName) → {string}

Parse the repository from Repository resource.

Parameters:
Name Type Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns:
Type Description
string

A string representing the repository.

matchSecretFromSecretVersionName(secretVersionName) → {string}

Parse the secret from SecretVersion resource.

Parameters:
Name Type Description
secretVersionName string

A fully-qualified path representing SecretVersion resource.

Returns:
Type Description
string

A string representing the secret.

matchServiceAccountFromServiceAccountName(serviceAccountName) → {string}

Parse the service_account from ServiceAccount resource.

Parameters:
Name Type Description
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns:
Type Description
string

A string representing the service_account.

matchSubscriptionFromSubscriptionName(subscriptionName) → {string}

Parse the subscription from Subscription resource.

Parameters:
Name Type Description
subscriptionName string

A fully-qualified path representing Subscription resource.

Returns:
Type Description
string

A string representing the subscription.

matchTopicFromTopicName(topicName) → {string}

Parse the topic from Topic resource.

Parameters:
Name Type Description
topicName string

A fully-qualified path representing Topic resource.

Returns:
Type Description
string

A string representing the topic.

matchTriggerFromProjectLocationTriggerName(projectLocationTriggerName) → {string}

Parse the trigger from ProjectLocationTrigger resource.

Parameters:
Name Type Description
projectLocationTriggerName string

A fully-qualified path representing project_location_trigger resource.

Returns:
Type Description
string

A string representing the trigger.

matchTriggerFromProjectTriggerName(projectTriggerName) → {string}

Parse the trigger from ProjectTrigger resource.

Parameters:
Name Type Description
projectTriggerName string

A fully-qualified path representing project_trigger resource.

Returns:
Type Description
string

A string representing the trigger.

matchVersionFromSecretVersionName(secretVersionName) → {string}

Parse the version from SecretVersion resource.

Parameters:
Name Type Description
secretVersionName string

A fully-qualified path representing SecretVersion resource.

Returns:
Type Description
string

A string representing the version.

matchWorkerPoolFromWorkerPoolName(workerPoolName) → {string}

Parse the worker_pool from WorkerPool resource.

Parameters:
Name Type Description
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns:
Type Description
string

A string representing the worker_pool.

networkPath(project, network) → {string}

Return a fully-qualified network resource name string.

Parameters:
Name Type Description
project string
network string
Returns:
Type Description
string

Resource name string.

projectBuildPath(project, build) → {string}

Return a fully-qualified projectBuild resource name string.

Parameters:
Name Type Description
project string
build string
Returns:
Type Description
string

Resource name string.

projectConfigPath(project, config) → {string}

Return a fully-qualified projectConfig resource name string.

Parameters:
Name Type Description
project string
config string
Returns:
Type Description
string

Resource name string.

projectLocationBuildPath(project, location, build) → {string}

Return a fully-qualified projectLocationBuild resource name string.

Parameters:
Name Type Description
project string
location string
build string
Returns:
Type Description
string

Resource name string.

projectLocationConfigPath(project, location, config) → {string}

Return a fully-qualified projectLocationConfig resource name string.

Parameters:
Name Type Description
project string
location string
config string
Returns:
Type Description
string

Resource name string.

projectLocationTriggerPath(project, location, trigger) → {string}

Return a fully-qualified projectLocationTrigger resource name string.

Parameters:
Name Type Description
project string
location string
trigger string
Returns:
Type Description
string

Resource name string.

projectPath(project) → {string}

Return a fully-qualified project resource name string.

Parameters:
Name Type Description
project string
Returns:
Type Description
string

Resource name string.

projectTriggerPath(project, trigger) → {string}

Return a fully-qualified projectTrigger resource name string.

Parameters:
Name Type Description
project string
trigger string
Returns:
Type Description
string

Resource name string.

repositoryPath(project, location, connection, repository) → {string}

Return a fully-qualified repository resource name string.

Parameters:
Name Type Description
project string
location string
connection string
repository string
Returns:
Type Description
string

Resource name string.

secretVersionPath(project, secret, version) → {string}

Return a fully-qualified secretVersion resource name string.

Parameters:
Name Type Description
project string
secret string
version string
Returns:
Type Description
string

Resource name string.

serviceAccountPath(project, service_account) → {string}

Return a fully-qualified serviceAccount resource name string.

Parameters:
Name Type Description
project string
service_account string
Returns:
Type Description
string

Resource name string.

subscriptionPath(project, subscription) → {string}

Return a fully-qualified subscription resource name string.

Parameters:
Name Type Description
project string
subscription string
Returns:
Type Description
string

Resource name string.

topicPath(project, topic) → {string}

Return a fully-qualified topic resource name string.

Parameters:
Name Type Description
project string
topic string
Returns:
Type Description
string

Resource name string.

workerPoolPath(project, location, worker_pool) → {string}

Return a fully-qualified workerPool resource name string.

Parameters:
Name Type Description
project string
location string
worker_pool string
Returns:
Type Description
string

Resource name string.