instances
Creates, updates, deletes, gets or lists a instances
resource.
Overview
Name | instances |
Type | Resource |
Id | google.memcache.instances |
Fields
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. |
createTime | string | 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. |
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 | Maintenance policy per instance. |
maintenanceSchedule | object | Upcoming maintenance schedule. |
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. |
nodeConfig | object | Configuration for a Memcached Node. |
nodeCount | integer | Required. Number of nodes in the Memcached instance. |
parameters | object | |
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. |
updateTime | string | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | instancesId, locationsId, projectsId | Gets details of a single Instance. |
list | SELECT | locationsId, projectsId | Lists Instances in a given location. |
create | INSERT | locationsId, projectsId | Creates a new Instance in a given location. |
delete | DELETE | instancesId, locationsId, projectsId | Deletes a single Instance. |
patch | UPDATE | instancesId, locationsId, projectsId | Updates an existing Instance in a given project and location. |
apply_parameters | EXEC | instancesId, locationsId, projectsId | ApplyParameters restarts the set of specified nodes in order to update them to the current set of parameters for the Memcached Instance. |
reschedule_maintenance | EXEC | instancesId, locationsId, projectsId | Reschedules upcoming maintenance event. |
upgrade | EXEC | instancesId, locationsId, projectsId | Upgrades the Memcache instance to a newer memcached engine version specified in the request. |
SELECT
examples
Lists Instances in a given location.
SELECT
name,
authorizedNetwork,
createTime,
discoveryEndpoint,
displayName,
instanceMessages,
labels,
maintenancePolicy,
maintenanceSchedule,
memcacheFullVersion,
memcacheNodes,
memcacheVersion,
nodeConfig,
nodeCount,
parameters,
reservedIpRangeId,
satisfiesPzi,
satisfiesPzs,
state,
updateTime,
zones
FROM google.memcache.instances
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new instances
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.memcache.instances (
locationsId,
projectsId,
name,
displayName,
labels,
authorizedNetwork,
zones,
nodeCount,
nodeConfig,
memcacheVersion,
parameters,
instanceMessages,
maintenancePolicy,
reservedIpRangeId
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ labels }}',
'{{ authorizedNetwork }}',
'{{ zones }}',
'{{ nodeCount }}',
'{{ nodeConfig }}',
'{{ memcacheVersion }}',
'{{ parameters }}',
'{{ instanceMessages }}',
'{{ maintenancePolicy }}',
'{{ reservedIpRangeId }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: labels
value: object
- name: authorizedNetwork
value: string
- name: zones
value:
- string
- name: nodeCount
value: integer
- name: nodeConfig
value:
- name: cpuCount
value: integer
- name: memorySizeMb
value: integer
- name: memcacheVersion
value: string
- name: parameters
value:
- name: id
value: string
- name: params
value: object
- name: memcacheNodes
value:
- - name: nodeId
value: string
- name: zone
value: string
- name: state
value: string
- name: host
value: string
- name: port
value: integer
- name: memcacheVersion
value: string
- name: memcacheFullVersion
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: state
value: string
- name: memcacheFullVersion
value: string
- name: instanceMessages
value:
- - name: code
value: string
- name: message
value: string
- name: discoveryEndpoint
value: string
- name: maintenancePolicy
value:
- name: createTime
value: string
- name: updateTime
value: string
- name: description
value: string
- name: weeklyMaintenanceWindow
value:
- - name: day
value: string
- name: startTime
value:
- name: hours
value: integer
- name: minutes
value: integer
- name: seconds
value: integer
- name: nanos
value: integer
- name: duration
value: string
- name: maintenanceSchedule
value:
- name: startTime
value: string
- name: endTime
value: string
- name: scheduleDeadlineTime
value: string
- name: reservedIpRangeId
value:
- string
- name: satisfiesPzs
value: boolean
- name: satisfiesPzi
value: boolean
UPDATE
example
Updates a instances
resource.
/*+ update */
UPDATE google.memcache.instances
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
labels = '{{ labels }}',
authorizedNetwork = '{{ authorizedNetwork }}',
zones = '{{ zones }}',
nodeCount = '{{ nodeCount }}',
nodeConfig = '{{ nodeConfig }}',
memcacheVersion = '{{ memcacheVersion }}',
parameters = '{{ parameters }}',
instanceMessages = '{{ instanceMessages }}',
maintenancePolicy = '{{ maintenancePolicy }}',
reservedIpRangeId = '{{ reservedIpRangeId }}'
WHERE
instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified instances
resource.
/*+ delete */
DELETE FROM google.memcache.instances
WHERE instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';