Class v1.AttachedClustersClient (1.1.0)

The AttachedClusters API provides a single centrally managed service to register and manage Anthos attached clusters that run on customer's owned infrastructure. v1

Package

@google-cloud/gkemulticloud

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of AttachedClustersClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof 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 AttachedClustersClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

attachedClustersStub

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

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

attachedClusterPath(project, location, attachedCluster)

attachedClusterPath(project: string, location: string, attachedCluster: string): string;

Return a fully-qualified attachedCluster resource name string.

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

{string} Resource name string.

attachedServerConfigPath(project, location)

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

Return a fully-qualified attachedServerConfig resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

awsClusterPath(project, location, awsCluster)

awsClusterPath(project: string, location: string, awsCluster: string): string;

Return a fully-qualified awsCluster resource name string.

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

{string} Resource name string.

awsNodePoolPath(project, location, awsCluster, awsNodePool)

awsNodePoolPath(project: string, location: string, awsCluster: string, awsNodePool: string): string;

Return a fully-qualified awsNodePool resource name string.

Parameters
Name Description
project string
location string
awsCluster string
awsNodePool string
Returns
Type Description
string

{string} Resource name string.

awsServerConfigPath(project, location)

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

Return a fully-qualified awsServerConfig resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

azureClientPath(project, location, azureClient)

azureClientPath(project: string, location: string, azureClient: string): string;

Return a fully-qualified azureClient resource name string.

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

{string} Resource name string.

azureClusterPath(project, location, azureCluster)

azureClusterPath(project: string, location: string, azureCluster: string): string;

Return a fully-qualified azureCluster resource name string.

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

{string} Resource name string.

azureNodePoolPath(project, location, azureCluster, azureNodePool)

azureNodePoolPath(project: string, location: string, azureCluster: string, azureNodePool: string): string;

Return a fully-qualified azureNodePool resource name string.

Parameters
Name Description
project string
location string
azureCluster string
azureNodePool string
Returns
Type Description
string

{string} Resource name string.

azureServerConfigPath(project, location)

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

Return a fully-qualified azureServerConfig resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

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

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreateAttachedClusterProgress(name)

checkCreateAttachedClusterProgress(name: string): Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.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 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 location where this
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  will be created.
   *  Location names are formatted as `projects/

checkDeleteAttachedClusterProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkemulticloud.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 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 resource name the
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  to delete.
   *  `AttachedCluster` names are formatted as
   *  `projects/

checkImportAttachedClusterProgress(name)

checkImportAttachedClusterProgress(name: string): Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.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 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 location where this
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  will be created.
   *  Location names are formatted as `projects/

checkUpdateAttachedClusterProgress(name)

checkUpdateAttachedClusterProgress(name: string): Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkemulticloud.v1.AttachedCluster, protos.google.cloud.gkemulticloud.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 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
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  to update.
   */
  // const attachedCluster = {}
  /**
   *  If set, only validate the request, but do not actually update the cluster.
   */
  // const validateOnly = true
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. The elements of the repeated paths field can only include these
   *  fields from
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster:
   *   *   `annotations`.
   *   *   `authorization.admin_groups`.
   *   *   `authorization.admin_users`.
   *   *   `binary_authorization.evaluation_mode`.
   *   *   `description`.
   *   *   `logging_config.component_config.enable_components`.
   *   *   `monitoring_config.managed_prometheus_config.enabled`.
   *   *   `platform_version`.
   *   *   `proxy_config.kubernetes_secret.name`.
   *   *   `proxy_config.kubernetes_secret.namespace`.
   */
  // const updateMask = {}

  // Imports the Gkemulticloud library
  const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1;

  // Instantiates a client
  const gkemulticloudClient = new AttachedClustersClient();

  async function callUpdateAttachedCluster() {
    // Construct request
    const request = {
      attachedCluster,
      updateMask,
    };

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

  callUpdateAttachedCluster();

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
Type Description
Promise<void>

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

createAttachedCluster(request, options)

createAttachedCluster(request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new resource on a given Google Cloud Platform project and region.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Parameters
Name Description
request ICreateAttachedClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.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 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 location where this
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  will be created.
   *  Location names are formatted as `projects/

createAttachedCluster(request, options, callback)

createAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateAttachedClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createAttachedCluster(request, callback)

createAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateAttachedClusterRequest
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAttachedCluster(request, options)

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

Deletes a specific resource.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Parameters
Name Description
request IDeleteAttachedClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkemulticloud.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 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 resource name the
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  to delete.
   *  `AttachedCluster` names are formatted as
   *  `projects/

deleteAttachedCluster(request, options, callback)

deleteAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAttachedClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAttachedCluster(request, callback)

deleteAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAttachedClusterRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

generateAttachedClusterAgentToken(request, options)

generateAttachedClusterAgentToken(request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse,
        (protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | undefined),
        {} | undefined
    ]>;

Generates an access token for a cluster agent.

Parameters
Name Description
request IGenerateAttachedClusterAgentTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse, (protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing GenerateAttachedClusterAgentTokenResponse. 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.
   */
  // const attachedCluster = 'abc123'
  /**
   *  Required.
   */
  // const subjectToken = 'abc123'
  /**
   *  Required.
   */
  // const subjectTokenType = 'abc123'
  /**
   *  Required.
   */
  // const version = 'abc123'
  /**
   *  Optional.
   */
  // const grantType = 'abc123'
  /**
   *  Optional.
   */
  // const audience = 'abc123'
  /**
   *  Optional.
   */
  // const scope = 'abc123'
  /**
   *  Optional.
   */
  // const requestedTokenType = 'abc123'
  /**
   *  Optional.
   */
  // const options = 'abc123'

  // Imports the Gkemulticloud library
  const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1;

  // Instantiates a client
  const gkemulticloudClient = new AttachedClustersClient();

  async function callGenerateAttachedClusterAgentToken() {
    // Construct request
    const request = {
      attachedCluster,
      subjectToken,
      subjectTokenType,
      version,
    };

    // Run request
    const response = await gkemulticloudClient.generateAttachedClusterAgentToken(request);
    console.log(response);
  }

  callGenerateAttachedClusterAgentToken();

generateAttachedClusterAgentToken(request, options, callback)

generateAttachedClusterAgentToken(request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGenerateAttachedClusterAgentTokenRequest
options CallOptions
callback Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

generateAttachedClusterAgentToken(request, callback)

generateAttachedClusterAgentToken(request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest, callback: Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGenerateAttachedClusterAgentTokenRequest
callback Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterAgentTokenRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

generateAttachedClusterInstallManifest(request, options)

generateAttachedClusterInstallManifest(request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse,
        (protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | undefined),
        {} | undefined
    ]>;

Generates the install manifest to be installed on the target cluster.

Parameters
Name Description
request IGenerateAttachedClusterInstallManifestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, (protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing GenerateAttachedClusterInstallManifestResponse. 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 location where this
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  will be created.
   *  Location names are formatted as `projects/

generateAttachedClusterInstallManifest(request, options, callback)

generateAttachedClusterInstallManifest(request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGenerateAttachedClusterInstallManifestRequest
options CallOptions
callback Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

generateAttachedClusterInstallManifest(request, callback)

generateAttachedClusterInstallManifest(request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, callback: Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGenerateAttachedClusterInstallManifestRequest
callback Callback<protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAttachedCluster(request, options)

getAttachedCluster(request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkemulticloud.v1.IAttachedCluster,
        (protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | undefined),
        {} | undefined
    ]>;

Describes a specific resource.

Parameters
Name Description
request IGetAttachedClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkemulticloud.v1.IAttachedCluster, (protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . 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
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  to describe.
   *  `AttachedCluster` names are formatted as
   *  `projects/

getAttachedCluster(request, options, callback)

getAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAttachedClusterRequest
options CallOptions
callback Callback<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAttachedCluster(request, callback)

getAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, callback: Callback<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAttachedClusterRequest
callback Callback<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAttachedServerConfig(request, options)

getAttachedServerConfig(request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig,
        (protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | undefined),
        {} | undefined
    ]>;

Returns information, such as supported Kubernetes versions, on a given Google Cloud location.

Parameters
Name Description
request IGetAttachedServerConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, (protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AttachedServerConfig. 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
   *  AttachedServerConfig google.cloud.gkemulticloud.v1.AttachedServerConfig 
   *  resource to describe.
   *  `AttachedServerConfig` names are formatted as
   *  `projects/

getAttachedServerConfig(request, options, callback)

getAttachedServerConfig(request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAttachedServerConfigRequest
options CallOptions
callback Callback<protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAttachedServerConfig(request, callback)

getAttachedServerConfig(request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, callback: Callback<protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAttachedServerConfigRequest
callback Callback<protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

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

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

importAttachedCluster(request, options)

importAttachedCluster(request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Imports creates a new resource by importing an existing Fleet Membership resource.

Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Parameters
Name Description
request IImportAttachedClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.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 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 location where this
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  will be created.
   *  Location names are formatted as `projects/

importAttachedCluster(request, options, callback)

importAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IImportAttachedClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

importAttachedCluster(request, callback)

importAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IImportAttachedClusterRequest
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
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
Type Description
Promise<{ [name: string]: Function; }>

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

listAttachedClusters(request, options)

listAttachedClusters(request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkemulticloud.v1.IAttachedCluster[],
        protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest | null,
        protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse
    ]>;

Lists all resources on a given Google Cloud project and region.

Parameters
Name Description
request IListAttachedClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest | null, protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse ]>

{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 listAttachedClustersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAttachedClusters(request, options, callback)

listAttachedClusters(request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse | null | undefined, protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void;
Parameters
Name Description
request IListAttachedClustersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse | null | undefined, protos.google.cloud.gkemulticloud.v1.IAttachedCluster>
Returns
Type Description
void

listAttachedClusters(request, callback)

listAttachedClusters(request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, callback: PaginationCallback<protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse | null | undefined, protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void;
Parameters
Name Description
request IListAttachedClustersRequest
callback PaginationCallback<protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse | null | undefined, protos.google.cloud.gkemulticloud.v1.IAttachedCluster>
Returns
Type Description
void

listAttachedClustersAsync(request, options)

listAttachedClustersAsync(request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkemulticloud.v1.IAttachedCluster>;

Equivalent to listAttachedClusters, but returns an iterable object.

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

Parameters
Name Description
request IListAttachedClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkemulticloud.v1.IAttachedCluster>

{Object} An iterable Object that allows async iteration. 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 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 location which owns this collection of
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resources.
   *  Location names are formatted as `projects/

listAttachedClustersStream(request, options)

listAttachedClustersStream(request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, options?: CallOptions): Transform;

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

Parameters
Name Description
request IListAttachedClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listAttachedClustersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchAttachedClusterFromAttachedClusterName(attachedClusterName)

matchAttachedClusterFromAttachedClusterName(attachedClusterName: string): string | number;

Parse the attached_cluster from AttachedCluster resource.

Parameter
Name Description
attachedClusterName string

A fully-qualified path representing AttachedCluster resource.

Returns
Type Description
string | number

{string} A string representing the attached_cluster.

matchAwsClusterFromAwsClusterName(awsClusterName)

matchAwsClusterFromAwsClusterName(awsClusterName: string): string | number;

Parse the aws_cluster from AwsCluster resource.

Parameter
Name Description
awsClusterName string

A fully-qualified path representing AwsCluster resource.

Returns
Type Description
string | number

{string} A string representing the aws_cluster.

matchAwsClusterFromAwsNodePoolName(awsNodePoolName)

matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string): string | number;

Parse the aws_cluster from AwsNodePool resource.

Parameter
Name Description
awsNodePoolName string

A fully-qualified path representing AwsNodePool resource.

Returns
Type Description
string | number

{string} A string representing the aws_cluster.

matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName)

matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string): string | number;

Parse the aws_node_pool from AwsNodePool resource.

Parameter
Name Description
awsNodePoolName string

A fully-qualified path representing AwsNodePool resource.

Returns
Type Description
string | number

{string} A string representing the aws_node_pool.

matchAzureClientFromAzureClientName(azureClientName)

matchAzureClientFromAzureClientName(azureClientName: string): string | number;

Parse the azure_client from AzureClient resource.

Parameter
Name Description
azureClientName string

A fully-qualified path representing AzureClient resource.

Returns
Type Description
string | number

{string} A string representing the azure_client.

matchAzureClusterFromAzureClusterName(azureClusterName)

matchAzureClusterFromAzureClusterName(azureClusterName: string): string | number;

Parse the azure_cluster from AzureCluster resource.

Parameter
Name Description
azureClusterName string

A fully-qualified path representing AzureCluster resource.

Returns
Type Description
string | number

{string} A string representing the azure_cluster.

matchAzureClusterFromAzureNodePoolName(azureNodePoolName)

matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string): string | number;

Parse the azure_cluster from AzureNodePool resource.

Parameter
Name Description
azureNodePoolName string

A fully-qualified path representing AzureNodePool resource.

Returns
Type Description
string | number

{string} A string representing the azure_cluster.

matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName)

matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string): string | number;

Parse the azure_node_pool from AzureNodePool resource.

Parameter
Name Description
azureNodePoolName string

A fully-qualified path representing AzureNodePool resource.

Returns
Type Description
string | number

{string} A string representing the azure_node_pool.

matchLocationFromAttachedClusterName(attachedClusterName)

matchLocationFromAttachedClusterName(attachedClusterName: string): string | number;

Parse the location from AttachedCluster resource.

Parameter
Name Description
attachedClusterName string

A fully-qualified path representing AttachedCluster resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAttachedServerConfigName(attachedServerConfigName)

matchLocationFromAttachedServerConfigName(attachedServerConfigName: string): string | number;

Parse the location from AttachedServerConfig resource.

Parameter
Name Description
attachedServerConfigName string

A fully-qualified path representing AttachedServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAwsClusterName(awsClusterName)

matchLocationFromAwsClusterName(awsClusterName: string): string | number;

Parse the location from AwsCluster resource.

Parameter
Name Description
awsClusterName string

A fully-qualified path representing AwsCluster resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAwsNodePoolName(awsNodePoolName)

matchLocationFromAwsNodePoolName(awsNodePoolName: string): string | number;

Parse the location from AwsNodePool resource.

Parameter
Name Description
awsNodePoolName string

A fully-qualified path representing AwsNodePool resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAwsServerConfigName(awsServerConfigName)

matchLocationFromAwsServerConfigName(awsServerConfigName: string): string | number;

Parse the location from AwsServerConfig resource.

Parameter
Name Description
awsServerConfigName string

A fully-qualified path representing AwsServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAzureClientName(azureClientName)

matchLocationFromAzureClientName(azureClientName: string): string | number;

Parse the location from AzureClient resource.

Parameter
Name Description
azureClientName string

A fully-qualified path representing AzureClient resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAzureClusterName(azureClusterName)

matchLocationFromAzureClusterName(azureClusterName: string): string | number;

Parse the location from AzureCluster resource.

Parameter
Name Description
azureClusterName string

A fully-qualified path representing AzureCluster resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAzureNodePoolName(azureNodePoolName)

matchLocationFromAzureNodePoolName(azureNodePoolName: string): string | number;

Parse the location from AzureNodePool resource.

Parameter
Name Description
azureNodePoolName string

A fully-qualified path representing AzureNodePool resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromAzureServerConfigName(azureServerConfigName)

matchLocationFromAzureServerConfigName(azureServerConfigName: string): string | number;

Parse the location from AzureServerConfig resource.

Parameter
Name Description
azureServerConfigName string

A fully-qualified path representing AzureServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromAttachedClusterName(attachedClusterName)

matchProjectFromAttachedClusterName(attachedClusterName: string): string | number;

Parse the project from AttachedCluster resource.

Parameter
Name Description
attachedClusterName string

A fully-qualified path representing AttachedCluster resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAttachedServerConfigName(attachedServerConfigName)

matchProjectFromAttachedServerConfigName(attachedServerConfigName: string): string | number;

Parse the project from AttachedServerConfig resource.

Parameter
Name Description
attachedServerConfigName string

A fully-qualified path representing AttachedServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAwsClusterName(awsClusterName)

matchProjectFromAwsClusterName(awsClusterName: string): string | number;

Parse the project from AwsCluster resource.

Parameter
Name Description
awsClusterName string

A fully-qualified path representing AwsCluster resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAwsNodePoolName(awsNodePoolName)

matchProjectFromAwsNodePoolName(awsNodePoolName: string): string | number;

Parse the project from AwsNodePool resource.

Parameter
Name Description
awsNodePoolName string

A fully-qualified path representing AwsNodePool resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAwsServerConfigName(awsServerConfigName)

matchProjectFromAwsServerConfigName(awsServerConfigName: string): string | number;

Parse the project from AwsServerConfig resource.

Parameter
Name Description
awsServerConfigName string

A fully-qualified path representing AwsServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAzureClientName(azureClientName)

matchProjectFromAzureClientName(azureClientName: string): string | number;

Parse the project from AzureClient resource.

Parameter
Name Description
azureClientName string

A fully-qualified path representing AzureClient resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAzureClusterName(azureClusterName)

matchProjectFromAzureClusterName(azureClusterName: string): string | number;

Parse the project from AzureCluster resource.

Parameter
Name Description
azureClusterName string

A fully-qualified path representing AzureCluster resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAzureNodePoolName(azureNodePoolName)

matchProjectFromAzureNodePoolName(azureNodePoolName: string): string | number;

Parse the project from AzureNodePool resource.

Parameter
Name Description
azureNodePoolName string

A fully-qualified path representing AzureNodePool resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAzureServerConfigName(azureServerConfigName)

matchProjectFromAzureServerConfigName(azureServerConfigName: string): string | number;

Parse the project from AzureServerConfig resource.

Parameter
Name Description
azureServerConfigName string

A fully-qualified path representing AzureServerConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

updateAttachedCluster(request, options)

updateAttachedCluster(request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an .

Parameters
Name Description
request IUpdateAttachedClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.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 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
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster  resource
   *  to update.
   */
  // const attachedCluster = {}
  /**
   *  If set, only validate the request, but do not actually update the cluster.
   */
  // const validateOnly = true
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. The elements of the repeated paths field can only include these
   *  fields from
   *  AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster:
   *   *   `annotations`.
   *   *   `authorization.admin_groups`.
   *   *   `authorization.admin_users`.
   *   *   `binary_authorization.evaluation_mode`.
   *   *   `description`.
   *   *   `logging_config.component_config.enable_components`.
   *   *   `monitoring_config.managed_prometheus_config.enabled`.
   *   *   `platform_version`.
   *   *   `proxy_config.kubernetes_secret.name`.
   *   *   `proxy_config.kubernetes_secret.namespace`.
   */
  // const updateMask = {}

  // Imports the Gkemulticloud library
  const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1;

  // Instantiates a client
  const gkemulticloudClient = new AttachedClustersClient();

  async function callUpdateAttachedCluster() {
    // Construct request
    const request = {
      attachedCluster,
      updateMask,
    };

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

  callUpdateAttachedCluster();

updateAttachedCluster(request, options, callback)

updateAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateAttachedClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateAttachedCluster(request, callback)

updateAttachedCluster(request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, callback: Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateAttachedClusterRequest
callback Callback<LROperation<protos.google.cloud.gkemulticloud.v1.IAttachedCluster, protos.google.cloud.gkemulticloud.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void