Class v1.AppHubClient (0.1.0)

The App Hub API allows you to manage App Hub resources. v1

Package

@google-cloud/apphub

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of AppHubClient.

Parameters
NameDescription
optsClientOptions
gaxInstancetypeofgax | typeoffallback

: loaded instance ofgoogle-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 AppHubClient({fallback: true}, gax); ```

Properties

apiEndpoint

getapiEndpoint():string;

The DNS address for this API service.

apiEndpoint

staticgetapiEndpoint():string;

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

appHubStub

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

auth

auth:gax.GoogleAuth;

descriptors

descriptors:Descriptors;

iamClient

iamClient:IamClient;

innerApiCalls

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

locationsClient

locationsClient:LocationsClient;

operationsClient

operationsClient:gax.OperationsClient;

pathTemplates

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

port

staticgetport():number;

The port for this API service.

scopes

staticgetscopes():string[];

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

servicePath

staticgetservicePath():string;

The DNS address for this API service.

universeDomain

getuniverseDomain():string;

warn

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

Methods

applicationPath(project, location, application)

applicationPath(project:string,location:string,application:string):string;

Return a fully-qualified application resource name string.

Parameters
NameDescription
projectstring
locationstring
applicationstring
Returns
TypeDescription
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 returnsgoogle.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 toCode.CANCELLED.

Parameters
NameDescription
requestCancelOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
TypeDescription
Promise<protos.google.protobuf.Empty>
Example
constclient=longrunning.operationsClient();awaitclient.cancelOperation({name:''});

checkCreateApplicationProgress(name)

checkCreateApplicationProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Application,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned bycreateApplication().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Application,protos.google.cloud.apphub.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 thedocumentation 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. Project and location to create Application in.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. The Application identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const applicationId = 'abc123'/**   *  Required. The resource being created   */// const application = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateApplication(){// Construct requestconstrequest={parent,applicationId,application,};// Run requestconst[operation]=awaitapphubClient.createApplication(request);const[response]=awaitoperation.promise();console.log(response);}callCreateApplication();

checkCreateServiceProgress(name)

checkCreateServiceProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Service,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned bycreateService().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Service,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the parent Application to create the   *  Service in. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Required. The Service identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const serviceId = 'abc123'/**   *  Required. The resource being created.   */// const service = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateService(){// Construct requestconstrequest={parent,serviceId,service,};// Run requestconst[operation]=awaitapphubClient.createService(request);const[response]=awaitoperation.promise();console.log(response);}callCreateService();

checkCreateServiceProjectAttachmentProgress(name)

checkCreateServiceProjectAttachmentProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.ServiceProjectAttachment,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned bycreateServiceProjectAttachment().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.ServiceProjectAttachment,protos.google.cloud.apphub.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 thedocumentation 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. Host project ID and location to which service project is being   *  attached. Only global location is supported. Expected format:   *  `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. The service project attachment identifier must contain the   *  project id of the service project specified in the   *  service_project_attachment.service_project field.   */// const serviceProjectAttachmentId = 'abc123'/**   *  Required. The resource being created.   */// const serviceProjectAttachment = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateServiceProjectAttachment(){// Construct requestconstrequest={parent,serviceProjectAttachmentId,serviceProjectAttachment,};// Run requestconst[operation]=awaitapphubClient.createServiceProjectAttachment(request);const[response]=awaitoperation.promise();console.log(response);}callCreateServiceProjectAttachment();

checkCreateWorkloadProgress(name)

checkCreateWorkloadProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Workload,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned bycreateWorkload().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Workload,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the Application to create Workload in.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Required. The Workload identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const workloadId = 'abc123'/**   *  Required. The resource being created.   */// const workload = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateWorkload(){// Construct requestconstrequest={parent,workloadId,workload,};// Run requestconst[operation]=awaitapphubClient.createWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callCreateWorkload();

checkDeleteApplicationProgress(name)

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

Check the status of the long running operation returned bydeleteApplication().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the Application to delete.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteApplication(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteApplication(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteApplication();

checkDeleteServiceProgress(name)

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

Check the status of the long running operation returned bydeleteService().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the Service to delete from an   *  Application. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/services/{service}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteService(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteService(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteService();

checkDeleteServiceProjectAttachmentProgress(name)

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

Check the status of the long running operation returned bydeleteServiceProjectAttachment().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the service project attachment to delete.   *  Expected format:   *  `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteServiceProjectAttachment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteServiceProjectAttachment(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteServiceProjectAttachment();

checkDeleteWorkloadProgress(name)

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

Check the status of the long running operation returned bydeleteWorkload().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty,protos.google.cloud.apphub.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 thedocumentation 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. Fully qualified name of the Workload to delete from an   *  Application. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteWorkload(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteWorkload();

checkUpdateApplicationProgress(name)

checkUpdateApplicationProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Application,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned byupdateApplication().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Application,protos.google.cloud.apphub.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 thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Application resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const application = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateApplication(){// Construct requestconstrequest={updateMask,application,};// Run requestconst[operation]=awaitapphubClient.updateApplication(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateApplication();

checkUpdateServiceProgress(name)

checkUpdateServiceProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Service,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned byupdateService().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Service,protos.google.cloud.apphub.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 thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Service resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const service = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateService(){// Construct requestconstrequest={updateMask,service,};// Run requestconst[operation]=awaitapphubClient.updateService(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateService();

checkUpdateWorkloadProgress(name)

checkUpdateWorkloadProgress(name:string):Promise<LROperation<protos.google.cloud.apphub.v1.Workload,protos.google.cloud.apphub.v1.OperationMetadata>>;

Check the status of the long running operation returned byupdateWorkload().

Parameter
NameDescription
namestring

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apphub.v1.Workload,protos.google.cloud.apphub.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 thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Workload resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const workload = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateWorkload(){// Construct requestconstrequest={updateMask,workload,};// Run requestconst[operation]=awaitapphubClient.updateWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateWorkload();

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.

createApplication(request, options)

createApplication(request?:protos.google.cloud.apphub.v1.ICreateApplicationRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Creates an Application in a host project and location.

Parameters
NameDescription
requestICreateApplicationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Project and location to create Application in.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. The Application identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const applicationId = 'abc123'/**   *  Required. The resource being created   */// const application = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateApplication(){// Construct requestconstrequest={parent,applicationId,application,};// Run requestconst[operation]=awaitapphubClient.createApplication(request);const[response]=awaitoperation.promise();console.log(response);}callCreateApplication();

createApplication(request, options, callback)

createApplication(request:protos.google.cloud.apphub.v1.ICreateApplicationRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateApplicationRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createApplication(request, callback)

createApplication(request:protos.google.cloud.apphub.v1.ICreateApplicationRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateApplicationRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, options)

createService(request?:protos.google.cloud.apphub.v1.ICreateServiceRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Creates a Service in an Application.

Parameters
NameDescription
requestICreateServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the parent Application to create the   *  Service in. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Required. The Service identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const serviceId = 'abc123'/**   *  Required. The resource being created.   */// const service = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateService(){// Construct requestconstrequest={parent,serviceId,service,};// Run requestconst[operation]=awaitapphubClient.createService(request);const[response]=awaitoperation.promise();console.log(response);}callCreateService();

createService(request, options, callback)

createService(request:protos.google.cloud.apphub.v1.ICreateServiceRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateServiceRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, callback)

createService(request:protos.google.cloud.apphub.v1.ICreateServiceRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateServiceRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceProjectAttachment(request, options)

createServiceProjectAttachment(request?:protos.google.cloud.apphub.v1.ICreateServiceProjectAttachmentRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Attaches a service project to the host project.

Parameters
NameDescription
requestICreateServiceProjectAttachmentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Host project ID and location to which service project is being   *  attached. Only global location is supported. Expected format:   *  `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. The service project attachment identifier must contain the   *  project id of the service project specified in the   *  service_project_attachment.service_project field.   */// const serviceProjectAttachmentId = 'abc123'/**   *  Required. The resource being created.   */// const serviceProjectAttachment = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateServiceProjectAttachment(){// Construct requestconstrequest={parent,serviceProjectAttachmentId,serviceProjectAttachment,};// Run requestconst[operation]=awaitapphubClient.createServiceProjectAttachment(request);const[response]=awaitoperation.promise();console.log(response);}callCreateServiceProjectAttachment();

createServiceProjectAttachment(request, options, callback)

createServiceProjectAttachment(request:protos.google.cloud.apphub.v1.ICreateServiceProjectAttachmentRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateServiceProjectAttachmentRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceProjectAttachment(request, callback)

createServiceProjectAttachment(request:protos.google.cloud.apphub.v1.ICreateServiceProjectAttachmentRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateServiceProjectAttachmentRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkload(request, options)

createWorkload(request?:protos.google.cloud.apphub.v1.ICreateWorkloadRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Creates a Workload in an Application.

Parameters
NameDescription
requestICreateWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the Application to create Workload in.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Required. The Workload identifier.   *  Must contain only lowercase letters, numbers   *  or hyphens, with the first character a letter, the last a letter or a   *  number, and a 63 character maximum.   */// const workloadId = 'abc123'/**   *  Required. The resource being created.   */// const workload = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallCreateWorkload(){// Construct requestconstrequest={parent,workloadId,workload,};// Run requestconst[operation]=awaitapphubClient.createWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callCreateWorkload();

createWorkload(request, options, callback)

createWorkload(request:protos.google.cloud.apphub.v1.ICreateWorkloadRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateWorkloadRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkload(request, callback)

createWorkload(request:protos.google.cloud.apphub.v1.ICreateWorkloadRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestICreateWorkloadRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteApplication(request, options)

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

Deletes an Application in a host project and location.

Parameters
NameDescription
requestIDeleteApplicationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the Application to delete.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteApplication(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteApplication(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteApplication();

deleteApplication(request, options, callback)

deleteApplication(request:protos.google.cloud.apphub.v1.IDeleteApplicationRequest,options:CallOptions,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteApplicationRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteApplication(request, callback)

deleteApplication(request:protos.google.cloud.apphub.v1.IDeleteApplicationRequest,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteApplicationRequest
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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 returnsgoogle.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
requestDeleteOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
TypeDescription
Promise<protos.google.protobuf.Empty>
Example
constclient=longrunning.operationsClient();awaitclient.deleteOperation({name:''});

deleteService(request, options)

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

Deletes a Service from an Application.

Parameters
NameDescription
requestIDeleteServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the Service to delete from an   *  Application. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/services/{service}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteService(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteService(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteService();

deleteService(request, options, callback)

deleteService(request:protos.google.cloud.apphub.v1.IDeleteServiceRequest,options:CallOptions,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteServiceRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteService(request, callback)

deleteService(request:protos.google.cloud.apphub.v1.IDeleteServiceRequest,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteServiceRequest
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteServiceProjectAttachment(request, options)

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

Deletes a service project attachment.

Parameters
NameDescription
requestIDeleteServiceProjectAttachmentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the service project attachment to delete.   *  Expected format:   *  `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteServiceProjectAttachment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteServiceProjectAttachment(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteServiceProjectAttachment();

deleteServiceProjectAttachment(request, options, callback)

deleteServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IDeleteServiceProjectAttachmentRequest,options:CallOptions,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteServiceProjectAttachmentRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteServiceProjectAttachment(request, callback)

deleteServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IDeleteServiceProjectAttachmentRequest,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteServiceProjectAttachmentRequest
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkload(request, options)

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

Deletes a Workload from an Application.

Parameters
NameDescription
requestIDeleteWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Fully qualified name of the Workload to delete from an   *  Application. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.   */// const name = 'abc123'/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDeleteWorkload(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitapphubClient.deleteWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteWorkload();

deleteWorkload(request, options, callback)

deleteWorkload(request:protos.google.cloud.apphub.v1.IDeleteWorkloadRequest,options:CallOptions,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteWorkloadRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkload(request, callback)

deleteWorkload(request:protos.google.cloud.apphub.v1.IDeleteWorkloadRequest,callback:Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDeleteWorkloadRequest
callbackCallback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

detachServiceProjectAttachment(request, options)

detachServiceProjectAttachment(request?:protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,(protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest|undefined),{}|undefined]>;

Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.

Parameters
NameDescription
requestIDetachServiceProjectAttachmentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse, (protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingDetachServiceProjectAttachmentResponse. Please see thedocumentation 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. Service project id and location to detach from a host project.   *  Only global location is supported. Expected format:   *  `projects/{project}/locations/{location}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallDetachServiceProjectAttachment(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.detachServiceProjectAttachment(request);console.log(response);}callDetachServiceProjectAttachment();

detachServiceProjectAttachment(request, options, callback)

detachServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDetachServiceProjectAttachmentRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

detachServiceProjectAttachment(request, callback)

detachServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest,callback:Callback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIDetachServiceProjectAttachmentRequest
callbackCallback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

discoveredServicePath(project, location, discoveredService)

discoveredServicePath(project:string,location:string,discoveredService:string):string;

Return a fully-qualified discoveredService resource name string.

Parameters
NameDescription
projectstring
locationstring
discoveredServicestring
Returns
TypeDescription
string

{string} Resource name string.

discoveredWorkloadPath(project, location, discoveredWorkload)

discoveredWorkloadPath(project:string,location:string,discoveredWorkload:string):string;

Return a fully-qualified discoveredWorkload resource name string.

Parameters
NameDescription
projectstring
locationstring
discoveredWorkloadstring
Returns
TypeDescription
string

{string} Resource name string.

getApplication(request, options)

getApplication(request?:protos.google.cloud.apphub.v1.IGetApplicationRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest|undefined,{}|undefined]>;

Gets an Application in a host project and location.

Parameters
NameDescription
requestIGetApplicationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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. Fully qualified name of the Application to fetch.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetApplication(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getApplication(request);console.log(response);}callGetApplication();

getApplication(request, options, callback)

getApplication(request:protos.google.cloud.apphub.v1.IGetApplicationRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetApplicationRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getApplication(request, callback)

getApplication(request:protos.google.cloud.apphub.v1.IGetApplicationRequest,callback:Callback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetApplicationRequest
callbackCallback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDiscoveredService(request, options)

getDiscoveredService(request?:protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest|undefined,{}|undefined]>;

Gets a Discovered Service in a host project and location.

Parameters
NameDescription
requestIGetDiscoveredServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingDiscoveredService. Please see thedocumentation 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. Fully qualified name of the Discovered Service to fetch.   *  Expected format:   *  `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetDiscoveredService(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getDiscoveredService(request);console.log(response);}callGetDiscoveredService();

getDiscoveredService(request, options, callback)

getDiscoveredService(request:protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetDiscoveredServiceRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDiscoveredService(request, callback)

getDiscoveredService(request:protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest,callback:Callback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetDiscoveredServiceRequest
callbackCallback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDiscoveredWorkload(request, options)

getDiscoveredWorkload(request?:protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest|undefined,{}|undefined]>;

Gets a Discovered Workload in a host project and location.

Parameters
NameDescription
requestIGetDiscoveredWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingDiscoveredWorkload. Please see thedocumentation 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. Fully qualified name of the Discovered Workload to fetch.   *  Expected format:   *  `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetDiscoveredWorkload(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getDiscoveredWorkload(request);console.log(response);}callGetDiscoveredWorkload();

getDiscoveredWorkload(request, options, callback)

getDiscoveredWorkload(request:protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetDiscoveredWorkloadRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDiscoveredWorkload(request, callback)

getDiscoveredWorkload(request:protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest,callback:Callback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetDiscoveredWorkloadRequest
callbackCallback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request:IamProtos.google.iam.v1.GetIamPolicyRequest,options?:gax.CallOptions|Callback<IamProtos.google.iam.v1.Policy,IamProtos.google.iam.v1.GetIamPolicyRequest|null|undefined,{}|null|undefined>,callback?:Callback<IamProtos.google.iam.v1.Policy,IamProtos.google.iam.v1.GetIamPolicyRequest|null|undefined,{}|null|undefined>):Promise<[IamProtos.google.iam.v1.Policy]>;

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

Parameters
NameDescription
requestIamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

optionsCallOptions |Callback<google.iam.v1.Policy,google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

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

callbackCallback<google.iam.v1.Policy,google.iam.v1.GetIamPolicyRequest | null | undefined, {} | 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 .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

{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.

getLocation(request, options, callback)

getLocation(request:LocationProtos.google.cloud.location.IGetLocationRequest,options?:gax.CallOptions|Callback<LocationProtos.google.cloud.location.ILocation,LocationProtos.google.cloud.location.IGetLocationRequest|null|undefined,{}|null|undefined>,callback?:Callback<LocationProtos.google.cloud.location.ILocation,LocationProtos.google.cloud.location.IGetLocationRequest|null|undefined,{}|null|undefined>):Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
requestLocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

optionsCallOptions |Callback<google.cloud.location.ILocation,google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. SeeCallOptions for more details.

callbackCallback<google.cloud.location.ILocation,google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation for more details and examples.

Example
const[response]=awaitclient.getLocation(request);

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
NameDescription
requestGetOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example
constclient=longrunning.operationsClient();constname='';const[response]=awaitclient.getOperation({name});// doThingsWith(response)

getProjectId()

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

getProjectId(callback)

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

getService(request, options)

getService(request?:protos.google.cloud.apphub.v1.IGetServiceRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest|undefined,{}|undefined]>;

Gets a Service in an Application.

Parameters
NameDescription
requestIGetServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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. Fully qualified name of the Service to fetch.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/services/{service}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetService(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getService(request);console.log(response);}callGetService();

getService(request, options, callback)

getService(request:protos.google.cloud.apphub.v1.IGetServiceRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetServiceRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getService(request, callback)

getService(request:protos.google.cloud.apphub.v1.IGetServiceRequest,callback:Callback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetServiceRequest
callbackCallback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceProjectAttachment(request, options)

getServiceProjectAttachment(request?:protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IServiceProjectAttachment,(protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest|undefined),{}|undefined]>;

Gets a service project attachment.

Parameters
NameDescription
requestIGetServiceProjectAttachmentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IServiceProjectAttachment, (protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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. Fully qualified name of the service project attachment to   *  retrieve. Expected format:   *  `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetServiceProjectAttachment(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getServiceProjectAttachment(request);console.log(response);}callGetServiceProjectAttachment();

getServiceProjectAttachment(request, options, callback)

getServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetServiceProjectAttachmentRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceProjectAttachment(request, callback)

getServiceProjectAttachment(request:protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest,callback:Callback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetServiceProjectAttachmentRequest
callbackCallback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkload(request, options)

getWorkload(request?:protos.google.cloud.apphub.v1.IGetWorkloadRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest|undefined,{}|undefined]>;

Gets a Workload in an Application.

Parameters
NameDescription
requestIGetWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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. Fully qualified name of the Workload to fetch.   *  Expected format:   *  `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallGetWorkload(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.getWorkload(request);console.log(response);}callGetWorkload();

getWorkload(request, options, callback)

getWorkload(request:protos.google.cloud.apphub.v1.IGetWorkloadRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetWorkloadRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkload(request, callback)

getWorkload(request:protos.google.cloud.apphub.v1.IGetWorkloadRequest,callback:Callback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetWorkloadRequest
callbackCallback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest | null | undefined, {} | null | 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.

listApplications(request, options)

listApplications(request?:protos.google.cloud.apphub.v1.IListApplicationsRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IApplication[],protos.google.cloud.apphub.v1.IListApplicationsRequest|null,protos.google.cloud.apphub.v1.IListApplicationsResponse]>;

Lists Applications in a host project and location.

Parameters
NameDescription
requestIListApplicationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IApplication[],protos.google.cloud.apphub.v1.IListApplicationsRequest | null,protos.google.cloud.apphub.v1.IListApplicationsResponse ]>

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

listApplications(request, options, callback)

listApplications(request:protos.google.cloud.apphub.v1.IListApplicationsRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListApplicationsRequest,protos.google.cloud.apphub.v1.IListApplicationsResponse|null|undefined,protos.google.cloud.apphub.v1.IApplication>):void;
Parameters
NameDescription
requestIListApplicationsRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListApplicationsRequest,protos.google.cloud.apphub.v1.IListApplicationsResponse | null | undefined,protos.google.cloud.apphub.v1.IApplication>
Returns
TypeDescription
void

listApplications(request, callback)

listApplications(request:protos.google.cloud.apphub.v1.IListApplicationsRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListApplicationsRequest,protos.google.cloud.apphub.v1.IListApplicationsResponse|null|undefined,protos.google.cloud.apphub.v1.IApplication>):void;
Parameters
NameDescription
requestIListApplicationsRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListApplicationsRequest,protos.google.cloud.apphub.v1.IListApplicationsResponse | null | undefined,protos.google.cloud.apphub.v1.IApplication>
Returns
TypeDescription
void

listApplicationsAsync(request, options)

listApplicationsAsync(request?:protos.google.cloud.apphub.v1.IListApplicationsRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IApplication>;

Equivalent tolistApplications, but returns an iterable object.

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

Parameters
NameDescription
requestIListApplicationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IApplication>

{Object} An iterable Object that allowsasync 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 thedocumentation 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. Project and location to list Applications on.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results.   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results.   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListApplications(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listApplicationsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListApplications();

listApplicationsStream(request, options)

listApplicationsStream(request?:protos.google.cloud.apphub.v1.IListApplicationsRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListApplicationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistApplicationsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listDiscoveredServices(request, options)

listDiscoveredServices(request?:protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IDiscoveredService[],protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest|null,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse]>;

Lists Discovered Services that can be added to an Application in a host project and location.

Parameters
NameDescription
requestIListDiscoveredServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IDiscoveredService[],protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest | null,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array ofDiscoveredService. 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 usinglistDiscoveredServicesAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listDiscoveredServices(request, options, callback)

listDiscoveredServices(request:protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse|null|undefined,protos.google.cloud.apphub.v1.IDiscoveredService>):void;
Parameters
NameDescription
requestIListDiscoveredServicesRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredService>
Returns
TypeDescription
void

listDiscoveredServices(request, callback)

listDiscoveredServices(request:protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse|null|undefined,protos.google.cloud.apphub.v1.IDiscoveredService>):void;
Parameters
NameDescription
requestIListDiscoveredServicesRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredService>
Returns
TypeDescription
void

listDiscoveredServicesAsync(request, options)

listDiscoveredServicesAsync(request?:protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredService>;

Equivalent tolistDiscoveredServices, but returns an iterable object.

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

Parameters
NameDescription
requestIListDiscoveredServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredService>

{Object} An iterable Object that allowsasync iteration. When you iterate the returned iterable, each element will be an object representingDiscoveredService. 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 thedocumentation 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. Project and location to list Discovered Services on.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results.   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results.   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListDiscoveredServices(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listDiscoveredServicesAsync(request);forawait(constresponseofiterable){console.log(response);}}callListDiscoveredServices();

listDiscoveredServicesStream(request, options)

listDiscoveredServicesStream(request?:protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListDiscoveredServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representingDiscoveredService 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 usinglistDiscoveredServicesAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listDiscoveredWorkloads(request, options)

listDiscoveredWorkloads(request?:protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IDiscoveredWorkload[],protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest|null,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse]>;

Lists Discovered Workloads that can be added to an Application in a host project and location.

Parameters
NameDescription
requestIListDiscoveredWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IDiscoveredWorkload[],protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest | null,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array ofDiscoveredWorkload. 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 usinglistDiscoveredWorkloadsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listDiscoveredWorkloads(request, options, callback)

listDiscoveredWorkloads(request:protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse|null|undefined,protos.google.cloud.apphub.v1.IDiscoveredWorkload>):void;
Parameters
NameDescription
requestIListDiscoveredWorkloadsRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredWorkload>
Returns
TypeDescription
void

listDiscoveredWorkloads(request, callback)

listDiscoveredWorkloads(request:protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse|null|undefined,protos.google.cloud.apphub.v1.IDiscoveredWorkload>):void;
Parameters
NameDescription
requestIListDiscoveredWorkloadsRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredWorkload>
Returns
TypeDescription
void

listDiscoveredWorkloadsAsync(request, options)

listDiscoveredWorkloadsAsync(request?:protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredWorkload>;

Equivalent tolistDiscoveredWorkloads, but returns an iterable object.

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

Parameters
NameDescription
requestIListDiscoveredWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredWorkload>

{Object} An iterable Object that allowsasync iteration. When you iterate the returned iterable, each element will be an object representingDiscoveredWorkload. 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 thedocumentation 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. Project and location to list Discovered Workloads on.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results.   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results.   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListDiscoveredWorkloads(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listDiscoveredWorkloadsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListDiscoveredWorkloads();

listDiscoveredWorkloadsStream(request, options)

listDiscoveredWorkloadsStream(request?:protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListDiscoveredWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representingDiscoveredWorkload 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 usinglistDiscoveredWorkloadsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request:LocationProtos.google.cloud.location.IListLocationsRequest,options?:CallOptions):AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

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

Parameters
NameDescription
requestLocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allowsasync 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 thedocumentation for more details and examples.

Example
constiterable=client.listLocationsAsync(request);forawait(constresponseofiterable){// process response}

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 returnsUNIMPLEMENTED. Returns an iterable object.

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

Parameters
NameDescription
requestListOperationsRequest

The request object that will be sent.

optionsCallOptions

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

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms toiteration protocols.

Example
constclient=longrunning.operationsClient();forawait(constresponseofclient.listOperationsAsync(request));// doThingsWith(response)

listServiceProjectAttachments(request, options)

listServiceProjectAttachments(request?:protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IServiceProjectAttachment[],protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest|null,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse]>;

Lists service projects attached to the host project.

Parameters
NameDescription
requestIListServiceProjectAttachmentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IServiceProjectAttachment[],protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest | null,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse ]>

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

listServiceProjectAttachments(request, options, callback)

listServiceProjectAttachments(request:protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse|null|undefined,protos.google.cloud.apphub.v1.IServiceProjectAttachment>):void;
Parameters
NameDescription
requestIListServiceProjectAttachmentsRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse | null | undefined,protos.google.cloud.apphub.v1.IServiceProjectAttachment>
Returns
TypeDescription
void

listServiceProjectAttachments(request, callback)

listServiceProjectAttachments(request:protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse|null|undefined,protos.google.cloud.apphub.v1.IServiceProjectAttachment>):void;
Parameters
NameDescription
requestIListServiceProjectAttachmentsRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse | null | undefined,protos.google.cloud.apphub.v1.IServiceProjectAttachment>
Returns
TypeDescription
void

listServiceProjectAttachmentsAsync(request, options)

listServiceProjectAttachmentsAsync(request?:protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IServiceProjectAttachment>;

Equivalent tolistServiceProjectAttachments, but returns an iterable object.

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

Parameters
NameDescription
requestIListServiceProjectAttachmentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IServiceProjectAttachment>

{Object} An iterable Object that allowsasync 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 thedocumentation 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. Host project ID and location to list service project attachments.   *  Only global location is supported. Expected format:   *  `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results.   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results.   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListServiceProjectAttachments(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listServiceProjectAttachmentsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListServiceProjectAttachments();

listServiceProjectAttachmentsStream(request, options)

listServiceProjectAttachmentsStream(request?:protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListServiceProjectAttachmentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistServiceProjectAttachmentsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listServices(request, options)

listServices(request?:protos.google.cloud.apphub.v1.IListServicesRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IService[],protos.google.cloud.apphub.v1.IListServicesRequest|null,protos.google.cloud.apphub.v1.IListServicesResponse]>;

Lists Services in an Application.

Parameters
NameDescription
requestIListServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IService[],protos.google.cloud.apphub.v1.IListServicesRequest | null,protos.google.cloud.apphub.v1.IListServicesResponse ]>

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

listServices(request, options, callback)

listServices(request:protos.google.cloud.apphub.v1.IListServicesRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListServicesRequest,protos.google.cloud.apphub.v1.IListServicesResponse|null|undefined,protos.google.cloud.apphub.v1.IService>):void;
Parameters
NameDescription
requestIListServicesRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListServicesRequest,protos.google.cloud.apphub.v1.IListServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IService>
Returns
TypeDescription
void

listServices(request, callback)

listServices(request:protos.google.cloud.apphub.v1.IListServicesRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListServicesRequest,protos.google.cloud.apphub.v1.IListServicesResponse|null|undefined,protos.google.cloud.apphub.v1.IService>):void;
Parameters
NameDescription
requestIListServicesRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListServicesRequest,protos.google.cloud.apphub.v1.IListServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IService>
Returns
TypeDescription
void

listServicesAsync(request, options)

listServicesAsync(request?:protos.google.cloud.apphub.v1.IListServicesRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IService>;

Equivalent tolistServices, but returns an iterable object.

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

Parameters
NameDescription
requestIListServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IService>

{Object} An iterable Object that allowsasync 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 thedocumentation 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. Fully qualified name of the parent Application to list Services   *  for. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListServices(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listServicesAsync(request);forawait(constresponseofiterable){console.log(response);}}callListServices();

listServicesStream(request, options)

listServicesStream(request?:protos.google.cloud.apphub.v1.IListServicesRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListServicesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistServicesAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listWorkloads(request, options)

listWorkloads(request?:protos.google.cloud.apphub.v1.IListWorkloadsRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.IWorkload[],protos.google.cloud.apphub.v1.IListWorkloadsRequest|null,protos.google.cloud.apphub.v1.IListWorkloadsResponse]>;

Lists Workloads in an Application.

Parameters
NameDescription
requestIListWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.IWorkload[],protos.google.cloud.apphub.v1.IListWorkloadsRequest | null,protos.google.cloud.apphub.v1.IListWorkloadsResponse ]>

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

listWorkloads(request, options, callback)

listWorkloads(request:protos.google.cloud.apphub.v1.IListWorkloadsRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListWorkloadsRequest,protos.google.cloud.apphub.v1.IListWorkloadsResponse|null|undefined,protos.google.cloud.apphub.v1.IWorkload>):void;
Parameters
NameDescription
requestIListWorkloadsRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListWorkloadsRequest,protos.google.cloud.apphub.v1.IListWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IWorkload>
Returns
TypeDescription
void

listWorkloads(request, callback)

listWorkloads(request:protos.google.cloud.apphub.v1.IListWorkloadsRequest,callback:PaginationCallback<protos.google.cloud.apphub.v1.IListWorkloadsRequest,protos.google.cloud.apphub.v1.IListWorkloadsResponse|null|undefined,protos.google.cloud.apphub.v1.IWorkload>):void;
Parameters
NameDescription
requestIListWorkloadsRequest
callbackPaginationCallback<protos.google.cloud.apphub.v1.IListWorkloadsRequest,protos.google.cloud.apphub.v1.IListWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IWorkload>
Returns
TypeDescription
void

listWorkloadsAsync(request, options)

listWorkloadsAsync(request?:protos.google.cloud.apphub.v1.IListWorkloadsRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.apphub.v1.IWorkload>;

Equivalent tolistWorkloads, but returns an iterable object.

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

Parameters
NameDescription
requestIListWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apphub.v1.IWorkload>

{Object} An iterable Object that allowsasync 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 thedocumentation 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. Fully qualified name of the parent Application to list Workloads   *  for. Expected format:   *  `projects/{project}/locations/{location}/applications/{application}`.   */// const parent = 'abc123'/**   *  Optional. Requested page size. Server may return fewer items than   *  requested. If unspecified, server will pick an appropriate default.   */// const pageSize = 1234/**   *  Optional. A token identifying a page of results the server should return.   */// const pageToken = 'abc123'/**   *  Optional. Filtering results.   */// const filter = 'abc123'/**   *  Optional. Hint for how to order the results.   */// const orderBy = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallListWorkloads(){// Construct requestconstrequest={parent,};// Run requestconstiterable=apphubClient.listWorkloadsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListWorkloads();

listWorkloadsStream(request, options)

listWorkloadsStream(request?:protos.google.cloud.apphub.v1.IListWorkloadsRequest,options?:CallOptions):Transform;

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

Parameters
NameDescription
requestIListWorkloadsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistWorkloadsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
projectstring
locationstring
Returns
TypeDescription
string

{string} Resource name string.

lookupDiscoveredService(request, options)

lookupDiscoveredService(request?:protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest|undefined,{}|undefined]>;

Lists a Discovered Service in a host project and location, with a given resource URI.

Parameters
NameDescription
requestILookupDiscoveredServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingLookupDiscoveredServiceResponse. Please see thedocumentation 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. Host project ID and location to lookup Discovered Service in.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. Resource URI to find DiscoveredService for.   *  Accepts both project number and project ID and does translation when   *  needed.   */// const uri = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallLookupDiscoveredService(){// Construct requestconstrequest={parent,uri,};// Run requestconstresponse=awaitapphubClient.lookupDiscoveredService(request);console.log(response);}callLookupDiscoveredService();

lookupDiscoveredService(request, options, callback)

lookupDiscoveredService(request:protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupDiscoveredServiceRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupDiscoveredService(request, callback)

lookupDiscoveredService(request:protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest,callback:Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupDiscoveredServiceRequest
callbackCallback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupDiscoveredWorkload(request, options)

lookupDiscoveredWorkload(request?:protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,(protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest|undefined),{}|undefined]>;

Lists a Discovered Workload in a host project and location, with a given resource URI.

Parameters
NameDescription
requestILookupDiscoveredWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse, (protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingLookupDiscoveredWorkloadResponse. Please see thedocumentation 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. Host project ID and location to lookup Discovered Workload in.   *  Expected format: `projects/{project}/locations/{location}`.   */// const parent = 'abc123'/**   *  Required. Resource URI to find Discovered Workload for.   *  Accepts both project number and project ID and does translation when   *  needed.   */// const uri = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallLookupDiscoveredWorkload(){// Construct requestconstrequest={parent,uri,};// Run requestconstresponse=awaitapphubClient.lookupDiscoveredWorkload(request);console.log(response);}callLookupDiscoveredWorkload();

lookupDiscoveredWorkload(request, options, callback)

lookupDiscoveredWorkload(request:protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupDiscoveredWorkloadRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupDiscoveredWorkload(request, callback)

lookupDiscoveredWorkload(request:protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest,callback:Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupDiscoveredWorkloadRequest
callbackCallback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupServiceProjectAttachment(request, options)

lookupServiceProjectAttachment(request?:protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest,options?:CallOptions):Promise<[protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,(protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest|undefined),{}|undefined]>;

Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.

Parameters
NameDescription
requestILookupServiceProjectAttachmentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse, (protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representingLookupServiceProjectAttachmentResponse. Please see thedocumentation 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. Service project ID and location to lookup service project   *  attachment for. Only global location is supported. Expected format:   *  `projects/{project}/locations/{location}`.   */// const name = 'abc123'// Imports the Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallLookupServiceProjectAttachment(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitapphubClient.lookupServiceProjectAttachment(request);console.log(response);}callLookupServiceProjectAttachment();

lookupServiceProjectAttachment(request, options, callback)

lookupServiceProjectAttachment(request:protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest,options:CallOptions,callback:Callback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupServiceProjectAttachmentRequest
optionsCallOptions
callbackCallback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupServiceProjectAttachment(request, callback)

lookupServiceProjectAttachment(request:protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest,callback:Callback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestILookupServiceProjectAttachmentRequest
callbackCallback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

matchApplicationFromApplicationName(applicationName)

matchApplicationFromApplicationName(applicationName:string):string|number;

Parse the application from Application resource.

Parameter
NameDescription
applicationNamestring

A fully-qualified path representing Application resource.

Returns
TypeDescription
string | number

{string} A string representing the application.

matchApplicationFromServiceName(serviceName)

matchApplicationFromServiceName(serviceName:string):string|number;

Parse the application from Service resource.

Parameter
NameDescription
serviceNamestring

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the application.

matchApplicationFromWorkloadName(workloadName)

matchApplicationFromWorkloadName(workloadName:string):string|number;

Parse the application from Workload resource.

Parameter
NameDescription
workloadNamestring

A fully-qualified path representing Workload resource.

Returns
TypeDescription
string | number

{string} A string representing the application.

matchDiscoveredServiceFromDiscoveredServiceName(discoveredServiceName)

matchDiscoveredServiceFromDiscoveredServiceName(discoveredServiceName:string):string|number;

Parse the discovered_service from DiscoveredService resource.

Parameter
NameDescription
discoveredServiceNamestring

A fully-qualified path representing DiscoveredService resource.

Returns
TypeDescription
string | number

{string} A string representing the discovered_service.

matchDiscoveredWorkloadFromDiscoveredWorkloadName(discoveredWorkloadName)

matchDiscoveredWorkloadFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;

Parse the discovered_workload from DiscoveredWorkload resource.

Parameter
NameDescription
discoveredWorkloadNamestring

A fully-qualified path representing DiscoveredWorkload resource.

Returns
TypeDescription
string | number

{string} A string representing the discovered_workload.

matchLocationFromApplicationName(applicationName)

matchLocationFromApplicationName(applicationName:string):string|number;

Parse the location from Application resource.

Parameter
NameDescription
applicationNamestring

A fully-qualified path representing Application resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromDiscoveredServiceName(discoveredServiceName)

matchLocationFromDiscoveredServiceName(discoveredServiceName:string):string|number;

Parse the location from DiscoveredService resource.

Parameter
NameDescription
discoveredServiceNamestring

A fully-qualified path representing DiscoveredService resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromDiscoveredWorkloadName(discoveredWorkloadName)

matchLocationFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;

Parse the location from DiscoveredWorkload resource.

Parameter
NameDescription
discoveredWorkloadNamestring

A fully-qualified path representing DiscoveredWorkload 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
locationNamestring

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServiceName(serviceName)

matchLocationFromServiceName(serviceName:string):string|number;

Parse the location from Service resource.

Parameter
NameDescription
serviceNamestring

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServiceProjectAttachmentName(serviceProjectAttachmentName)

matchLocationFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;

Parse the location from ServiceProjectAttachment resource.

Parameter
NameDescription
serviceProjectAttachmentNamestring

A fully-qualified path representing ServiceProjectAttachment resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkloadName(workloadName)

matchLocationFromWorkloadName(workloadName:string):string|number;

Parse the location from Workload resource.

Parameter
NameDescription
workloadNamestring

A fully-qualified path representing Workload resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromApplicationName(applicationName)

matchProjectFromApplicationName(applicationName:string):string|number;

Parse the project from Application resource.

Parameter
NameDescription
applicationNamestring

A fully-qualified path representing Application resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromDiscoveredServiceName(discoveredServiceName)

matchProjectFromDiscoveredServiceName(discoveredServiceName:string):string|number;

Parse the project from DiscoveredService resource.

Parameter
NameDescription
discoveredServiceNamestring

A fully-qualified path representing DiscoveredService resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromDiscoveredWorkloadName(discoveredWorkloadName)

matchProjectFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;

Parse the project from DiscoveredWorkload resource.

Parameter
NameDescription
discoveredWorkloadNamestring

A fully-qualified path representing DiscoveredWorkload 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
locationNamestring

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
projectNamestring

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServiceName(serviceName)

matchProjectFromServiceName(serviceName:string):string|number;

Parse the project from Service resource.

Parameter
NameDescription
serviceNamestring

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServiceProjectAttachmentName(serviceProjectAttachmentName)

matchProjectFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;

Parse the project from ServiceProjectAttachment resource.

Parameter
NameDescription
serviceProjectAttachmentNamestring

A fully-qualified path representing ServiceProjectAttachment resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkloadName(workloadName)

matchProjectFromWorkloadName(workloadName:string):string|number;

Parse the project from Workload resource.

Parameter
NameDescription
workloadNamestring

A fully-qualified path representing Workload resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchServiceFromServiceName(serviceName)

matchServiceFromServiceName(serviceName:string):string|number;

Parse the service from Service resource.

Parameter
NameDescription
serviceNamestring

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

matchServiceProjectAttachmentFromServiceProjectAttachmentName(serviceProjectAttachmentName)

matchServiceProjectAttachmentFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;

Parse the service_project_attachment from ServiceProjectAttachment resource.

Parameter
NameDescription
serviceProjectAttachmentNamestring

A fully-qualified path representing ServiceProjectAttachment resource.

Returns
TypeDescription
string | number

{string} A string representing the service_project_attachment.

matchWorkloadFromWorkloadName(workloadName)

matchWorkloadFromWorkloadName(workloadName:string):string|number;

Parse the workload from Workload resource.

Parameter
NameDescription
workloadNamestring

A fully-qualified path representing Workload resource.

Returns
TypeDescription
string | number

{string} A string representing the workload.

projectPath(project)

projectPath(project:string):string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
projectstring
Returns
TypeDescription
string

{string} Resource name string.

servicePath(project, location, application, service)

servicePath(project:string,location:string,application:string,service:string):string;

Return a fully-qualified service resource name string.

Parameters
NameDescription
projectstring
locationstring
applicationstring
servicestring
Returns
TypeDescription
string

{string} Resource name string.

serviceProjectAttachmentPath(project, location, serviceProjectAttachment)

serviceProjectAttachmentPath(project:string,location:string,serviceProjectAttachment:string):string;

Return a fully-qualified serviceProjectAttachment resource name string.

Parameters
NameDescription
projectstring
locationstring
serviceProjectAttachmentstring
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request:IamProtos.google.iam.v1.SetIamPolicyRequest,options?:gax.CallOptions|Callback<IamProtos.google.iam.v1.Policy,IamProtos.google.iam.v1.SetIamPolicyRequest|null|undefined,{}|null|undefined>,callback?:Callback<IamProtos.google.iam.v1.Policy,IamProtos.google.iam.v1.SetIamPolicyRequest|null|undefined,{}|null|undefined>):Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestIamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

optionsCallOptions |Callback<google.iam.v1.Policy,google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

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

callbackCallback<google.iam.v1.Policy,google.iam.v1.SetIamPolicyRequest | null | undefined, {} | 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 .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

{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.

testIamPermissions(request, options, callback)

testIamPermissions(request:IamProtos.google.iam.v1.TestIamPermissionsRequest,options?:gax.CallOptions|Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse,IamProtos.google.iam.v1.TestIamPermissionsRequest|null|undefined,{}|null|undefined>,callback?:Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse,IamProtos.google.iam.v1.TestIamPermissionsRequest|null|undefined,{}|null|undefined>):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestIamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

optionsCallOptions |Callback<google.iam.v1.TestIamPermissionsResponse,google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

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

callbackCallback<google.iam.v1.TestIamPermissionsResponse,google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | 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 .

Returns
TypeDescription
Promise<[google.iam.v1.TestIamPermissionsResponse]>

{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.

updateApplication(request, options)

updateApplication(request?:protos.google.cloud.apphub.v1.IUpdateApplicationRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Updates an Application in a host project and location.

Parameters
NameDescription
requestIUpdateApplicationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Application resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const application = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateApplication(){// Construct requestconstrequest={updateMask,application,};// Run requestconst[operation]=awaitapphubClient.updateApplication(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateApplication();

updateApplication(request, options, callback)

updateApplication(request:protos.google.cloud.apphub.v1.IUpdateApplicationRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateApplicationRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateApplication(request, callback)

updateApplication(request:protos.google.cloud.apphub.v1.IUpdateApplicationRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateApplicationRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateService(request, options)

updateService(request?:protos.google.cloud.apphub.v1.IUpdateServiceRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Updates a Service in an Application.

Parameters
NameDescription
requestIUpdateServiceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Service resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const service = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateService(){// Construct requestconstrequest={updateMask,service,};// Run requestconst[operation]=awaitapphubClient.updateService(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateService();

updateService(request, options, callback)

updateService(request:protos.google.cloud.apphub.v1.IUpdateServiceRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateServiceRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateService(request, callback)

updateService(request:protos.google.cloud.apphub.v1.IUpdateServiceRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateServiceRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkload(request, options)

updateWorkload(request?:protos.google.cloud.apphub.v1.IUpdateWorkloadRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Updates a Workload in an Application.

Parameters
NameDescription
requestIUpdateWorkloadRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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. Field mask is used to specify the fields to be overwritten in the   *  Workload resource by the update.   *  The fields specified in the update_mask are relative to the resource, not   *  the full request.   *  The API changes the values of the fields as specified in the update_mask.   *  The API ignores the values of all fields not covered by the update_mask.   *  You can also unset a field by not specifying it in the updated message, but   *  adding the field to the mask. This clears whatever value the field   *  previously had.   */// const updateMask = {}/**   *  Required. The resource being updated.   */// const workload = {}/**   *  Optional. 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 the   *  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 Apphub libraryconst{AppHubClient}=require('@google-cloud/apphub').v1;// Instantiates a clientconstapphubClient=newAppHubClient();asyncfunctioncallUpdateWorkload(){// Construct requestconstrequest={updateMask,workload,};// Run requestconst[operation]=awaitapphubClient.updateWorkload(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateWorkload();

updateWorkload(request, options, callback)

updateWorkload(request:protos.google.cloud.apphub.v1.IUpdateWorkloadRequest,options:CallOptions,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateWorkloadRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkload(request, callback)

updateWorkload(request:protos.google.cloud.apphub.v1.IUpdateWorkloadRequest,callback:Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIUpdateWorkloadRequest
callbackCallback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

workloadPath(project, location, application, workload)

workloadPath(project:string,location:string,application:string,workload:string):string;

Return a fully-qualified workload resource name string.

Parameters
NameDescription
projectstring
locationstring
applicationstring
workloadstring
Returns
TypeDescription
string

{string} Resource name string.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.