- 2.0.1-RC1 (latest)
 - 2.0.0-RC1
 - 1.106.0
 - 1.105.1
 - 1.104.1
 - 1.103.0
 - 1.102.0
 - 1.101.0
 - 1.100.0
 - 1.98.0
 - 1.97.0
 - 1.96.0
 - 1.95.0
 - 1.94.0
 - 1.93.1
 - 1.92.1
 - 1.91.0
 - 1.90.0
 - 1.89.0
 - 1.88.0
 - 1.87.0
 - 1.86.0
 - 1.85.0
 - 1.84.0
 - 1.83.0
 - 1.82.0
 - 1.81.0
 - 1.80.0
 - 1.79.0
 - 1.78.0
 - 1.77.0
 - 1.76.1
 - 1.68.0
 - 1.67.0
 - 1.66.0
 - 1.65.0
 - 1.64.0
 - 1.63.2
 - 1.62.1
 - 1.61.0
 - 1.60.0
 - 1.59.0
 - 1.58.4
 - 1.57.0
 - 1.56.0
 - 1.55.0
 - 1.54.2
 
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');
Methods
__construct
Create an instance configuration object.
| Parameters | |
|---|---|
| Name | Description | 
connection | 
        
          Google\Cloud\Spanner\Connection\ConnectionInterface
          A service connection for the Spanner API.  | 
      
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();
| Returns | |
|---|---|
| Type | Description | 
string | 
        |
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();
| Parameter | |
|---|---|
| Name | Description | 
options | 
        
          array
          [optional] Configuration options.  | 
      
| Returns | |
|---|---|
| Type | Description | 
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!';
}
| Parameter | |
|---|---|
| Name | Description | 
options | 
        
          array
          [optional] Configuration options.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bool | 
        |
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();
| Parameter | |
|---|---|
| Name | Description | 
options | 
        
          array
          [optional] Configuration options.  | 
      
| Returns | |
|---|---|
| Type | Description | 
array | 
        [InstanceConfig](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#instanceconfig) | 
create
Create a new instance configuration.
Example:
$operation = $instanceConfig->create($baseConfig, $options);
| Parameters | |
|---|---|
| Name | Description | 
baseConfig | 
        
          Google\Cloud\Spanner\InstanceConfiguration
          The base configuration to extend for this custom instance configuration.  | 
      
replicas | 
        
          array<Google\Cloud\Spanner\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 Google\Cloud\Spanner\InstanceConfiguration::reload() or Google\Cloud\Spanner\InstanceConfiguration::info().  | 
      
↳ labels | 
        
          array
          For more information, see Using labels to organize Google Cloud Platform resources.  | 
      
↳ validateOnly | 
        
          bool
          An option to validate, but not actually execute, the request, and provide the same response. Defaults to   | 
      
| Returns | |
|---|---|
| Type | Description | 
Google\Cloud\Core\LongRunning\LongRunningOperation<\google\cloud\spanner\instanceconfiguration> | 
        |
update
Update the instance configuration. This is only possible for customer managed instance configurations.
Example:
$operation = $instanceConfig->update([
    'displayName' => 'My Instance config'
]);
| Parameters | |
|---|---|
| Name | Description | 
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.  | 
      
↳ labels | 
        
          array
          For more information, see Using labels to organize Google Cloud Platform resources.  | 
      
↳ validateOnly | 
        
          bool
          An option to validate, but not actually execute, the request, and provide the same response. Defaults to   | 
      
| Returns | |
|---|---|
| Type | Description | 
Google\Cloud\Core\LongRunning\LongRunningOperation<\google\cloud\spanner\instanceconfiguration> | 
        |
delete
Delete the instance configuration. This is only possible for customer managed instance configurations that are currently not in use by any instances.
Example:
$instanceConfig->delete();
| Parameter | |
|---|---|
| Name | Description | 
options | 
        
          array
          [optional] Configuration options.  | 
      
| Returns | |
|---|---|
| Type | Description | 
void | 
        |
__debugInfo
A more readable representation of the object.