Class v1.SessionControllerClient (5.5.0)

The SessionController provides methods to manage interactive sessions. v1

Package

@google-cloud/dataproc

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of SessionControllerClient.

Parameters
Name
Description
opts
ClientOptions
gaxInstance
typeof gax | typeof fallback

: loaded instance of google-gax . Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new SessionControllerClient({fallback: true}, gax); ```

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.

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.

sessionControllerStub

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

universeDomain

  get 
  
 universeDomain 
 () 
 : 
  
 string 
 ; 
 

warn

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

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
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
Example
  const 
  
 client 
  
 = 
  
 longrunning 
 . 
 operationsClient 
 (); 
 await 
  
 client 
 . 
 cancelOperation 
 ({ 
 name 
 : 
  
 '' 
 }); 
 

checkCreateSessionProgress(name)

  checkCreateSessionProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 Session 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 SessionOperationMetadata 
>> ; 
 

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

Parameter
Name
Description
name
string

The operation name that will be passed.

Returns
Type
Description

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The parent resource where this session will be created. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The interactive session to create. 
 */ 
  
 // const session = {} 
  
 /** 
 *  Required. The ID to use for the session, which becomes the final component 
 *  of the session's resource name. 
 *  This value must be 4-63 characters. Valid characters 
 *  are /[a-z][0-9]-/. 
 */ 
  
 // const sessionId = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  CreateSessionRequests (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s 
 *  with the same ID, the second request is ignored, and the 
 *  first Session google.cloud.dataproc.v1.Session  is created and stored in 
 *  the backend. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 session 
 , 
  
 sessionId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 createSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateSession 
 (); 
 

checkDeleteSessionProgress(name)

  checkDeleteSessionProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 Session 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 SessionOperationMetadata 
>> ; 
 

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

Parameter
Name
Description
name
string

The operation name that will be passed.

Returns
Type
Description

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The name of the session resource to delete. 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  DeleteSessionRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s 
 *  with the same ID, the second request is ignored. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 deleteSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteSession 
 (); 
 

checkTerminateSessionProgress(name)

  checkTerminateSessionProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 Session 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 SessionOperationMetadata 
>> ; 
 

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

Parameter
Name
Description
name
string

The operation name that will be passed.

Returns
Type
Description

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The name of the session resource to terminate. 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  TerminateSessionRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s 
 *  with the same ID, the second request is ignored. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callTerminateSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 terminateSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callTerminateSession 
 (); 
 

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.

createSession(request, options)

  createSession 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ICreateSessionRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Create an interactive session asynchronously.

Parameters
Name
Description
request
ICreateSessionRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The parent resource where this session will be created. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The interactive session to create. 
 */ 
  
 // const session = {} 
  
 /** 
 *  Required. The ID to use for the session, which becomes the final component 
 *  of the session's resource name. 
 *  This value must be 4-63 characters. Valid characters 
 *  are /[a-z][0-9]-/. 
 */ 
  
 // const sessionId = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  CreateSessionRequests (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s 
 *  with the same ID, the second request is ignored, and the 
 *  first Session google.cloud.dataproc.v1.Session  is created and stored in 
 *  the backend. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 session 
 , 
  
 sessionId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 createSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateSession 
 (); 
 

createSession(request, options, callback)

  createSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ICreateSessionRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

createSession(request, callback)

  createSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ICreateSessionRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
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
Example
  const 
  
 client 
  
 = 
  
 longrunning 
 . 
 operationsClient 
 (); 
 await 
  
 client 
 . 
 deleteOperation 
 ({ 
 name 
 : 
  
 '' 
 }); 
 

deleteSession(request, options)

  deleteSession 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IDeleteSessionRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Deletes the interactive session resource. If the session is not in terminal state, it is terminated, and then deleted.

Parameters
Name
Description
request
IDeleteSessionRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The name of the session resource to delete. 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  DeleteSessionRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s 
 *  with the same ID, the second request is ignored. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 deleteSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteSession 
 (); 
 

deleteSession(request, options, callback)

  deleteSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IDeleteSessionRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

deleteSession(request, callback)

  deleteSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IDeleteSessionRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
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.

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
Example
  const 
  
 client 
  
 = 
  
 longrunning 
 . 
 operationsClient 
 (); 
 const 
  
 name 
  
 = 
  
 '' 
 ; 
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 client 
 . 
 getOperation 
 ({ 
 name 
 }); 
 // doThingsWith(response) 
 

getProjectId()

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

getProjectId(callback)

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

getSession(request, options)

  getSession 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Gets the resource representation for an interactive session.

Parameters
Name
Description
request
IGetSessionRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The name of the session to retrieve. 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Dataproc library 
  
 const 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callGetSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 getSession 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetSession 
 (); 
 

getSession(request, options, callback)

  getSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
callback
Returns
Type
Description
void

getSession(request, callback)

  getSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IGetSessionRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
callback
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.

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

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

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

listSessions(request, options)

  listSessions 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsResponse 
  
 ]>; 
 

Lists interactive sessions.

Parameters
Name
Description
request
IListSessionsRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

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

listSessions(request, options, callback)

  listSessions 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

listSessions(request, callback)

  listSessions 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
> ) 
 : 
  
 void 
 ; 
 
Returns
Type
Description
void

listSessionsAsync(request, options)

  listSessionsAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
> ; 
 

Equivalent to listSessions , but returns an iterable object.

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

Parameters
Name
Description
request
IListSessionsRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Object} An iterable Object that allows async iteration . When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The parent, which owns this collection of sessions. 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Optional. The maximum number of sessions to return in each response. 
 *  The service may return fewer than this value. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  Optional. A page token received from a previous `ListSessions` call. 
 *  Provide this token to retrieve the subsequent page. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Optional. A filter for the sessions to return in the response. 
 *  A filter is a logical expression constraining the values of various fields 
 *  in each session resource. Filters are case sensitive, and may contain 
 *  multiple clauses combined with logical operators (AND, OR). 
 *  Supported fields are `session_id`, `session_uuid`, `state`, and 
 *  `create_time`. 
 *  Example: `state = ACTIVE and create_time < "2023-01-01t00:00:00z"`="" *="" is="" a="" filter="" for="" sessions="" in="" an="" active="" state="" that="" were="" created="" before="" *="" 2023-01-01.="" *="" see="" https://google.aip.dev/assets/misc/ebnf-filtering.txt="" for="" a="" detailed="" *="" description="" of="" the="" filter="" syntax="" and="" a="" list="" of="" supported="" comparators.="" */ 
 = 
 "" 
  
 const 
 = 
 "" 
  
 filter 
 = 
 'abc123' 
  
 imports 
 = 
 "" 
  
 the 
 = 
 "" 
  
 dataproc 
 = 
 "" 
  
 library 
 = 
 "" 
  
 const 
 = 
 "" 
  
 { 
 sessioncontrollerclient 
 } 
 = 
 "require('@google-cloud/dataproc').v1;" 
  
 instantiates 
 = 
 "" 
  
 a 
 = 
 "" 
  
 client 
 = 
 "" 
  
 const 
 = 
 "" 
  
 dataprocclient 
 = 
 "new" 
  
 sessioncontrollerclient 
 (); 
 = 
 "" 
  
 async 
 = 
 "" 
  
 function 
 = 
 "" 
  
 calllistsessions 
 () 
 = 
 "" 
  
 { 
 = 
 "" 
  
 construct 
 = 
 "" 
  
 request 
 = 
 "" 
  
 const 
 = 
 "" 
  
 request 
 = 
 "{" 
  
 parent 
 , 
 = 
 "" 
  
 }; 
 = 
 "" 
  
 run 
 = 
 "" 
  
 request 
 = 
 "" 
  
 const 
 = 
 "" 
  
 iterable 
 = 
 "dataprocClient.listSessionsAsync(request);" 
  
 for 
 = 
 "" 
  
 await 
 = 
 "" 
  
 ( 
 const 
 = 
 "" 
  
 response 
 = 
 "" 
  
 of 
 = 
 "" 
  
 iterable 
 ) 
 = 
 "" 
  
 { 
 = 
 "" 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
 = 
 "" 
  
 } 
 = 
 "" 
  
 } 
 = 
 "" 
  
 calllistsessions 
 (); 
 = 
 "" 
> 

listSessionsStream(request, options)

  listSessionsStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 IListSessionsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

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

Parameters
Name
Description
request
IListSessionsRequest

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

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
Name
Description
project
string
location
string
Returns
Type
Description
string

{string} Resource name string.

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.

matchLocationFromLocationName(locationName)

  matchLocationFromLocationName 
 ( 
 locationName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from Location resource.

Parameter
Name
Description
locationName
string

A fully-qualified path representing Location resource.

Returns
Type
Description
string | number

{string} A string representing the location.

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.

matchLocationFromSessionName(sessionName)

  matchLocationFromSessionName 
 ( 
 sessionName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from Session resource.

Parameter
Name
Description
sessionName
string

A fully-qualified path representing Session resource.

Returns
Type
Description
string | number

{string} A string representing the location.

matchLocationFromSessionTemplateName(sessionTemplateName)

  matchLocationFromSessionTemplateName 
 ( 
 sessionTemplateName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from SessionTemplate resource.

Parameter
Name
Description
sessionTemplateName
string

A fully-qualified path representing SessionTemplate 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.

matchProjectFromLocationName(locationName)

  matchProjectFromLocationName 
 ( 
 locationName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from Location resource.

Parameter
Name
Description
locationName
string

A fully-qualified path representing Location resource.

Returns
Type
Description
string | number

{string} A string representing the project.

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.

matchProjectFromSessionName(sessionName)

  matchProjectFromSessionName 
 ( 
 sessionName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from Session resource.

Parameter
Name
Description
sessionName
string

A fully-qualified path representing Session resource.

Returns
Type
Description
string | number

{string} A string representing the project.

matchProjectFromSessionTemplateName(sessionTemplateName)

  matchProjectFromSessionTemplateName 
 ( 
 sessionTemplateName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from SessionTemplate resource.

Parameter
Name
Description
sessionTemplateName
string

A fully-qualified path representing SessionTemplate 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.

matchSessionFromSessionName(sessionName)

  matchSessionFromSessionName 
 ( 
 sessionName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the session from Session resource.

Parameter
Name
Description
sessionName
string

A fully-qualified path representing Session resource.

Returns
Type
Description
string | number

{string} A string representing the session.

matchTemplateFromSessionTemplateName(sessionTemplateName)

  matchTemplateFromSessionTemplateName 
 ( 
 sessionTemplateName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the template from SessionTemplate resource.

Parameter
Name
Description
sessionTemplateName
string

A fully-qualified path representing SessionTemplate resource.

Returns
Type
Description
string | number

{string} A string representing the template.

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.

sessionPath(project, location, session)

  sessionPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 session 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified session resource name string.

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

{string} Resource name string.

sessionTemplatePath(project, location, template)

  sessionTemplatePath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 template 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified sessionTemplate resource name string.

Parameters
Name
Description
project
string
location
string
template
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
CallOptions | Callback < google.iam.v1.Policy , google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

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

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

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

The second parameter to the callback is an object representing .

Returns
Type
Description
Promise <[ google.iam.v1.Policy ]>

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

terminateSession(request, options)

  terminateSession 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ITerminateSessionRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Terminates the interactive session.

Parameters
Name
Description
request
ITerminateSessionRequest

The request object that will be sent.

options
CallOptions

Call options. See CallOptions for more details.

Returns
Type
Description

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The name of the session resource to terminate. 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  Optional. A unique ID used to identify the request. If the service 
 *  receives two 
 *  TerminateSessionRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s 
 *  with the same ID, the second request is ignored. 
 *  Recommendation: Set this value to a 
 *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier). 
 *  The value 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 
  
 { 
 SessionControllerClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/dataproc 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 dataprocClient 
  
 = 
  
 new 
  
  SessionControllerClient 
 
 (); 
  
 async 
  
 function 
  
 callTerminateSession 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 dataprocClient 
 . 
 terminateSession 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callTerminateSession 
 (); 
 

terminateSession(request, options, callback)

  terminateSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ITerminateSessionRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
options
CallOptions
Returns
Type
Description
void

terminateSession(request, callback)

  terminateSession 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ITerminateSessionRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISession 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 dataproc 
 . 
 v1 
 . 
 ISessionOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
Returns
Type
Description
void

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

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

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

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

The second parameter to the callback is an object representing .

Returns
Type
Description
Promise <[ google.iam.v1.TestIamPermissionsResponse ]>

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

Design a Mobile Site
View Site in Mobile | Classic
Share by: