google-cloud-spanner 3.55.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/cloud/spanner.py +47 -0
- google/cloud/spanner_admin_database_v1/__init__.py +146 -0
- google/cloud/spanner_admin_database_v1/gapic_metadata.json +418 -0
- google/cloud/spanner_admin_database_v1/gapic_version.py +16 -0
- google/cloud/spanner_admin_database_v1/py.typed +2 -0
- google/cloud/spanner_admin_database_v1/services/__init__.py +15 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/__init__.py +22 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py +4097 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/client.py +4602 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/pagers.py +989 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/__init__.py +38 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py +820 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc.py +1303 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc_asyncio.py +1688 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py +6512 -0
- google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest_base.py +1650 -0
- google/cloud/spanner_admin_database_v1/types/__init__.py +144 -0
- google/cloud/spanner_admin_database_v1/types/backup.py +1106 -0
- google/cloud/spanner_admin_database_v1/types/backup_schedule.py +369 -0
- google/cloud/spanner_admin_database_v1/types/common.py +180 -0
- google/cloud/spanner_admin_database_v1/types/spanner_database_admin.py +1303 -0
- google/cloud/spanner_admin_instance_v1/__init__.py +110 -0
- google/cloud/spanner_admin_instance_v1/gapic_metadata.json +343 -0
- google/cloud/spanner_admin_instance_v1/gapic_version.py +16 -0
- google/cloud/spanner_admin_instance_v1/py.typed +2 -0
- google/cloud/spanner_admin_instance_v1/services/__init__.py +15 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/__init__.py +22 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py +3466 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py +3881 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/pagers.py +856 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/__init__.py +38 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/base.py +545 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc.py +1347 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc_asyncio.py +1539 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py +4834 -0
- google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest_base.py +1198 -0
- google/cloud/spanner_admin_instance_v1/types/__init__.py +104 -0
- google/cloud/spanner_admin_instance_v1/types/common.py +99 -0
- google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py +2375 -0
- google/cloud/spanner_dbapi/__init__.py +93 -0
- google/cloud/spanner_dbapi/_helpers.py +113 -0
- google/cloud/spanner_dbapi/batch_dml_executor.py +135 -0
- google/cloud/spanner_dbapi/checksum.py +80 -0
- google/cloud/spanner_dbapi/client_side_statement_executor.py +140 -0
- google/cloud/spanner_dbapi/client_side_statement_parser.py +106 -0
- google/cloud/spanner_dbapi/connection.py +818 -0
- google/cloud/spanner_dbapi/cursor.py +609 -0
- google/cloud/spanner_dbapi/exceptions.py +172 -0
- google/cloud/spanner_dbapi/parse_utils.py +392 -0
- google/cloud/spanner_dbapi/parsed_statement.py +63 -0
- google/cloud/spanner_dbapi/parser.py +258 -0
- google/cloud/spanner_dbapi/partition_helper.py +41 -0
- google/cloud/spanner_dbapi/transaction_helper.py +294 -0
- google/cloud/spanner_dbapi/types.py +106 -0
- google/cloud/spanner_dbapi/utils.py +147 -0
- google/cloud/spanner_dbapi/version.py +20 -0
- google/cloud/spanner_v1/__init__.py +154 -0
- google/cloud/spanner_v1/_helpers.py +751 -0
- google/cloud/spanner_v1/_opentelemetry_tracing.py +165 -0
- google/cloud/spanner_v1/backup.py +397 -0
- google/cloud/spanner_v1/batch.py +433 -0
- google/cloud/spanner_v1/client.py +538 -0
- google/cloud/spanner_v1/data_types.py +350 -0
- google/cloud/spanner_v1/database.py +1968 -0
- google/cloud/spanner_v1/database_sessions_manager.py +249 -0
- google/cloud/spanner_v1/gapic_metadata.json +268 -0
- google/cloud/spanner_v1/gapic_version.py +16 -0
- google/cloud/spanner_v1/instance.py +735 -0
- google/cloud/spanner_v1/keyset.py +193 -0
- google/cloud/spanner_v1/merged_result_set.py +146 -0
- google/cloud/spanner_v1/metrics/constants.py +71 -0
- google/cloud/spanner_v1/metrics/metrics_capture.py +75 -0
- google/cloud/spanner_v1/metrics/metrics_exporter.py +384 -0
- google/cloud/spanner_v1/metrics/metrics_interceptor.py +156 -0
- google/cloud/spanner_v1/metrics/metrics_tracer.py +588 -0
- google/cloud/spanner_v1/metrics/metrics_tracer_factory.py +328 -0
- google/cloud/spanner_v1/metrics/spanner_metrics_tracer_factory.py +172 -0
- google/cloud/spanner_v1/param_types.py +110 -0
- google/cloud/spanner_v1/pool.py +813 -0
- google/cloud/spanner_v1/py.typed +2 -0
- google/cloud/spanner_v1/request_id_header.py +64 -0
- google/cloud/spanner_v1/services/__init__.py +15 -0
- google/cloud/spanner_v1/services/spanner/__init__.py +22 -0
- google/cloud/spanner_v1/services/spanner/async_client.py +2205 -0
- google/cloud/spanner_v1/services/spanner/client.py +2624 -0
- google/cloud/spanner_v1/services/spanner/pagers.py +196 -0
- google/cloud/spanner_v1/services/spanner/transports/__init__.py +38 -0
- google/cloud/spanner_v1/services/spanner/transports/base.py +520 -0
- google/cloud/spanner_v1/services/spanner/transports/grpc.py +911 -0
- google/cloud/spanner_v1/services/spanner/transports/grpc_asyncio.py +1144 -0
- google/cloud/spanner_v1/services/spanner/transports/rest.py +3468 -0
- google/cloud/spanner_v1/services/spanner/transports/rest_base.py +981 -0
- google/cloud/spanner_v1/session.py +631 -0
- google/cloud/spanner_v1/session_options.py +133 -0
- google/cloud/spanner_v1/snapshot.py +1057 -0
- google/cloud/spanner_v1/streamed.py +402 -0
- google/cloud/spanner_v1/table.py +181 -0
- google/cloud/spanner_v1/testing/__init__.py +0 -0
- google/cloud/spanner_v1/testing/database_test.py +121 -0
- google/cloud/spanner_v1/testing/interceptors.py +118 -0
- google/cloud/spanner_v1/testing/mock_database_admin.py +38 -0
- google/cloud/spanner_v1/testing/mock_spanner.py +261 -0
- google/cloud/spanner_v1/testing/spanner_database_admin_pb2_grpc.py +1267 -0
- google/cloud/spanner_v1/testing/spanner_pb2_grpc.py +882 -0
- google/cloud/spanner_v1/transaction.py +747 -0
- google/cloud/spanner_v1/types/__init__.py +118 -0
- google/cloud/spanner_v1/types/commit_response.py +94 -0
- google/cloud/spanner_v1/types/keys.py +248 -0
- google/cloud/spanner_v1/types/mutation.py +201 -0
- google/cloud/spanner_v1/types/query_plan.py +220 -0
- google/cloud/spanner_v1/types/result_set.py +379 -0
- google/cloud/spanner_v1/types/spanner.py +1815 -0
- google/cloud/spanner_v1/types/transaction.py +818 -0
- google/cloud/spanner_v1/types/type.py +288 -0
- google_cloud_spanner-3.55.0.dist-info/LICENSE +202 -0
- google_cloud_spanner-3.55.0.dist-info/METADATA +318 -0
- google_cloud_spanner-3.55.0.dist-info/RECORD +119 -0
- google_cloud_spanner-3.55.0.dist-info/WHEEL +5 -0
- google_cloud_spanner-3.55.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
from collections import OrderedDict
|
|
17
|
+
from typing import Dict, Type
|
|
18
|
+
|
|
19
|
+
from .base import InstanceAdminTransport
|
|
20
|
+
from .grpc import InstanceAdminGrpcTransport
|
|
21
|
+
from .grpc_asyncio import InstanceAdminGrpcAsyncIOTransport
|
|
22
|
+
from .rest import InstanceAdminRestTransport
|
|
23
|
+
from .rest import InstanceAdminRestInterceptor
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# Compile a registry of transports.
|
|
27
|
+
_transport_registry = OrderedDict() # type: Dict[str, Type[InstanceAdminTransport]]
|
|
28
|
+
_transport_registry["grpc"] = InstanceAdminGrpcTransport
|
|
29
|
+
_transport_registry["grpc_asyncio"] = InstanceAdminGrpcAsyncIOTransport
|
|
30
|
+
_transport_registry["rest"] = InstanceAdminRestTransport
|
|
31
|
+
|
|
32
|
+
__all__ = (
|
|
33
|
+
"InstanceAdminTransport",
|
|
34
|
+
"InstanceAdminGrpcTransport",
|
|
35
|
+
"InstanceAdminGrpcAsyncIOTransport",
|
|
36
|
+
"InstanceAdminRestTransport",
|
|
37
|
+
"InstanceAdminRestInterceptor",
|
|
38
|
+
)
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
import abc
|
|
17
|
+
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
|
|
18
|
+
|
|
19
|
+
from google.cloud.spanner_admin_instance_v1 import gapic_version as package_version
|
|
20
|
+
|
|
21
|
+
import google.auth # type: ignore
|
|
22
|
+
import google.api_core
|
|
23
|
+
from google.api_core import exceptions as core_exceptions
|
|
24
|
+
from google.api_core import gapic_v1
|
|
25
|
+
from google.api_core import retry as retries
|
|
26
|
+
from google.api_core import operations_v1
|
|
27
|
+
from google.auth import credentials as ga_credentials # type: ignore
|
|
28
|
+
from google.oauth2 import service_account # type: ignore
|
|
29
|
+
import google.protobuf
|
|
30
|
+
|
|
31
|
+
from google.cloud.spanner_admin_instance_v1.types import spanner_instance_admin
|
|
32
|
+
from google.iam.v1 import iam_policy_pb2 # type: ignore
|
|
33
|
+
from google.iam.v1 import policy_pb2 # type: ignore
|
|
34
|
+
from google.longrunning import operations_pb2 # type: ignore
|
|
35
|
+
from google.protobuf import empty_pb2 # type: ignore
|
|
36
|
+
|
|
37
|
+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
|
|
38
|
+
gapic_version=package_version.__version__
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
|
|
42
|
+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class InstanceAdminTransport(abc.ABC):
|
|
46
|
+
"""Abstract transport class for InstanceAdmin."""
|
|
47
|
+
|
|
48
|
+
AUTH_SCOPES = (
|
|
49
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
50
|
+
"https://www.googleapis.com/auth/spanner.admin",
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
DEFAULT_HOST: str = "spanner.googleapis.com"
|
|
54
|
+
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
*,
|
|
58
|
+
host: str = DEFAULT_HOST,
|
|
59
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
60
|
+
credentials_file: Optional[str] = None,
|
|
61
|
+
scopes: Optional[Sequence[str]] = None,
|
|
62
|
+
quota_project_id: Optional[str] = None,
|
|
63
|
+
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
|
|
64
|
+
always_use_jwt_access: Optional[bool] = False,
|
|
65
|
+
api_audience: Optional[str] = None,
|
|
66
|
+
**kwargs,
|
|
67
|
+
) -> None:
|
|
68
|
+
"""Instantiate the transport.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
host (Optional[str]):
|
|
72
|
+
The hostname to connect to (default: 'spanner.googleapis.com').
|
|
73
|
+
credentials (Optional[google.auth.credentials.Credentials]): The
|
|
74
|
+
authorization credentials to attach to requests. These
|
|
75
|
+
credentials identify the application to the service; if none
|
|
76
|
+
are specified, the client will attempt to ascertain the
|
|
77
|
+
credentials from the environment.
|
|
78
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
79
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
80
|
+
This argument is mutually exclusive with credentials.
|
|
81
|
+
scopes (Optional[Sequence[str]]): A list of scopes.
|
|
82
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
83
|
+
and quota.
|
|
84
|
+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
|
|
85
|
+
The client info used to send a user-agent string along with
|
|
86
|
+
API requests. If ``None``, then default info will be used.
|
|
87
|
+
Generally, you only need to set this if you're developing
|
|
88
|
+
your own client library.
|
|
89
|
+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
90
|
+
be used for service account credentials.
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
|
|
94
|
+
|
|
95
|
+
# Save the scopes.
|
|
96
|
+
self._scopes = scopes
|
|
97
|
+
if not hasattr(self, "_ignore_credentials"):
|
|
98
|
+
self._ignore_credentials: bool = False
|
|
99
|
+
|
|
100
|
+
# If no credentials are provided, then determine the appropriate
|
|
101
|
+
# defaults.
|
|
102
|
+
if credentials and credentials_file:
|
|
103
|
+
raise core_exceptions.DuplicateCredentialArgs(
|
|
104
|
+
"'credentials_file' and 'credentials' are mutually exclusive"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
if credentials_file is not None:
|
|
108
|
+
credentials, _ = google.auth.load_credentials_from_file(
|
|
109
|
+
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
|
|
110
|
+
)
|
|
111
|
+
elif credentials is None and not self._ignore_credentials:
|
|
112
|
+
credentials, _ = google.auth.default(
|
|
113
|
+
**scopes_kwargs, quota_project_id=quota_project_id
|
|
114
|
+
)
|
|
115
|
+
# Don't apply audience if the credentials file passed from user.
|
|
116
|
+
if hasattr(credentials, "with_gdch_audience"):
|
|
117
|
+
credentials = credentials.with_gdch_audience(
|
|
118
|
+
api_audience if api_audience else host
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# If the credentials are service account credentials, then always try to use self signed JWT.
|
|
122
|
+
if (
|
|
123
|
+
always_use_jwt_access
|
|
124
|
+
and isinstance(credentials, service_account.Credentials)
|
|
125
|
+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
|
|
126
|
+
):
|
|
127
|
+
credentials = credentials.with_always_use_jwt_access(True)
|
|
128
|
+
|
|
129
|
+
# Save the credentials.
|
|
130
|
+
self._credentials = credentials
|
|
131
|
+
|
|
132
|
+
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
|
|
133
|
+
if ":" not in host:
|
|
134
|
+
host += ":443"
|
|
135
|
+
self._host = host
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def host(self):
|
|
139
|
+
return self._host
|
|
140
|
+
|
|
141
|
+
def _prep_wrapped_messages(self, client_info):
|
|
142
|
+
# Precompute the wrapped methods.
|
|
143
|
+
self._wrapped_methods = {
|
|
144
|
+
self.list_instance_configs: gapic_v1.method.wrap_method(
|
|
145
|
+
self.list_instance_configs,
|
|
146
|
+
default_retry=retries.Retry(
|
|
147
|
+
initial=1.0,
|
|
148
|
+
maximum=32.0,
|
|
149
|
+
multiplier=1.3,
|
|
150
|
+
predicate=retries.if_exception_type(
|
|
151
|
+
core_exceptions.DeadlineExceeded,
|
|
152
|
+
core_exceptions.ServiceUnavailable,
|
|
153
|
+
),
|
|
154
|
+
deadline=3600.0,
|
|
155
|
+
),
|
|
156
|
+
default_timeout=3600.0,
|
|
157
|
+
client_info=client_info,
|
|
158
|
+
),
|
|
159
|
+
self.get_instance_config: gapic_v1.method.wrap_method(
|
|
160
|
+
self.get_instance_config,
|
|
161
|
+
default_retry=retries.Retry(
|
|
162
|
+
initial=1.0,
|
|
163
|
+
maximum=32.0,
|
|
164
|
+
multiplier=1.3,
|
|
165
|
+
predicate=retries.if_exception_type(
|
|
166
|
+
core_exceptions.DeadlineExceeded,
|
|
167
|
+
core_exceptions.ServiceUnavailable,
|
|
168
|
+
),
|
|
169
|
+
deadline=3600.0,
|
|
170
|
+
),
|
|
171
|
+
default_timeout=3600.0,
|
|
172
|
+
client_info=client_info,
|
|
173
|
+
),
|
|
174
|
+
self.create_instance_config: gapic_v1.method.wrap_method(
|
|
175
|
+
self.create_instance_config,
|
|
176
|
+
default_timeout=None,
|
|
177
|
+
client_info=client_info,
|
|
178
|
+
),
|
|
179
|
+
self.update_instance_config: gapic_v1.method.wrap_method(
|
|
180
|
+
self.update_instance_config,
|
|
181
|
+
default_timeout=None,
|
|
182
|
+
client_info=client_info,
|
|
183
|
+
),
|
|
184
|
+
self.delete_instance_config: gapic_v1.method.wrap_method(
|
|
185
|
+
self.delete_instance_config,
|
|
186
|
+
default_timeout=None,
|
|
187
|
+
client_info=client_info,
|
|
188
|
+
),
|
|
189
|
+
self.list_instance_config_operations: gapic_v1.method.wrap_method(
|
|
190
|
+
self.list_instance_config_operations,
|
|
191
|
+
default_timeout=None,
|
|
192
|
+
client_info=client_info,
|
|
193
|
+
),
|
|
194
|
+
self.list_instances: gapic_v1.method.wrap_method(
|
|
195
|
+
self.list_instances,
|
|
196
|
+
default_retry=retries.Retry(
|
|
197
|
+
initial=1.0,
|
|
198
|
+
maximum=32.0,
|
|
199
|
+
multiplier=1.3,
|
|
200
|
+
predicate=retries.if_exception_type(
|
|
201
|
+
core_exceptions.DeadlineExceeded,
|
|
202
|
+
core_exceptions.ServiceUnavailable,
|
|
203
|
+
),
|
|
204
|
+
deadline=3600.0,
|
|
205
|
+
),
|
|
206
|
+
default_timeout=3600.0,
|
|
207
|
+
client_info=client_info,
|
|
208
|
+
),
|
|
209
|
+
self.list_instance_partitions: gapic_v1.method.wrap_method(
|
|
210
|
+
self.list_instance_partitions,
|
|
211
|
+
default_timeout=None,
|
|
212
|
+
client_info=client_info,
|
|
213
|
+
),
|
|
214
|
+
self.get_instance: gapic_v1.method.wrap_method(
|
|
215
|
+
self.get_instance,
|
|
216
|
+
default_retry=retries.Retry(
|
|
217
|
+
initial=1.0,
|
|
218
|
+
maximum=32.0,
|
|
219
|
+
multiplier=1.3,
|
|
220
|
+
predicate=retries.if_exception_type(
|
|
221
|
+
core_exceptions.DeadlineExceeded,
|
|
222
|
+
core_exceptions.ServiceUnavailable,
|
|
223
|
+
),
|
|
224
|
+
deadline=3600.0,
|
|
225
|
+
),
|
|
226
|
+
default_timeout=3600.0,
|
|
227
|
+
client_info=client_info,
|
|
228
|
+
),
|
|
229
|
+
self.create_instance: gapic_v1.method.wrap_method(
|
|
230
|
+
self.create_instance,
|
|
231
|
+
default_timeout=3600.0,
|
|
232
|
+
client_info=client_info,
|
|
233
|
+
),
|
|
234
|
+
self.update_instance: gapic_v1.method.wrap_method(
|
|
235
|
+
self.update_instance,
|
|
236
|
+
default_timeout=3600.0,
|
|
237
|
+
client_info=client_info,
|
|
238
|
+
),
|
|
239
|
+
self.delete_instance: gapic_v1.method.wrap_method(
|
|
240
|
+
self.delete_instance,
|
|
241
|
+
default_retry=retries.Retry(
|
|
242
|
+
initial=1.0,
|
|
243
|
+
maximum=32.0,
|
|
244
|
+
multiplier=1.3,
|
|
245
|
+
predicate=retries.if_exception_type(
|
|
246
|
+
core_exceptions.DeadlineExceeded,
|
|
247
|
+
core_exceptions.ServiceUnavailable,
|
|
248
|
+
),
|
|
249
|
+
deadline=3600.0,
|
|
250
|
+
),
|
|
251
|
+
default_timeout=3600.0,
|
|
252
|
+
client_info=client_info,
|
|
253
|
+
),
|
|
254
|
+
self.set_iam_policy: gapic_v1.method.wrap_method(
|
|
255
|
+
self.set_iam_policy,
|
|
256
|
+
default_timeout=30.0,
|
|
257
|
+
client_info=client_info,
|
|
258
|
+
),
|
|
259
|
+
self.get_iam_policy: gapic_v1.method.wrap_method(
|
|
260
|
+
self.get_iam_policy,
|
|
261
|
+
default_retry=retries.Retry(
|
|
262
|
+
initial=1.0,
|
|
263
|
+
maximum=32.0,
|
|
264
|
+
multiplier=1.3,
|
|
265
|
+
predicate=retries.if_exception_type(
|
|
266
|
+
core_exceptions.DeadlineExceeded,
|
|
267
|
+
core_exceptions.ServiceUnavailable,
|
|
268
|
+
),
|
|
269
|
+
deadline=30.0,
|
|
270
|
+
),
|
|
271
|
+
default_timeout=30.0,
|
|
272
|
+
client_info=client_info,
|
|
273
|
+
),
|
|
274
|
+
self.test_iam_permissions: gapic_v1.method.wrap_method(
|
|
275
|
+
self.test_iam_permissions,
|
|
276
|
+
default_timeout=30.0,
|
|
277
|
+
client_info=client_info,
|
|
278
|
+
),
|
|
279
|
+
self.get_instance_partition: gapic_v1.method.wrap_method(
|
|
280
|
+
self.get_instance_partition,
|
|
281
|
+
default_timeout=None,
|
|
282
|
+
client_info=client_info,
|
|
283
|
+
),
|
|
284
|
+
self.create_instance_partition: gapic_v1.method.wrap_method(
|
|
285
|
+
self.create_instance_partition,
|
|
286
|
+
default_timeout=None,
|
|
287
|
+
client_info=client_info,
|
|
288
|
+
),
|
|
289
|
+
self.delete_instance_partition: gapic_v1.method.wrap_method(
|
|
290
|
+
self.delete_instance_partition,
|
|
291
|
+
default_timeout=None,
|
|
292
|
+
client_info=client_info,
|
|
293
|
+
),
|
|
294
|
+
self.update_instance_partition: gapic_v1.method.wrap_method(
|
|
295
|
+
self.update_instance_partition,
|
|
296
|
+
default_timeout=None,
|
|
297
|
+
client_info=client_info,
|
|
298
|
+
),
|
|
299
|
+
self.list_instance_partition_operations: gapic_v1.method.wrap_method(
|
|
300
|
+
self.list_instance_partition_operations,
|
|
301
|
+
default_timeout=None,
|
|
302
|
+
client_info=client_info,
|
|
303
|
+
),
|
|
304
|
+
self.move_instance: gapic_v1.method.wrap_method(
|
|
305
|
+
self.move_instance,
|
|
306
|
+
default_timeout=None,
|
|
307
|
+
client_info=client_info,
|
|
308
|
+
),
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
def close(self):
|
|
312
|
+
"""Closes resources associated with the transport.
|
|
313
|
+
|
|
314
|
+
.. warning::
|
|
315
|
+
Only call this method if the transport is NOT shared
|
|
316
|
+
with other clients - this may cause errors in other clients!
|
|
317
|
+
"""
|
|
318
|
+
raise NotImplementedError()
|
|
319
|
+
|
|
320
|
+
@property
|
|
321
|
+
def operations_client(self):
|
|
322
|
+
"""Return the client designed to process long-running operations."""
|
|
323
|
+
raise NotImplementedError()
|
|
324
|
+
|
|
325
|
+
@property
|
|
326
|
+
def list_instance_configs(
|
|
327
|
+
self,
|
|
328
|
+
) -> Callable[
|
|
329
|
+
[spanner_instance_admin.ListInstanceConfigsRequest],
|
|
330
|
+
Union[
|
|
331
|
+
spanner_instance_admin.ListInstanceConfigsResponse,
|
|
332
|
+
Awaitable[spanner_instance_admin.ListInstanceConfigsResponse],
|
|
333
|
+
],
|
|
334
|
+
]:
|
|
335
|
+
raise NotImplementedError()
|
|
336
|
+
|
|
337
|
+
@property
|
|
338
|
+
def get_instance_config(
|
|
339
|
+
self,
|
|
340
|
+
) -> Callable[
|
|
341
|
+
[spanner_instance_admin.GetInstanceConfigRequest],
|
|
342
|
+
Union[
|
|
343
|
+
spanner_instance_admin.InstanceConfig,
|
|
344
|
+
Awaitable[spanner_instance_admin.InstanceConfig],
|
|
345
|
+
],
|
|
346
|
+
]:
|
|
347
|
+
raise NotImplementedError()
|
|
348
|
+
|
|
349
|
+
@property
|
|
350
|
+
def create_instance_config(
|
|
351
|
+
self,
|
|
352
|
+
) -> Callable[
|
|
353
|
+
[spanner_instance_admin.CreateInstanceConfigRequest],
|
|
354
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
355
|
+
]:
|
|
356
|
+
raise NotImplementedError()
|
|
357
|
+
|
|
358
|
+
@property
|
|
359
|
+
def update_instance_config(
|
|
360
|
+
self,
|
|
361
|
+
) -> Callable[
|
|
362
|
+
[spanner_instance_admin.UpdateInstanceConfigRequest],
|
|
363
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
364
|
+
]:
|
|
365
|
+
raise NotImplementedError()
|
|
366
|
+
|
|
367
|
+
@property
|
|
368
|
+
def delete_instance_config(
|
|
369
|
+
self,
|
|
370
|
+
) -> Callable[
|
|
371
|
+
[spanner_instance_admin.DeleteInstanceConfigRequest],
|
|
372
|
+
Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]],
|
|
373
|
+
]:
|
|
374
|
+
raise NotImplementedError()
|
|
375
|
+
|
|
376
|
+
@property
|
|
377
|
+
def list_instance_config_operations(
|
|
378
|
+
self,
|
|
379
|
+
) -> Callable[
|
|
380
|
+
[spanner_instance_admin.ListInstanceConfigOperationsRequest],
|
|
381
|
+
Union[
|
|
382
|
+
spanner_instance_admin.ListInstanceConfigOperationsResponse,
|
|
383
|
+
Awaitable[spanner_instance_admin.ListInstanceConfigOperationsResponse],
|
|
384
|
+
],
|
|
385
|
+
]:
|
|
386
|
+
raise NotImplementedError()
|
|
387
|
+
|
|
388
|
+
@property
|
|
389
|
+
def list_instances(
|
|
390
|
+
self,
|
|
391
|
+
) -> Callable[
|
|
392
|
+
[spanner_instance_admin.ListInstancesRequest],
|
|
393
|
+
Union[
|
|
394
|
+
spanner_instance_admin.ListInstancesResponse,
|
|
395
|
+
Awaitable[spanner_instance_admin.ListInstancesResponse],
|
|
396
|
+
],
|
|
397
|
+
]:
|
|
398
|
+
raise NotImplementedError()
|
|
399
|
+
|
|
400
|
+
@property
|
|
401
|
+
def list_instance_partitions(
|
|
402
|
+
self,
|
|
403
|
+
) -> Callable[
|
|
404
|
+
[spanner_instance_admin.ListInstancePartitionsRequest],
|
|
405
|
+
Union[
|
|
406
|
+
spanner_instance_admin.ListInstancePartitionsResponse,
|
|
407
|
+
Awaitable[spanner_instance_admin.ListInstancePartitionsResponse],
|
|
408
|
+
],
|
|
409
|
+
]:
|
|
410
|
+
raise NotImplementedError()
|
|
411
|
+
|
|
412
|
+
@property
|
|
413
|
+
def get_instance(
|
|
414
|
+
self,
|
|
415
|
+
) -> Callable[
|
|
416
|
+
[spanner_instance_admin.GetInstanceRequest],
|
|
417
|
+
Union[
|
|
418
|
+
spanner_instance_admin.Instance, Awaitable[spanner_instance_admin.Instance]
|
|
419
|
+
],
|
|
420
|
+
]:
|
|
421
|
+
raise NotImplementedError()
|
|
422
|
+
|
|
423
|
+
@property
|
|
424
|
+
def create_instance(
|
|
425
|
+
self,
|
|
426
|
+
) -> Callable[
|
|
427
|
+
[spanner_instance_admin.CreateInstanceRequest],
|
|
428
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
429
|
+
]:
|
|
430
|
+
raise NotImplementedError()
|
|
431
|
+
|
|
432
|
+
@property
|
|
433
|
+
def update_instance(
|
|
434
|
+
self,
|
|
435
|
+
) -> Callable[
|
|
436
|
+
[spanner_instance_admin.UpdateInstanceRequest],
|
|
437
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
438
|
+
]:
|
|
439
|
+
raise NotImplementedError()
|
|
440
|
+
|
|
441
|
+
@property
|
|
442
|
+
def delete_instance(
|
|
443
|
+
self,
|
|
444
|
+
) -> Callable[
|
|
445
|
+
[spanner_instance_admin.DeleteInstanceRequest],
|
|
446
|
+
Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]],
|
|
447
|
+
]:
|
|
448
|
+
raise NotImplementedError()
|
|
449
|
+
|
|
450
|
+
@property
|
|
451
|
+
def set_iam_policy(
|
|
452
|
+
self,
|
|
453
|
+
) -> Callable[
|
|
454
|
+
[iam_policy_pb2.SetIamPolicyRequest],
|
|
455
|
+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
|
|
456
|
+
]:
|
|
457
|
+
raise NotImplementedError()
|
|
458
|
+
|
|
459
|
+
@property
|
|
460
|
+
def get_iam_policy(
|
|
461
|
+
self,
|
|
462
|
+
) -> Callable[
|
|
463
|
+
[iam_policy_pb2.GetIamPolicyRequest],
|
|
464
|
+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
|
|
465
|
+
]:
|
|
466
|
+
raise NotImplementedError()
|
|
467
|
+
|
|
468
|
+
@property
|
|
469
|
+
def test_iam_permissions(
|
|
470
|
+
self,
|
|
471
|
+
) -> Callable[
|
|
472
|
+
[iam_policy_pb2.TestIamPermissionsRequest],
|
|
473
|
+
Union[
|
|
474
|
+
iam_policy_pb2.TestIamPermissionsResponse,
|
|
475
|
+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
|
|
476
|
+
],
|
|
477
|
+
]:
|
|
478
|
+
raise NotImplementedError()
|
|
479
|
+
|
|
480
|
+
@property
|
|
481
|
+
def get_instance_partition(
|
|
482
|
+
self,
|
|
483
|
+
) -> Callable[
|
|
484
|
+
[spanner_instance_admin.GetInstancePartitionRequest],
|
|
485
|
+
Union[
|
|
486
|
+
spanner_instance_admin.InstancePartition,
|
|
487
|
+
Awaitable[spanner_instance_admin.InstancePartition],
|
|
488
|
+
],
|
|
489
|
+
]:
|
|
490
|
+
raise NotImplementedError()
|
|
491
|
+
|
|
492
|
+
@property
|
|
493
|
+
def create_instance_partition(
|
|
494
|
+
self,
|
|
495
|
+
) -> Callable[
|
|
496
|
+
[spanner_instance_admin.CreateInstancePartitionRequest],
|
|
497
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
498
|
+
]:
|
|
499
|
+
raise NotImplementedError()
|
|
500
|
+
|
|
501
|
+
@property
|
|
502
|
+
def delete_instance_partition(
|
|
503
|
+
self,
|
|
504
|
+
) -> Callable[
|
|
505
|
+
[spanner_instance_admin.DeleteInstancePartitionRequest],
|
|
506
|
+
Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]],
|
|
507
|
+
]:
|
|
508
|
+
raise NotImplementedError()
|
|
509
|
+
|
|
510
|
+
@property
|
|
511
|
+
def update_instance_partition(
|
|
512
|
+
self,
|
|
513
|
+
) -> Callable[
|
|
514
|
+
[spanner_instance_admin.UpdateInstancePartitionRequest],
|
|
515
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
516
|
+
]:
|
|
517
|
+
raise NotImplementedError()
|
|
518
|
+
|
|
519
|
+
@property
|
|
520
|
+
def list_instance_partition_operations(
|
|
521
|
+
self,
|
|
522
|
+
) -> Callable[
|
|
523
|
+
[spanner_instance_admin.ListInstancePartitionOperationsRequest],
|
|
524
|
+
Union[
|
|
525
|
+
spanner_instance_admin.ListInstancePartitionOperationsResponse,
|
|
526
|
+
Awaitable[spanner_instance_admin.ListInstancePartitionOperationsResponse],
|
|
527
|
+
],
|
|
528
|
+
]:
|
|
529
|
+
raise NotImplementedError()
|
|
530
|
+
|
|
531
|
+
@property
|
|
532
|
+
def move_instance(
|
|
533
|
+
self,
|
|
534
|
+
) -> Callable[
|
|
535
|
+
[spanner_instance_admin.MoveInstanceRequest],
|
|
536
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
537
|
+
]:
|
|
538
|
+
raise NotImplementedError()
|
|
539
|
+
|
|
540
|
+
@property
|
|
541
|
+
def kind(self) -> str:
|
|
542
|
+
raise NotImplementedError()
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
__all__ = ("InstanceAdminTransport",)
|