instances
Creates, updates, deletes, gets or lists an instances resource.
Overview
| Name | instances |
| Type | Resource |
| Id | google.memcache.instances |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | 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: Memcached instances are managed and addressed at the regional level so location_id here refers to a Google Cloud region; however, users may choose which zones Memcached nodes should be provisioned in within an instance. Refer to zones field for more details. |
authorizedNetwork | string | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. |
availableMaintenanceVersions | array | Output only. The available maintenance versions that can be applied to the instance. |
createTime | string (google-datetime) | Output only. The time the instance was created. |
discoveryEndpoint | string | Output only. Endpoint for the Discovery API. |
displayName | string | User provided name for the instance, which is only used for display purposes. Cannot be more than 80 characters. |
effectiveMaintenanceVersion | string | Output only. The effective maintenance version of the instance. |
instanceMessages | array | List of messages that describe the current state of the Memcached instance. |
labels | object | Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
maintenancePolicy | object | The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule. (id: GoogleCloudMemcacheV1MaintenancePolicy) |
maintenanceSchedule | object | Output only. Published maintenance schedule. (id: MaintenanceSchedule) |
maintenanceVersion | string | Optional. Last self service update maintenance version triggered by the customer. If it is empty, it means that the maintenance version is not set by the user. |
memcacheFullVersion | string | Output only. The full version of memcached server running on this instance. System automatically determines the full memcached version for an instance based on the input MemcacheVersion. The full version format will be "memcached-1.5.16". |
memcacheNodes | array | Output only. List of Memcached nodes. Refer to Node message for more details. |
memcacheVersion | string | The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the latest supported minor version. (MEMCACHE_VERSION_UNSPECIFIED, MEMCACHE_1_5, MEMCACHE_1_6_15) |
nodeConfig | object | Required. Configuration for Memcached nodes. (id: NodeConfig) |
nodeCount | integer (int32) | Required. Number of nodes in the Memcached instance. |
parameters | object | User defined parameters to apply to the memcached process on each node. (id: MemcacheParameters) |
reservedIpRangeId | array | Optional. Contains the id of allocated IP address ranges associated with the private service access connection for example, "test-default" associated with IP range 10.0.0.0/29. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
state | string | Output only. The state of this Memcached instance. (STATE_UNSPECIFIED, CREATING, READY, UPDATING, DELETING, PERFORMING_MAINTENANCE, MEMCACHE_VERSION_UPGRADING) |
updateTime | string (google-datetime) | Output only. The time the instance was updated. |
zones | array | Zones in which Memcached nodes should be provisioned. Memcached nodes will be equally distributed across these zones. If not provided, the service will by default create nodes in all zones in the region for the instance. |
| Name | Datatype | Description |
|---|---|---|
name | string | 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: Memcached instances are managed and addressed at the regional level so location_id here refers to a Google Cloud region; however, users may choose which zones Memcached nodes should be provisioned in within an instance. Refer to zones field for more details. |
authorizedNetwork | string | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. |
availableMaintenanceVersions | array | Output only. The available maintenance versions that can be applied to the instance. |
createTime | string (google-datetime) | Output only. The time the instance was created. |
discoveryEndpoint | string | Output only. Endpoint for the Discovery API. |
displayName | string | User provided name for the instance, which is only used for display purposes. Cannot be more than 80 characters. |
effectiveMaintenanceVersion | string | Output only. The effective maintenance version of the instance. |
instanceMessages | array | List of messages that describe the current state of the Memcached instance. |
labels | object | Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
maintenancePolicy | object | The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule. (id: GoogleCloudMemcacheV1MaintenancePolicy) |
maintenanceSchedule | object | Output only. Published maintenance schedule. (id: MaintenanceSchedule) |
maintenanceVersion | string | Optional. Last self service update maintenance version triggered by the customer. If it is empty, it means that the maintenance version is not set by the user. |
memcacheFullVersion | string | Output only. The full version of memcached server running on this instance. System automatically determines the full memcached version for an instance based on the input MemcacheVersion. The full version format will be "memcached-1.5.16". |
memcacheNodes | array | Output only. List of Memcached nodes. Refer to Node message for more details. |
memcacheVersion | string | The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the latest supported minor version. (MEMCACHE_VERSION_UNSPECIFIED, MEMCACHE_1_5, MEMCACHE_1_6_15) |
nodeConfig | object | Required. Configuration for Memcached nodes. (id: NodeConfig) |
nodeCount | integer (int32) | Required. Number of nodes in the Memcached instance. |
parameters | object | User defined parameters to apply to the memcached process on each node. (id: MemcacheParameters) |
reservedIpRangeId | array | Optional. Contains the id of allocated IP address ranges associated with the private service access connection for example, "test-default" associated with IP range 10.0.0.0/29. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
state | string | Output only. The state of this Memcached instance. (STATE_UNSPECIFIED, CREATING, READY, UPDATING, DELETING, PERFORMING_MAINTENANCE, MEMCACHE_VERSION_UPGRADING) |
updateTime | string (google-datetime) | Output only. The time the instance was updated. |
zones | array | Zones in which Memcached nodes should be provisioned. Memcached nodes will be equally distributed across these zones. If not provided, the service will by default create nodes in all zones in the region for the instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, instancesId | Gets details of a single Instance. | |
list | select | projectsId, locationsId | filter, pageSize, orderBy, pageToken | Lists Instances in a given location. |
create | insert | projectsId, locationsId | instanceId | Creates a new Instance in a given location. |
patch | update | projectsId, locationsId, instancesId | updateMask | Updates an existing Instance in a given project and location. |
delete | delete | projectsId, locationsId, instancesId | Deletes a single Instance. | |
set_tags | exec | projectsId, locationsId, instancesId | Updates tags directly bound to a GCP resource. | |
reschedule_maintenance | exec | projectsId, locationsId, instancesId | Reschedules upcoming maintenance event. | |
upgrade | exec | projectsId, locationsId, instancesId | Upgrades the Memcache instance to a newer memcached engine version specified in the request. | |
apply_parameters | exec | projectsId, locationsId, instancesId | ApplyParameters restarts the set of specified nodes in order to update them to the current set of parameters for the Memcached Instance. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
instancesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
instanceId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single Instance.
SELECT
name,
authorizedNetwork,
availableMaintenanceVersions,
createTime,
discoveryEndpoint,
displayName,
effectiveMaintenanceVersion,
instanceMessages,
labels,
maintenancePolicy,
maintenanceSchedule,
maintenanceVersion,
memcacheFullVersion,
memcacheNodes,
memcacheVersion,
nodeConfig,
nodeCount,
parameters,
reservedIpRangeId,
satisfiesPzi,
satisfiesPzs,
state,
updateTime,
zones
FROM google.memcache.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
;
Lists Instances in a given location.
SELECT
name,
authorizedNetwork,
availableMaintenanceVersions,
createTime,
discoveryEndpoint,
displayName,
effectiveMaintenanceVersion,
instanceMessages,
labels,
maintenancePolicy,
maintenanceSchedule,
maintenanceVersion,
memcacheFullVersion,
memcacheNodes,
memcacheVersion,
nodeConfig,
nodeCount,
parameters,
reservedIpRangeId,
satisfiesPzi,
satisfiesPzs,
state,
updateTime,
zones
FROM google.memcache.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new Instance in a given location.
INSERT INTO google.memcache.instances (
data__memcacheVersion,
data__maintenanceVersion,
data__reservedIpRangeId,
data__displayName,
data__nodeCount,
data__instanceMessages,
data__parameters,
data__labels,
data__nodeConfig,
data__name,
data__zones,
data__maintenancePolicy,
data__authorizedNetwork,
projectsId,
locationsId,
instanceId
)
SELECT
'{{ memcacheVersion }}',
'{{ maintenanceVersion }}',
'{{ reservedIpRangeId }}',
'{{ displayName }}',
{{ nodeCount }},
'{{ instanceMessages }}',
'{{ parameters }}',
'{{ labels }}',
'{{ nodeConfig }}',
'{{ name }}',
'{{ zones }}',
'{{ maintenancePolicy }}',
'{{ authorizedNetwork }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ instanceId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: instances
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the instances resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the instances resource.
- name: memcacheVersion
value: "{{ memcacheVersion }}"
description: |
The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest supported major version is `MEMCACHE_1_5`. The minor version will be automatically determined by our system based on the latest supported minor version.
valid_values: ['MEMCACHE_VERSION_UNSPECIFIED', 'MEMCACHE_1_5', 'MEMCACHE_1_6_15']
- name: maintenanceVersion
value: "{{ maintenanceVersion }}"
description: |
Optional. Last self service update maintenance version triggered by the customer. If it is empty, it means that the maintenance version is not set by the user.
- name: reservedIpRangeId
value:
- "{{ reservedIpRangeId }}"
description: |
Optional. Contains the id of allocated IP address ranges associated with the private service access connection for example, "test-default" associated with IP range 10.0.0.0/29.
- name: displayName
value: "{{ displayName }}"
description: |
User provided name for the instance, which is only used for display purposes. Cannot be more than 80 characters.
- name: nodeCount
value: {{ nodeCount }}
description: |
Required. Number of nodes in the Memcached instance.
- name: instanceMessages
description: |
List of messages that describe the current state of the Memcached instance.
value:
- code: "{{ code }}"
message: "{{ message }}"
- name: parameters
description: |
User defined parameters to apply to the memcached process on each node.
value:
id: "{{ id }}"
params: "{{ params }}"
- name: labels
value: "{{ labels }}"
description: |
Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
- name: nodeConfig
description: |
Required. Configuration for Memcached nodes.
value:
cpuCount: {{ cpuCount }}
memorySizeMb: {{ memorySizeMb }}
- name: name
value: "{{ name }}"
description: |
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: Memcached instances are managed and addressed at the regional level so `location_id` here refers to a Google Cloud region; however, users may choose which zones Memcached nodes should be provisioned in within an instance. Refer to zones field for more details.
- name: zones
value:
- "{{ zones }}"
description: |
Zones in which Memcached nodes should be provisioned. Memcached nodes will be equally distributed across these zones. If not provided, the service will by default create nodes in all zones in the region for the instance.
- name: maintenancePolicy
description: |
The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule.
value:
createTime: "{{ createTime }}"
updateTime: "{{ updateTime }}"
weeklyMaintenanceWindow:
- startTime:
seconds: {{ seconds }}
hours: {{ hours }}
nanos: {{ nanos }}
minutes: {{ minutes }}
duration: "{{ duration }}"
day: "{{ day }}"
description: "{{ description }}"
- name: authorizedNetwork
value: "{{ authorizedNetwork }}"
description: |
The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the instance is connected. If left unspecified, the `default` network will be used.
- name: instanceId
value: "{{ instanceId }}"
UPDATE examples
- patch
Updates an existing Instance in a given project and location.
UPDATE google.memcache.instances
SET
data__memcacheVersion = '{{ memcacheVersion }}',
data__maintenanceVersion = '{{ maintenanceVersion }}',
data__reservedIpRangeId = '{{ reservedIpRangeId }}',
data__displayName = '{{ displayName }}',
data__nodeCount = {{ nodeCount }},
data__instanceMessages = '{{ instanceMessages }}',
data__parameters = '{{ parameters }}',
data__labels = '{{ labels }}',
data__nodeConfig = '{{ nodeConfig }}',
data__name = '{{ name }}',
data__zones = '{{ zones }}',
data__maintenancePolicy = '{{ maintenancePolicy }}',
data__authorizedNetwork = '{{ authorizedNetwork }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Instance.
DELETE FROM google.memcache.instances
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
;
Lifecycle Methods
- set_tags
- reschedule_maintenance
- upgrade
- apply_parameters
Updates tags directly bound to a GCP resource.
EXEC google.memcache.instances.set_tags
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"name": "{{ name }}",
"etag": "{{ etag }}",
"tags": "{{ tags }}",
"requestId": "{{ requestId }}"
}'
;
Reschedules upcoming maintenance event.
EXEC google.memcache.instances.reschedule_maintenance
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"rescheduleType": "{{ rescheduleType }}",
"scheduleTime": "{{ scheduleTime }}"
}'
;
Upgrades the Memcache instance to a newer memcached engine version specified in the request.
EXEC google.memcache.instances.upgrade
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"memcacheVersion": "{{ memcacheVersion }}"
}'
;
ApplyParameters restarts the set of specified nodes in order to update them to the current set of parameters for the Memcached Instance.
EXEC google.memcache.instances.apply_parameters
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"nodeIds": "{{ nodeIds }}",
"applyAll": {{ applyAll }}
}'
;