Class v1.AppHubClient (0.1.0) Stay organized with collections Save and categorize content based on your preferences.
The App Hub API allows you to manage App Hub resources. v1
Package
@google-cloud/apphubConstructors
(constructor)(opts, gaxInstance)
constructor(opts?:ClientOptions,gaxInstance?:typeofgax|typeofgax.fallback);Construct an instance of AppHubClient.
| Parameters | |
|---|---|
| Name | Description |
opts | ClientOptions |
gaxInstance | typeofgax | typeoffallback: loaded instance of |
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 | |
|---|---|
| Name | Description |
project | string |
location | string |
application | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
cancelOperation(request, options, callback)
cancelOperation(request:protos.google.longrunning.CancelOperationRequest,options?:gax.CallOptions|Callback<protos.google.protobuf.Empty,protos.google.longrunning.CancelOperationRequest,{}|undefined|null>,callback?:Callback<protos.google.longrunning.CancelOperationRequest,protos.google.protobuf.Empty,{}|undefined|null>):Promise<protos.google.protobuf.Empty>;Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it 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 | |
|---|---|
| Name | Description |
request | CancelOperationRequestThe request object that will be sent. |
options | CallOptions |Callback<protos.google.protobuf.Empty,protos.google.longrunning.CancelOperationRequest, {} | undefined | null>Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. Seegax.CallOptions for the details. |
callback | Callback<protos.google.longrunning.CancelOperationRequest,protos.google.protobuf.Empty, {} | undefined | null>The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> | |
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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
name | stringThe operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateApplicationRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateApplicationRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateServiceRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateServiceProjectAttachmentRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateServiceProjectAttachmentRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ICreateWorkloadRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteApplicationRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | IDeleteApplicationRequest |
options | CallOptions |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteApplicationRequest |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
deleteOperation(request, options, callback)
deleteOperation(request:protos.google.longrunning.DeleteOperationRequest,options?:gax.CallOptions|Callback<protos.google.protobuf.Empty,protos.google.longrunning.DeleteOperationRequest,{}|null|undefined>,callback?:Callback<protos.google.protobuf.Empty,protos.google.longrunning.DeleteOperationRequest,{}|null|undefined>):Promise<protos.google.protobuf.Empty>;Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returnsgoogle.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request | DeleteOperationRequestThe request object that will be sent. |
options | CallOptions |Callback<protos.google.protobuf.Empty,protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. Seegax.CallOptions for the details. |
callback | Callback<protos.google.protobuf.Empty,protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> | |
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 | |
|---|---|
| Name | Description |
request | IDeleteServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | IDeleteServiceRequest |
options | CallOptions |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteServiceRequest |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteServiceProjectAttachmentRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | IDeleteServiceProjectAttachmentRequest |
options | CallOptions |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteServiceProjectAttachmentRequest |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | IDeleteWorkloadRequest |
options | CallOptions |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDeleteWorkloadRequest |
callback | Callback<LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDetachServiceProjectAttachmentRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IDetachServiceProjectAttachmentRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IDetachServiceProjectAttachmentRequest |
callback | Callback<protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.IDetachServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
discoveredServicePath(project, location, discoveredService)
discoveredServicePath(project:string,location:string,discoveredService:string):string;Return a fully-qualified discoveredService resource name string.
| Parameters | |
|---|---|
| Name | Description |
project | string |
location | string |
discoveredService | string |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
project | string |
location | string |
discoveredWorkload | string |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetApplicationRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetApplicationRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetApplicationRequest |
callback | Callback<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IGetApplicationRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredServiceRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredServiceRequest |
callback | Callback<protos.google.cloud.apphub.v1.IDiscoveredService,protos.google.cloud.apphub.v1.IGetDiscoveredServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredWorkloadRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetDiscoveredWorkloadRequest |
callback | Callback<protos.google.cloud.apphub.v1.IDiscoveredWorkload,protos.google.cloud.apphub.v1.IGetDiscoveredWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IamProtos.google.iam.v1.GetIamPolicyRequestThe request object that will be sent. |
options | CallOptions |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. |
callback | Callback<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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | LocationProtos.google.cloud.location.IGetLocationRequestThe request object that will be sent. |
options | CallOptions |Callback<google.cloud.location.ILocation,google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>Call options. SeeCallOptions for more details. |
callback | Callback<google.cloud.location.ILocation,google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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. |
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 | |
|---|---|
| Name | Description |
request | GetOperationRequestThe request object that will be sent. |
options | CallOptions |Callback<protos.google.longrunning.Operation,protos.google.longrunning.GetOperationRequest, {} | null | undefined>Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. Seegax.CallOptions for the details. |
callback | Callback<protos.google.longrunning.Operation,protos.google.longrunning.GetOperationRequest, {} | null | undefined>The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.longrunning.Operation]> | |
constclient=longrunning.operationsClient();constname='';const[response]=awaitclient.getOperation({name});// doThingsWith(response)getProjectId()
getProjectId():Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback:Callback<string,undefined,undefined>):void;| Parameter | |
|---|---|
| Name | Description |
callback | Callback<string, undefined, undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
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 | |
|---|---|
| Name | Description |
request | IGetServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetServiceRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetServiceRequest |
callback | Callback<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IGetServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetServiceProjectAttachmentRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetServiceProjectAttachmentRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetServiceProjectAttachmentRequest |
callback | Callback<protos.google.cloud.apphub.v1.IServiceProjectAttachment,protos.google.cloud.apphub.v1.IGetServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IGetWorkloadRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IGetWorkloadRequest |
callback | Callback<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IGetWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
initialize()
initialize():Promise<{[name:string]:Function;}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{ [name: string]:Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
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 | |
|---|---|
| Name | Description |
request | IListApplicationsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListApplicationsRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListApplicationsRequest,protos.google.cloud.apphub.v1.IListApplicationsResponse | null | undefined,protos.google.cloud.apphub.v1.IApplication> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListApplicationsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListApplicationsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredServicesRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest,protos.google.cloud.apphub.v1.IListDiscoveredServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredService> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListDiscoveredServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredWorkloadsRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest,protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IDiscoveredWorkload> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListDiscoveredWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListDiscoveredWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | LocationProtos.google.cloud.location.IListLocationsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
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 | |
|---|---|
| Name | Description |
request | ListOperationsRequestThe request object that will be sent. |
options | CallOptionsOptional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. Seegax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms toiteration protocols. |
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 | |
|---|---|
| Name | Description |
request | IListServiceProjectAttachmentsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListServiceProjectAttachmentsRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest,protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsResponse | null | undefined,protos.google.cloud.apphub.v1.IServiceProjectAttachment> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListServiceProjectAttachmentsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListServiceProjectAttachmentsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
|---|---|
| Name | Description |
request | IListServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListServicesRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListServicesRequest,protos.google.cloud.apphub.v1.IListServicesResponse | null | undefined,protos.google.cloud.apphub.v1.IService> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListServicesRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
|---|---|
| Name | Description |
request | IListWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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 using |
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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListWorkloadsRequest |
callback | PaginationCallback<protos.google.cloud.apphub.v1.IListWorkloadsRequest,protos.google.cloud.apphub.v1.IListWorkloadsResponse | null | undefined,protos.google.cloud.apphub.v1.IWorkload> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IListWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | IListWorkloadsRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
locationPath(project, location)
locationPath(project:string,location:string):string;Return a fully-qualified location resource name string.
| Parameters | |
|---|---|
| Name | Description |
project | string |
location | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredServiceRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredServiceRequest |
callback | Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredServiceResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredServiceRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredWorkloadRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ILookupDiscoveredWorkloadRequest |
callback | Callback<protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadResponse,protos.google.cloud.apphub.v1.ILookupDiscoveredWorkloadRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ILookupServiceProjectAttachmentRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. |
/** * 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 | |
|---|---|
| Name | Description |
request | ILookupServiceProjectAttachmentRequest |
options | CallOptions |
callback | Callback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | ILookupServiceProjectAttachmentRequest |
callback | Callback<protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentResponse,protos.google.cloud.apphub.v1.ILookupServiceProjectAttachmentRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
matchApplicationFromApplicationName(applicationName)
matchApplicationFromApplicationName(applicationName:string):string|number;Parse the application from Application resource.
| Parameter | |
|---|---|
| Name | Description |
applicationName | stringA fully-qualified path representing Application resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the application. |
matchApplicationFromServiceName(serviceName)
matchApplicationFromServiceName(serviceName:string):string|number;Parse the application from Service resource.
| Parameter | |
|---|---|
| Name | Description |
serviceName | stringA fully-qualified path representing Service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the application. |
matchApplicationFromWorkloadName(workloadName)
matchApplicationFromWorkloadName(workloadName:string):string|number;Parse the application from Workload resource.
| Parameter | |
|---|---|
| Name | Description |
workloadName | stringA fully-qualified path representing Workload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the application. |
matchDiscoveredServiceFromDiscoveredServiceName(discoveredServiceName)
matchDiscoveredServiceFromDiscoveredServiceName(discoveredServiceName:string):string|number;Parse the discovered_service from DiscoveredService resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredServiceName | stringA fully-qualified path representing DiscoveredService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the discovered_service. |
matchDiscoveredWorkloadFromDiscoveredWorkloadName(discoveredWorkloadName)
matchDiscoveredWorkloadFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;Parse the discovered_workload from DiscoveredWorkload resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredWorkloadName | stringA fully-qualified path representing DiscoveredWorkload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the discovered_workload. |
matchLocationFromApplicationName(applicationName)
matchLocationFromApplicationName(applicationName:string):string|number;Parse the location from Application resource.
| Parameter | |
|---|---|
| Name | Description |
applicationName | stringA fully-qualified path representing Application resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromDiscoveredServiceName(discoveredServiceName)
matchLocationFromDiscoveredServiceName(discoveredServiceName:string):string|number;Parse the location from DiscoveredService resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredServiceName | stringA fully-qualified path representing DiscoveredService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromDiscoveredWorkloadName(discoveredWorkloadName)
matchLocationFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;Parse the location from DiscoveredWorkload resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredWorkloadName | stringA fully-qualified path representing DiscoveredWorkload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName:string):string|number;Parse the location from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName | stringA fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromServiceName(serviceName)
matchLocationFromServiceName(serviceName:string):string|number;Parse the location from Service resource.
| Parameter | |
|---|---|
| Name | Description |
serviceName | stringA fully-qualified path representing Service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromServiceProjectAttachmentName(serviceProjectAttachmentName)
matchLocationFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;Parse the location from ServiceProjectAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceProjectAttachmentName | stringA fully-qualified path representing ServiceProjectAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromWorkloadName(workloadName)
matchLocationFromWorkloadName(workloadName:string):string|number;Parse the location from Workload resource.
| Parameter | |
|---|---|
| Name | Description |
workloadName | stringA fully-qualified path representing Workload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromApplicationName(applicationName)
matchProjectFromApplicationName(applicationName:string):string|number;Parse the project from Application resource.
| Parameter | |
|---|---|
| Name | Description |
applicationName | stringA fully-qualified path representing Application resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromDiscoveredServiceName(discoveredServiceName)
matchProjectFromDiscoveredServiceName(discoveredServiceName:string):string|number;Parse the project from DiscoveredService resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredServiceName | stringA fully-qualified path representing DiscoveredService resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromDiscoveredWorkloadName(discoveredWorkloadName)
matchProjectFromDiscoveredWorkloadName(discoveredWorkloadName:string):string|number;Parse the project from DiscoveredWorkload resource.
| Parameter | |
|---|---|
| Name | Description |
discoveredWorkloadName | stringA fully-qualified path representing DiscoveredWorkload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName:string):string|number;Parse the project from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName | stringA fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName:string):string|number;Parse the project from Project resource.
| Parameter | |
|---|---|
| Name | Description |
projectName | stringA fully-qualified path representing Project resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromServiceName(serviceName)
matchProjectFromServiceName(serviceName:string):string|number;Parse the project from Service resource.
| Parameter | |
|---|---|
| Name | Description |
serviceName | stringA fully-qualified path representing Service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromServiceProjectAttachmentName(serviceProjectAttachmentName)
matchProjectFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;Parse the project from ServiceProjectAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceProjectAttachmentName | stringA fully-qualified path representing ServiceProjectAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromWorkloadName(workloadName)
matchProjectFromWorkloadName(workloadName:string):string|number;Parse the project from Workload resource.
| Parameter | |
|---|---|
| Name | Description |
workloadName | stringA fully-qualified path representing Workload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the project. |
matchServiceFromServiceName(serviceName)
matchServiceFromServiceName(serviceName:string):string|number;Parse the service from Service resource.
| Parameter | |
|---|---|
| Name | Description |
serviceName | stringA fully-qualified path representing Service resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the service. |
matchServiceProjectAttachmentFromServiceProjectAttachmentName(serviceProjectAttachmentName)
matchServiceProjectAttachmentFromServiceProjectAttachmentName(serviceProjectAttachmentName:string):string|number;Parse the service_project_attachment from ServiceProjectAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceProjectAttachmentName | stringA fully-qualified path representing ServiceProjectAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the service_project_attachment. |
matchWorkloadFromWorkloadName(workloadName)
matchWorkloadFromWorkloadName(workloadName:string):string|number;Parse the workload from Workload resource.
| Parameter | |
|---|---|
| Name | Description |
workloadName | stringA fully-qualified path representing Workload resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the workload. |
projectPath(project)
projectPath(project:string):string;Return a fully-qualified project resource name string.
| Parameter | |
|---|---|
| Name | Description |
project | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
servicePath(project, location, application, service)
servicePath(project:string,location:string,application:string,service:string):string;Return a fully-qualified service resource name string.
| Parameters | |
|---|---|
| Name | Description |
project | string |
location | string |
application | string |
service | string |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
project | string |
location | string |
serviceProjectAttachment | string |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IamProtos.google.iam.v1.SetIamPolicyRequestThe request object that will be sent. |
options | CallOptions |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. |
callback | Callback<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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IamProtos.google.iam.v1.TestIamPermissionsRequestThe request object that will be sent. |
options | CallOptions |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. |
callback | Callback<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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateApplicationRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateApplicationRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IApplication,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateServiceRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateServiceRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IService,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateWorkloadRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
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. Its |
/** * 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 | |
|---|---|
| Name | Description |
request | 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> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request | IUpdateWorkloadRequest |
callback | Callback<LROperation<protos.google.cloud.apphub.v1.IWorkload,protos.google.cloud.apphub.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
project | string |
location | string |
application | string |
workload | string |
| Returns | |
|---|---|
| Type | Description |
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.