Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Redis

import { Redis } from "https://googleapis.deno.dev/v1/redis:v1.ts";

Creates and manages Redis instances on the Google Cloud Platform.

class Redis {
constructor(client?: CredentialsClient, baseUrl?: string);
async projectsLocationsClustersCreate(
parent: string,
req: Cluster,
): Promise<Operation>;
async projectsLocationsClustersDelete(name: string, opts?: ProjectsLocationsClustersDeleteOptions): Promise<Operation>;
async projectsLocationsClustersGet(name: string): Promise<Cluster>;
async projectsLocationsClustersGetCertificateAuthority(name: string): Promise<CertificateAuthority>;
async projectsLocationsClustersList(parent: string, opts?: ProjectsLocationsClustersListOptions): Promise<ListClustersResponse>;
async projectsLocationsClustersPatch(
name: string,
req: Cluster,
): Promise<Operation>;
async projectsLocationsGet(name: string): Promise<Location>;
async projectsLocationsInstancesCreate(
parent: string,
req: Instance,
): Promise<Operation>;
async projectsLocationsInstancesDelete(name: string): Promise<Operation>;
async projectsLocationsInstancesExport(name: string, req: ExportInstanceRequest): Promise<Operation>;
async projectsLocationsInstancesFailover(name: string, req: FailoverInstanceRequest): Promise<Operation>;
async projectsLocationsInstancesGet(name: string): Promise<Instance>;
async projectsLocationsInstancesGetAuthString(name: string): Promise<InstanceAuthString>;
async projectsLocationsInstancesImport(name: string, req: ImportInstanceRequest): Promise<Operation>;
async projectsLocationsInstancesList(parent: string, opts?: ProjectsLocationsInstancesListOptions): Promise<ListInstancesResponse>;
async projectsLocationsInstancesPatch(
name: string,
req: Instance,
): Promise<Operation>;
async projectsLocationsInstancesRescheduleMaintenance(name: string, req: RescheduleMaintenanceRequest): Promise<Operation>;
async projectsLocationsInstancesUpgrade(name: string, req: UpgradeInstanceRequest): Promise<Operation>;
async projectsLocationsList(name: string, opts?: ProjectsLocationsListOptions): Promise<ListLocationsResponse>;
async projectsLocationsOperationsCancel(name: string): Promise<Empty>;
async projectsLocationsOperationsDelete(name: string): Promise<Empty>;
async projectsLocationsOperationsGet(name: string): Promise<Operation>;
async projectsLocationsOperationsList(name: string, opts?: ProjectsLocationsOperationsListOptions): Promise<ListOperationsResponse>;
}

§Constructors

§
new Redis(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
projectsLocationsClustersCreate(parent: string, req: Cluster, opts?: ProjectsLocationsClustersCreateOptions): Promise<Operation>
[src]

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.

@param parent

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.

§
projectsLocationsClustersDelete(name: string, opts?: ProjectsLocationsClustersDeleteOptions): Promise<Operation>
[src]

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

@param name

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.

§
projectsLocationsClustersGet(name: string): Promise<Cluster>
[src]

Gets the details of a specific Redis cluster.

@param name

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.

§
projectsLocationsClustersGetCertificateAuthority(name: string): Promise<CertificateAuthority>
[src]

Gets the details of certificate authority information for Redis cluster.

@param name

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.

§
projectsLocationsClustersList(parent: string, opts?: ProjectsLocationsClustersListOptions): Promise<ListClustersResponse>
[src]

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.

@param parent

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.

§
projectsLocationsClustersPatch(name: string, req: Cluster, opts?: ProjectsLocationsClustersPatchOptions): Promise<Operation>
[src]

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.

@param name

Required. Unique name of the resource in this scope including project and location using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id}

§
projectsLocationsGet(name: string): Promise<Location>
[src]

Gets information about a location.

@param name

Resource name for the location.

§
projectsLocationsInstancesCreate(parent: string, req: Instance, opts?: ProjectsLocationsInstancesCreateOptions): Promise<Operation>
[src]

Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's default network. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

@param parent

Required. The resource name of the instance location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesDelete(name: string): Promise<Operation>
[src]

Deletes a specific Redis instance. Instance stops serving and data is deleted.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesExport(name: string, req: ExportInstanceRequest): Promise<Operation>
[src]

Export Redis instance data into a Redis RDB format file in Cloud Storage. Redis will continue serving during this operation. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesFailover(name: string, req: FailoverInstanceRequest): Promise<Operation>
[src]

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesGet(name: string): Promise<Instance>
[src]

Gets the details of a specific Redis instance.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesGetAuthString(name: string): Promise<InstanceAuthString>
[src]

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesImport(name: string, req: ImportInstanceRequest): Promise<Operation>
[src]

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesList(parent: string, opts?: ProjectsLocationsInstancesListOptions): Promise<ListInstancesResponse>
[src]

Lists all Redis instances 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.

@param parent

Required. The resource name of the instance location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesPatch(name: string, req: Instance, opts?: ProjectsLocationsInstancesPatchOptions): Promise<Operation>
[src]

Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

@param name

Required. Unique name of the resource in this scope including project and location using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.

§
projectsLocationsInstancesRescheduleMaintenance(name: string, req: RescheduleMaintenanceRequest): Promise<Operation>
[src]

Reschedule maintenance for a given instance in a given project and location.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsInstancesUpgrade(name: string, req: UpgradeInstanceRequest): Promise<Operation>
[src]

Upgrades Redis instance to the newer Redis version specified in the request.

@param name

Required. Redis instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a GCP region.

§
projectsLocationsList(name: string, opts?: ProjectsLocationsListOptions): Promise<ListLocationsResponse>
[src]

Lists information about the supported locations for this service.

@param name

The resource that owns the locations collection, if applicable.

§
projectsLocationsOperationsCancel(name: string): Promise<Empty>
[src]

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 Operations.GetOperation 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 Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

@param name

The name of the operation resource to be cancelled.

§
projectsLocationsOperationsDelete(name: string): Promise<Empty>
[src]

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.

@param name

The name of the operation resource to be deleted.

§
projectsLocationsOperationsGet(name: string): Promise<Operation>
[src]

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.

@param name

The name of the operation resource.

§
projectsLocationsOperationsList(name: string, opts?: ProjectsLocationsOperationsListOptions): Promise<ListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.