The App Hub API allows you to manage App Hub resources. v1
Package
@google-cloud/apphubConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of AppHubClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;
The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): 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
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
universeDomain
get universeDomain(): 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 returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.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 by createApplication()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateApplication() {
// Construct request
const request = {
parent,
applicationId,
application,
};
// Run request
const [operation] = await apphubClient.createApplication(request);
const [response] = await operation.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 by createService()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateService() {
// Construct request
const request = {
parent,
serviceId,
service,
};
// Run request
const [operation] = await apphubClient.createService(request);
const [response] = await operation.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 by createServiceProjectAttachment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateServiceProjectAttachment() {
// Construct request
const request = {
parent,
serviceProjectAttachmentId,
serviceProjectAttachment,
};
// Run request
const [operation] = await apphubClient.createServiceProjectAttachment(request);
const [response] = await operation.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 by createWorkload()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateWorkload() {
// Construct request
const request = {
parent,
workloadId,
workload,
};
// Run request
const [operation] = await apphubClient.createWorkload(request);
const [response] = await operation.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 by deleteApplication()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteApplication() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteApplication(request);
const [response] = await operation.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 by deleteService()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteService() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteService(request);
const [response] = await operation.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 by deleteServiceProjectAttachment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteServiceProjectAttachment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteServiceProjectAttachment(request);
const [response] = await operation.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 by deleteWorkload()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteWorkload() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteWorkload(request);
const [response] = await operation.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 by updateApplication()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callUpdateApplication() {
// Construct request
const request = {
updateMask,
application,
};
// Run request
const [operation] = await apphubClient.updateApplication(request);
const [response] = await operation.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 by updateService()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callUpdateService() {
// Construct request
const request = {
updateMask,
service,
};
// Run request
const [operation] = await apphubClient.updateService(request);
const [response] = await operation.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 by updateWorkload()
.
Parameter | |
---|---|
Name | Description |
name |
string
The 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callUpdateWorkload() {
// Construct request
const request = {
updateMask,
workload,
};
// Run request
const [operation] = await apphubClient.updateWorkload(request);
const [response] = await operation.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 |
ICreateApplicationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateApplication() {
// Construct request
const request = {
parent,
applicationId,
application,
};
// Run request
const [operation] = await apphubClient.createApplication(request);
const [response] = await operation.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 |
ICreateServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateService() {
// Construct request
const request = {
parent,
serviceId,
service,
};
// Run request
const [operation] = await apphubClient.createService(request);
const [response] = await operation.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 |
ICreateServiceProjectAttachmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateServiceProjectAttachment() {
// Construct request
const request = {
parent,
serviceProjectAttachmentId,
serviceProjectAttachment,
};
// Run request
const [operation] = await apphubClient.createServiceProjectAttachment(request);
const [response] = await operation.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 |
ICreateWorkloadRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callCreateWorkload() {
// Construct request
const request = {
parent,
workloadId,
workload,
};
// Run request
const [operation] = await apphubClient.createWorkload(request);
const [response] = await operation.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 |
IDeleteApplicationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteApplication() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteApplication(request);
const [response] = await operation.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 returns google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.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 |
IDeleteServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteService() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteService(request);
const [response] = await operation.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 |
IDeleteServiceProjectAttachmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteServiceProjectAttachment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteServiceProjectAttachment(request);
const [response] = await operation.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 |
IDeleteWorkloadRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDeleteWorkload() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await apphubClient.deleteWorkload(request);
const [response] = await operation.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 |
IDetachServiceProjectAttachmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 representing DetachServiceProjectAttachmentResponse. Please see the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callDetachServiceProjectAttachment() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IGetApplicationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetApplication() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IGetDiscoveredServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 representing DiscoveredService. Please see the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetDiscoveredService() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IGetDiscoveredWorkloadRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 representing DiscoveredWorkload. Please see the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetDiscoveredWorkload() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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.GetIamPolicyRequest
The 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. See gax.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.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions 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 the documentation for more details and examples. |
const [response] = await client.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 |
GetOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
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 |
IGetServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetService() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IGetServiceProjectAttachmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetServiceProjectAttachment() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IGetWorkloadRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 the documentation 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callGetWorkload() {
// Construct request
const request = {
name,
};
// Run request
const response = await apphubClient.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 |
IListApplicationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 to listApplications
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListApplicationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.apphub.v1.IApplication> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callListApplications() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = apphubClient.listApplicationsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListApplications();
listApplicationsStream(request, options)
listApplicationsStream(request?: protos.google.cloud.apphub.v1.IListApplicationsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListApplicationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 |
IListDiscoveredServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 of DiscoveredService. 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 to listDiscoveredServices
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListDiscoveredServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredService> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DiscoveredService. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callListDiscoveredServices() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = apphubClient.listDiscoveredServicesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDiscoveredServices();
listDiscoveredServicesStream(request, options)
listDiscoveredServicesStream(request?: protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListDiscoveredServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing DiscoveredService 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 |
IListDiscoveredWorkloadsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 of DiscoveredWorkload. 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 to listDiscoveredWorkloads
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListDiscoveredWorkloadsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.apphub.v1.IDiscoveredWorkload> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DiscoveredWorkload. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callListDiscoveredWorkloads() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = apphubClient.listDiscoveredWorkloadsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDiscoveredWorkloads();
listDiscoveredWorkloadsStream(request, options)
listDiscoveredWorkloadsStream(request?: protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListDiscoveredWorkloadsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing DiscoveredWorkload 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.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<google.cloud.location.ILocation> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// 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 returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters | |
---|---|
Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.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 |
IListServiceProjectAttachmentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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 to listServiceProjectAttachments
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListServiceProjectAttachmentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.apphub.v1.IServiceProjectAttachment> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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 library
const {AppHubClient} = require('@google-cloud/apphub').v1;
// Instantiates a client
const apphubClient = new AppHubClient();
async function callListServiceProjectAttachments() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = apphubClient.listServiceProjectAttachmentsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListServiceProjectAttachments();
listServiceProjectAttachmentsStream(request, options)
listServiceProjectAttachmentsStream(request?: protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListServiceProjectAttachmentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 |
IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions 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