Send feedback
Cloud Spanner Client - Class InstanceConfiguration (1.104.0) Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
Reference documentation and code samples for the Cloud Spanner Client class InstanceConfiguration.
Represents a Cloud Spanner Instance Configuration.
Example:
use Google\Cloud\Spanner\SpannerClient;
$spanner = new SpannerClient();
$configuration = $spanner->instanceConfiguration('regional-europe-west');
Namespace
Google \ Cloud \ Spanner
Methods
__construct
Create an instance configuration object.
connection
Connection\ConnectionInterface
A service connection for the
Spanner API. This object is created by SpannerClient,
and should not be instantiated outside of this client.
projectId
string
The current project ID.
name
string
The configuration name or ID.
info
array
[optional] A service representation of the
configuration.
lroConnection
Google\Cloud\Core\LongRunning\LongRunningConnectionInterface
An implementation
mapping to methods which handle LRO resolution in the service.
name
Return the configuration name.
Example:
$name = $configuration->name();
info
Return the service representation of the configuration.
This method may require a service call.
NOTE : Requires https://www.googleapis.com/auth/spanner.admin
scope.
Example:
$info = $configuration->info();
options
array
[optional] Configuration options.
array
[InstanceConfig](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#instanceconfig)
exists
Check if the configuration exists.
This method requires a service call.
NOTE : Requires https://www.googleapis.com/auth/spanner.admin
scope.
Example:
if ($configuration->exists()) {
echo 'Configuration exists!';
}
options
array
[optional] Configuration options.
reload
Fetch a fresh representation of the configuration from the service.
NOTE : Requires https://www.googleapis.com/auth/spanner.admin
scope.
Example:
$info = $configuration->reload();
options
array
[optional] Configuration options.
array
[InstanceConfig](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#instanceconfig)
create
replicas
array< Admin\Instance\V1\ReplicaInfo
>|array
The replica information for the new instance configuration. This array must
contain all the replicas from the base configuration, plus at least one from list of optional replicas
of the base configuration. One of the replicas must be set as the default leader location.
options
array
Configuration options
↳ displayName
string
Defaults to the name of this instance configuration.
↳ leaderOptions
array
Allowed values of the "default_leader" schema option for databases in instances that use this instance configuration. Defaults to the leader options of the base configuration. Please note it may be possible for the default value to be an empty array when lazy loading the base configuration. To ensure the default value matches the upstream values please make sure to trigger a network request on the base configuration with either InstanceConfiguration::reload()
or InstanceConfiguration::info()
.
↳ validateOnly
bool
An option to validate, but not actually execute, the request, and provide the same response. Defaults to false
.
update
options
array
Configuration options
↳ displayName
string
The descriptive name for this instance as it appears in UIs. Defaults to the name of this instance configuration.
↳ validateOnly
bool
An option to validate, but not actually execute, the request, and provide the same response. Defaults to false
.
delete
options
array
[optional] Configuration options.
__debugInfo
A more readable representation of the object.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Spanner Client - Class InstanceConfiguration (1.104.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.104.0 (latest)](/php/docs/reference/cloud-spanner/latest/InstanceConfiguration)\n- [1.103.0](/php/docs/reference/cloud-spanner/1.103.0/InstanceConfiguration)\n- [1.102.0](/php/docs/reference/cloud-spanner/1.102.0/InstanceConfiguration)\n- [1.101.0](/php/docs/reference/cloud-spanner/1.101.0/InstanceConfiguration)\n- [1.100.0](/php/docs/reference/cloud-spanner/1.100.0/InstanceConfiguration)\n- [1.98.0](/php/docs/reference/cloud-spanner/1.98.0/InstanceConfiguration)\n- [1.97.0](/php/docs/reference/cloud-spanner/1.97.0/InstanceConfiguration)\n- [1.96.0](/php/docs/reference/cloud-spanner/1.96.0/InstanceConfiguration)\n- [1.95.0](/php/docs/reference/cloud-spanner/1.95.0/InstanceConfiguration)\n- [1.94.0](/php/docs/reference/cloud-spanner/1.94.0/InstanceConfiguration)\n- [1.93.1](/php/docs/reference/cloud-spanner/1.93.1/InstanceConfiguration)\n- [1.92.1](/php/docs/reference/cloud-spanner/1.92.1/InstanceConfiguration)\n- [1.91.0](/php/docs/reference/cloud-spanner/1.91.0/InstanceConfiguration)\n- [1.90.0](/php/docs/reference/cloud-spanner/1.90.0/InstanceConfiguration)\n- [1.89.0](/php/docs/reference/cloud-spanner/1.89.0/InstanceConfiguration)\n- [1.88.0](/php/docs/reference/cloud-spanner/1.88.0/InstanceConfiguration)\n- [1.87.0](/php/docs/reference/cloud-spanner/1.87.0/InstanceConfiguration)\n- [1.86.0](/php/docs/reference/cloud-spanner/1.86.0/InstanceConfiguration)\n- [1.85.0](/php/docs/reference/cloud-spanner/1.85.0/InstanceConfiguration)\n- [1.84.0](/php/docs/reference/cloud-spanner/1.84.0/InstanceConfiguration)\n- [1.83.0](/php/docs/reference/cloud-spanner/1.83.0/InstanceConfiguration)\n- [1.82.0](/php/docs/reference/cloud-spanner/1.82.0/InstanceConfiguration)\n- [1.81.0](/php/docs/reference/cloud-spanner/1.81.0/InstanceConfiguration)\n- [1.80.0](/php/docs/reference/cloud-spanner/1.80.0/InstanceConfiguration)\n- [1.79.0](/php/docs/reference/cloud-spanner/1.79.0/InstanceConfiguration)\n- [1.78.0](/php/docs/reference/cloud-spanner/1.78.0/InstanceConfiguration)\n- [1.77.0](/php/docs/reference/cloud-spanner/1.77.0/InstanceConfiguration)\n- [1.76.1](/php/docs/reference/cloud-spanner/1.76.1/InstanceConfiguration)\n- [1.68.0](/php/docs/reference/cloud-spanner/1.68.0/InstanceConfiguration)\n- [1.67.0](/php/docs/reference/cloud-spanner/1.67.0/InstanceConfiguration)\n- [1.66.0](/php/docs/reference/cloud-spanner/1.66.0/InstanceConfiguration)\n- [1.65.0](/php/docs/reference/cloud-spanner/1.65.0/InstanceConfiguration)\n- [1.64.0](/php/docs/reference/cloud-spanner/1.64.0/InstanceConfiguration)\n- [1.63.2](/php/docs/reference/cloud-spanner/1.63.2/InstanceConfiguration)\n- [1.62.1](/php/docs/reference/cloud-spanner/1.62.1/InstanceConfiguration)\n- [1.61.0](/php/docs/reference/cloud-spanner/1.61.0/InstanceConfiguration)\n- [1.60.0](/php/docs/reference/cloud-spanner/1.60.0/InstanceConfiguration)\n- [1.59.0](/php/docs/reference/cloud-spanner/1.59.0/InstanceConfiguration)\n- [1.58.4](/php/docs/reference/cloud-spanner/1.58.4/InstanceConfiguration)\n- [1.57.0](/php/docs/reference/cloud-spanner/1.57.0/InstanceConfiguration)\n- [1.56.0](/php/docs/reference/cloud-spanner/1.56.0/InstanceConfiguration)\n- [1.55.0](/php/docs/reference/cloud-spanner/1.55.0/InstanceConfiguration)\n- [1.54.2](/php/docs/reference/cloud-spanner/1.54.2/InstanceConfiguration) \nReference documentation and code samples for the Cloud Spanner Client class InstanceConfiguration.\n\nRepresents a Cloud Spanner Instance Configuration.\n\nExample: \n\n use Google\\Cloud\\Spanner\\SpannerClient;\n\n $spanner = new SpannerClient();\n\n $configuration = $spanner-\u003einstanceConfiguration('regional-europe-west');\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Spanner\n\nMethods\n-------\n\n### __construct\n\nCreate an instance configuration object.\n\n### name\n\nReturn the configuration name.\n\nExample: \n\n $name = $configuration-\u003ename();\n\n### info\n\nReturn the service representation of the configuration.\n\nThis method may require a service call.\n\n**NOTE** : Requires `https://www.googleapis.com/auth/spanner.admin` scope.\n\nExample: \n\n $info = $configuration-\u003einfo();\n\n### exists\n\nCheck if the configuration exists.\n\nThis method requires a service call.\n\n**NOTE** : Requires `https://www.googleapis.com/auth/spanner.admin` scope.\n\nExample: \n\n if ($configuration-\u003eexists()) {\n echo 'Configuration exists!';\n }\n\n### reload\n\nFetch a fresh representation of the configuration from the service.\n\n**NOTE** : Requires `https://www.googleapis.com/auth/spanner.admin` scope.\n\nExample: \n\n $info = $configuration-\u003ereload();\n\n### create\n\nSee also:\n\n- [CreateInstanceConfigRequest](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#createinstanceconfigrequest)\n\n### update\n\nSee also:\n\n- [UpdateInstanceConfigRequest](https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.instance.v1#updateinstanceconfigrequest)\n\n### delete\n\nSee also:\n\n- [DeleteInstanceConfigRequest](https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.instance.v1#deleteinstanceconfigrequest)\n\n### __debugInfo\n\nA more readable representation of the object."]]