Class v1.IDSClient (2.2.1)

The IDS Service v1

Package

@google-cloud/ids

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of IDSClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: 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 IDSClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iDSStub

iDSStub?: Promise<{
        [name: string]: Function;
    }>;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

checkCreateEndpointProgress(name)

checkCreateEndpointProgress(name: string): Promise<LROperation<protos.google.cloud.ids.v1.Endpoint, protos.google.cloud.ids.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.ids.v1.Endpoint, protos.google.cloud.ids.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 endpoint's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The endpoint identifier. This will be part of the endpoint's
   *  resource name.
   *  This value must start with a lowercase letter followed by up to 62
   *  lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
   *  Values that do not match this pattern will trigger an INVALID_ARGUMENT
   *  error.
   */
  // const endpointId = 'abc123'
  /**
   *  Required. The endpoint to create.
   */
  // const endpoint = {}
  /**
   *  An optional request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

  async function callCreateEndpoint() {
    // Construct request
    const request = {
      parent,
      endpointId,
      endpoint,
    };

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

  callCreateEndpoint();

checkDeleteEndpointProgress(name)

checkDeleteEndpointProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.ids.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.ids.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 endpoint to delete.
   */
  // const name = 'abc123'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

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

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

  callDeleteEndpoint();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createEndpoint(request, options)

createEndpoint(request?: protos.google.cloud.ids.v1.ICreateEndpointRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Endpoint in a given project and location.

Parameters
NameDescription
request protos.google.cloud.ids.v1.ICreateEndpointRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 endpoint's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The endpoint identifier. This will be part of the endpoint's
   *  resource name.
   *  This value must start with a lowercase letter followed by up to 62
   *  lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
   *  Values that do not match this pattern will trigger an INVALID_ARGUMENT
   *  error.
   */
  // const endpointId = 'abc123'
  /**
   *  Required. The endpoint to create.
   */
  // const endpoint = {}
  /**
   *  An optional request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

  async function callCreateEndpoint() {
    // Construct request
    const request = {
      parent,
      endpointId,
      endpoint,
    };

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

  callCreateEndpoint();

createEndpoint(request, options, callback)

createEndpoint(request: protos.google.cloud.ids.v1.ICreateEndpointRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.ICreateEndpointRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEndpoint(request, callback)

createEndpoint(request: protos.google.cloud.ids.v1.ICreateEndpointRequest, callback: Callback<LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.ICreateEndpointRequest
callback Callback<LROperation<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEndpoint(request, options)

deleteEndpoint(request?: protos.google.cloud.ids.v1.IDeleteEndpointRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Endpoint.

Parameters
NameDescription
request protos.google.cloud.ids.v1.IDeleteEndpointRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 endpoint to delete.
   */
  // const name = 'abc123'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

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

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

  callDeleteEndpoint();

deleteEndpoint(request, options, callback)

deleteEndpoint(request: protos.google.cloud.ids.v1.IDeleteEndpointRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IDeleteEndpointRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEndpoint(request, callback)

deleteEndpoint(request: protos.google.cloud.ids.v1.IDeleteEndpointRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IDeleteEndpointRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.ids.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

endpointPath(project, location, endpoint)

endpointPath(project: string, location: string, endpoint: string): string;

Return a fully-qualified endpoint resource name string.

Parameters
NameDescription
project string
location string
endpoint string
Returns
TypeDescription
string

{string} Resource name string.

getEndpoint(request, options)

getEndpoint(request?: protos.google.cloud.ids.v1.IGetEndpointRequest, options?: CallOptions): Promise<[
        protos.google.cloud.ids.v1.IEndpoint,
        protos.google.cloud.ids.v1.IGetEndpointRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Endpoint.

Parameters
NameDescription
request protos.google.cloud.ids.v1.IGetEndpointRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IGetEndpointRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 endpoint to retrieve.
   *  Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
   */
  // const name = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

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

    // Run request
    const response = await idsClient.getEndpoint(request);
    console.log(response);
  }

  callGetEndpoint();

getEndpoint(request, options, callback)

getEndpoint(request: protos.google.cloud.ids.v1.IGetEndpointRequest, options: CallOptions, callback: Callback<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IGetEndpointRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IGetEndpointRequest
options CallOptions
callback Callback<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IGetEndpointRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEndpoint(request, callback)

getEndpoint(request: protos.google.cloud.ids.v1.IGetEndpointRequest, callback: Callback<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IGetEndpointRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IGetEndpointRequest
callback Callback<protos.google.cloud.ids.v1.IEndpoint, protos.google.cloud.ids.v1.IGetEndpointRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listEndpoints(request, options)

listEndpoints(request?: protos.google.cloud.ids.v1.IListEndpointsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.ids.v1.IEndpoint[],
        protos.google.cloud.ids.v1.IListEndpointsRequest | null,
        protos.google.cloud.ids.v1.IListEndpointsResponse
    ]>;

Lists Endpoints in a given project and location.

Parameters
NameDescription
request protos.google.cloud.ids.v1.IListEndpointsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.ids.v1.IEndpoint[], protos.google.cloud.ids.v1.IListEndpointsRequest | null, protos.google.cloud.ids.v1.IListEndpointsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listEndpointsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listEndpoints(request, options, callback)

listEndpoints(request: protos.google.cloud.ids.v1.IListEndpointsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.ids.v1.IListEndpointsRequest, protos.google.cloud.ids.v1.IListEndpointsResponse | null | undefined, protos.google.cloud.ids.v1.IEndpoint>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IListEndpointsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.ids.v1.IListEndpointsRequest, protos.google.cloud.ids.v1.IListEndpointsResponse | null | undefined, protos.google.cloud.ids.v1.IEndpoint>
Returns
TypeDescription
void

listEndpoints(request, callback)

listEndpoints(request: protos.google.cloud.ids.v1.IListEndpointsRequest, callback: PaginationCallback<protos.google.cloud.ids.v1.IListEndpointsRequest, protos.google.cloud.ids.v1.IListEndpointsResponse | null | undefined, protos.google.cloud.ids.v1.IEndpoint>): void;
Parameters
NameDescription
request protos.google.cloud.ids.v1.IListEndpointsRequest
callback PaginationCallback<protos.google.cloud.ids.v1.IListEndpointsRequest, protos.google.cloud.ids.v1.IListEndpointsResponse | null | undefined, protos.google.cloud.ids.v1.IEndpoint>
Returns
TypeDescription
void

listEndpointsAsync(request, options)

listEndpointsAsync(request?: protos.google.cloud.ids.v1.IListEndpointsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.ids.v1.IEndpoint>;

Equivalent to listEndpoints, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.ids.v1.IListEndpointsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.ids.v1.IEndpoint>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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, which owns this collection of endpoints.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of endpoints to return. The service may return fewer
   *  than this value.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous `ListEndpoints` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListEndpoints` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter expression, following the syntax outlined in
   *  https://google.aip.dev/160.
   */
  // const filter = 'abc123'
  /**
   *  Optional. One or more fields to compare and use to sort the output.
   *  See https://google.aip.dev/132#ordering.
   */
  // const orderBy = 'abc123'

  // Imports the Ids library
  const {IDSClient} = require('@google-cloud/ids').v1;

  // Instantiates a client
  const idsClient = new IDSClient();

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

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

  callListEndpoints();

listEndpointsStream(request, options)

listEndpointsStream(request?: protos.google.cloud.ids.v1.IListEndpointsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.ids.v1.IListEndpointsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listEndpointsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchEndpointFromEndpointName(endpointName)

matchEndpointFromEndpointName(endpointName: string): string | number;

Parse the endpoint from Endpoint resource.

Parameter
NameDescription
endpointName string

A fully-qualified path representing Endpoint resource.

Returns
TypeDescription
string | number

{string} A string representing the endpoint.

matchLocationFromEndpointName(endpointName)

matchLocationFromEndpointName(endpointName: string): string | number;

Parse the location from Endpoint resource.

Parameter
NameDescription
endpointName string

A fully-qualified path representing Endpoint resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromEndpointName(endpointName)

matchProjectFromEndpointName(endpointName: string): string | number;

Parse the project from Endpoint resource.

Parameter
NameDescription
endpointName string

A fully-qualified path representing Endpoint resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.