Configures and manages Cloud Memorystore for Redis clusters
Google Cloud Memorystore for Redis Cluster
The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters: * The service works with a collection of cloud projects, named: /projects/* * Each project has a collection of available locations, named: /locations/* * Each location has a collection of Redis clusters, named: /clusters/* * As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id}
Note that location_id must be a GCP region; for example: * projects/redpepper-1290/locations/us-central1/clusters/my-redis v1
Package
@google-cloud/redis-clusterConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of CloudRedisClusterClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;cloudRedisClusterStub
cloudRedisClusterStub?: Promise<{
[name: string]: Function;
}>;descriptors
descriptors: Descriptors;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};locationsClient
locationsClient: LocationsClient;operationsClient
operationsClient: gax.OperationsClient;pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};port
static get port(): number;The port for this API service.
scopes
static get scopes(): string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
aclPolicyPath(project, location, aclPolicy)
aclPolicyPath(project: string, location: string, aclPolicy: string): string;Return a fully-qualified aclPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
aclPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
aclPolicyRevisionPath(project, location, aclPolicy, revision)
aclPolicyRevisionPath(project: string, location: string, aclPolicy: string, revision: string): string;Return a fully-qualified aclPolicyRevision resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
aclPolicy |
string
|
revision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
addAuthToken(request, options)
addAuthToken(request?: protos.google.cloud.redis.cluster.v1.IAddAuthTokenRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Adds a auth token for a user of a token based auth enabled cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IAddAuthTokenRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user resource that this auth token
* will be added for. Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const tokenAuthUser = 'abc123'
/**
* Required. The auth token to add.
*/
// const authToken = {}
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callAddAuthToken() {
// Construct request
const request = {
tokenAuthUser,
authToken,
};
// Run request
const [operation] = await clusterClient.addAuthToken(request);
const [response] = await operation.promise();
console.log(response);
}
callAddAuthToken();
addAuthToken(request, options, callback)
addAuthToken(request: protos.google.cloud.redis.cluster.v1.IAddAuthTokenRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IAddAuthTokenRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
addAuthToken(request, callback)
addAuthToken(request: protos.google.cloud.redis.cluster.v1.IAddAuthTokenRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IAddAuthTokenRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
addTokenAuthUser(request, options)
addTokenAuthUser(request?: protos.google.cloud.redis.cluster.v1.IAddTokenAuthUserRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Adds a token auth user for a token based auth enabled cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IAddTokenAuthUserRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The cluster resource that this token auth user will be added for.
* Format: projects/{project}/locations/{location}/clusters/{cluster}
*/
// const cluster = 'abc123'
/**
* Required. The id of the token auth user to add.
*/
// const tokenAuthUser = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callAddTokenAuthUser() {
// Construct request
const request = {
cluster,
tokenAuthUser,
};
// Run request
const [operation] = await clusterClient.addTokenAuthUser(request);
const [response] = await operation.promise();
console.log(response);
}
callAddTokenAuthUser();
addTokenAuthUser(request, options, callback)
addTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IAddTokenAuthUserRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IAddTokenAuthUserRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
addTokenAuthUser(request, callback)
addTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IAddTokenAuthUserRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IAddTokenAuthUserRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
authTokenPath(project, location, cluster, tokenAuthUser, authToken)
authTokenPath(project: string, location: string, cluster: string, tokenAuthUser: string, authToken: string): string;Return a fully-qualified authToken resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
tokenAuthUser |
string
|
authToken |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupCluster(request, options)
backupCluster(request?: protos.google.cloud.redis.cluster.v1.IBackupClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IBackupClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
* If not specified, the default value is 100 years.
*/
// const ttl = {}
/**
* Optional. The id of the backup to be created. If not specified, the
* default value (YYYYMMDDHHMMSS _Shortened Cluster UID is used.
*/
// const backupId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callBackupCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.backupCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callBackupCluster();
backupCluster(request, options, callback)
backupCluster(request: protos.google.cloud.redis.cluster.v1.IBackupClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IBackupClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
backupCluster(request, callback)
backupCluster(request: protos.google.cloud.redis.cluster.v1.IBackupClusterRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IBackupClusterRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
backupCollectionPath(project, location, backupCollection)
backupCollectionPath(project: string, location: string, backupCollection: string): string;Return a fully-qualified backupCollection resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupCollection |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupPath(project, location, backupCollection, backup)
backupPath(project: string, location: string, backupCollection: string, backup: string): string;Return a fully-qualified backup resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupCollection |
string
|
backup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cancelOperation(request, optionsOrCallback, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | 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. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
|
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
caPoolPath(project, location, caPool)
caPoolPath(project: string, location: string, caPool: string): string;Return a fully-qualified caPool resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
caPool |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
certificateAuthorityPath(project, location, cluster)
certificateAuthorityPath(project: string, location: string, cluster: string): string;Return a fully-qualified certificateAuthority resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
checkAddAuthTokenProgress(name)
checkAddAuthTokenProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.TokenAuthUser, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by addAuthToken().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.TokenAuthUser, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user resource that this auth token
* will be added for. Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const tokenAuthUser = 'abc123'
/**
* Required. The auth token to add.
*/
// const authToken = {}
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callAddAuthToken() {
// Construct request
const request = {
tokenAuthUser,
authToken,
};
// Run request
const [operation] = await clusterClient.addAuthToken(request);
const [response] = await operation.promise();
console.log(response);
}
callAddAuthToken();
checkAddTokenAuthUserProgress(name)
checkAddTokenAuthUserProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by addTokenAuthUser().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The cluster resource that this token auth user will be added for.
* Format: projects/{project}/locations/{location}/clusters/{cluster}
*/
// const cluster = 'abc123'
/**
* Required. The id of the token auth user to add.
*/
// const tokenAuthUser = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callAddTokenAuthUser() {
// Construct request
const request = {
cluster,
tokenAuthUser,
};
// Run request
const [operation] = await clusterClient.addTokenAuthUser(request);
const [response] = await operation.promise();
console.log(response);
}
callAddTokenAuthUser();
checkBackupClusterProgress(name)
checkBackupClusterProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>>;Check the status of the long running operation returned by backupCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
* If not specified, the default value is 100 years.
*/
// const ttl = {}
/**
* Optional. The id of the backup to be created. If not specified, the
* default value (YYYYMMDDHHMMSS _Shortened Cluster UID is used.
*/
// const backupId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callBackupCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.backupCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callBackupCluster();
checkCreateClusterProgress(name)
checkCreateClusterProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>>;Check the status of the long running operation returned by createCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the cluster location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
*/
// const parent = 'abc123'
/**
* Required. The logical name of the Redis cluster in the customer project
* with the following restrictions:
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the customer project / location
*/
// const clusterId = 'abc123'
/**
* Required. The cluster that is to be created.
*/
// const cluster = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callCreateCluster() {
// Construct request
const request = {
parent,
clusterId,
cluster,
};
// Run request
const [operation] = await clusterClient.createCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCluster();
checkDeleteAclPolicyProgress(name)
checkDeleteAclPolicyProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteAclPolicy().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis ACL policy resource name using the form:
* `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
/**
* Optional. Etag of the ACL policy. If this is different from the server's
* etag, the request will fail with an ABORTED error.
*/
// const etag = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteAclPolicy() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteAclPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAclPolicy();
checkDeleteAuthTokenProgress(name)
checkDeleteAuthTokenProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteAuthToken().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user resource that this auth token
* will be deleted from. Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteAuthToken() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteAuthToken(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAuthToken();
checkDeleteBackupProgress(name)
checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.protobuf.Any>>;Check the status of the long running operation returned by deleteBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
checkDeleteClusterProgress(name)
checkDeleteClusterProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.protobuf.Any>>;Check the status of the long running operation returned by deleteCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteCluster();
checkDeleteTokenAuthUserProgress(name)
checkDeleteTokenAuthUserProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteTokenAuthUser().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user to delete.
* Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any child auth tokens of this user will also be
* deleted. Otherwise, the request will only work if the user has no auth
* tokens.
*/
// const force = true
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteTokenAuthUser() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteTokenAuthUser(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteTokenAuthUser();
checkExportBackupProgress(name)
checkExportBackupProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Backup, protos.google.protobuf.Any>>;Check the status of the long running operation returned by exportBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Backup, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Google Cloud Storage bucket, like "my-bucket".
*/
// const gcsBucket = 'abc123'
/**
* Required. Redis backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callExportBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.exportBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callExportBackup();
checkRescheduleClusterMaintenanceProgress(name)
checkRescheduleClusterMaintenanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>>;Check the status of the long running operation returned by rescheduleClusterMaintenance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis Cluster instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
* well.
*/
// const rescheduleType = {}
/**
* Optional. Timestamp when the maintenance shall be rescheduled to if
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
* example `2012-11-15T16:19:00.094Z`.
*/
// const scheduleTime = {}
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callRescheduleClusterMaintenance() {
// Construct request
const request = {
name,
rescheduleType,
};
// Run request
const [operation] = await clusterClient.rescheduleClusterMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleClusterMaintenance();
checkUpdateAclPolicyProgress(name)
checkUpdateAclPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.AclPolicy, protos.google.cloud.redis.cluster.v1.OperationMetadata>>;Check the status of the long running operation returned by updateAclPolicy().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.AclPolicy, protos.google.cloud.redis.cluster.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ACL policy to be updated.
*/
// const aclPolicy = {}
/**
* Optional. Mask of fields to be updated. At least one path must be supplied
* in this field. The elements of the repeated paths field may only include
* these fields from `AclPolicy`:
* * `rules`
*/
// const updateMask = {}
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callUpdateAclPolicy() {
// Construct request
const request = {
aclPolicy,
};
// Run request
const [operation] = await clusterClient.updateAclPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateAclPolicy();
checkUpdateClusterProgress(name)
checkUpdateClusterProgress(name: string): Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>>;Check the status of the long running operation returned by updateCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.redis.cluster.v1.Cluster, protos.google.protobuf.Any>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field may only include these
* fields from Cluster google.cloud.redis.cluster.v1.Cluster:
* * `size_gb`
* * `replica_count`
*/
// const updateMask = {}
/**
* Required. Update description.
* Only fields specified in update_mask are updated.
*/
// const cluster = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callUpdateCluster() {
// Construct request
const request = {
updateMask,
cluster,
};
// Run request
const [operation] = await clusterClient.updateCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateCluster();
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. |
clusterPath(project, location, cluster)
clusterPath(project: string, location: string, cluster: string): string;Return a fully-qualified cluster resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
createAclPolicy(request, options)
createAclPolicy(request?: protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy,
protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | undefined,
{} | undefined
]>;Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAclPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy,
protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the cluster location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const parent = 'abc123'
/**
* Required. The logical name of the ACL policy in the customer project
* with the following restrictions:
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the customer project / location
*/
// const aclPolicyId = 'abc123'
/**
* Required. The ACL policy that is to be created.
*/
// const aclPolicy = {}
/**
* Optional. Idempotent request UUID.
* .
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callCreateAclPolicy() {
// Construct request
const request = {
parent,
aclPolicyId,
aclPolicy,
};
// Run request
const response = await clusterClient.createAclPolicy(request);
console.log(response);
}
callCreateAclPolicy();
createAclPolicy(request, options, callback)
createAclPolicy(request: protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAclPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createAclPolicy(request, callback)
createAclPolicy(request: protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateAclPolicyRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.ICreateAclPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createCluster(request, options)
createCluster(request?: protos.google.cloud.redis.cluster.v1.ICreateClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.
The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the cluster location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
*/
// const parent = 'abc123'
/**
* Required. The logical name of the Redis cluster in the customer project
* with the following restrictions:
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the customer project / location
*/
// const clusterId = 'abc123'
/**
* Required. The cluster that is to be created.
*/
// const cluster = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callCreateCluster() {
// Construct request
const request = {
parent,
clusterId,
cluster,
};
// Run request
const [operation] = await clusterClient.createCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCluster();
createCluster(request, options, callback)
createCluster(request: protos.google.cloud.redis.cluster.v1.ICreateClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createCluster(request, callback)
createCluster(request: protos.google.cloud.redis.cluster.v1.ICreateClusterRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateClusterRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
cryptoKeyPath(project, location, keyRing, cryptoKey)
cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;Return a fully-qualified cryptoKey resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cryptoKeyVersionPath(project, location, keyRing, cryptoKey, cryptoKeyVersion)
cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string;Return a fully-qualified cryptoKeyVersion resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
cryptoKeyVersion |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
deleteAclPolicy(request, options)
deleteAclPolicy(request?: protos.google.cloud.redis.cluster.v1.IDeleteAclPolicyRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAclPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis ACL policy resource name using the form:
* `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
/**
* Optional. Etag of the ACL policy. If this is different from the server's
* etag, the request will fail with an ABORTED error.
*/
// const etag = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteAclPolicy() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteAclPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAclPolicy();
deleteAclPolicy(request, options, callback)
deleteAclPolicy(request: protos.google.cloud.redis.cluster.v1.IDeleteAclPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAclPolicyRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAclPolicy(request, callback)
deleteAclPolicy(request: protos.google.cloud.redis.cluster.v1.IDeleteAclPolicyRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAclPolicyRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAuthToken(request, options)
deleteAuthToken(request?: protos.google.cloud.redis.cluster.v1.IDeleteAuthTokenRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Removes a auth token for a user of a token based auth enabled instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAuthTokenRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user resource that this auth token
* will be deleted from. Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteAuthToken() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteAuthToken(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAuthToken();
deleteAuthToken(request, options, callback)
deleteAuthToken(request: protos.google.cloud.redis.cluster.v1.IDeleteAuthTokenRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAuthTokenRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteAuthToken(request, callback)
deleteAuthToken(request: protos.google.cloud.redis.cluster.v1.IDeleteAuthTokenRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteAuthTokenRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackup(request, options)
deleteBackup(request?: protos.google.cloud.redis.cluster.v1.IDeleteBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a specific backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
deleteBackup(request, options, callback)
deleteBackup(request: protos.google.cloud.redis.cluster.v1.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackup(request, callback)
deleteBackup(request: protos.google.cloud.redis.cluster.v1.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteCluster(request, options)
deleteCluster(request?: protos.google.cloud.redis.cluster.v1.IDeleteClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a specific Redis cluster. Cluster stops serving and data is deleted.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteCluster();
deleteCluster(request, options, callback)
deleteCluster(request: protos.google.cloud.redis.cluster.v1.IDeleteClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteCluster(request, callback)
deleteCluster(request: protos.google.cloud.redis.cluster.v1.IDeleteClusterRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteClusterRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteOperation(request, optionsOrCallback, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: 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. |
optionsOrCallback |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
deleteTokenAuthUser(request, options)
deleteTokenAuthUser(request?: protos.google.cloud.redis.cluster.v1.IDeleteTokenAuthUserRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a token auth user for a token based auth enabled cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteTokenAuthUserRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the token auth user to delete.
* Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any child auth tokens of this user will also be
* deleted. Otherwise, the request will only work if the user has no auth
* tokens.
*/
// const force = true
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callDeleteTokenAuthUser() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.deleteTokenAuthUser(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteTokenAuthUser();
deleteTokenAuthUser(request, options, callback)
deleteTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IDeleteTokenAuthUserRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteTokenAuthUserRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteTokenAuthUser(request, callback)
deleteTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IDeleteTokenAuthUserRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteTokenAuthUserRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
exportBackup(request, options)
exportBackup(request?: protos.google.cloud.redis.cluster.v1.IExportBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Exports a specific backup to a customer target Cloud Storage URI.
| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Google Cloud Storage bucket, like "my-bucket".
*/
// const gcsBucket = 'abc123'
/**
* Required. Redis backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callExportBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await clusterClient.exportBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callExportBackup();
exportBackup(request, options, callback)
exportBackup(request: protos.google.cloud.redis.cluster.v1.IExportBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
exportBackup(request, callback)
exportBackup(request: protos.google.cloud.redis.cluster.v1.IExportBackupRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
forwardingRulePath(project, region, forwardingRule)
forwardingRulePath(project: string, region: string, forwardingRule: string): string;Return a fully-qualified forwardingRule resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
region |
string
|
forwardingRule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
getAclPolicy(request, options)
getAclPolicy(request?: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy,
protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | undefined,
{} | undefined
]>;Gets the details of a specific Redis Cluster ACL policy.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy,
protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis ACL policy resource name using the form:
* `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetAclPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getAclPolicy(request);
console.log(response);
}
callGetAclPolicy();
getAclPolicy(request, options, callback)
getAclPolicy(request: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAclPolicy(request, callback)
getAclPolicy(request: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAclPolicyRevision(request, options)
getAclPolicyRevision(request?: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicyRevision,
(protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | undefined),
{} | undefined
]>;Gets details of a specific ACL policy revision.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRevisionRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicyRevision,
(protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AclPolicyRevision. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis ACL policy revision resource name using the form:
* `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}/revisions/{revision_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetAclPolicyRevision() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getAclPolicyRevision(request);
console.log(response);
}
callGetAclPolicyRevision();
getAclPolicyRevision(request, options, callback)
getAclPolicyRevision(request: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRevisionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAclPolicyRevision(request, callback)
getAclPolicyRevision(request: protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAclPolicyRevisionRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision, protos.google.cloud.redis.cluster.v1.IGetAclPolicyRevisionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAuthToken(request, options)
getAuthToken(request?: protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAuthToken,
protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | undefined,
{} | undefined
]>;Gets a specific auth token for a specific token auth user.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetAuthTokenRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAuthToken,
protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of auth token for a token based auth enabled cluster.
* Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetAuthToken() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getAuthToken(request);
console.log(response);
}
callGetAuthToken();
getAuthToken(request, options, callback)
getAuthToken(request: protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IAuthToken, protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAuthTokenRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAuthToken, protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getAuthToken(request, callback)
getAuthToken(request: protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IAuthToken, protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetAuthTokenRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IAuthToken, protos.google.cloud.redis.cluster.v1.IGetAuthTokenRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackup(request, options)
getBackup(request?: protos.google.cloud.redis.cluster.v1.IGetBackupRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IBackup,
protos.google.cloud.redis.cluster.v1.IGetBackupRequest | undefined,
{} | undefined
]>;Gets the details of a specific backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IBackup,
protos.google.cloud.redis.cluster.v1.IGetBackupRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetBackup() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getBackup(request);
console.log(response);
}
callGetBackup();
getBackup(request, options, callback)
getBackup(request: protos.google.cloud.redis.cluster.v1.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.cloud.redis.cluster.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.cloud.redis.cluster.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackup(request, callback)
getBackup(request: protos.google.cloud.redis.cluster.v1.IGetBackupRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.cloud.redis.cluster.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IBackup, protos.google.cloud.redis.cluster.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupCollection(request, options)
getBackupCollection(request?: protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IBackupCollection,
(protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | undefined),
{} | undefined
]>;Get a backup collection.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IBackupCollection,
(protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing BackupCollection. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis backupCollection resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetBackupCollection() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getBackupCollection(request);
console.log(response);
}
callGetBackupCollection();
getBackupCollection(request, options, callback)
getBackupCollection(request: protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.IBackupCollection, protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IBackupCollection, protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupCollection(request, callback)
getBackupCollection(request: protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.IBackupCollection, protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.IBackupCollection, protos.google.cloud.redis.cluster.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getCluster(request, options)
getCluster(request?: protos.google.cloud.redis.cluster.v1.IGetClusterRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ICluster,
protos.google.cloud.redis.cluster.v1.IGetClusterRequest | undefined,
{} | undefined
]>;Gets the details of a specific Redis cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ICluster,
protos.google.cloud.redis.cluster.v1.IGetClusterRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetCluster() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getCluster(request);
console.log(response);
}
callGetCluster();
getCluster(request, options, callback)
getCluster(request: protos.google.cloud.redis.cluster.v1.IGetClusterRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getCluster(request, callback)
getCluster(request: protos.google.cloud.redis.cluster.v1.IGetClusterRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.cloud.redis.cluster.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getClusterCertificateAuthority(request, options)
getClusterCertificateAuthority(request?: protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ICertificateAuthority,
(protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | undefined),
{} | undefined
]>;Gets the details of certificate authority information for Redis cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterCertificateAuthorityRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ICertificateAuthority,
(protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis cluster certificate authority resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetClusterCertificateAuthority() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getClusterCertificateAuthority(request);
console.log(response);
}
callGetClusterCertificateAuthority();
getClusterCertificateAuthority(request, options, callback)
getClusterCertificateAuthority(request: protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.ICertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterCertificateAuthorityRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ICertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getClusterCertificateAuthority(request, callback)
getClusterCertificateAuthority(request: protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.ICertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetClusterCertificateAuthorityRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ICertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetClusterCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;Gets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.location.ILocation> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, optionsOrCallback, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: 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. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.longrunning.Operation]> |
|
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getSharedRegionalCertificateAuthority(request, options)
getSharedRegionalCertificateAuthority(request?: protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority,
(protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | undefined),
{} | undefined
]>;Gets the details of regional certificate authority information for Redis cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetSharedRegionalCertificateAuthorityRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority,
(protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Regional certificate authority resource name using the form:
* `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetSharedRegionalCertificateAuthority() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getSharedRegionalCertificateAuthority(request);
console.log(response);
}
callGetSharedRegionalCertificateAuthority();
getSharedRegionalCertificateAuthority(request, options, callback)
getSharedRegionalCertificateAuthority(request: protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetSharedRegionalCertificateAuthorityRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getSharedRegionalCertificateAuthority(request, callback)
getSharedRegionalCertificateAuthority(request: protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetSharedRegionalCertificateAuthorityRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ISharedRegionalCertificateAuthority, protos.google.cloud.redis.cluster.v1.IGetSharedRegionalCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getTokenAuthUser(request, options)
getTokenAuthUser(request?: protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ITokenAuthUser,
protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | undefined,
{} | undefined
]>;Gets a specific token auth user for a basic auth enabled cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetTokenAuthUserRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ITokenAuthUser,
protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of token auth user for a token based auth enabled
* cluster. Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const name = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callGetTokenAuthUser() {
// Construct request
const request = {
name,
};
// Run request
const response = await clusterClient.getTokenAuthUser(request);
console.log(response);
}
callGetTokenAuthUser();
getTokenAuthUser(request, options, callback)
getTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetTokenAuthUserRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getTokenAuthUser(request, callback)
getTokenAuthUser(request: protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest, callback: Callback<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetTokenAuthUserRequest
|
callback |
Callback<protos.google.cloud.redis.cluster.v1.ITokenAuthUser, protos.google.cloud.redis.cluster.v1.IGetTokenAuthUserRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
listAclPolicies(request, options)
listAclPolicies(request?: protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy[],
protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest | null,
protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse
]>;Lists all ACL policies owned by a project in either the specified location (region) or all locations.
The location should have the following format:
* projects/{project_id}/locations/{location_id}
If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicy[],
protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest | null,
protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse
]> |
{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 |
listAclPolicies(request, options, callback)
listAclPolicies(request: protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPoliciesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAclPolicies(request, callback)
listAclPolicies(request: protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPoliciesRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, protos.google.cloud.redis.cluster.v1.IListAclPoliciesResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAclPoliciesAsync(request, options)
listAclPoliciesAsync(request?: protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.IAclPolicy>;Equivalent to listAclPolicies, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.IAclPolicy> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the ACL policy location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return.
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* `next_page_token` google.cloud.redis.cluster.v1.ListAclPoliciesResponse.next_page_token
* to determine if there are more ACL policies left to be queried.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* `ListAclPolicies` request, if any.
*/
// const pageToken = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListAclPolicies() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listAclPoliciesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAclPolicies();
listAclPoliciesStream(request, options)
listAclPoliciesStream(request?: protos.google.cloud.redis.cluster.v1.IListAclPoliciesRequest, options?: CallOptions): Transform;Equivalent to listAclPolicies, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPoliciesRequest
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 |
listAclPolicyRevisions(request, options)
listAclPolicyRevisions(request?: protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicyRevision[],
protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest | null,
protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse
]>;Lists all ACL policy revisions in a given ACL policy.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPolicyRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAclPolicyRevision[],
protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest | null,
protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of AclPolicyRevision. 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 |
listAclPolicyRevisions(request, options, callback)
listAclPolicyRevisions(request: protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicyRevision>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPolicyRevisionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicyRevision>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAclPolicyRevisions(request, callback)
listAclPolicyRevisions(request: protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicyRevision>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPolicyRevisionsRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAclPolicyRevision>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAclPolicyRevisionsAsync(request, options)
listAclPolicyRevisionsAsync(request?: protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision>;Equivalent to listAclPolicyRevisions, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPolicyRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.IAclPolicyRevision> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AclPolicyRevision. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the ACL policy to list revisions for.
* Format:
* "projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}"
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* `ListAclPolicyRevisions` request, if any.
*/
// const pageToken = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListAclPolicyRevisions() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listAclPolicyRevisionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAclPolicyRevisions();
listAclPolicyRevisionsStream(request, options)
listAclPolicyRevisionsStream(request?: protos.google.cloud.redis.cluster.v1.IListAclPolicyRevisionsRequest, options?: CallOptions): Transform;Equivalent to listAclPolicyRevisions, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAclPolicyRevisionsRequest
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 AclPolicyRevision 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 |
listAuthTokens(request, options)
listAuthTokens(request?: protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IAuthToken[],
protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest | null,
protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse
]>;Lists all the auth tokens for a specific token auth user.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAuthTokensRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IAuthToken[],
protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest | null,
protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse
]> |
{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 |
listAuthTokens(request, options, callback)
listAuthTokens(request: protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAuthToken>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAuthTokensRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAuthToken>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAuthTokens(request, callback)
listAuthTokens(request: protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAuthToken>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListAuthTokensRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, protos.google.cloud.redis.cluster.v1.IListAuthTokensResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IAuthToken>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listAuthTokensAsync(request, options)
listAuthTokensAsync(request?: protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.IAuthToken>;Equivalent to listAuthTokens, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAuthTokensRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.IAuthToken> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource that this auth token will be listed for.
* Format:
* projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return. The maximum value is 1000;
* values above 1000 will be coerced to 1000. If not specified, a default
* value of 1000 will be used by the service. Regardless of the page_size
* value, the response may include a partial list and a caller should only
* rely on response's
* `next_page_token` google.cloud.redis.cluster.v1.ListTokenAuthUsersResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListTokenAuthUsers request, if any.
*/
// const pageToken = 'abc123'
/**
* Optional. Expression for filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Sort results by a defined order.
*/
// const orderBy = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListAuthTokens() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listAuthTokensAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAuthTokens();
listAuthTokensStream(request, options)
listAuthTokensStream(request?: protos.google.cloud.redis.cluster.v1.IListAuthTokensRequest, options?: CallOptions): Transform;Equivalent to listAuthTokens, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListAuthTokensRequest
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 |
listBackupCollections(request, options)
listBackupCollections(request?: protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IBackupCollection[],
protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest | null,
protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse
]>;Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.
If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IBackupCollection[],
protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest | null,
protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of BackupCollection. 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 |
listBackupCollections(request, options, callback)
listBackupCollections(request: protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackupCollection>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackupCollection>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupCollections(request, callback)
listBackupCollections(request: protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackupCollection>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, protos.google.cloud.redis.cluster.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackupCollection>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupCollectionsAsync(request, options)
listBackupCollectionsAsync(request?: protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.IBackupCollection>;Equivalent to listBackupCollections, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.IBackupCollection> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing BackupCollection. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the backupCollection location using the
* form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return.
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* `next_page_token` google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListBackupCollections request, if any.
*/
// const pageToken = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListBackupCollections() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listBackupCollectionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupCollections();
listBackupCollectionsStream(request, options)
listBackupCollectionsStream(request?: protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, options?: CallOptions): Transform;Equivalent to listBackupCollections, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
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 BackupCollection 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 |
listBackups(request, options)
listBackups(request?: protos.google.cloud.redis.cluster.v1.IListBackupsRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.IBackup[],
protos.google.cloud.redis.cluster.v1.IListBackupsRequest | null,
protos.google.cloud.redis.cluster.v1.IListBackupsResponse
]>;Lists all backups owned by a backup collection.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.IBackup[],
protos.google.cloud.redis.cluster.v1.IListBackupsRequest | null,
protos.google.cloud.redis.cluster.v1.IListBackupsResponse
]> |
{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 |
listBackups(request, options, callback)
listBackups(request: protos.google.cloud.redis.cluster.v1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupsRequest, protos.google.cloud.redis.cluster.v1.IListBackupsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupsRequest, protos.google.cloud.redis.cluster.v1.IListBackupsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackups(request, callback)
listBackups(request: protos.google.cloud.redis.cluster.v1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupsRequest, protos.google.cloud.redis.cluster.v1.IListBackupsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListBackupsRequest, protos.google.cloud.redis.cluster.v1.IListBackupsResponse | null | undefined, protos.google.cloud.redis.cluster.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupsAsync(request, options)
listBackupsAsync(request?: protos.google.cloud.redis.cluster.v1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.IBackup>;Equivalent to listBackups, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.IBackup> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the backupCollection using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return.
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* `next_page_token` google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListBackupCollections request, if any.
*/
// const pageToken = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListBackups() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listBackupsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackups();
listBackupsStream(request, options)
listBackupsStream(request?: protos.google.cloud.redis.cluster.v1.IListBackupsRequest, options?: CallOptions): Transform;Equivalent to listBackups, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
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 |
listClusters(request, options)
listClusters(request?: protos.google.cloud.redis.cluster.v1.IListClustersRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ICluster[],
protos.google.cloud.redis.cluster.v1.IListClustersRequest | null,
protos.google.cloud.redis.cluster.v1.IListClustersResponse
]>;Lists all Redis clusters owned by a project in either the specified location (region) or all locations.
The location should have the following format:
* projects/{project_id}/locations/{location_id}
If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
| Parameters | |
|---|---|
| Name | Description |
request |
IListClustersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ICluster[],
protos.google.cloud.redis.cluster.v1.IListClustersRequest | null,
protos.google.cloud.redis.cluster.v1.IListClustersResponse
]> |
{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 |
listClusters(request, options, callback)
listClusters(request: protos.google.cloud.redis.cluster.v1.IListClustersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListClustersRequest, protos.google.cloud.redis.cluster.v1.IListClustersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ICluster>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListClustersRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListClustersRequest, protos.google.cloud.redis.cluster.v1.IListClustersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ICluster>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listClusters(request, callback)
listClusters(request: protos.google.cloud.redis.cluster.v1.IListClustersRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListClustersRequest, protos.google.cloud.redis.cluster.v1.IListClustersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ICluster>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListClustersRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListClustersRequest, protos.google.cloud.redis.cluster.v1.IListClustersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ICluster>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listClustersAsync(request, options)
listClustersAsync(request?: protos.google.cloud.redis.cluster.v1.IListClustersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.ICluster>;Equivalent to listClusters, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListClustersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.ICluster> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the cluster location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return.
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* `next_page_token` google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* The `next_page_token` value returned from a previous
* ListClusters CloudRedis.ListClusters request, if any.
*/
// const pageToken = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListClusters() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listClustersAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListClusters();
listClustersStream(request, options)
listClustersStream(request?: protos.google.cloud.redis.cluster.v1.IListClustersRequest, options?: CallOptions): Transform;Equivalent to listClusters, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListClustersRequest
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 |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;Lists information about the supported locations for this service. Returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<google.cloud.location.ILocation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.IOperation> |
{Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
listTokenAuthUsers(request, options)
listTokenAuthUsers(request?: protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.cluster.v1.ITokenAuthUser[],
protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest | null,
protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse
]>;Lists all the token auth users for a token based auth enabled cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IListTokenAuthUsersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.redis.cluster.v1.ITokenAuthUser[],
protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest | null,
protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse
]> |
{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 |
listTokenAuthUsers(request, options, callback)
listTokenAuthUsers(request: protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ITokenAuthUser>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListTokenAuthUsersRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ITokenAuthUser>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listTokenAuthUsers(request, callback)
listTokenAuthUsers(request: protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, callback: PaginationCallback<protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ITokenAuthUser>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListTokenAuthUsersRequest
|
callback |
PaginationCallback<protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersResponse | null | undefined, protos.google.cloud.redis.cluster.v1.ITokenAuthUser>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listTokenAuthUsersAsync(request, options)
listTokenAuthUsersAsync(request?: protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.cluster.v1.ITokenAuthUser>;Equivalent to listTokenAuthUsers, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListTokenAuthUsersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.redis.cluster.v1.ITokenAuthUser> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource that this token based auth user will be
* listed for. Format:
* projects/{project}/locations/{location}/clusters/{cluster}
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of items to return.
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* The maximum value is 1000; values above 1000 will be coerced to 1000.
* `next_page_token` google.cloud.redis.cluster.v1.ListTokenAuthUsersResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListTokenAuthUsers request, if any.
*/
// const pageToken = 'abc123'
/**
* Optional. Expression for filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Sort results by a defined order.
*/
// const orderBy = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callListTokenAuthUsers() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = clusterClient.listTokenAuthUsersAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListTokenAuthUsers();
listTokenAuthUsersStream(request, options)
listTokenAuthUsersStream(request?: protos.google.cloud.redis.cluster.v1.IListTokenAuthUsersRequest, options?: CallOptions): Transform;Equivalent to listTokenAuthUsers, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListTokenAuthUsersRequest
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 |
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. |
matchAclPolicyFromAclPolicyName(aclPolicyName)
matchAclPolicyFromAclPolicyName(aclPolicyName: string): string | number;Parse the acl_policy from AclPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyName |
string
A fully-qualified path representing AclPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the acl_policy. |
matchAclPolicyFromAclPolicyRevisionName(aclPolicyRevisionName)
matchAclPolicyFromAclPolicyRevisionName(aclPolicyRevisionName: string): string | number;Parse the acl_policy from AclPolicyRevision resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyRevisionName |
string
A fully-qualified path representing AclPolicyRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the acl_policy. |
matchAuthTokenFromAuthTokenName(authTokenName)
matchAuthTokenFromAuthTokenName(authTokenName: string): string | number;Parse the auth_token from AuthToken resource.
| Parameter | |
|---|---|
| Name | Description |
authTokenName |
string
A fully-qualified path representing AuthToken resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the auth_token. |
matchBackupCollectionFromBackupCollectionName(backupCollectionName)
matchBackupCollectionFromBackupCollectionName(backupCollectionName: string): string | number;Parse the backup_collection from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_collection. |
matchBackupCollectionFromBackupName(backupName)
matchBackupCollectionFromBackupName(backupName: string): string | number;Parse the backup_collection from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_collection. |
matchBackupFromBackupName(backupName)
matchBackupFromBackupName(backupName: string): string | number;Parse the backup from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup. |
matchCaPoolFromCaPoolName(caPoolName)
matchCaPoolFromCaPoolName(caPoolName: string): string | number;Parse the ca_pool from CaPool resource.
| Parameter | |
|---|---|
| Name | Description |
caPoolName |
string
A fully-qualified path representing CaPool resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the ca_pool. |
matchClusterFromAuthTokenName(authTokenName)
matchClusterFromAuthTokenName(authTokenName: string): string | number;Parse the cluster from AuthToken resource.
| Parameter | |
|---|---|
| Name | Description |
authTokenName |
string
A fully-qualified path representing AuthToken resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromCertificateAuthorityName(certificateAuthorityName)
matchClusterFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the cluster from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromClusterName(clusterName)
matchClusterFromClusterName(clusterName: string): string | number;Parse the cluster from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromTokenAuthUserName(tokenAuthUserName)
matchClusterFromTokenAuthUserName(tokenAuthUserName: string): string | number;Parse the cluster from TokenAuthUser resource.
| Parameter | |
|---|---|
| Name | Description |
tokenAuthUserName |
string
A fully-qualified path representing TokenAuthUser resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchCryptoKeyFromCryptoKeyName(cryptoKeyName)
matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the crypto_key from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key. |
matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName)
matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the crypto_key from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key. |
matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName)
matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the crypto_key_version from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key_version. |
matchForwardingRuleFromForwardingRuleName(forwardingRuleName)
matchForwardingRuleFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the forwarding_rule from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the forwarding_rule. |
matchKeyRingFromCryptoKeyName(cryptoKeyName)
matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the key_ring from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the key_ring. |
matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName)
matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the key_ring from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the key_ring. |
matchLocationFromAclPolicyName(aclPolicyName)
matchLocationFromAclPolicyName(aclPolicyName: string): string | number;Parse the location from AclPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyName |
string
A fully-qualified path representing AclPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromAclPolicyRevisionName(aclPolicyRevisionName)
matchLocationFromAclPolicyRevisionName(aclPolicyRevisionName: string): string | number;Parse the location from AclPolicyRevision resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyRevisionName |
string
A fully-qualified path representing AclPolicyRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromAuthTokenName(authTokenName)
matchLocationFromAuthTokenName(authTokenName: string): string | number;Parse the location from AuthToken resource.
| Parameter | |
|---|---|
| Name | Description |
authTokenName |
string
A fully-qualified path representing AuthToken resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupCollectionName(backupCollectionName)
matchLocationFromBackupCollectionName(backupCollectionName: string): string | number;Parse the location from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupName(backupName)
matchLocationFromBackupName(backupName: string): string | number;Parse the location from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCaPoolName(caPoolName)
matchLocationFromCaPoolName(caPoolName: string): string | number;Parse the location from CaPool resource.
| Parameter | |
|---|---|
| Name | Description |
caPoolName |
string
A fully-qualified path representing CaPool resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCertificateAuthorityName(certificateAuthorityName)
matchLocationFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the location from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromClusterName(clusterName)
matchLocationFromClusterName(clusterName: string): string | number;Parse the location from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCryptoKeyName(cryptoKeyName)
matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the location from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName)
matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the location from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion 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. |
matchLocationFromSharedRegionalCertificateAuthorityName(sharedRegionalCertificateAuthorityName)
matchLocationFromSharedRegionalCertificateAuthorityName(sharedRegionalCertificateAuthorityName: string): string | number;Parse the location from SharedRegionalCertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
sharedRegionalCertificateAuthorityName |
string
A fully-qualified path representing SharedRegionalCertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromTokenAuthUserName(tokenAuthUserName)
matchLocationFromTokenAuthUserName(tokenAuthUserName: string): string | number;Parse the location from TokenAuthUser resource.
| Parameter | |
|---|---|
| Name | Description |
tokenAuthUserName |
string
A fully-qualified path representing TokenAuthUser resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchNetworkFromNetworkName(networkName)
matchNetworkFromNetworkName(networkName: string): string | number;Parse the network from Network resource.
| Parameter | |
|---|---|
| Name | Description |
networkName |
string
A fully-qualified path representing Network resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the network. |
matchProjectFromAclPolicyName(aclPolicyName)
matchProjectFromAclPolicyName(aclPolicyName: string): string | number;Parse the project from AclPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyName |
string
A fully-qualified path representing AclPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromAclPolicyRevisionName(aclPolicyRevisionName)
matchProjectFromAclPolicyRevisionName(aclPolicyRevisionName: string): string | number;Parse the project from AclPolicyRevision resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyRevisionName |
string
A fully-qualified path representing AclPolicyRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromAuthTokenName(authTokenName)
matchProjectFromAuthTokenName(authTokenName: string): string | number;Parse the project from AuthToken resource.
| Parameter | |
|---|---|
| Name | Description |
authTokenName |
string
A fully-qualified path representing AuthToken resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupCollectionName(backupCollectionName)
matchProjectFromBackupCollectionName(backupCollectionName: string): string | number;Parse the project from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupName(backupName)
matchProjectFromBackupName(backupName: string): string | number;Parse the project from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCaPoolName(caPoolName)
matchProjectFromCaPoolName(caPoolName: string): string | number;Parse the project from CaPool resource.
| Parameter | |
|---|---|
| Name | Description |
caPoolName |
string
A fully-qualified path representing CaPool resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCertificateAuthorityName(certificateAuthorityName)
matchProjectFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the project from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromClusterName(clusterName)
matchProjectFromClusterName(clusterName: string): string | number;Parse the project from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCryptoKeyName(cryptoKeyName)
matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the project from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName)
matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the project from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromForwardingRuleName(forwardingRuleName)
matchProjectFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the project from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule 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. |
matchProjectFromNetworkName(networkName)
matchProjectFromNetworkName(networkName: string): string | number;Parse the project from Network resource.
| Parameter | |
|---|---|
| Name | Description |
networkName |
string
A fully-qualified path representing Network 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. |
matchProjectFromServiceAttachmentName(serviceAttachmentName)
matchProjectFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the project from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromSharedRegionalCertificateAuthorityName(sharedRegionalCertificateAuthorityName)
matchProjectFromSharedRegionalCertificateAuthorityName(sharedRegionalCertificateAuthorityName: string): string | number;Parse the project from SharedRegionalCertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
sharedRegionalCertificateAuthorityName |
string
A fully-qualified path representing SharedRegionalCertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromTokenAuthUserName(tokenAuthUserName)
matchProjectFromTokenAuthUserName(tokenAuthUserName: string): string | number;Parse the project from TokenAuthUser resource.
| Parameter | |
|---|---|
| Name | Description |
tokenAuthUserName |
string
A fully-qualified path representing TokenAuthUser resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchRegionFromForwardingRuleName(forwardingRuleName)
matchRegionFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the region from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the region. |
matchRegionFromServiceAttachmentName(serviceAttachmentName)
matchRegionFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the region from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the region. |
matchRevisionFromAclPolicyRevisionName(aclPolicyRevisionName)
matchRevisionFromAclPolicyRevisionName(aclPolicyRevisionName: string): string | number;Parse the revision from AclPolicyRevision resource.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyRevisionName |
string
A fully-qualified path representing AclPolicyRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the revision. |
matchServiceAttachmentFromServiceAttachmentName(serviceAttachmentName)
matchServiceAttachmentFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the service_attachment from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service_attachment. |
matchTokenAuthUserFromAuthTokenName(authTokenName)
matchTokenAuthUserFromAuthTokenName(authTokenName: string): string | number;Parse the token_auth_user from AuthToken resource.
| Parameter | |
|---|---|
| Name | Description |
authTokenName |
string
A fully-qualified path representing AuthToken resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the token_auth_user. |
matchTokenAuthUserFromTokenAuthUserName(tokenAuthUserName)
matchTokenAuthUserFromTokenAuthUserName(tokenAuthUserName: string): string | number;Parse the token_auth_user from TokenAuthUser resource.
| Parameter | |
|---|---|
| Name | Description |
tokenAuthUserName |
string
A fully-qualified path representing TokenAuthUser resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the token_auth_user. |
networkPath(project, network)
networkPath(project: string, network: string): string;Return a fully-qualified network resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
network |
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. |
rescheduleClusterMaintenance(request, options)
rescheduleClusterMaintenance(request?: protos.google.cloud.redis.cluster.v1.IRescheduleClusterMaintenanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Reschedules upcoming maintenance event.
| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleClusterMaintenanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Redis Cluster instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
* where `location_id` refers to a GCP region.
*/
// const name = 'abc123'
/**
* Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
* well.
*/
// const rescheduleType = {}
/**
* Optional. Timestamp when the maintenance shall be rescheduled to if
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
* example `2012-11-15T16:19:00.094Z`.
*/
// const scheduleTime = {}
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callRescheduleClusterMaintenance() {
// Construct request
const request = {
name,
rescheduleType,
};
// Run request
const [operation] = await clusterClient.rescheduleClusterMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleClusterMaintenance();
rescheduleClusterMaintenance(request, options, callback)
rescheduleClusterMaintenance(request: protos.google.cloud.redis.cluster.v1.IRescheduleClusterMaintenanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleClusterMaintenanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
rescheduleClusterMaintenance(request, callback)
rescheduleClusterMaintenance(request: protos.google.cloud.redis.cluster.v1.IRescheduleClusterMaintenanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleClusterMaintenanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
serviceAttachmentPath(project, region, serviceAttachment)
serviceAttachmentPath(project: string, region: string, serviceAttachment: string): string;Return a fully-qualified serviceAttachment resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
region |
string
|
serviceAttachment |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
sharedRegionalCertificateAuthorityPath(project, location)
sharedRegionalCertificateAuthorityPath(project: string, location: string): string;Return a fully-qualified sharedRegionalCertificateAuthority resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
tokenAuthUserPath(project, location, cluster, tokenAuthUser)
tokenAuthUserPath(project: string, location: string, cluster: string, tokenAuthUser: string): string;Return a fully-qualified tokenAuthUser resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
tokenAuthUser |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
updateAclPolicy(request, options)
updateAclPolicy(request?: protos.google.cloud.redis.cluster.v1.IUpdateAclPolicyRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the ACL policy.
The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.
Completed longrunning.Operation will contain the new ACL policy object in the response field.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAclPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The ACL policy to be updated.
*/
// const aclPolicy = {}
/**
* Optional. Mask of fields to be updated. At least one path must be supplied
* in this field. The elements of the repeated paths field may only include
* these fields from `AclPolicy`:
* * `rules`
*/
// const updateMask = {}
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callUpdateAclPolicy() {
// Construct request
const request = {
aclPolicy,
};
// Run request
const [operation] = await clusterClient.updateAclPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateAclPolicy();
updateAclPolicy(request, options, callback)
updateAclPolicy(request: protos.google.cloud.redis.cluster.v1.IUpdateAclPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAclPolicyRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateAclPolicy(request, callback)
updateAclPolicy(request: protos.google.cloud.redis.cluster.v1.IUpdateAclPolicyRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateAclPolicyRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.IAclPolicy, protos.google.cloud.redis.cluster.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateCluster(request, options)
updateCluster(request?: protos.google.cloud.redis.cluster.v1.IUpdateClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the metadata and configuration of a specific Redis cluster.
Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field may only include these
* fields from Cluster google.cloud.redis.cluster.v1.Cluster:
* * `size_gb`
* * `replica_count`
*/
// const updateMask = {}
/**
* Required. Update description.
* Only fields specified in update_mask are updated.
*/
// const cluster = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Cluster library
const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1;
// Instantiates a client
const clusterClient = new CloudRedisClusterClient();
async function callUpdateCluster() {
// Construct request
const request = {
updateMask,
cluster,
};
// Run request
const [operation] = await clusterClient.updateCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateCluster();
updateCluster(request, options, callback)
updateCluster(request: protos.google.cloud.redis.cluster.v1.IUpdateClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateCluster(request, callback)
updateCluster(request: protos.google.cloud.redis.cluster.v1.IUpdateClusterRequest, callback: Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateClusterRequest
|
callback |
Callback<LROperation<protos.google.cloud.redis.cluster.v1.ICluster, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|