SpannerExecutorProxyClient

SpannerExecutorProxyClient

Service that executes SpannerActions asynchronously.

Constructor

new SpannerExecutorProxyClient(optionsopt, gaxInstanceopt)

Construct an instance of SpannerExecutorProxyClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

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 SpannerExecutorProxyClient({fallback: true}, gax);

Members

apiEndpoint

The DNS address for this API service.

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

backupPath(project, instance, backup) → {string}

Return a fully-qualified backup resource name string.

Parameters:
Name Type Description
project string
instance string
backup string
Returns:
Type Description
string

Resource name string.

close() → {Promise}

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

A promise that resolves when the client is closed.

databasePath(project, instance, database) → {string}

Return a fully-qualified database resource name string.

Parameters:
Name Type Description
project string
instance string
database string
Returns:
Type Description
string

Resource name string.

databaseRolePath(project, instance, database, role) → {string}

Return a fully-qualified databaseRole resource name string.

Parameters:
Name Type Description
project string
instance string
database string
role string
Returns:
Type Description
string

Resource name string.

executeActionAsync(optionsopt) → {Stream}

ExecuteActionAsync is a streaming call that starts executing a new Spanner action.

For each request, the server will reply with one or more responses, but only the last response will contain status in the outcome.

Responses can be matched to requests by action_id. It is allowed to have multiple actions in flight--in that case, actions are be executed in parallel.

Parameters:
Name Type Attributes Description
options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which is both readable and writable. It accepts objects representing SpannerAsyncActionRequest for write() method, and will emit objects representing SpannerAsyncActionResponse on 'data' event asynchronously. Please see the documentation for more details and examples.

Example

include:samples/generated/v1/spanner_executor_proxy.execute_action_async.js

region_tag:spanner-cloud-executor_v1_generated_SpannerExecutorProxy_ExecuteActionAsync_async

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

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

A promise that resolves to an authenticated service stub.

instanceConfigPath(project, instance_config) → {string}

Return a fully-qualified instanceConfig resource name string.

Parameters:
Name Type Description
project string
instance_config string
Returns:
Type Description
string

Resource name string.

instancePartitionPath(project, instance, instance_partition) → {string}

Return a fully-qualified instancePartition resource name string.

Parameters:
Name Type Description
project string
instance string
instance_partition string
Returns:
Type Description
string

Resource name string.

instancePath(project, instance) → {string}

Return a fully-qualified instance resource name string.

Parameters:
Name Type Description
project string
instance string
Returns:
Type Description
string

Resource name string.

matchBackupFromBackupName(backupName) → {string}

Parse the backup from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the backup.

matchDatabaseFromDatabaseName(databaseName) → {string}

Parse the database from Database resource.

Parameters:
Name Type Description
databaseName string

A fully-qualified path representing Database resource.

Returns:
Type Description
string

A string representing the database.

matchDatabaseFromDatabaseRoleName(databaseRoleName) → {string}

Parse the database from DatabaseRole resource.

Parameters:
Name Type Description
databaseRoleName string

A fully-qualified path representing DatabaseRole resource.

Returns:
Type Description
string

A string representing the database.

matchDatabaseFromSessionName(sessionName) → {string}

Parse the database from Session resource.

Parameters:
Name Type Description
sessionName string

A fully-qualified path representing Session resource.

Returns:
Type Description
string

A string representing the database.

matchInstanceConfigFromInstanceConfigName(instanceConfigName) → {string}

Parse the instance_config from InstanceConfig resource.

Parameters:
Name Type Description
instanceConfigName string

A fully-qualified path representing InstanceConfig resource.

Returns:
Type Description
string

A string representing the instance_config.

matchInstanceFromBackupName(backupName) → {string}

Parse the instance from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromDatabaseName(databaseName) → {string}

Parse the instance from Database resource.

Parameters:
Name Type Description
databaseName string

A fully-qualified path representing Database resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromDatabaseRoleName(databaseRoleName) → {string}

Parse the instance from DatabaseRole resource.

Parameters:
Name Type Description
databaseRoleName string

A fully-qualified path representing DatabaseRole resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromInstanceName(instanceName) → {string}

Parse the instance from Instance resource.

Parameters:
Name Type Description
instanceName string

A fully-qualified path representing Instance resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromInstancePartitionName(instancePartitionName) → {string}

Parse the instance from InstancePartition resource.

Parameters:
Name Type Description
instancePartitionName string

A fully-qualified path representing InstancePartition resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromSessionName(sessionName) → {string}

Parse the instance from Session resource.

Parameters:
Name Type Description
sessionName string

A fully-qualified path representing Session resource.

Returns:
Type Description
string

A string representing the instance.

matchInstancePartitionFromInstancePartitionName(instancePartitionName) → {string}

Parse the instance_partition from InstancePartition resource.

Parameters:
Name Type Description
instancePartitionName string

A fully-qualified path representing InstancePartition resource.

Returns:
Type Description
string

A string representing the instance_partition.

matchProjectFromBackupName(backupName) → {string}

Parse the project from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromDatabaseName(databaseName) → {string}

Parse the project from Database resource.

Parameters:
Name Type Description
databaseName string

A fully-qualified path representing Database resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromDatabaseRoleName(databaseRoleName) → {string}

Parse the project from DatabaseRole resource.

Parameters:
Name Type Description
databaseRoleName string

A fully-qualified path representing DatabaseRole resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromInstanceConfigName(instanceConfigName) → {string}

Parse the project from InstanceConfig resource.

Parameters:
Name Type Description
instanceConfigName string

A fully-qualified path representing InstanceConfig resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromInstanceName(instanceName) → {string}

Parse the project from Instance resource.

Parameters:
Name Type Description
instanceName string

A fully-qualified path representing Instance resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromInstancePartitionName(instancePartitionName) → {string}

Parse the project from InstancePartition resource.

Parameters:
Name Type Description
instancePartitionName string

A fully-qualified path representing InstancePartition resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSessionName(sessionName) → {string}

Parse the project from Session resource.

Parameters:
Name Type Description
sessionName string

A fully-qualified path representing Session resource.

Returns:
Type Description
string

A string representing the project.

matchRoleFromDatabaseRoleName(databaseRoleName) → {string}

Parse the role from DatabaseRole resource.

Parameters:
Name Type Description
databaseRoleName string

A fully-qualified path representing DatabaseRole resource.

Returns:
Type Description
string

A string representing the role.

matchSessionFromSessionName(sessionName) → {string}

Parse the session from Session resource.

Parameters:
Name Type Description
sessionName string

A fully-qualified path representing Session resource.

Returns:
Type Description
string

A string representing the session.

sessionPath(project, instance, database, session) → {string}

Return a fully-qualified session resource name string.

Parameters:
Name Type Description
project string
instance string
database string
session string
Returns:
Type Description
string

Resource name string.