REST Resource: projects.locations.instances

Resource: Instance

A Memorystore instance.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "state": enum (State),
  "stateInfo": {
    object (StateInfo)
  },
  "uid": string,
  "authorizationMode": enum (AuthorizationMode),
  "transitEncryptionMode": enum (TransitEncryptionMode),
  "shardCount": integer,
  "discoveryEndpoints": [
    {
      object (DiscoveryEndpoint)
    }
  ],
  "nodeType": enum (NodeType),
  "persistenceConfig": {
    object (PersistenceConfig)
  },
  "engineVersion": string,
  "engineConfigs": {
    string: string,
    ...
  },
  "nodeConfig": {
    object (NodeConfig)
  },
  "zoneDistributionConfig": {
    object (ZoneDistributionConfig)
  },
  "pscAutoConnections": [
    {
      object (PscAutoConnection)
    }
  ],
  "endpoints": [
    {
      object (InstanceEndpoint)
    }
  ],
  "mode": enum (Mode),
  "replicaCount": integer,
  "deletionProtectionEnabled": boolean
}
Fields
name

string

Identifier. Unique name of the instance. Format: projects/{project}/locations/{location}/instances/{instance}

createTime

string (Timestamp format)

Output only. Creation timestamp of the instance.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Latest update timestamp of the instance.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. Labels to represent user-provided metadata.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

state

enum (State)

Output only. Current state of the instance.

stateInfo

object (StateInfo)

Output only. Additional information about the state of the instance.

uid

string

Output only. System assigned, unique identifier for the instance.

authorizationMode

enum (AuthorizationMode)

Optional. Immutable. Authorization mode of the instance.

transitEncryptionMode

enum (TransitEncryptionMode)

Optional. Immutable. In-transit encryption mode of the instance.

shardCount

integer

Optional. Number of shards for the instance.

discoveryEndpoints[]

object (DiscoveryEndpoint)

Output only. Endpoints clients can connect to the instance through. Currently only one discovery endpoint is supported.

nodeType

enum (NodeType)

Optional. Immutable. Machine type for individual nodes of the instance.

persistenceConfig

object (PersistenceConfig)

Optional. Persistence configuration of the instance.

engineVersion

string

Optional. Immutable. Engine version of the instance.

engineConfigs

map (key: string, value: string)

Optional. User-provided engine configurations for the instance.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

nodeConfig

object (NodeConfig)

Output only. Configuration of individual nodes of the instance.

zoneDistributionConfig

object (ZoneDistributionConfig)

Optional. Immutable. Zone distribution configuration of the instance for node allocation.

pscAutoConnections[]

object (PscAutoConnection)

Required. Immutable. User inputs and resource details of the auto-created PSC connections.

endpoints[]

object (InstanceEndpoint)

Optional. Endpoints for the instance.

mode

enum (Mode)

Optional. The mode config for the instance.

replicaCount

integer

Optional. Number of replica nodes per shard. If omitted the default is 0 replicas.

deletionProtectionEnabled

boolean

Optional. If set to true deletion of the instance will fail.

State

Possible states of the instance.

Enums
STATE_UNSPECIFIED Not set.
CREATING Instance is being created.
ACTIVE Instance has been created and is usable.
UPDATING Instance is being updated.
DELETING Instance is being deleted.

StateInfo

Additional information about the state of the instance.

JSON representation
{

  // Union field info can be only one of the following:
  "updateInfo": {
    object (UpdateInfo)
  }
  // End of list of possible types for union field info.
}
Fields

Union field info.

info can be only one of the following:

updateInfo

object (UpdateInfo)

Output only. Describes ongoing update when instance state is UPDATING.

UpdateInfo

Represents information about instance with state UPDATING.

JSON representation
{
  "targetShardCount": integer,
  "targetReplicaCount": integer
}
Fields
targetShardCount

integer

Output only. Target number of shards for the instance.

targetReplicaCount

integer

Output only. Target number of replica nodes per shard for the instance.

AuthorizationMode

Possible authorization modes of the instance.

Enums
AUTHORIZATION_MODE_UNSPECIFIED Not set.
AUTH_DISABLED Authorization disabled.
IAM_AUTH IAM basic authorization.

TransitEncryptionMode

Possible in-transit encryption modes of the instance.

Enums
TRANSIT_ENCRYPTION_MODE_UNSPECIFIED Not set.
TRANSIT_ENCRYPTION_DISABLED In-transit encryption is disabled.
SERVER_AUTHENTICATION Server-managed encryption is used for in-transit encryption.

DiscoveryEndpoint

Represents an endpoint for clients to connect to the instance.

JSON representation
{
  "address": string,
  "port": integer,
  "network": string
}
Fields
address

string

Output only. IP address of the exposed endpoint clients connect to.

port

integer

Output only. The port number of the exposed endpoint.

network

string

Output only. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{networkProject}/global/networks/{network_id}.

NodeType

Possible node types of the instance. See https://cloud.google.com/memorystore/docs/valkey/instance-node-specification for more information.

Enums
NODE_TYPE_UNSPECIFIED Not set.
SHARED_CORE_NANO Shared core nano.
HIGHMEM_MEDIUM High memory medium.
HIGHMEM_XLARGE High memory extra large.
STANDARD_SMALL Standard small.

PersistenceConfig

Represents persistence configuration for a instance.

JSON representation
{
  "mode": enum (PersistenceMode),
  "rdbConfig": {
    object (RDBConfig)
  },
  "aofConfig": {
    object (AOFConfig)
  }
}
Fields
mode

enum (PersistenceMode)

Optional. Current persistence mode.

rdbConfig

object (RDBConfig)

Optional. RDB configuration. This field will be ignored if mode is not RDB.

aofConfig

object (AOFConfig)

Optional. AOF configuration. This field will be ignored if mode is not AOF.

PersistenceMode

Possible persistence modes.

Enums
PERSISTENCE_MODE_UNSPECIFIED Not set.
DISABLED Persistence is disabled, and any snapshot data is deleted.
RDB RDB based persistence is enabled.
AOF AOF based persistence is enabled.

RDBConfig

Configuration for RDB based persistence.

JSON representation
{
  "rdbSnapshotPeriod": enum (SnapshotPeriod),
  "rdbSnapshotStartTime": string
}
Fields
rdbSnapshotPeriod

enum (SnapshotPeriod)

Optional. Period between RDB snapshots.

rdbSnapshotStartTime

string (Timestamp format)

Optional. Time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

SnapshotPeriod

Possible snapshot periods.

Enums
SNAPSHOT_PERIOD_UNSPECIFIED Not set.
ONE_HOUR One hour.
SIX_HOURS Six hours.
TWELVE_HOURS Twelve hours.
TWENTY_FOUR_HOURS Twenty four hours.

AOFConfig

Configuration for AOF based persistence.

JSON representation
{
  "appendFsync": enum (AppendFsync)
}
Fields
appendFsync

enum (AppendFsync)

Optional. The fsync mode.

AppendFsync

Possible fsync modes.

Enums
APPEND_FSYNC_UNSPECIFIED Not set. Default: EVERY_SEC
NEVER Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.
EVERY_SEC Fsync every second. You may lose 1 second of data if there is a disaster.
ALWAYS Fsync every time new write commands are appended to the AOF. The best data loss protection at the cost of performance.

NodeConfig

Represents configuration for nodes of the instance.

JSON representation
{
  "sizeGb": number
}
Fields
sizeGb

number

Output only. Memory size in GB of the node.

ZoneDistributionConfig

Zone distribution configuration for allocation of instance resources.

JSON representation
{
  "zone": string,
  "mode": enum (ZoneDistributionMode)
}
Fields
zone

string

Optional. Defines zone where all resources will be allocated with SINGLE_ZONE mode. Ignored for MULTI_ZONE mode.

mode

enum (ZoneDistributionMode)

Optional. Current zone distribution mode. Defaults to MULTI_ZONE.

ZoneDistributionMode

Possible zone distribution modes.

Enums
ZONE_DISTRIBUTION_MODE_UNSPECIFIED Not Set. Default: MULTI_ZONE
MULTI_ZONE Distribute resources across 3 zones picked at random within the region.
SINGLE_ZONE Provision resources in a single zone. Zone field must be specified.

PscAutoConnection

Details of consumer resources in a PSC connection.

JSON representation
{
  "pscConnectionId": string,
  "ipAddress": string,
  "forwardingRule": string,
  "projectId": string,
  "network": string,
  "serviceAttachment": string,
  "pscConnectionStatus": enum (PscConnectionStatus),
  "connectionType": enum (ConnectionType),

  // Union field ports can be only one of the following:
  "port": integer
  // End of list of possible types for union field ports.
}
Fields
pscConnectionId

string

Output only. The PSC connection id of the forwarding rule connected to the service attachment.

ipAddress

string

Output only. The IP allocated on the consumer network for the PSC forwarding rule.

forwardingRule

string

Output only. The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwardingRule}

projectId

string

Required. The consumer projectId where PSC connections are established. This should be the same projectId that the instance is being created in.

network

string

Required. The network where the PSC endpoints are created, in the form of projects/{projectId}/global/networks/{network_id}.

serviceAttachment

string

Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.

pscConnectionStatus

enum (PscConnectionStatus)

Output only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.

connectionType

enum (ConnectionType)

Output only. Type of the PSC connection.

Union field ports. Ports of the exposed endpoint. ports can be only one of the following:
port

integer

Optional. Output only. port will only be set for Primary/Reader or Discovery endpoint.

PscConnectionStatus

Status of the PSC connection.

Enums
PSC_CONNECTION_STATUS_UNSPECIFIED PSC connection status is not specified.
ACTIVE The connection is active
NOT_FOUND Connection not found

ConnectionType

Type of a PSC connection

Enums
CONNECTION_TYPE_UNSPECIFIED Connection Type is not set
CONNECTION_TYPE_DISCOVERY Connection that will be used for topology discovery.
CONNECTION_TYPE_PRIMARY Connection that will be used as primary endpoint to access primary.
CONNECTION_TYPE_READER Connection that will be used as reader endpoint to access replicas.

InstanceEndpoint

InstanceEndpoint consists of PSC connections that are created as a group in each VPC network for accessing the instance. In each group, there shall be one connection for each service attachment in the cluster.

JSON representation
{
  "connections": [
    {
      object (ConnectionDetail)
    }
  ]
}
Fields
connections[]

object (ConnectionDetail)

Optional. A group of PSC connections. They are created in the same VPC network, one for each service attachment in the cluster.

ConnectionDetail

Information of each PSC connection.

JSON representation
{

  // Union field connection can be only one of the following:
  "pscAutoConnection": {
    object (PscAutoConnection)
  },
  "pscConnection": {
    object (PscConnection)
  }
  // End of list of possible types for union field connection.
}
Fields
Union field connection. A PSC connection to an instance could either be created through Service Connectivity Automation (auto connection) during the cluster creation, or it could be created by customer themeslves (user-created connection). connection can be only one of the following:
pscAutoConnection

object (PscAutoConnection)

Detailed information of a PSC connection that is created through service connectivity automation.

pscConnection

object (PscConnection)

Detailed information of a PSC connection that is created by the user.

PscConnection

User created Psc connection configuration.

JSON representation
{
  "pscConnectionId": string,
  "ipAddress": string,
  "forwardingRule": string,
  "projectId": string,
  "network": string,
  "serviceAttachment": string,
  "pscConnectionStatus": enum (PscConnectionStatus),
  "connectionType": enum (ConnectionType)
}
Fields
pscConnectionId

string

Output only. The PSC connection id of the forwarding rule connected to the service attachment.

ipAddress

string

Required. The IP allocated on the consumer network for the PSC forwarding rule.

forwardingRule

string

Required. The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwardingRule}

projectId

string

Output only. The consumer projectId where the forwarding rule is created from.

network

string

Required. The consumer network where the IP address resides, in the form of projects/{projectId}/global/networks/{network_id}.

serviceAttachment

string

Required. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.

pscConnectionStatus

enum (PscConnectionStatus)

Output only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.

connectionType

enum (ConnectionType)

Output only. Type of the PSC connection.

Mode

The mode config, which is used to enable/disable cluster mode.

Enums
MODE_UNSPECIFIED Mode is not specified.
CLUSTER Instance is in cluster mode.
CLUSTER_DISABLED Cluster mode is disabled for the instance.

Methods

create

Creates a new Instance in a given project and location.

delete

Deletes a single Instance.

get

Gets details of a single Instance.

getCertificateAuthority

Gets details about the certificate authority for an Instance.

list

Lists Instances in a given project and location.

patch

Updates the parameters of a single Instance.