Cloud Spanner Instance Admin API
The Cloud Spanner Instance Admin API can be used to create, delete, modify and list instances. Instances are dedicated Cloud Spanner serving and storage resources to be used by Cloud Spanner databases.
Each instance has a "configuration", which dictates where the serving resources for the Cloud Spanner instance are located (e.g., US-central, Europe). Configurations are created by Google based on resource availability.
Cloud Spanner billing is based on the instances that exist and their sizes. After an instance exists, there are no additional per-database or per-operation charges for use of the instance (though there may be additional network bandwidth charges). Instances offer isolation: problems with databases in one instance will not affect other instances. However, within an instance databases can affect each other. For example, if one database in an instance receives a lot of requests and consumes most of the instance resources, fewer resources are available for other databases in that instance, and their performance may suffer. v1
Package
@google-cloud/spanner!Constructors
(constructor)(opts)
constructor
(
opts
?:
ClientOptions
);
Construct an instance of InstanceAdminClient.
Type | Name | Description |
---|---|---|
ClientOptions
|
opts |
Properties
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Type | Description |
---|---|
string |
auth
auth
:
gax
.
GoogleAuth
;
Type | Description |
---|---|
gax. GoogleAuth |
descriptors
descriptors
:
Descriptors
;
Type | Description |
---|---|
Descriptors |
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
Type | Description |
---|---|
{ [name: string]: Function ; } |
instanceAdminStub
instanceAdminStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Type | Description |
---|---|
Promise <{ [name: string]: Function ; }> |
operationsClient
operationsClient
:
gax
.
OperationsClient
;
Type | Description |
---|---|
gax. OperationsClient |
pathTemplates
pathTemplates
:
{
[
name
:
string
]
:
gax
.
PathTemplate
;
};
Type | Description |
---|---|
{ [name: string]: gax. PathTemplate ; } |
port
static
get
port
()
:
number
;
The port for this API service.
Type | Description |
---|---|
number |
scopes
static
get
scopes
()
:
string
[];
The scopes needed to make gRPC calls for every method defined in this service.
Type | Description |
---|---|
string[] |
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
Type | Description |
---|---|
string |
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Type | Description |
---|---|
(code: string, message: string, warnType?: string) => void |
Methods
checkCreateInstanceProgress(name)
checkCreateInstanceProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
Instance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
CreateInstanceMetadata
>> ;
Check the status of the long running operation returned by createInstance()
.
Type | Name | Description |
---|---|---|
string
|
name | The operation name that will be passed. |
Type | Description |
---|---|
Promise < LROperation <protos. google.spanner.admin.instance.v1.Instance , protos. google.spanner.admin.instance.v1.CreateInstanceMetadata >> | {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. |
checkUpdateInstanceProgress(name)
checkUpdateInstanceProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
Instance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
UpdateInstanceMetadata
>> ;
Check the status of the long running operation returned by updateInstance()
.
Type | Name | Description |
---|---|---|
string
|
name | The operation name that will be passed. |
Type | Description |
---|---|
Promise < LROperation <protos. google.spanner.admin.instance.v1.Instance , protos. google.spanner.admin.instance.v1.UpdateInstanceMetadata >> | {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. |
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.
Type | Description |
---|---|
Promise <void> | {Promise} A promise that resolves when the client is closed. |
createInstance(request, options)
createInstance
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.ICreateInstanceRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[ LROperation <protos. google.spanner.admin.instance.v1.IInstance , protos. google.spanner.admin.instance.v1.ICreateInstanceMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined]> |
createInstance(request, options, callback)
createInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.ICreateInstanceRequest
|
request | |
CallOptions
|
options | |
Callback
< LROperation
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.ICreateInstanceMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
createInstance(request, callback)
createInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceRequest
,
callback
:
Callback<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
ICreateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.ICreateInstanceRequest
|
request | |
Callback
< LROperation
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.ICreateInstanceMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
deleteInstance(request, options)
deleteInstance
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
protobuf
.
IEmpty
,
(
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
|
undefined
),
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.protobuf.IEmpty , (protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest | undefined), {} | undefined]> |
deleteInstance(request, options, callback)
deleteInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.protobuf.IEmpty
, protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
deleteInstance(request, callback)
deleteInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IDeleteInstanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest
|
request | |
Callback
<protos. google.protobuf.IEmpty
, protos. google.spanner.admin.instance.v1.IDeleteInstanceRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getIamPolicy(request, options)
getIamPolicy
(
request
?:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.IGetIamPolicyRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.iam.v1.IPolicy , protos. google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]> |
getIamPolicy(request, options, callback)
getIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.IGetIamPolicyRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.IGetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getIamPolicy(request, callback)
getIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
IGetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.IGetIamPolicyRequest
|
request | |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.IGetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getInstance(request, options)
getInstance
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.spanner.admin.instance.v1.IInstance , protos. google.spanner.admin.instance.v1.IGetInstanceRequest | undefined, {} | undefined]> |
getInstance(request, options, callback)
getInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.IGetInstanceRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getInstance(request, callback)
getInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
,
callback
:
Callback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceRequest
|
request | |
Callback
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.IGetInstanceRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getInstanceConfig(request, options)
getInstanceConfig
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
,
(
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
|
undefined
),
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.spanner.admin.instance.v1.IInstanceConfig , (protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest | undefined), {} | undefined]> |
getInstanceConfig(request, options, callback)
getInstanceConfig
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.spanner.admin.instance.v1.IInstanceConfig
, protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getInstanceConfig(request, callback)
getInstanceConfig
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
,
callback
:
Callback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IGetInstanceConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest
|
request | |
Callback
<protos. google.spanner.admin.instance.v1.IInstanceConfig
, protos. google.spanner.admin.instance.v1.IGetInstanceConfigRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
getProjectId()
getProjectId
()
:
Promise<string>
;
Type | Description |
---|---|
Promise <string> |
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
Callback
<string, undefined, undefined>
|
callback |
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.
Type | Description |
---|---|
Promise <{ [name: string]: Function ; }> | {Promise} A promise that resolves to an authenticated service stub. |
instanceConfigPath(project, instanceConfig)
instanceConfigPath
(
project
:
string
,
instanceConfig
:
string
)
:
string
;
Return a fully-qualified instanceConfig resource name string.
Type | Name | Description |
---|---|---|
string
|
project | |
string
|
instanceConfig |
Type | Description |
---|---|
string | {string} Resource name string. |
instancePath(project, instance)
instancePath
(
project
:
string
,
instance
:
string
)
:
string
;
Return a fully-qualified instance resource name string.
Type | Name | Description |
---|---|---|
string
|
project | |
string
|
instance |
Type | Description |
---|---|
string | {string} Resource name string. |
listInstanceConfigs(request, options)
listInstanceConfigs
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
[],
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
|
null
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsResponse
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.spanner.admin.instance.v1.IInstanceConfig [], protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest | null, protos. google.spanner.admin.instance.v1.IListInstanceConfigsResponse ]> |
listInstanceConfigs(request, options, callback)
listInstanceConfigs
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsResponse
|
null
|
undefined
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
|
request | |
CallOptions
|
options | |
PaginationCallback
<protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
, protos. google.spanner.admin.instance.v1.IListInstanceConfigsResponse
| null | undefined, protos. google.spanner.admin.instance.v1.IInstanceConfig
>
|
callback |
Type | Description |
---|---|
void |
listInstanceConfigs(request, callback)
listInstanceConfigs
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
callback
:
PaginationCallback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsResponse
|
null
|
undefined
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
|
request | |
PaginationCallback
<protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
, protos. google.spanner.admin.instance.v1.IListInstanceConfigsResponse
| null | undefined, protos. google.spanner.admin.instance.v1.IInstanceConfig
>
|
callback |
Type | Description |
---|---|
void |
listInstanceConfigsAsync(request, options)
listInstanceConfigsAsync
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstanceConfig
> ;
Equivalent to listInstanceConfigs
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
|
request | The request object that will be sent. |
CallOptions
|
options | Call options. See CallOptions for more details. |
Type | Description |
---|---|
AsyncIterable <protos. google.spanner.admin.instance.v1.IInstanceConfig > | {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 [InstanceConfig]. 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. |
listInstanceConfigsStream(request, options)
listInstanceConfigsStream
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstanceConfigsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstanceConfigsRequest
|
request | The request object that will be sent. |
CallOptions
|
options | Call options. See CallOptions for more details. |
Type | Description |
---|---|
Transform | {Stream} An object stream which emits an object representing [InstanceConfig] 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 |
listInstances(request, options)
listInstances
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
[],
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
|
null
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesResponse
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstancesRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.spanner.admin.instance.v1.IInstance [], protos. google.spanner.admin.instance.v1.IListInstancesRequest | null, protos. google.spanner.admin.instance.v1.IListInstancesResponse ]> |
listInstances(request, options, callback)
listInstances
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesResponse
|
null
|
undefined
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstancesRequest
|
request | |
CallOptions
|
options | |
PaginationCallback
<protos. google.spanner.admin.instance.v1.IListInstancesRequest
, protos. google.spanner.admin.instance.v1.IListInstancesResponse
| null | undefined, protos. google.spanner.admin.instance.v1.IInstance
>
|
callback |
Type | Description |
---|---|
void |
listInstances(request, callback)
listInstances
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
callback
:
PaginationCallback<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesResponse
|
null
|
undefined
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstancesRequest
|
request | |
PaginationCallback
<protos. google.spanner.admin.instance.v1.IListInstancesRequest
, protos. google.spanner.admin.instance.v1.IListInstancesResponse
| null | undefined, protos. google.spanner.admin.instance.v1.IInstance
>
|
callback |
Type | Description |
---|---|
void |
listInstancesAsync(request, options)
listInstancesAsync
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
> ;
Equivalent to listInstances
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstancesRequest
|
request | The request object that will be sent. |
CallOptions
|
options | Call options. See CallOptions for more details. |
Type | Description |
---|---|
AsyncIterable <protos. google.spanner.admin.instance.v1.IInstance > | {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 [Instance]. 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. |
listInstancesStream(request, options)
listInstancesStream
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IListInstancesRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IListInstancesRequest
|
request | The request object that will be sent. |
CallOptions
|
options | Call options. See CallOptions for more details. |
Type | Description |
---|---|
Transform | {Stream} An object stream which emits an object representing [Instance] 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 |
matchInstanceConfigFromInstanceConfigName(instanceConfigName)
matchInstanceConfigFromInstanceConfigName
(
instanceConfigName
:
string
)
:
string
|
number
;
Parse the instance_config from InstanceConfig resource.
Type | Name | Description |
---|---|---|
string
|
instanceConfigName | A fully-qualified path representing InstanceConfig resource. |
Type | Description |
---|---|
string | number | {string} A string representing the instance_config. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName
(
instanceName
:
string
)
:
string
|
number
;
Parse the instance from Instance resource.
Type | Name | Description |
---|---|---|
string
|
instanceName | A fully-qualified path representing Instance resource. |
Type | Description |
---|---|
string | number | {string} A string representing the instance. |
matchProjectFromInstanceConfigName(instanceConfigName)
matchProjectFromInstanceConfigName
(
instanceConfigName
:
string
)
:
string
|
number
;
Parse the project from InstanceConfig resource.
Type | Name | Description |
---|---|---|
string
|
instanceConfigName | A fully-qualified path representing InstanceConfig resource. |
Type | Description |
---|---|
string | number | {string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName
(
instanceName
:
string
)
:
string
|
number
;
Parse the project from Instance resource.
Type | Name | Description |
---|---|---|
string
|
instanceName | A fully-qualified path representing Instance resource. |
Type | Description |
---|---|
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName
(
projectName
:
string
)
:
string
|
number
;
Parse the project from Project resource.
Type | Name | Description |
---|---|---|
string
|
projectName | A fully-qualified path representing Project resource. |
Type | Description |
---|---|
string | number | {string} A string representing the project. |
projectPath(project)
projectPath
(
project
:
string
)
:
string
;
Return a fully-qualified project resource name string.
Type | Name | Description |
---|---|---|
string
|
project |
Type | Description |
---|---|
string | {string} Resource name string. |
setIamPolicy(request, options)
setIamPolicy
(
request
?:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ISetIamPolicyRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.iam.v1.IPolicy , protos. google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]> |
setIamPolicy(request, options, callback)
setIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ISetIamPolicyRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.ISetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
setIamPolicy(request, callback)
setIamPolicy
(
request
:
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
IPolicy
,
protos
.
google
.
iam
.
v1
.
ISetIamPolicyRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ISetIamPolicyRequest
|
request | |
Callback
<protos. google.iam.v1.IPolicy
, protos. google.iam.v1.ISetIamPolicyRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
testIamPermissions(request, options)
testIamPermissions
(
request
?:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ITestIamPermissionsRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[protos. google.iam.v1.ITestIamPermissionsResponse , protos. google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]> |
testIamPermissions(request, options, callback)
testIamPermissions
(
request
:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ITestIamPermissionsRequest
|
request | |
CallOptions
|
options | |
Callback
<protos. google.iam.v1.ITestIamPermissionsResponse
, protos. google.iam.v1.ITestIamPermissionsRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
testIamPermissions(request, callback)
testIamPermissions
(
request
:
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
,
callback
:
Callback<protos
.
google
.
iam
.
v1
.
ITestIamPermissionsResponse
,
protos
.
google
.
iam
.
v1
.
ITestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.iam.v1.ITestIamPermissionsRequest
|
request | |
Callback
<protos. google.iam.v1.ITestIamPermissionsResponse
, protos. google.iam.v1.ITestIamPermissionsRequest
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
updateInstance(request, options)
updateInstance
(
request
?:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IUpdateInstanceRequest
|
request | |
CallOptions
|
options |
Type | Description |
---|---|
Promise <[ LROperation <protos. google.spanner.admin.instance.v1.IInstance , protos. google.spanner.admin.instance.v1.IUpdateInstanceMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined]> |
updateInstance(request, options, callback)
updateInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IUpdateInstanceRequest
|
request | |
CallOptions
|
options | |
Callback
< LROperation
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.IUpdateInstanceMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |
updateInstance(request, callback)
updateInstance
(
request
:
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceRequest
,
callback
:
Callback<LROperation<protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IInstance
,
protos
.
google
.
spanner
.
admin
.
instance
.
v1
.
IUpdateInstanceMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Type | Name | Description |
---|---|---|
protos. google.spanner.admin.instance.v1.IUpdateInstanceRequest
|
request | |
Callback
< LROperation
<protos. google.spanner.admin.instance.v1.IInstance
, protos. google.spanner.admin.instance.v1.IUpdateInstanceMetadata
>, protos. google.longrunning.IOperation
| null | undefined, {} | null | undefined>
|
callback |
Type | Description |
---|---|
void |