{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-memorystore/json-schema/google-cloud-memorystore-instance-schema.json",
  "title": "Instance",
  "description": "A Memorystore for Memcached instance",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-memorystore-memcache-projects-api-openapi.yml#/components/schemas/Instance",
  "type": "object",
  "properties": {
    "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.",
      "type": "string"
    },
    "discoveryEndpoint": {
      "readOnly": true,
      "description": "Output only. Endpoint for the Discovery API.",
      "type": "string"
    },
    "memcacheNodes": {
      "description": "Output only. List of Memcached nodes. Refer to Node message for more details.",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/Node"
      },
      "type": "array"
    },
    "reservedIpRangeId": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "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."
    },
    "maintenanceSchedule": {
      "$ref": "#/$defs/MaintenanceSchedule",
      "description": "Output only. Published maintenance schedule."
    },
    "effectiveMaintenanceVersion": {
      "description": "Output only. The effective maintenance version of the instance.",
      "type": "string",
      "readOnly": true
    },
    "parameters": {
      "$ref": "#/$defs/MemcacheParameters",
      "description": "User defined parameters to apply to the memcached process on each node."
    },
    "displayName": {
      "type": "string",
      "description": "User provided name for the instance, which is only used for display purposes. Cannot be more than 80 characters."
    },
    "state": {
      "description": "Output only. The state of this Memcached instance.",
      "enum": [
        "STATE_UNSPECIFIED",
        "CREATING",
        "READY",
        "UPDATING",
        "DELETING",
        "PERFORMING_MAINTENANCE",
        "MEMCACHE_VERSION_UPGRADING"
      ],
      "readOnly": true,
      "type": "string"
    },
    "createTime": {
      "format": "google-datetime",
      "type": "string",
      "description": "Output only. The time the instance was created.",
      "readOnly": true
    },
    "maintenancePolicy": {
      "$ref": "#/$defs/GoogleCloudMemcacheV1MaintenancePolicy",
      "description": "The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule."
    },
    "instanceMessages": {
      "description": "List of messages that describe the current state of the Memcached instance.",
      "items": {
        "$ref": "#/$defs/InstanceMessage"
      },
      "type": "array"
    },
    "nodeConfig": {
      "$ref": "#/$defs/NodeConfig",
      "description": "Required. Configuration for Memcached nodes."
    },
    "memcacheFullVersion": {
      "description": "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\".",
      "type": "string",
      "readOnly": true
    },
    "availableMaintenanceVersions": {
      "readOnly": true,
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Output only. The available maintenance versions that can be applied to the instance."
    },
    "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.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "nodeCount": {
      "format": "int32",
      "type": "integer",
      "description": "Required. Number of nodes in the Memcached instance."
    },
    "authorizedNetwork": {
      "description": "The full name of the Google Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the instance is connected. If left unspecified, the `default` network will be used.",
      "type": "string"
    },
    "satisfiesPzs": {
      "description": "Optional. Output only. Reserved for future use.",
      "readOnly": true,
      "type": "boolean"
    },
    "satisfiesPzi": {
      "readOnly": true,
      "type": "boolean",
      "description": "Optional. Output only. Reserved for future use."
    },
    "memcacheVersion": {
      "type": "string",
      "enum": [
        "MEMCACHE_VERSION_UNSPECIFIED",
        "MEMCACHE_1_5",
        "MEMCACHE_1_6_15"
      ],
      "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."
    },
    "maintenanceVersion": {
      "type": "string",
      "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."
    },
    "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",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "updateTime": {
      "format": "google-datetime",
      "description": "Output only. The time the instance was updated.",
      "type": "string",
      "readOnly": true
    }
  },
  "$defs": {
    "GoogleCloudMemcacheV1MaintenancePolicy": {
      "properties": {
        "createTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. The time when the policy was created.",
          "readOnly": true
        },
        "weeklyMaintenanceWindow": {
          "description": "Required. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_windows is expected to be one.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/WeeklyMaintenanceWindow"
          }
        },
        "description": {
          "description": "Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.",
          "type": "string"
        },
        "updateTime": {
          "type": "string",
          "description": "Output only. The time when the policy was updated.",
          "readOnly": true,
          "format": "google-datetime"
        }
      },
      "description": "Maintenance policy per instance.",
      "type": "object"
    },
    "InstanceMessage": {
      "type": "object",
      "properties": {
        "code": {
          "description": "A code that correspond to one type of user-facing message.",
          "type": "string",
          "enum": [
            "CODE_UNSPECIFIED",
            "ZONE_DISTRIBUTION_UNBALANCED"
          ]
        },
        "message": {
          "type": "string",
          "description": "Message on memcached instance which will be exposed to users."
        }
      }
    },
    "MaintenanceSchedule": {
      "description": "Upcoming maintenance schedule.",
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.",
          "format": "google-datetime",
          "readOnly": true
        },
        "endTime": {
          "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "scheduleDeadlineTime": {
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.",
          "type": "string"
        }
      }
    },
    "MemcacheParameters": {
      "type": "object",
      "properties": {
        "id": {
          "readOnly": true,
          "description": "Output only. The unique ID associated with this set of parameters. Users can use this id to determine if the parameters associated with the instance differ from the parameters associated with the nodes. A discrepancy between parameter ids can inform users that they may need to take action to apply parameters on nodes.",
          "type": "string"
        },
        "params": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "User defined set of parameters to use in the memcached process."
        }
      }
    },
    "Node": {
      "properties": {
        "zone": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Location (GCP Zone) for the Memcached node."
        },
        "host": {
          "description": "Output only. Hostname or IP address of the Memcached node used by the clients to connect to the Memcached server on this node.",
          "readOnly": true,
          "type": "string"
        },
        "memcacheVersion": {
          "enum": [
            "MEMCACHE_VERSION_UNSPECIFIED",
            "MEMCACHE_1_5",
            "MEMCACHE_1_6_15"
          ],
          "type": "string",
          "readOnly": true,
          "description": "Output only. Major version of memcached server running on this node, e.g. MEMCACHE_1_5"
        },
        "parameters": {
          "$ref": "#/$defs/MemcacheParameters",
          "description": "User defined parameters currently applied to the node."
        },
        "port": {
          "format": "int32",
          "description": "Output only. The port number of the Memcached server on this node.",
          "readOnly": true,
          "type": "integer"
        },
        "memcacheFullVersion": {
          "readOnly": true,
          "description": "Output only. The full version of memcached server running on this node. e.g. - memcached-1.5.16",
          "type": "string"
        },
        "state": {
          "type": "string",
          "description": "Output only. Current state of the Memcached node.",
          "enum": [
            "STATE_UNSPECIFIED",
            "CREATING",
            "READY",
            "DELETING",
            "UPDATING"
          ],
          "readOnly": true
        },
        "nodeId": {
          "description": "Output only. Identifier of the Memcached node. The node id does not include project or location like the Memcached instance name.",
          "type": "string",
          "readOnly": true
        }
      },
      "type": "object"
    },
    "NodeConfig": {
      "properties": {
        "memorySizeMb": {
          "description": "Required. Memory size in MiB for each Memcached node.",
          "format": "int32",
          "type": "integer"
        },
        "cpuCount": {
          "description": "Required. Number of cpus per Memcached node.",
          "type": "integer",
          "format": "int32"
        }
      },
      "description": "Configuration for a Memcached Node.",
      "type": "object"
    },
    "TimeOfDay": {
      "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.",
      "properties": {
        "seconds": {
          "format": "int32",
          "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.",
          "type": "integer"
        },
        "minutes": {
          "format": "int32",
          "type": "integer",
          "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59."
        },
        "hours": {
          "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.",
          "type": "integer",
          "format": "int32"
        },
        "nanos": {
          "type": "integer",
          "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.",
          "format": "int32"
        }
      },
      "type": "object"
    },
    "WeeklyMaintenanceWindow": {
      "properties": {
        "duration": {
          "description": "Required. Duration of the time window.",
          "format": "google-duration",
          "type": "string"
        },
        "startTime": {
          "$ref": "#/$defs/TimeOfDay",
          "description": "Required. Start time of the window in UTC."
        },
        "day": {
          "description": "Required. Allows to define schedule that runs specified day of the week.",
          "type": "string",
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ]
        }
      },
      "type": "object",
      "description": "Time window specified for weekly operations."
    }
  }
}