Google Cloud Spanner · Schema
Instance
An isolated set of Cloud Spanner resources on which databases can be hosted.
DatabaseDistributedGoogle CloudRelationalSQL
Properties
| Name | Type | Description |
|---|---|---|
| labels | object | Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to f |
| defaultBackupScheduleType | string | Optional. Controls the default backup schedule behavior for new databases within the instance. By default, a backup schedule is created automatically when a new database is created in a new instance. |
| replicaComputeCapacity | array | Output only. Lists the compute capacity per ReplicaSelection. A replica selection identifies a set of replicas with common properties. Replicas identified by a ReplicaSelection are scaled with the sam |
| createTime | string | Output only. The time at which the instance was created. |
| processingUnits | integer | The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to spe |
| instanceType | string | The `InstanceType` of the current instance. |
| edition | string | Optional. The `Edition` of the current instance. |
| config | string | Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs. |
| tags | object | Optional. Tag keys/values directly bound to this resource. For example: "123/environment": "prod", "123/costCenter": "marketing" |
| autoscalingConfig | object | Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the cur |
| updateTime | string | Output only. The time at which the instance was most recently updated. |
| name | string | Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be |
| displayName | string | Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
| nodeCount | integer | The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target n |
| endpointUris | array | Deprecated. This field is not populated. |
| freeInstanceMetadata | object | Free instance metadata. Only populated for free instances. |
| state | string | Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/google-cloud-spanner/json-schema/google-cloud-spanner-instance-schema.json",
"title": "Instance",
"description": "An isolated set of Cloud Spanner resources on which databases can be hosted.",
"x-generated": "2026-11-11",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/google-cloud-spanner-projects-api-openapi.yml#/components/schemas/Instance",
"properties": {
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64 labels can be associated with a given resource. See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + \"_\" + value would prove problematic if we were to allow \"_\" in a future release."
},
"defaultBackupScheduleType": {
"type": "string",
"description": "Optional. Controls the default backup schedule behavior for new databases within the instance. By default, a backup schedule is created automatically when a new database is created in a new instance. Note that the `AUTOMATIC` value isn't permitted for free instances, as backups and backup schedules aren't supported for free instances. In the `GetInstance` or `ListInstances` response, if the value of `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't create a default backup schedule for new databases in the instance.",
"enum": [
"DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED",
"NONE",
"AUTOMATIC"
]
},
"replicaComputeCapacity": {
"type": "array",
"description": "Output only. Lists the compute capacity per ReplicaSelection. A replica selection identifies a set of replicas with common properties. Replicas identified by a ReplicaSelection are scaled with the same compute capacity.",
"readOnly": true,
"items": {
"$ref": "#/$defs/ReplicaComputeCapacity"
}
},
"createTime": {
"format": "google-datetime",
"type": "string",
"readOnly": true,
"description": "Output only. The time at which the instance was created."
},
"processingUnits": {
"format": "int32",
"type": "integer",
"description": "The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying processing units per replica (achieved by setting `asymmetric_autoscaling_options` in the autoscaling configuration), the `processing_units` set here is the maximum processing units across all replicas. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity)."
},
"instanceType": {
"enum": [
"INSTANCE_TYPE_UNSPECIFIED",
"PROVISIONED",
"FREE_INSTANCE"
],
"type": "string",
"description": "The `InstanceType` of the current instance."
},
"edition": {
"description": "Optional. The `Edition` of the current instance.",
"type": "string",
"enum": [
"EDITION_UNSPECIFIED",
"STANDARD",
"ENTERPRISE",
"ENTERPRISE_PLUS"
]
},
"config": {
"description": "Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.",
"type": "string"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Optional. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"prod\", \"123/costCenter\": \"marketing\""
},
"autoscalingConfig": {
"$ref": "#/$defs/AutoscalingConfig",
"description": "Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance."
},
"updateTime": {
"description": "Output only. The time at which the instance was most recently updated.",
"readOnly": true,
"type": "string",
"format": "google-datetime"
},
"name": {
"description": "Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length.",
"type": "string"
},
"displayName": {
"description": "Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.",
"type": "string"
},
"nodeCount": {
"type": "integer",
"format": "int32",
"description": "The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying node count across replicas (achieved by setting `asymmetric_autoscaling_options` in the autoscaling configuration), the `node_count` set here is the maximum node count across all replicas. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity)."
},
"endpointUris": {
"type": "array",
"description": "Deprecated. This field is not populated.",
"items": {
"type": "string"
}
},
"freeInstanceMetadata": {
"$ref": "#/$defs/FreeInstanceMetadata",
"description": "Free instance metadata. Only populated for free instances."
},
"state": {
"readOnly": true,
"enum": [
"STATE_UNSPECIFIED",
"CREATING",
"READY"
],
"type": "string",
"description": "Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`."
}
},
"type": "object",
"$defs": {
"AsymmetricAutoscalingOption": {
"description": "AsymmetricAutoscalingOption specifies the scaling of replicas identified by the given selection.",
"properties": {
"overrides": {
"$ref": "#/$defs/AutoscalingConfigOverrides",
"description": "Optional. Overrides applied to the top-level autoscaling configuration for the selected replicas."
},
"replicaSelection": {
"$ref": "#/$defs/InstanceReplicaSelection",
"description": "Required. Selects the replicas to which this AsymmetricAutoscalingOption applies. Only read-only replicas are supported."
}
},
"type": "object"
},
"AutoscalingConfig": {
"type": "object",
"description": "Autoscaling configuration for an instance.",
"properties": {
"asymmetricAutoscalingOptions": {
"description": "Optional. Optional asymmetric autoscaling options. Replicas matching the replica selection criteria will be autoscaled independently from other replicas. The autoscaler will scale the replicas based on the utilization of replicas identified by the replica selection. Replica selections should not overlap with each other. Other replicas (those do not match any replica selection) will be autoscaled together and will have the same compute capacity allocated to them.",
"items": {
"$ref": "#/$defs/AsymmetricAutoscalingOption"
},
"type": "array"
},
"autoscalingTargets": {
"$ref": "#/$defs/AutoscalingTargets",
"description": "Required. The autoscaling targets for an instance."
},
"autoscalingLimits": {
"$ref": "#/$defs/AutoscalingLimits",
"description": "Required. Autoscaling limits for an instance."
}
}
},
"AutoscalingConfigOverrides": {
"properties": {
"disableHighPriorityCpuAutoscaling": {
"description": "Optional. If true, disables high priority CPU autoscaling for the selected replicas and ignores high_priority_cpu_utilization_percent in the top-level autoscaling configuration. When setting this field to true, setting autoscaling_target_high_priority_cpu_utilization_percent field to a non-zero value for the same replica is not supported. If false, the autoscaling_target_high_priority_cpu_utilization_percent field in the replica will be used if set to a non-zero value. Otherwise, the high_priority_cpu_utilization_percent field in the top-level autoscaling configuration will be used. Setting both disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to true for the same replica is not supported.",
"type": "boolean"
},
"autoscalingTargetTotalCpuUtilizationPercent": {
"format": "int32",
"type": "integer",
"description": "Optional. If specified, overrides the autoscaling target `total_cpu_utilization_percent` in the top-level autoscaling configuration for the selected replicas."
},
"autoscalingLimits": {
"$ref": "#/$defs/AutoscalingLimits",
"description": "Optional. If specified, overrides the min/max limit in the top-level autoscaling configuration for the selected replicas."
},
"disableTotalCpuAutoscaling": {
"type": "boolean",
"description": "Optional. If true, disables total CPU autoscaling for the selected replicas and ignores total_cpu_utilization_percent in the top-level autoscaling configuration. When setting this field to true, setting autoscaling_target_total_cpu_utilization_percent field to a non-zero value for the same replica is not supported. If false, the autoscaling_target_total_cpu_utilization_percent field in the replica will be used if set to a non-zero value. Otherwise, the total_cpu_utilization_percent field in the top-level autoscaling configuration will be used. Setting both disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to true for the same replica is not supported."
},
"autoscalingTargetHighPriorityCpuUtilizationPercent": {
"type": "integer",
"format": "int32",
"description": "Optional. If specified, overrides the autoscaling target high_priority_cpu_utilization_percent in the top-level autoscaling configuration for the selected replicas."
}
},
"description": "Overrides the top-level autoscaling configuration for the replicas identified by `replica_selection`. All fields in this message are optional. Any unspecified fields will use the corresponding values from the top-level autoscaling configuration.",
"type": "object"
},
"AutoscalingLimits": {
"type": "object",
"description": "The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.",
"properties": {
"maxNodes": {
"type": "integer",
"description": "Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.",
"format": "int32"
},
"minNodes": {
"type": "integer",
"format": "int32",
"description": "Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1."
},
"minProcessingUnits": {
"format": "int32",
"type": "integer",
"description": "Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000."
},
"maxProcessingUnits": {
"description": "Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.",
"type": "integer",
"format": "int32"
}
}
},
"AutoscalingTargets": {
"type": "object",
"description": "The autoscaling targets for an instance.",
"properties": {
"totalCpuUtilizationPercent": {
"description": "Optional. The target total CPU utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler skips scaling based on total CPU utilization. If both `high_priority_cpu_utilization_percent` and `total_cpu_utilization_percent` are specified, the autoscaler provisions the larger of the two required compute capacities to satisfy both targets.",
"type": "integer",
"format": "int32"
},
"storageUtilizationPercent": {
"format": "int32",
"type": "integer",
"description": "Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 99] inclusive."
},
"highPriorityCpuUtilizationPercent": {
"description": "Optional. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler skips scaling based on high priority CPU utilization.",
"format": "int32",
"type": "integer"
}
}
},
"FreeInstanceMetadata": {
"description": "Free instance specific metadata that is kept even after an instance has been upgraded for tracking purposes.",
"type": "object",
"properties": {
"upgradeTime": {
"description": "Output only. If present, the timestamp at which the free instance was upgraded to a provisioned instance.",
"type": "string",
"format": "google-datetime",
"readOnly": true
},
"expireBehavior": {
"type": "string",
"description": "Specifies the expiration behavior of a free instance. The default of ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during or after creation, and before expiration.",
"enum": [
"EXPIRE_BEHAVIOR_UNSPECIFIED",
"FREE_TO_PROVISIONED",
"REMOVE_AFTER_GRACE_PERIOD"
]
},
"expireTime": {
"format": "google-datetime",
"type": "string",
"description": "Output only. Timestamp after which the instance will either be upgraded or scheduled for deletion after a grace period. ExpireBehavior is used to choose between upgrading or scheduling the free instance for deletion. This timestamp is set during the creation of a free instance.",
"readOnly": true
}
}
},
"InstanceReplicaSelection": {
"description": "ReplicaSelection identifies replicas with common properties.",
"type": "object",
"properties": {
"location": {
"description": "Required. Name of the location of the replicas (for example, \"us-central1\").",
"type": "string"
}
}
},
"ReplicaComputeCapacity": {
"properties": {
"nodeCount": {
"type": "integer",
"description": "The number of nodes allocated to each replica. This may be zero in API responses for instances that are not yet in state `READY`.",
"format": "int32"
},
"processingUnits": {
"description": "The number of processing units allocated to each replica. This may be zero in API responses for instances that are not yet in state `READY`.",
"type": "integer",
"format": "int32"
},
"replicaSelection": {
"$ref": "#/$defs/InstanceReplicaSelection",
"description": "Required. Identifies replicas by specified properties. All replicas in the selection have the same amount of compute capacity."
}
},
"description": "ReplicaComputeCapacity describes the amount of server resources that are allocated to each replica identified by the replica selection.",
"type": "object"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-cloud-spanner-instance"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.