The API interface for managing Workflow Templates in the Dataproc API. v1
Package
@google-cloud/dataprocConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of WorkflowTemplateServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
workflowTemplateServiceStub
workflowTemplateServiceStub?: Promise<{
[name: string]: Function;
}>;
Methods
batchPath(project, location, batch)
batchPath(project: string, location: string, batch: string): string;
Return a fully-qualified batch resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
batch |
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 |
protos.google.longrunning.CancelOperationRequest
The request object that will be sent. |
options |
gax.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: ''});
checkInstantiateInlineWorkflowTemplateProgress(name)
checkInstantiateInlineWorkflowTemplateProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.dataproc.v1.WorkflowMetadata>>;
Check the status of the long running operation returned by instantiateInlineWorkflowTemplate()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.dataproc.v1.WorkflowMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the region or location, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates,instantiateinline`, the resource
* name of the region has the following format:
* `projects/{project_id}/regions/{region}`
* * For `projects.locations.workflowTemplates.instantiateinline`, the
* resource name of the location has the following format:
* `projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Required. The workflow template to instantiate.
*/
// const template = {}
/**
* Optional. A tag that prevents multiple concurrent workflow
* instances with the same tag from running. This mitigates risk of
* concurrent instances started due to retries.
* It is recommended to always set this value to a
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The tag must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callInstantiateInlineWorkflowTemplate() {
// Construct request
const request = {
parent,
template,
};
// Run request
const [operation] = await dataprocClient.instantiateInlineWorkflowTemplate(request);
const [response] = await operation.promise();
console.log(response);
}
callInstantiateInlineWorkflowTemplate();
checkInstantiateWorkflowTemplateProgress(name)
checkInstantiateWorkflowTemplateProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.dataproc.v1.WorkflowMetadata>>;
Check the status of the long running operation returned by instantiateWorkflowTemplate()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.dataproc.v1.WorkflowMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the workflow template, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates.instantiate`, the resource name
* of the template has the following format:
* `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
* * For `projects.locations.workflowTemplates.instantiate`, the resource name
* of the template has the following format:
* `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
// const name = 'abc123'
/**
* Optional. The version of workflow template to instantiate. If specified,
* the workflow will be instantiated only if the current version of
* the workflow template has the supplied version.
* This option cannot be used to instantiate a previous version of
* workflow template.
*/
// const version = 1234
/**
* Optional. A tag that prevents multiple concurrent workflow
* instances with the same tag from running. This mitigates risk of
* concurrent instances started due to retries.
* It is recommended to always set this value to a
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The tag must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
/**
* Optional. Map from parameter names to values that should be used for those
* parameters. Values may not exceed 1000 characters.
*/
// const parameters = 1234
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callInstantiateWorkflowTemplate() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await dataprocClient.instantiateWorkflowTemplate(request);
const [response] = await operation.promise();
console.log(response);
}
callInstantiateWorkflowTemplate();
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. |
createWorkflowTemplate(request, options)
createWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest, options?: CallOptions): Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
(protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | undefined),
{} | undefined
]>;
Creates new workflow template.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
(protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the region or location, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates.create`, the resource name of the
* region has the following format:
* `projects/{project_id}/regions/{region}`
* * For `projects.locations.workflowTemplates.create`, the resource name of
* the location has the following format:
* `projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Required. The Dataproc workflow template to create.
*/
// const template = {}
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callCreateWorkflowTemplate() {
// Construct request
const request = {
parent,
template,
};
// Run request
const response = await dataprocClient.createWorkflowTemplate(request);
console.log(response);
}
callCreateWorkflowTemplate();
createWorkflowTemplate(request, options, callback)
createWorkflowTemplate(request: protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createWorkflowTemplate(request, callback)
createWorkflowTemplate(request: protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.ICreateWorkflowTemplateRequest | 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 |
protos.google.longrunning.DeleteOperationRequest
The request object that will be sent. |
options |
gax.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: ''});
deleteWorkflowTemplate(request, options)
deleteWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | undefined),
{} | undefined
]>;
Deletes a workflow template. It does not cancel in-progress workflows.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the workflow template, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates.delete`, the resource name
* of the template has the following format:
* `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
* * For `projects.locations.workflowTemplates.instantiate`, the resource name
* of the template has the following format:
* `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
// const name = 'abc123'
/**
* Optional. The version of workflow template to delete. If specified,
* will only delete the template if the current server version matches
* specified version.
*/
// const version = 1234
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callDeleteWorkflowTemplate() {
// Construct request
const request = {
name,
};
// Run request
const response = await dataprocClient.deleteWorkflowTemplate(request);
console.log(response);
}
callDeleteWorkflowTemplate();
deleteWorkflowTemplate(request, options, callback)
deleteWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteWorkflowTemplate(request, callback)
deleteWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IDeleteWorkflowTemplateRequest | 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 |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.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<IamProtos.google.iam.v1.Policy, IamProtos.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<IamProtos.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. |
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 |
protos.google.longrunning.GetOperationRequest
The request object that will be sent. |
options |
gax.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 |
getWorkflowTemplate(request, options)
getWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest, options?: CallOptions): Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | undefined,
{} | undefined
]>;
Retrieves the latest workflow template.
Can retrieve previously instantiated template by specifying optional version parameter.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the workflow template, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates.get`, the resource name of the
* template has the following format:
* `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
* * For `projects.locations.workflowTemplates.get`, the resource name of the
* template has the following format:
* `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
// const name = 'abc123'
/**
* Optional. The version of workflow template to retrieve. Only previously
* instantiated versions can be retrieved.
* If unspecified, retrieves the current version.
*/
// const version = 1234
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callGetWorkflowTemplate() {
// Construct request
const request = {
name,
};
// Run request
const response = await dataprocClient.getWorkflowTemplate(request);
console.log(response);
}
callGetWorkflowTemplate();
getWorkflowTemplate(request, options, callback)
getWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getWorkflowTemplate(request, callback)
getWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IGetWorkflowTemplateRequest | 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. |
instantiateInlineWorkflowTemplate(request, options)
instantiateInlineWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Instantiates a template and begins execution.
This method is equivalent to executing the sequence , , .
The returned Operation can be used to track execution of workflow by polling . The Operation will complete when entire workflow is finished.
The running workflow can be aborted via . This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The will be [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see [Using WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
On successful completion, will be .
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest
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.dataproc.v1.IWorkflowMetadata>,
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. The resource name of the region or location, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates,instantiateinline`, the resource
* name of the region has the following format:
* `projects/{project_id}/regions/{region}`
* * For `projects.locations.workflowTemplates.instantiateinline`, the
* resource name of the location has the following format:
* `projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Required. The workflow template to instantiate.
*/
// const template = {}
/**
* Optional. A tag that prevents multiple concurrent workflow
* instances with the same tag from running. This mitigates risk of
* concurrent instances started due to retries.
* It is recommended to always set this value to a
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The tag must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callInstantiateInlineWorkflowTemplate() {
// Construct request
const request = {
parent,
template,
};
// Run request
const [operation] = await dataprocClient.instantiateInlineWorkflowTemplate(request);
const [response] = await operation.promise();
console.log(response);
}
callInstantiateInlineWorkflowTemplate();
instantiateInlineWorkflowTemplate(request, options, callback)
instantiateInlineWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
instantiateInlineWorkflowTemplate(request, callback)
instantiateInlineWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateInlineWorkflowTemplateRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
instantiateWorkflowTemplate(request, options)
instantiateWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Instantiates a template and begins execution.
The returned Operation can be used to track execution of workflow by polling . The Operation will complete when entire workflow is finished.
The running workflow can be aborted via . This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The will be [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see [Using WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
On successful completion, will be .
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest
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.dataproc.v1.IWorkflowMetadata>,
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. The resource name of the workflow template, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates.instantiate`, the resource name
* of the template has the following format:
* `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
* * For `projects.locations.workflowTemplates.instantiate`, the resource name
* of the template has the following format:
* `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
// const name = 'abc123'
/**
* Optional. The version of workflow template to instantiate. If specified,
* the workflow will be instantiated only if the current version of
* the workflow template has the supplied version.
* This option cannot be used to instantiate a previous version of
* workflow template.
*/
// const version = 1234
/**
* Optional. A tag that prevents multiple concurrent workflow
* instances with the same tag from running. This mitigates risk of
* concurrent instances started due to retries.
* It is recommended to always set this value to a
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The tag must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
/**
* Optional. Map from parameter names to values that should be used for those
* parameters. Values may not exceed 1000 characters.
*/
// const parameters = 1234
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callInstantiateWorkflowTemplate() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await dataprocClient.instantiateWorkflowTemplate(request);
const [response] = await operation.promise();
console.log(response);
}
callInstantiateWorkflowTemplate();
instantiateWorkflowTemplate(request, options, callback)
instantiateWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
instantiateWorkflowTemplate(request, callback)
instantiateWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IInstantiateWorkflowTemplateRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.dataproc.v1.IWorkflowMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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 |
protos.google.longrunning.ListOperationsRequest
The request object that will be sent. |
options |
gax.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)
listWorkflowTemplates(request, options)
listWorkflowTemplates(request?: protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, options?: CallOptions): Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate[],
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest | null,
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse
]>;
Lists workflows that match the specified filter in the request.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate[],
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest | null,
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse
]> | {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 |
listWorkflowTemplates(request, options, callback)
listWorkflowTemplates(request: protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse | null | undefined, protos.google.cloud.dataproc.v1.IWorkflowTemplate>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse | null | undefined, protos.google.cloud.dataproc.v1.IWorkflowTemplate>
|
Returns | |
---|---|
Type | Description |
void |
listWorkflowTemplates(request, callback)
listWorkflowTemplates(request: protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, callback: PaginationCallback<protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse | null | undefined, protos.google.cloud.dataproc.v1.IWorkflowTemplate>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest
|
callback |
PaginationCallback<protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, protos.google.cloud.dataproc.v1.IListWorkflowTemplatesResponse | null | undefined, protos.google.cloud.dataproc.v1.IWorkflowTemplate>
|
Returns | |
---|---|
Type | Description |
void |
listWorkflowTemplatesAsync(request, options)
listWorkflowTemplatesAsync(request?: protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.dataproc.v1.IWorkflowTemplate>;
Equivalent to listWorkflowTemplates
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.dataproc.v1.IWorkflowTemplate> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the region or location, as described
* in https://cloud.google.com/apis/design/resource_names.
* * For `projects.regions.workflowTemplates,list`, the resource
* name of the region has the following format:
* `projects/{project_id}/regions/{region}`
* * For `projects.locations.workflowTemplates.list`, the
* resource name of the location has the following format:
* `projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of results to return in each response.
*/
// const pageSize = 1234
/**
* Optional. The page token, returned by a previous call, to request the
* next page of results.
*/
// const pageToken = 'abc123'
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callListWorkflowTemplates() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await dataprocClient.listWorkflowTemplatesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListWorkflowTemplates();
listWorkflowTemplatesStream(request, options)
listWorkflowTemplatesStream(request?: protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest
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 |
matchAutoscalingPolicyFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName)
matchAutoscalingPolicyFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName: string): string | number;
Parse the autoscaling_policy from ProjectLocationAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectLocationAutoscalingPolicyName |
string
A fully-qualified path representing project_location_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the autoscaling_policy. |
matchAutoscalingPolicyFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName)
matchAutoscalingPolicyFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName: string): string | number;
Parse the autoscaling_policy from ProjectRegionAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectRegionAutoscalingPolicyName |
string
A fully-qualified path representing project_region_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the autoscaling_policy. |
matchBatchFromBatchName(batchName)
matchBatchFromBatchName(batchName: string): string | number;
Parse the batch from Batch resource.
Parameter | |
---|---|
Name | Description |
batchName |
string
A fully-qualified path representing Batch resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the batch. |
matchClusterFromNodeGroupName(nodeGroupName)
matchClusterFromNodeGroupName(nodeGroupName: string): string | number;
Parse the cluster from NodeGroup resource.
Parameter | |
---|---|
Name | Description |
nodeGroupName |
string
A fully-qualified path representing NodeGroup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the cluster. |
matchLocationFromBatchName(batchName)
matchLocationFromBatchName(batchName: string): string | number;
Parse the location from Batch resource.
Parameter | |
---|---|
Name | Description |
batchName |
string
A fully-qualified path representing Batch resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName)
matchLocationFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName: string): string | number;
Parse the location from ProjectLocationAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectLocationAutoscalingPolicyName |
string
A fully-qualified path representing project_location_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName)
matchLocationFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName: string): string | number;
Parse the location from ProjectLocationWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectLocationWorkflowTemplateName |
string
A fully-qualified path representing project_location_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchNodeGroupFromNodeGroupName(nodeGroupName)
matchNodeGroupFromNodeGroupName(nodeGroupName: string): string | number;
Parse the node_group from NodeGroup resource.
Parameter | |
---|---|
Name | Description |
nodeGroupName |
string
A fully-qualified path representing NodeGroup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the node_group. |
matchProjectFromBatchName(batchName)
matchProjectFromBatchName(batchName: string): string | number;
Parse the project from Batch resource.
Parameter | |
---|---|
Name | Description |
batchName |
string
A fully-qualified path representing Batch resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromNodeGroupName(nodeGroupName)
matchProjectFromNodeGroupName(nodeGroupName: string): string | number;
Parse the project from NodeGroup resource.
Parameter | |
---|---|
Name | Description |
nodeGroupName |
string
A fully-qualified path representing NodeGroup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName)
matchProjectFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName: string): string | number;
Parse the project from ProjectLocationAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectLocationAutoscalingPolicyName |
string
A fully-qualified path representing project_location_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName)
matchProjectFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName: string): string | number;
Parse the project from ProjectLocationWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectLocationWorkflowTemplateName |
string
A fully-qualified path representing project_location_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName)
matchProjectFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName: string): string | number;
Parse the project from ProjectRegionAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectRegionAutoscalingPolicyName |
string
A fully-qualified path representing project_region_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName)
matchProjectFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName: string): string | number;
Parse the project from ProjectRegionWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectRegionWorkflowTemplateName |
string
A fully-qualified path representing project_region_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRegionName(regionName)
matchProjectFromRegionName(regionName: string): string | number;
Parse the project from Region resource.
Parameter | |
---|---|
Name | Description |
regionName |
string
A fully-qualified path representing Region resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchRegionFromNodeGroupName(nodeGroupName)
matchRegionFromNodeGroupName(nodeGroupName: string): string | number;
Parse the region from NodeGroup resource.
Parameter | |
---|---|
Name | Description |
nodeGroupName |
string
A fully-qualified path representing NodeGroup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the region. |
matchRegionFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName)
matchRegionFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName: string): string | number;
Parse the region from ProjectRegionAutoscalingPolicy resource.
Parameter | |
---|---|
Name | Description |
projectRegionAutoscalingPolicyName |
string
A fully-qualified path representing project_region_autoscaling_policy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the region. |
matchRegionFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName)
matchRegionFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName: string): string | number;
Parse the region from ProjectRegionWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectRegionWorkflowTemplateName |
string
A fully-qualified path representing project_region_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the region. |
matchRegionFromRegionName(regionName)
matchRegionFromRegionName(regionName: string): string | number;
Parse the region from Region resource.
Parameter | |
---|---|
Name | Description |
regionName |
string
A fully-qualified path representing Region resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the region. |
matchWorkflowTemplateFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName)
matchWorkflowTemplateFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName: string): string | number;
Parse the workflow_template from ProjectLocationWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectLocationWorkflowTemplateName |
string
A fully-qualified path representing project_location_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the workflow_template. |
matchWorkflowTemplateFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName)
matchWorkflowTemplateFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName: string): string | number;
Parse the workflow_template from ProjectRegionWorkflowTemplate resource.
Parameter | |
---|---|
Name | Description |
projectRegionWorkflowTemplateName |
string
A fully-qualified path representing project_region_workflow_template resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the workflow_template. |
nodeGroupPath(project, region, cluster, nodeGroup)
nodeGroupPath(project: string, region: string, cluster: string, nodeGroup: string): string;
Return a fully-qualified nodeGroup resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
region |
string
|
cluster |
string
|
nodeGroup |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectLocationAutoscalingPolicyPath(project, location, autoscalingPolicy)
projectLocationAutoscalingPolicyPath(project: string, location: string, autoscalingPolicy: string): string;
Return a fully-qualified projectLocationAutoscalingPolicy resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
autoscalingPolicy |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectLocationWorkflowTemplatePath(project, location, workflowTemplate)
projectLocationWorkflowTemplatePath(project: string, location: string, workflowTemplate: string): string;
Return a fully-qualified projectLocationWorkflowTemplate resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
workflowTemplate |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectRegionAutoscalingPolicyPath(project, region, autoscalingPolicy)
projectRegionAutoscalingPolicyPath(project: string, region: string, autoscalingPolicy: string): string;
Return a fully-qualified projectRegionAutoscalingPolicy resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
region |
string
|
autoscalingPolicy |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
projectRegionWorkflowTemplatePath(project, region, workflowTemplate)
projectRegionWorkflowTemplatePath(project: string, region: string, workflowTemplate: string): string;
Return a fully-qualified projectRegionWorkflowTemplate resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
region |
string
|
workflowTemplate |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
regionPath(project, region)
regionPath(project: string, region: string): string;
Return a fully-qualified region resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
region |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
setIamPolicy(request, options, callback)
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.Policy> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
updateWorkflowTemplate(request, options)
updateWorkflowTemplate(request?: protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest, options?: CallOptions): Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
(protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | undefined),
{} | undefined
]>;
Updates (replaces) workflow template. The updated template must contain version that matches the current server version.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.dataproc.v1.IWorkflowTemplate,
(protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The updated workflow template.
* The `template.version` field must match the current version.
*/
// const template = {}
// Imports the Dataproc library
const {WorkflowTemplateServiceClient} = require('@google-cloud/dataproc').v1;
// Instantiates a client
const dataprocClient = new WorkflowTemplateServiceClient();
async function callUpdateWorkflowTemplate() {
// Construct request
const request = {
template,
};
// Run request
const response = await dataprocClient.updateWorkflowTemplate(request);
console.log(response);
}
callUpdateWorkflowTemplate();
updateWorkflowTemplate(request, options, callback)
updateWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateWorkflowTemplate(request, callback)
updateWorkflowTemplate(request: protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest, callback: Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest
|
callback |
Callback<protos.google.cloud.dataproc.v1.IWorkflowTemplate, protos.google.cloud.dataproc.v1.IUpdateWorkflowTemplateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |