Types for Google Cloud Spanner Admin Instance v1 API¶
- class google.cloud.spanner_admin_instance_v1.types.CreateInstanceConfigMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata type for the operation returned by [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
- instance_config¶
The target instance config end state.
- progress¶
The progress of the [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig] operation.
- cancel_time¶
The time at which this operation was cancelled.
- class google.cloud.spanner_admin_instance_v1.types.CreateInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [CreateInstanceConfigRequest][InstanceAdmin.CreateInstanceConfigRequest].
- parent¶
Required. The name of the project in which to create the instance config. Values are of the form
projects/<project>
.- Type
- instance_config_id¶
Required. The ID of the instance config to create. Valid identifiers are of the form
custom-[-a-z0-9]*[a-z0-9]
and must be between 2 and 64 characters in length. Thecustom-
prefix is required to avoid name conflicts with Google managed configurations.- Type
- instance_config¶
Required. The InstanceConfig proto of the configuration to create. instance_config.name must be
<parent>/instanceConfigs/<instance_config_id>
. instance_config.base_config must be a Google managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
- class google.cloud.spanner_admin_instance_v1.types.CreateInstanceMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata type for the operation returned by [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
- instance¶
The instance being created.
- start_time¶
The time at which the [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance] request was received.
- cancel_time¶
The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
- end_time¶
The time at which this operation failed or was completed successfully.
- class google.cloud.spanner_admin_instance_v1.types.CreateInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
- parent¶
Required. The name of the project in which to create the instance. Values are of the form
projects/<project>
.- Type
- instance_id¶
Required. The ID of the instance to create. Valid identifiers are of the form
[a-z][-a-z0-9]*[a-z0-9]
and must be between 2 and 64 characters in length.- Type
- instance¶
Required. The instance to create. The name may be omitted, but if specified must be
<parent>/instances/<instance_id>
.
- class google.cloud.spanner_admin_instance_v1.types.DeleteInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [DeleteInstanceConfigRequest][InstanceAdmin.DeleteInstanceConfigRequest].
- name¶
Required. The name of the instance configuration to be deleted. Values are of the form
projects/<project>/instanceConfigs/<instance_config>
- Type
- etag¶
Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other. If not empty, the API only deletes the instance config when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance config without checking the current status of the requested instance config.
- Type
- class google.cloud.spanner_admin_instance_v1.types.DeleteInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].
- class google.cloud.spanner_admin_instance_v1.types.GetInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
- class google.cloud.spanner_admin_instance_v1.types.GetInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].
- name¶
Required. The name of the requested instance. Values are of the form
projects/<project>/instances/<instance>
.- Type
- field_mask¶
If field_mask is present, specifies the subset of [Instance][google.spanner.admin.instance.v1.Instance] fields that should be returned. If absent, all [Instance][google.spanner.admin.instance.v1.Instance] fields are returned.
- class google.cloud.spanner_admin_instance_v1.types.Instance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An isolated set of Cloud Spanner resources on which databases can be hosted.
- name¶
Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form
projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]
. The final segment of the name must be between 2 and 64 characters in length.- Type
- config¶
Required. The name of the instance’s configuration. Values are of the form
projects/<project>/instanceConfigs/<configuration>
. See also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].- Type
- display_name¶
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
- node_count¶
The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. This may be zero in API responses for instances that are not yet in state
READY
.See the documentation for more information about nodes and processing units.
- Type
- processing_units¶
The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. This may be zero in API responses for instances that are not yet in state
READY
.See the documentation for more information about nodes and processing units.
- Type
- state¶
Output only. The current instance state. For [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance], the state must be either omitted or set to
CREATING
. For [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance], the state must be either omitted or set toREADY
.
- labels¶
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][a-z0-9_-]{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.
- create_time¶
Output only. The time at which the instance was created.
- update_time¶
Output only. The time at which the instance was most recently updated.
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class State(value)[source]¶
Bases:
proto.enums.Enum
Indicates the current state of the instance.
- Values:
- STATE_UNSPECIFIED (0):
Not specified.
- CREATING (1):
The instance is still being created. Resources may not be available yet, and operations such as database creation may not work.
- READY (2):
The instance is fully created and ready to do work such as creating databases.
- class google.cloud.spanner_admin_instance_v1.types.InstanceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
- name¶
A unique identifier for the instance configuration. Values are of the form
projects/<project>/instanceConfigs/[a-z][-a-z0-9]*
.- Type
- config_type¶
Output only. Whether this instance config is a Google or User Managed Configuration.
- replicas¶
The geographic placement of nodes in this instance configuration and their replication properties.
- Type
MutableSequence[google.cloud.spanner_admin_instance_v1.types.ReplicaInfo]
- optional_replicas¶
Output only. The available optional replicas to choose from for user managed configurations. Populated for Google managed configurations.
- Type
MutableSequence[google.cloud.spanner_admin_instance_v1.types.ReplicaInfo]
- base_config¶
Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3, based on which this configuration is created. Only set for user managed configurations.
base_config
must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.- Type
- labels¶
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][a-z0-9_-]{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. Therefore, 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.
- etag¶
etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance config from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance config updates in order to avoid race conditions: An etag is returned in the response which contains instance configs, and systems are expected to put that etag in the request to update instance config to ensure that their change will be applied to the same version of the instance config. If no etag is provided in the call to update instance config, then the existing instance config is overwritten blindly.
- Type
- leader_options¶
Allowed values of the “default_leader” schema option for databases in instances that use this instance configuration.
- Type
MutableSequence[str]
- reconciling¶
Output only. If true, the instance config is being created or updated. If false, there are no ongoing operations for the instance config.
- Type
- state¶
Output only. The current instance config state.
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class State(value)[source]¶
Bases:
proto.enums.Enum
Indicates the current state of the instance config.
- Values:
- STATE_UNSPECIFIED (0):
Not specified.
- CREATING (1):
The instance config is still being created.
- READY (2):
The instance config is fully created and ready to be used to create instances.
- class Type(value)[source]¶
Bases:
proto.enums.Enum
The type of this configuration.
- Values:
- TYPE_UNSPECIFIED (0):
Unspecified.
- GOOGLE_MANAGED (1):
Google managed configuration.
- USER_MANAGED (2):
User managed configuration.
- class google.cloud.spanner_admin_instance_v1.types.ListInstanceConfigOperationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
- parent¶
Required. The project of the instance config operations. Values are of the form
projects/<project>
.- Type
- filter¶
An expression that filters the list of returned operations.
A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of:
<
,>
,<=
,>=
,!=
,=
, or:
. Colon:
is the contains operator. Filter rules are not case sensitive.The following fields in the [Operation][google.longrunning.Operation] are eligible for filtering:
name
- The name of the long-running operationdone
- False if the operation is in progress, else true.metadata.@type
- the type of metadata. For example, the type string for [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] istype.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata
.metadata.<field_name>
- any field in metadata.value.metadata.@type
must be specified first, if filtering on metadata fields.error
- Error associated with the long-running operation.response.@type
- the type of response.response.<field_name>
- any field in response.value.
You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly.
Here are a few examples:
done:true
- The operation is complete.(metadata.@type=
type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND
(metadata.instance_config.name:custom-config) AND
(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND
(error:*)
- Return operations where:The operation’s metadata type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
The instance config name contains “custom-config”.
The operation started before 2021-03-28T14:50:00Z.
The operation resulted in an error.
- Type
- page_size¶
Number of operations to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.
- Type
- page_token¶
If non-empty,
page_token
should contain a [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.next_page_token] from a previous [ListInstanceConfigOperationsResponse][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse] to the sameparent
and with the samefilter
.- Type
- class google.cloud.spanner_admin_instance_v1.types.ListInstanceConfigOperationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response for [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
- operations¶
The list of matching instance config [long-running operations][google.longrunning.Operation]. Each operation’s name will be prefixed by the instance config’s name. The operation’s [metadata][google.longrunning.Operation.metadata] field type
metadata.type_url
describes the type of the metadata.- Type
MutableSequence[google.longrunning.operations_pb2.Operation]
- class google.cloud.spanner_admin_instance_v1.types.ListInstanceConfigsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
- parent¶
Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form
projects/<project>
.- Type
- page_size¶
Number of instance configurations to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.
- Type
- class google.cloud.spanner_admin_instance_v1.types.ListInstanceConfigsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
- instance_configs¶
The list of requested instance configurations.
- Type
MutableSequence[google.cloud.spanner_admin_instance_v1.types.InstanceConfig]
- class google.cloud.spanner_admin_instance_v1.types.ListInstancesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
- parent¶
Required. The name of the project for which a list of instances is requested. Values are of the form
projects/<project>
.- Type
- page_size¶
Number of instances to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.
- Type
- page_token¶
If non-empty,
page_token
should contain a [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token] from a previous [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].- Type
- filter¶
An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:
name
display_name
labels.key
where key is the name of a label
Some examples of using filters are:
name:*
–> The instance has a name.name:Howl
–> The instance’s name contains the string “howl”.name:HOWL
–> Equivalent to above.NAME:howl
–> Equivalent to above.labels.env:*
–> The instance has the label “env”.labels.env:dev
–> The instance has the label “env” and the value of the label contains the string “dev”.name:howl labels.env:dev
–> The instance’s name contains “howl” and it has the label “env” with its value containing “dev”.
- Type
- class google.cloud.spanner_admin_instance_v1.types.ListInstancesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
- instances¶
The list of requested instances.
- Type
MutableSequence[google.cloud.spanner_admin_instance_v1.types.Instance]
- class google.cloud.spanner_admin_instance_v1.types.OperationProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates progress related information for a Cloud Spanner long running instance operations.
- progress_percent¶
Percent completion of the operation. Values are between 0 and 100 inclusive.
- Type
- start_time¶
Time the request was received.
- end_time¶
If set, the time at which this operation failed or was completed successfully.
- class google.cloud.spanner_admin_instance_v1.types.ReplicaInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
- type_¶
The type of replica.
- default_leader_location¶
If true, this location is designated as the default leader location where leader replicas are placed. See the region types documentation for more details.
- Type
- class ReplicaType(value)[source]¶
Bases:
proto.enums.Enum
Indicates the type of replica. See the replica types documentation for more details.
- Values:
- TYPE_UNSPECIFIED (0):
Not specified.
- READ_WRITE (1):
Read-write replicas support both reads and writes. These replicas:
Maintain a full copy of your data.
Serve reads.
Can vote whether to commit a write.
Participate in leadership election.
Are eligible to become a leader.
- READ_ONLY (2):
Read-only replicas only support reads (not writes). Read-only replicas:
Maintain a full copy of your data.
Serve reads.
Do not participate in voting to commit writes.
Are not eligible to become a leader.
- WITNESS (3):
Witness replicas don’t support reads but do participate in voting to commit writes. Witness replicas:
Do not maintain a full copy of data.
Do not serve reads.
Vote whether to commit writes.
Participate in leader election but are not eligible to become leader.
- class google.cloud.spanner_admin_instance_v1.types.UpdateInstanceConfigMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata type for the operation returned by [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
- instance_config¶
The desired instance config after updating.
- progress¶
The progress of the [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig] operation.
- cancel_time¶
The time at which this operation was cancelled.
- class google.cloud.spanner_admin_instance_v1.types.UpdateInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [UpdateInstanceConfigRequest][InstanceAdmin.UpdateInstanceConfigRequest].
- instance_config¶
Required. The user instance config to update, which must always include the instance config name. Otherwise, only fields mentioned in [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask] need be included. To prevent conflicts of concurrent updates, [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can be used.
- update_mask¶
Required. A mask specifying which fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be updated. The field mask must always be specified; this prevents any future fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.
- class google.cloud.spanner_admin_instance_v1.types.UpdateInstanceMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata type for the operation returned by [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
- instance¶
The desired end state of the update.
- start_time¶
The time at which [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance] request was received.
- cancel_time¶
The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
- end_time¶
The time at which this operation failed or was completed successfully.
- class google.cloud.spanner_admin_instance_v1.types.UpdateInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
- instance¶
Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.
- field_mask¶
Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated. The field mask must always be specified; this prevents any future fields in [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know about them.