google-cloud-bigtable 2.30.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/bigtable/__init__.py +25 -0
- google/cloud/bigtable/app_profile.py +377 -0
- google/cloud/bigtable/backup.py +490 -0
- google/cloud/bigtable/batcher.py +414 -0
- google/cloud/bigtable/client.py +475 -0
- google/cloud/bigtable/cluster.py +541 -0
- google/cloud/bigtable/column_family.py +362 -0
- google/cloud/bigtable/data/__init__.py +103 -0
- google/cloud/bigtable/data/_async/__init__.py +25 -0
- google/cloud/bigtable/data/_async/_mutate_rows.py +226 -0
- google/cloud/bigtable/data/_async/_read_rows.py +363 -0
- google/cloud/bigtable/data/_async/client.py +1522 -0
- google/cloud/bigtable/data/_async/mutations_batcher.py +534 -0
- google/cloud/bigtable/data/_cross_sync/__init__.py +20 -0
- google/cloud/bigtable/data/_cross_sync/_decorators.py +441 -0
- google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +64 -0
- google/cloud/bigtable/data/_cross_sync/cross_sync.py +334 -0
- google/cloud/bigtable/data/_helpers.py +249 -0
- google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +182 -0
- google/cloud/bigtable/data/_sync_autogen/_read_rows.py +304 -0
- google/cloud/bigtable/data/_sync_autogen/client.py +1293 -0
- google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +449 -0
- google/cloud/bigtable/data/exceptions.py +340 -0
- google/cloud/bigtable/data/execute_query/__init__.py +43 -0
- google/cloud/bigtable/data/execute_query/_async/__init__.py +13 -0
- google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +291 -0
- google/cloud/bigtable/data/execute_query/_byte_cursor.py +123 -0
- google/cloud/bigtable/data/execute_query/_checksum.py +43 -0
- google/cloud/bigtable/data/execute_query/_parameters_formatting.py +155 -0
- google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +134 -0
- google/cloud/bigtable/data/execute_query/_reader.py +122 -0
- google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +239 -0
- google/cloud/bigtable/data/execute_query/metadata.py +399 -0
- google/cloud/bigtable/data/execute_query/values.py +123 -0
- google/cloud/bigtable/data/mutations.py +380 -0
- google/cloud/bigtable/data/read_modify_write_rules.py +112 -0
- google/cloud/bigtable/data/read_rows_query.py +536 -0
- google/cloud/bigtable/data/row.py +535 -0
- google/cloud/bigtable/data/row_filters.py +968 -0
- google/cloud/bigtable/encryption_info.py +64 -0
- google/cloud/bigtable/enums.py +223 -0
- google/cloud/bigtable/error.py +64 -0
- google/cloud/bigtable/gapic_version.py +16 -0
- google/cloud/bigtable/helpers.py +31 -0
- google/cloud/bigtable/instance.py +789 -0
- google/cloud/bigtable/policy.py +255 -0
- google/cloud/bigtable/row.py +1267 -0
- google/cloud/bigtable/row_data.py +380 -0
- google/cloud/bigtable/row_filters.py +838 -0
- google/cloud/bigtable/row_merger.py +250 -0
- google/cloud/bigtable/row_set.py +213 -0
- google/cloud/bigtable/table.py +1409 -0
- google/cloud/bigtable_admin/__init__.py +410 -0
- google/cloud/bigtable_admin/gapic_version.py +16 -0
- google/cloud/bigtable_admin/py.typed +2 -0
- google/cloud/bigtable_admin_v2/__init__.py +250 -0
- google/cloud/bigtable_admin_v2/gapic_metadata.json +962 -0
- google/cloud/bigtable_admin_v2/gapic_version.py +16 -0
- google/cloud/bigtable_admin_v2/py.typed +2 -0
- google/cloud/bigtable_admin_v2/services/__init__.py +15 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +22 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +3465 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +3944 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +681 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +40 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +751 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +1249 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +1579 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +6820 -0
- google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +1746 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +22 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +3472 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +3949 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +669 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +40 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +708 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +1257 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +1549 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +6609 -0
- google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +1714 -0
- google/cloud/bigtable_admin_v2/types/__init__.py +248 -0
- google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +1364 -0
- google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +1715 -0
- google/cloud/bigtable_admin_v2/types/common.py +81 -0
- google/cloud/bigtable_admin_v2/types/instance.py +819 -0
- google/cloud/bigtable_admin_v2/types/table.py +1028 -0
- google/cloud/bigtable_admin_v2/types/types.py +776 -0
- google/cloud/bigtable_v2/__init__.py +136 -0
- google/cloud/bigtable_v2/gapic_metadata.json +193 -0
- google/cloud/bigtable_v2/gapic_version.py +16 -0
- google/cloud/bigtable_v2/py.typed +2 -0
- google/cloud/bigtable_v2/services/__init__.py +15 -0
- google/cloud/bigtable_v2/services/bigtable/__init__.py +22 -0
- google/cloud/bigtable_v2/services/bigtable/async_client.py +1741 -0
- google/cloud/bigtable_v2/services/bigtable/client.py +2194 -0
- google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +38 -0
- google/cloud/bigtable_v2/services/bigtable/transports/base.py +343 -0
- google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +660 -0
- google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +762 -0
- google/cloud/bigtable_v2/services/bigtable/transports/rest.py +2489 -0
- google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +711 -0
- google/cloud/bigtable_v2/types/__init__.py +138 -0
- google/cloud/bigtable_v2/types/bigtable.py +1531 -0
- google/cloud/bigtable_v2/types/data.py +1612 -0
- google/cloud/bigtable_v2/types/feature_flags.py +119 -0
- google/cloud/bigtable_v2/types/request_stats.py +171 -0
- google/cloud/bigtable_v2/types/response_params.py +64 -0
- google/cloud/bigtable_v2/types/types.py +579 -0
- google_cloud_bigtable-2.30.0.data/scripts/fixup_bigtable_admin_v2_keywords.py +233 -0
- google_cloud_bigtable-2.30.0.data/scripts/fixup_bigtable_v2_keywords.py +186 -0
- google_cloud_bigtable-2.30.0.dist-info/LICENSE +202 -0
- google_cloud_bigtable-2.30.0.dist-info/METADATA +154 -0
- google_cloud_bigtable-2.30.0.dist-info/RECORD +115 -0
- google_cloud_bigtable-2.30.0.dist-info/WHEEL +5 -0
- google_cloud_bigtable-2.30.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1549 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2024 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 inspect
|
|
17
|
+
import json
|
|
18
|
+
import pickle
|
|
19
|
+
import logging as std_logging
|
|
20
|
+
import warnings
|
|
21
|
+
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
|
|
22
|
+
|
|
23
|
+
from google.api_core import gapic_v1
|
|
24
|
+
from google.api_core import grpc_helpers_async
|
|
25
|
+
from google.api_core import exceptions as core_exceptions
|
|
26
|
+
from google.api_core import retry_async as retries
|
|
27
|
+
from google.api_core import operations_v1
|
|
28
|
+
from google.auth import credentials as ga_credentials # type: ignore
|
|
29
|
+
from google.auth.transport.grpc import SslCredentials # type: ignore
|
|
30
|
+
from google.protobuf.json_format import MessageToJson
|
|
31
|
+
import google.protobuf.message
|
|
32
|
+
|
|
33
|
+
import grpc # type: ignore
|
|
34
|
+
import proto # type: ignore
|
|
35
|
+
from grpc.experimental import aio # type: ignore
|
|
36
|
+
|
|
37
|
+
from google.cloud.bigtable_admin_v2.types import bigtable_table_admin
|
|
38
|
+
from google.cloud.bigtable_admin_v2.types import table
|
|
39
|
+
from google.cloud.bigtable_admin_v2.types import table as gba_table
|
|
40
|
+
from google.iam.v1 import iam_policy_pb2 # type: ignore
|
|
41
|
+
from google.iam.v1 import policy_pb2 # type: ignore
|
|
42
|
+
from google.longrunning import operations_pb2 # type: ignore
|
|
43
|
+
from google.protobuf import empty_pb2 # type: ignore
|
|
44
|
+
from .base import BigtableTableAdminTransport, DEFAULT_CLIENT_INFO
|
|
45
|
+
from .grpc import BigtableTableAdminGrpcTransport
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
from google.api_core import client_logging # type: ignore
|
|
49
|
+
|
|
50
|
+
CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
|
|
51
|
+
except ImportError: # pragma: NO COVER
|
|
52
|
+
CLIENT_LOGGING_SUPPORTED = False
|
|
53
|
+
|
|
54
|
+
_LOGGER = std_logging.getLogger(__name__)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class _LoggingClientAIOInterceptor(
|
|
58
|
+
grpc.aio.UnaryUnaryClientInterceptor
|
|
59
|
+
): # pragma: NO COVER
|
|
60
|
+
async def intercept_unary_unary(self, continuation, client_call_details, request):
|
|
61
|
+
logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
|
|
62
|
+
std_logging.DEBUG
|
|
63
|
+
)
|
|
64
|
+
if logging_enabled: # pragma: NO COVER
|
|
65
|
+
request_metadata = client_call_details.metadata
|
|
66
|
+
if isinstance(request, proto.Message):
|
|
67
|
+
request_payload = type(request).to_json(request)
|
|
68
|
+
elif isinstance(request, google.protobuf.message.Message):
|
|
69
|
+
request_payload = MessageToJson(request)
|
|
70
|
+
else:
|
|
71
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
72
|
+
|
|
73
|
+
request_metadata = {
|
|
74
|
+
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
75
|
+
for key, value in request_metadata
|
|
76
|
+
}
|
|
77
|
+
grpc_request = {
|
|
78
|
+
"payload": request_payload,
|
|
79
|
+
"requestMethod": "grpc",
|
|
80
|
+
"metadata": dict(request_metadata),
|
|
81
|
+
}
|
|
82
|
+
_LOGGER.debug(
|
|
83
|
+
f"Sending request for {client_call_details.method}",
|
|
84
|
+
extra={
|
|
85
|
+
"serviceName": "google.bigtable.admin.v2.BigtableTableAdmin",
|
|
86
|
+
"rpcName": str(client_call_details.method),
|
|
87
|
+
"request": grpc_request,
|
|
88
|
+
"metadata": grpc_request["metadata"],
|
|
89
|
+
},
|
|
90
|
+
)
|
|
91
|
+
response = await continuation(client_call_details, request)
|
|
92
|
+
if logging_enabled: # pragma: NO COVER
|
|
93
|
+
response_metadata = await response.trailing_metadata()
|
|
94
|
+
# Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
|
|
95
|
+
metadata = (
|
|
96
|
+
dict([(k, str(v)) for k, v in response_metadata])
|
|
97
|
+
if response_metadata
|
|
98
|
+
else None
|
|
99
|
+
)
|
|
100
|
+
result = await response
|
|
101
|
+
if isinstance(result, proto.Message):
|
|
102
|
+
response_payload = type(result).to_json(result)
|
|
103
|
+
elif isinstance(result, google.protobuf.message.Message):
|
|
104
|
+
response_payload = MessageToJson(result)
|
|
105
|
+
else:
|
|
106
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
107
|
+
grpc_response = {
|
|
108
|
+
"payload": response_payload,
|
|
109
|
+
"metadata": metadata,
|
|
110
|
+
"status": "OK",
|
|
111
|
+
}
|
|
112
|
+
_LOGGER.debug(
|
|
113
|
+
f"Received response to rpc {client_call_details.method}.",
|
|
114
|
+
extra={
|
|
115
|
+
"serviceName": "google.bigtable.admin.v2.BigtableTableAdmin",
|
|
116
|
+
"rpcName": str(client_call_details.method),
|
|
117
|
+
"response": grpc_response,
|
|
118
|
+
"metadata": grpc_response["metadata"],
|
|
119
|
+
},
|
|
120
|
+
)
|
|
121
|
+
return response
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class BigtableTableAdminGrpcAsyncIOTransport(BigtableTableAdminTransport):
|
|
125
|
+
"""gRPC AsyncIO backend transport for BigtableTableAdmin.
|
|
126
|
+
|
|
127
|
+
Service for creating, configuring, and deleting Cloud
|
|
128
|
+
Bigtable tables.
|
|
129
|
+
|
|
130
|
+
Provides access to the table schemas only, not the data stored
|
|
131
|
+
within the tables.
|
|
132
|
+
|
|
133
|
+
This class defines the same methods as the primary client, so the
|
|
134
|
+
primary client can load the underlying transport implementation
|
|
135
|
+
and call it.
|
|
136
|
+
|
|
137
|
+
It sends protocol buffers over the wire using gRPC (which is built on
|
|
138
|
+
top of HTTP/2); the ``grpcio`` package must be installed.
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
_grpc_channel: aio.Channel
|
|
142
|
+
_stubs: Dict[str, Callable] = {}
|
|
143
|
+
|
|
144
|
+
@classmethod
|
|
145
|
+
def create_channel(
|
|
146
|
+
cls,
|
|
147
|
+
host: str = "bigtableadmin.googleapis.com",
|
|
148
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
149
|
+
credentials_file: Optional[str] = None,
|
|
150
|
+
scopes: Optional[Sequence[str]] = None,
|
|
151
|
+
quota_project_id: Optional[str] = None,
|
|
152
|
+
**kwargs,
|
|
153
|
+
) -> aio.Channel:
|
|
154
|
+
"""Create and return a gRPC AsyncIO channel object.
|
|
155
|
+
Args:
|
|
156
|
+
host (Optional[str]): The host for the channel to use.
|
|
157
|
+
credentials (Optional[~.Credentials]): The
|
|
158
|
+
authorization credentials to attach to requests. These
|
|
159
|
+
credentials identify this application to the service. If
|
|
160
|
+
none are specified, the client will attempt to ascertain
|
|
161
|
+
the credentials from the environment.
|
|
162
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
163
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
164
|
+
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
|
|
165
|
+
service. These are only used when credentials are not specified and
|
|
166
|
+
are passed to :func:`google.auth.default`.
|
|
167
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
168
|
+
and quota.
|
|
169
|
+
kwargs (Optional[dict]): Keyword arguments, which are passed to the
|
|
170
|
+
channel creation.
|
|
171
|
+
Returns:
|
|
172
|
+
aio.Channel: A gRPC AsyncIO channel object.
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
return grpc_helpers_async.create_channel(
|
|
176
|
+
host,
|
|
177
|
+
credentials=credentials,
|
|
178
|
+
credentials_file=credentials_file,
|
|
179
|
+
quota_project_id=quota_project_id,
|
|
180
|
+
default_scopes=cls.AUTH_SCOPES,
|
|
181
|
+
scopes=scopes,
|
|
182
|
+
default_host=cls.DEFAULT_HOST,
|
|
183
|
+
**kwargs,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def __init__(
|
|
187
|
+
self,
|
|
188
|
+
*,
|
|
189
|
+
host: str = "bigtableadmin.googleapis.com",
|
|
190
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
191
|
+
credentials_file: Optional[str] = None,
|
|
192
|
+
scopes: Optional[Sequence[str]] = None,
|
|
193
|
+
channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None,
|
|
194
|
+
api_mtls_endpoint: Optional[str] = None,
|
|
195
|
+
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
|
|
196
|
+
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
|
|
197
|
+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
|
|
198
|
+
quota_project_id: Optional[str] = None,
|
|
199
|
+
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
|
|
200
|
+
always_use_jwt_access: Optional[bool] = False,
|
|
201
|
+
api_audience: Optional[str] = None,
|
|
202
|
+
) -> None:
|
|
203
|
+
"""Instantiate the transport.
|
|
204
|
+
|
|
205
|
+
Args:
|
|
206
|
+
host (Optional[str]):
|
|
207
|
+
The hostname to connect to (default: 'bigtableadmin.googleapis.com').
|
|
208
|
+
credentials (Optional[google.auth.credentials.Credentials]): The
|
|
209
|
+
authorization credentials to attach to requests. These
|
|
210
|
+
credentials identify the application to the service; if none
|
|
211
|
+
are specified, the client will attempt to ascertain the
|
|
212
|
+
credentials from the environment.
|
|
213
|
+
This argument is ignored if a ``channel`` instance is provided.
|
|
214
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
215
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
216
|
+
This argument is ignored if a ``channel`` instance is provided.
|
|
217
|
+
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
|
|
218
|
+
service. These are only used when credentials are not specified and
|
|
219
|
+
are passed to :func:`google.auth.default`.
|
|
220
|
+
channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]):
|
|
221
|
+
A ``Channel`` instance through which to make calls, or a Callable
|
|
222
|
+
that constructs and returns one. If set to None, ``self.create_channel``
|
|
223
|
+
is used to create the channel. If a Callable is given, it will be called
|
|
224
|
+
with the same arguments as used in ``self.create_channel``.
|
|
225
|
+
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
|
|
226
|
+
If provided, it overrides the ``host`` argument and tries to create
|
|
227
|
+
a mutual TLS channel with client SSL credentials from
|
|
228
|
+
``client_cert_source`` or application default SSL credentials.
|
|
229
|
+
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
|
|
230
|
+
Deprecated. A callback to provide client SSL certificate bytes and
|
|
231
|
+
private key bytes, both in PEM format. It is ignored if
|
|
232
|
+
``api_mtls_endpoint`` is None.
|
|
233
|
+
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
|
|
234
|
+
for the grpc channel. It is ignored if a ``channel`` instance is provided.
|
|
235
|
+
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
|
|
236
|
+
A callback to provide client certificate bytes and private key bytes,
|
|
237
|
+
both in PEM format. It is used to configure a mutual TLS channel. It is
|
|
238
|
+
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
|
|
239
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
240
|
+
and quota.
|
|
241
|
+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
|
|
242
|
+
The client info used to send a user-agent string along with
|
|
243
|
+
API requests. If ``None``, then default info will be used.
|
|
244
|
+
Generally, you only need to set this if you're developing
|
|
245
|
+
your own client library.
|
|
246
|
+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
247
|
+
be used for service account credentials.
|
|
248
|
+
|
|
249
|
+
Raises:
|
|
250
|
+
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
|
|
251
|
+
creation failed for any reason.
|
|
252
|
+
google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
|
|
253
|
+
and ``credentials_file`` are passed.
|
|
254
|
+
"""
|
|
255
|
+
self._grpc_channel = None
|
|
256
|
+
self._ssl_channel_credentials = ssl_channel_credentials
|
|
257
|
+
self._stubs: Dict[str, Callable] = {}
|
|
258
|
+
self._operations_client: Optional[operations_v1.OperationsAsyncClient] = None
|
|
259
|
+
|
|
260
|
+
if api_mtls_endpoint:
|
|
261
|
+
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
|
|
262
|
+
if client_cert_source:
|
|
263
|
+
warnings.warn("client_cert_source is deprecated", DeprecationWarning)
|
|
264
|
+
|
|
265
|
+
if isinstance(channel, aio.Channel):
|
|
266
|
+
# Ignore credentials if a channel was passed.
|
|
267
|
+
credentials = None
|
|
268
|
+
self._ignore_credentials = True
|
|
269
|
+
# If a channel was explicitly provided, set it.
|
|
270
|
+
self._grpc_channel = channel
|
|
271
|
+
self._ssl_channel_credentials = None
|
|
272
|
+
else:
|
|
273
|
+
if api_mtls_endpoint:
|
|
274
|
+
host = api_mtls_endpoint
|
|
275
|
+
|
|
276
|
+
# Create SSL credentials with client_cert_source or application
|
|
277
|
+
# default SSL credentials.
|
|
278
|
+
if client_cert_source:
|
|
279
|
+
cert, key = client_cert_source()
|
|
280
|
+
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
|
|
281
|
+
certificate_chain=cert, private_key=key
|
|
282
|
+
)
|
|
283
|
+
else:
|
|
284
|
+
self._ssl_channel_credentials = SslCredentials().ssl_credentials
|
|
285
|
+
|
|
286
|
+
else:
|
|
287
|
+
if client_cert_source_for_mtls and not ssl_channel_credentials:
|
|
288
|
+
cert, key = client_cert_source_for_mtls()
|
|
289
|
+
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
|
|
290
|
+
certificate_chain=cert, private_key=key
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# The base transport sets the host, credentials and scopes
|
|
294
|
+
super().__init__(
|
|
295
|
+
host=host,
|
|
296
|
+
credentials=credentials,
|
|
297
|
+
credentials_file=credentials_file,
|
|
298
|
+
scopes=scopes,
|
|
299
|
+
quota_project_id=quota_project_id,
|
|
300
|
+
client_info=client_info,
|
|
301
|
+
always_use_jwt_access=always_use_jwt_access,
|
|
302
|
+
api_audience=api_audience,
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
if not self._grpc_channel:
|
|
306
|
+
# initialize with the provided callable or the default channel
|
|
307
|
+
channel_init = channel or type(self).create_channel
|
|
308
|
+
self._grpc_channel = channel_init(
|
|
309
|
+
self._host,
|
|
310
|
+
# use the credentials which are saved
|
|
311
|
+
credentials=self._credentials,
|
|
312
|
+
# Set ``credentials_file`` to ``None`` here as
|
|
313
|
+
# the credentials that we saved earlier should be used.
|
|
314
|
+
credentials_file=None,
|
|
315
|
+
scopes=self._scopes,
|
|
316
|
+
ssl_credentials=self._ssl_channel_credentials,
|
|
317
|
+
quota_project_id=quota_project_id,
|
|
318
|
+
options=[
|
|
319
|
+
("grpc.max_send_message_length", -1),
|
|
320
|
+
("grpc.max_receive_message_length", -1),
|
|
321
|
+
],
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
self._interceptor = _LoggingClientAIOInterceptor()
|
|
325
|
+
self._grpc_channel._unary_unary_interceptors.append(self._interceptor)
|
|
326
|
+
self._logged_channel = self._grpc_channel
|
|
327
|
+
self._wrap_with_kind = (
|
|
328
|
+
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
|
|
329
|
+
)
|
|
330
|
+
# Wrap messages. This must be done after self._logged_channel exists
|
|
331
|
+
self._prep_wrapped_messages(client_info)
|
|
332
|
+
|
|
333
|
+
@property
|
|
334
|
+
def grpc_channel(self) -> aio.Channel:
|
|
335
|
+
"""Create the channel designed to connect to this service.
|
|
336
|
+
|
|
337
|
+
This property caches on the instance; repeated calls return
|
|
338
|
+
the same channel.
|
|
339
|
+
"""
|
|
340
|
+
# Return the channel from cache.
|
|
341
|
+
return self._grpc_channel
|
|
342
|
+
|
|
343
|
+
@property
|
|
344
|
+
def operations_client(self) -> operations_v1.OperationsAsyncClient:
|
|
345
|
+
"""Create the client designed to process long-running operations.
|
|
346
|
+
|
|
347
|
+
This property caches on the instance; repeated calls return the same
|
|
348
|
+
client.
|
|
349
|
+
"""
|
|
350
|
+
# Quick check: Only create a new client if we do not already have one.
|
|
351
|
+
if self._operations_client is None:
|
|
352
|
+
self._operations_client = operations_v1.OperationsAsyncClient(
|
|
353
|
+
self._logged_channel
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
# Return the client from cache.
|
|
357
|
+
return self._operations_client
|
|
358
|
+
|
|
359
|
+
@property
|
|
360
|
+
def create_table(
|
|
361
|
+
self,
|
|
362
|
+
) -> Callable[
|
|
363
|
+
[bigtable_table_admin.CreateTableRequest], Awaitable[gba_table.Table]
|
|
364
|
+
]:
|
|
365
|
+
r"""Return a callable for the create table method over gRPC.
|
|
366
|
+
|
|
367
|
+
Creates a new table in the specified instance.
|
|
368
|
+
The table can be created with a full set of initial
|
|
369
|
+
column families, specified in the request.
|
|
370
|
+
|
|
371
|
+
Returns:
|
|
372
|
+
Callable[[~.CreateTableRequest],
|
|
373
|
+
Awaitable[~.Table]]:
|
|
374
|
+
A function that, when called, will call the underlying RPC
|
|
375
|
+
on the server.
|
|
376
|
+
"""
|
|
377
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
378
|
+
# the request.
|
|
379
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
380
|
+
# to pass in the functions for each.
|
|
381
|
+
if "create_table" not in self._stubs:
|
|
382
|
+
self._stubs["create_table"] = self._logged_channel.unary_unary(
|
|
383
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable",
|
|
384
|
+
request_serializer=bigtable_table_admin.CreateTableRequest.serialize,
|
|
385
|
+
response_deserializer=gba_table.Table.deserialize,
|
|
386
|
+
)
|
|
387
|
+
return self._stubs["create_table"]
|
|
388
|
+
|
|
389
|
+
@property
|
|
390
|
+
def create_table_from_snapshot(
|
|
391
|
+
self,
|
|
392
|
+
) -> Callable[
|
|
393
|
+
[bigtable_table_admin.CreateTableFromSnapshotRequest],
|
|
394
|
+
Awaitable[operations_pb2.Operation],
|
|
395
|
+
]:
|
|
396
|
+
r"""Return a callable for the create table from snapshot method over gRPC.
|
|
397
|
+
|
|
398
|
+
Creates a new table from the specified snapshot. The
|
|
399
|
+
target table must not exist. The snapshot and the table
|
|
400
|
+
must be in the same instance.
|
|
401
|
+
|
|
402
|
+
Note: This is a private alpha release of Cloud Bigtable
|
|
403
|
+
snapshots. This feature is not currently available to
|
|
404
|
+
most Cloud Bigtable customers. This feature might be
|
|
405
|
+
changed in backward-incompatible ways and is not
|
|
406
|
+
recommended for production use. It is not subject to any
|
|
407
|
+
SLA or deprecation policy.
|
|
408
|
+
|
|
409
|
+
Returns:
|
|
410
|
+
Callable[[~.CreateTableFromSnapshotRequest],
|
|
411
|
+
Awaitable[~.Operation]]:
|
|
412
|
+
A function that, when called, will call the underlying RPC
|
|
413
|
+
on the server.
|
|
414
|
+
"""
|
|
415
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
416
|
+
# the request.
|
|
417
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
418
|
+
# to pass in the functions for each.
|
|
419
|
+
if "create_table_from_snapshot" not in self._stubs:
|
|
420
|
+
self._stubs[
|
|
421
|
+
"create_table_from_snapshot"
|
|
422
|
+
] = self._logged_channel.unary_unary(
|
|
423
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot",
|
|
424
|
+
request_serializer=bigtable_table_admin.CreateTableFromSnapshotRequest.serialize,
|
|
425
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
426
|
+
)
|
|
427
|
+
return self._stubs["create_table_from_snapshot"]
|
|
428
|
+
|
|
429
|
+
@property
|
|
430
|
+
def list_tables(
|
|
431
|
+
self,
|
|
432
|
+
) -> Callable[
|
|
433
|
+
[bigtable_table_admin.ListTablesRequest],
|
|
434
|
+
Awaitable[bigtable_table_admin.ListTablesResponse],
|
|
435
|
+
]:
|
|
436
|
+
r"""Return a callable for the list tables method over gRPC.
|
|
437
|
+
|
|
438
|
+
Lists all tables served from a specified instance.
|
|
439
|
+
|
|
440
|
+
Returns:
|
|
441
|
+
Callable[[~.ListTablesRequest],
|
|
442
|
+
Awaitable[~.ListTablesResponse]]:
|
|
443
|
+
A function that, when called, will call the underlying RPC
|
|
444
|
+
on the server.
|
|
445
|
+
"""
|
|
446
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
447
|
+
# the request.
|
|
448
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
449
|
+
# to pass in the functions for each.
|
|
450
|
+
if "list_tables" not in self._stubs:
|
|
451
|
+
self._stubs["list_tables"] = self._logged_channel.unary_unary(
|
|
452
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables",
|
|
453
|
+
request_serializer=bigtable_table_admin.ListTablesRequest.serialize,
|
|
454
|
+
response_deserializer=bigtable_table_admin.ListTablesResponse.deserialize,
|
|
455
|
+
)
|
|
456
|
+
return self._stubs["list_tables"]
|
|
457
|
+
|
|
458
|
+
@property
|
|
459
|
+
def get_table(
|
|
460
|
+
self,
|
|
461
|
+
) -> Callable[[bigtable_table_admin.GetTableRequest], Awaitable[table.Table]]:
|
|
462
|
+
r"""Return a callable for the get table method over gRPC.
|
|
463
|
+
|
|
464
|
+
Gets metadata information about the specified table.
|
|
465
|
+
|
|
466
|
+
Returns:
|
|
467
|
+
Callable[[~.GetTableRequest],
|
|
468
|
+
Awaitable[~.Table]]:
|
|
469
|
+
A function that, when called, will call the underlying RPC
|
|
470
|
+
on the server.
|
|
471
|
+
"""
|
|
472
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
473
|
+
# the request.
|
|
474
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
475
|
+
# to pass in the functions for each.
|
|
476
|
+
if "get_table" not in self._stubs:
|
|
477
|
+
self._stubs["get_table"] = self._logged_channel.unary_unary(
|
|
478
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable",
|
|
479
|
+
request_serializer=bigtable_table_admin.GetTableRequest.serialize,
|
|
480
|
+
response_deserializer=table.Table.deserialize,
|
|
481
|
+
)
|
|
482
|
+
return self._stubs["get_table"]
|
|
483
|
+
|
|
484
|
+
@property
|
|
485
|
+
def update_table(
|
|
486
|
+
self,
|
|
487
|
+
) -> Callable[
|
|
488
|
+
[bigtable_table_admin.UpdateTableRequest], Awaitable[operations_pb2.Operation]
|
|
489
|
+
]:
|
|
490
|
+
r"""Return a callable for the update table method over gRPC.
|
|
491
|
+
|
|
492
|
+
Updates a specified table.
|
|
493
|
+
|
|
494
|
+
Returns:
|
|
495
|
+
Callable[[~.UpdateTableRequest],
|
|
496
|
+
Awaitable[~.Operation]]:
|
|
497
|
+
A function that, when called, will call the underlying RPC
|
|
498
|
+
on the server.
|
|
499
|
+
"""
|
|
500
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
501
|
+
# the request.
|
|
502
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
503
|
+
# to pass in the functions for each.
|
|
504
|
+
if "update_table" not in self._stubs:
|
|
505
|
+
self._stubs["update_table"] = self._logged_channel.unary_unary(
|
|
506
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/UpdateTable",
|
|
507
|
+
request_serializer=bigtable_table_admin.UpdateTableRequest.serialize,
|
|
508
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
509
|
+
)
|
|
510
|
+
return self._stubs["update_table"]
|
|
511
|
+
|
|
512
|
+
@property
|
|
513
|
+
def delete_table(
|
|
514
|
+
self,
|
|
515
|
+
) -> Callable[
|
|
516
|
+
[bigtable_table_admin.DeleteTableRequest], Awaitable[empty_pb2.Empty]
|
|
517
|
+
]:
|
|
518
|
+
r"""Return a callable for the delete table method over gRPC.
|
|
519
|
+
|
|
520
|
+
Permanently deletes a specified table and all of its
|
|
521
|
+
data.
|
|
522
|
+
|
|
523
|
+
Returns:
|
|
524
|
+
Callable[[~.DeleteTableRequest],
|
|
525
|
+
Awaitable[~.Empty]]:
|
|
526
|
+
A function that, when called, will call the underlying RPC
|
|
527
|
+
on the server.
|
|
528
|
+
"""
|
|
529
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
530
|
+
# the request.
|
|
531
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
532
|
+
# to pass in the functions for each.
|
|
533
|
+
if "delete_table" not in self._stubs:
|
|
534
|
+
self._stubs["delete_table"] = self._logged_channel.unary_unary(
|
|
535
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable",
|
|
536
|
+
request_serializer=bigtable_table_admin.DeleteTableRequest.serialize,
|
|
537
|
+
response_deserializer=empty_pb2.Empty.FromString,
|
|
538
|
+
)
|
|
539
|
+
return self._stubs["delete_table"]
|
|
540
|
+
|
|
541
|
+
@property
|
|
542
|
+
def undelete_table(
|
|
543
|
+
self,
|
|
544
|
+
) -> Callable[
|
|
545
|
+
[bigtable_table_admin.UndeleteTableRequest], Awaitable[operations_pb2.Operation]
|
|
546
|
+
]:
|
|
547
|
+
r"""Return a callable for the undelete table method over gRPC.
|
|
548
|
+
|
|
549
|
+
Restores a specified table which was accidentally
|
|
550
|
+
deleted.
|
|
551
|
+
|
|
552
|
+
Returns:
|
|
553
|
+
Callable[[~.UndeleteTableRequest],
|
|
554
|
+
Awaitable[~.Operation]]:
|
|
555
|
+
A function that, when called, will call the underlying RPC
|
|
556
|
+
on the server.
|
|
557
|
+
"""
|
|
558
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
559
|
+
# the request.
|
|
560
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
561
|
+
# to pass in the functions for each.
|
|
562
|
+
if "undelete_table" not in self._stubs:
|
|
563
|
+
self._stubs["undelete_table"] = self._logged_channel.unary_unary(
|
|
564
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable",
|
|
565
|
+
request_serializer=bigtable_table_admin.UndeleteTableRequest.serialize,
|
|
566
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
567
|
+
)
|
|
568
|
+
return self._stubs["undelete_table"]
|
|
569
|
+
|
|
570
|
+
@property
|
|
571
|
+
def create_authorized_view(
|
|
572
|
+
self,
|
|
573
|
+
) -> Callable[
|
|
574
|
+
[bigtable_table_admin.CreateAuthorizedViewRequest],
|
|
575
|
+
Awaitable[operations_pb2.Operation],
|
|
576
|
+
]:
|
|
577
|
+
r"""Return a callable for the create authorized view method over gRPC.
|
|
578
|
+
|
|
579
|
+
Creates a new AuthorizedView in a table.
|
|
580
|
+
|
|
581
|
+
Returns:
|
|
582
|
+
Callable[[~.CreateAuthorizedViewRequest],
|
|
583
|
+
Awaitable[~.Operation]]:
|
|
584
|
+
A function that, when called, will call the underlying RPC
|
|
585
|
+
on the server.
|
|
586
|
+
"""
|
|
587
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
588
|
+
# the request.
|
|
589
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
590
|
+
# to pass in the functions for each.
|
|
591
|
+
if "create_authorized_view" not in self._stubs:
|
|
592
|
+
self._stubs["create_authorized_view"] = self._logged_channel.unary_unary(
|
|
593
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView",
|
|
594
|
+
request_serializer=bigtable_table_admin.CreateAuthorizedViewRequest.serialize,
|
|
595
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
596
|
+
)
|
|
597
|
+
return self._stubs["create_authorized_view"]
|
|
598
|
+
|
|
599
|
+
@property
|
|
600
|
+
def list_authorized_views(
|
|
601
|
+
self,
|
|
602
|
+
) -> Callable[
|
|
603
|
+
[bigtable_table_admin.ListAuthorizedViewsRequest],
|
|
604
|
+
Awaitable[bigtable_table_admin.ListAuthorizedViewsResponse],
|
|
605
|
+
]:
|
|
606
|
+
r"""Return a callable for the list authorized views method over gRPC.
|
|
607
|
+
|
|
608
|
+
Lists all AuthorizedViews from a specific table.
|
|
609
|
+
|
|
610
|
+
Returns:
|
|
611
|
+
Callable[[~.ListAuthorizedViewsRequest],
|
|
612
|
+
Awaitable[~.ListAuthorizedViewsResponse]]:
|
|
613
|
+
A function that, when called, will call the underlying RPC
|
|
614
|
+
on the server.
|
|
615
|
+
"""
|
|
616
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
617
|
+
# the request.
|
|
618
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
619
|
+
# to pass in the functions for each.
|
|
620
|
+
if "list_authorized_views" not in self._stubs:
|
|
621
|
+
self._stubs["list_authorized_views"] = self._logged_channel.unary_unary(
|
|
622
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews",
|
|
623
|
+
request_serializer=bigtable_table_admin.ListAuthorizedViewsRequest.serialize,
|
|
624
|
+
response_deserializer=bigtable_table_admin.ListAuthorizedViewsResponse.deserialize,
|
|
625
|
+
)
|
|
626
|
+
return self._stubs["list_authorized_views"]
|
|
627
|
+
|
|
628
|
+
@property
|
|
629
|
+
def get_authorized_view(
|
|
630
|
+
self,
|
|
631
|
+
) -> Callable[
|
|
632
|
+
[bigtable_table_admin.GetAuthorizedViewRequest], Awaitable[table.AuthorizedView]
|
|
633
|
+
]:
|
|
634
|
+
r"""Return a callable for the get authorized view method over gRPC.
|
|
635
|
+
|
|
636
|
+
Gets information from a specified AuthorizedView.
|
|
637
|
+
|
|
638
|
+
Returns:
|
|
639
|
+
Callable[[~.GetAuthorizedViewRequest],
|
|
640
|
+
Awaitable[~.AuthorizedView]]:
|
|
641
|
+
A function that, when called, will call the underlying RPC
|
|
642
|
+
on the server.
|
|
643
|
+
"""
|
|
644
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
645
|
+
# the request.
|
|
646
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
647
|
+
# to pass in the functions for each.
|
|
648
|
+
if "get_authorized_view" not in self._stubs:
|
|
649
|
+
self._stubs["get_authorized_view"] = self._logged_channel.unary_unary(
|
|
650
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView",
|
|
651
|
+
request_serializer=bigtable_table_admin.GetAuthorizedViewRequest.serialize,
|
|
652
|
+
response_deserializer=table.AuthorizedView.deserialize,
|
|
653
|
+
)
|
|
654
|
+
return self._stubs["get_authorized_view"]
|
|
655
|
+
|
|
656
|
+
@property
|
|
657
|
+
def update_authorized_view(
|
|
658
|
+
self,
|
|
659
|
+
) -> Callable[
|
|
660
|
+
[bigtable_table_admin.UpdateAuthorizedViewRequest],
|
|
661
|
+
Awaitable[operations_pb2.Operation],
|
|
662
|
+
]:
|
|
663
|
+
r"""Return a callable for the update authorized view method over gRPC.
|
|
664
|
+
|
|
665
|
+
Updates an AuthorizedView in a table.
|
|
666
|
+
|
|
667
|
+
Returns:
|
|
668
|
+
Callable[[~.UpdateAuthorizedViewRequest],
|
|
669
|
+
Awaitable[~.Operation]]:
|
|
670
|
+
A function that, when called, will call the underlying RPC
|
|
671
|
+
on the server.
|
|
672
|
+
"""
|
|
673
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
674
|
+
# the request.
|
|
675
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
676
|
+
# to pass in the functions for each.
|
|
677
|
+
if "update_authorized_view" not in self._stubs:
|
|
678
|
+
self._stubs["update_authorized_view"] = self._logged_channel.unary_unary(
|
|
679
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView",
|
|
680
|
+
request_serializer=bigtable_table_admin.UpdateAuthorizedViewRequest.serialize,
|
|
681
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
682
|
+
)
|
|
683
|
+
return self._stubs["update_authorized_view"]
|
|
684
|
+
|
|
685
|
+
@property
|
|
686
|
+
def delete_authorized_view(
|
|
687
|
+
self,
|
|
688
|
+
) -> Callable[
|
|
689
|
+
[bigtable_table_admin.DeleteAuthorizedViewRequest], Awaitable[empty_pb2.Empty]
|
|
690
|
+
]:
|
|
691
|
+
r"""Return a callable for the delete authorized view method over gRPC.
|
|
692
|
+
|
|
693
|
+
Permanently deletes a specified AuthorizedView.
|
|
694
|
+
|
|
695
|
+
Returns:
|
|
696
|
+
Callable[[~.DeleteAuthorizedViewRequest],
|
|
697
|
+
Awaitable[~.Empty]]:
|
|
698
|
+
A function that, when called, will call the underlying RPC
|
|
699
|
+
on the server.
|
|
700
|
+
"""
|
|
701
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
702
|
+
# the request.
|
|
703
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
704
|
+
# to pass in the functions for each.
|
|
705
|
+
if "delete_authorized_view" not in self._stubs:
|
|
706
|
+
self._stubs["delete_authorized_view"] = self._logged_channel.unary_unary(
|
|
707
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView",
|
|
708
|
+
request_serializer=bigtable_table_admin.DeleteAuthorizedViewRequest.serialize,
|
|
709
|
+
response_deserializer=empty_pb2.Empty.FromString,
|
|
710
|
+
)
|
|
711
|
+
return self._stubs["delete_authorized_view"]
|
|
712
|
+
|
|
713
|
+
@property
|
|
714
|
+
def modify_column_families(
|
|
715
|
+
self,
|
|
716
|
+
) -> Callable[
|
|
717
|
+
[bigtable_table_admin.ModifyColumnFamiliesRequest], Awaitable[table.Table]
|
|
718
|
+
]:
|
|
719
|
+
r"""Return a callable for the modify column families method over gRPC.
|
|
720
|
+
|
|
721
|
+
Performs a series of column family modifications on
|
|
722
|
+
the specified table. Either all or none of the
|
|
723
|
+
modifications will occur before this method returns, but
|
|
724
|
+
data requests received prior to that point may see a
|
|
725
|
+
table where only some modifications have taken effect.
|
|
726
|
+
|
|
727
|
+
Returns:
|
|
728
|
+
Callable[[~.ModifyColumnFamiliesRequest],
|
|
729
|
+
Awaitable[~.Table]]:
|
|
730
|
+
A function that, when called, will call the underlying RPC
|
|
731
|
+
on the server.
|
|
732
|
+
"""
|
|
733
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
734
|
+
# the request.
|
|
735
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
736
|
+
# to pass in the functions for each.
|
|
737
|
+
if "modify_column_families" not in self._stubs:
|
|
738
|
+
self._stubs["modify_column_families"] = self._logged_channel.unary_unary(
|
|
739
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies",
|
|
740
|
+
request_serializer=bigtable_table_admin.ModifyColumnFamiliesRequest.serialize,
|
|
741
|
+
response_deserializer=table.Table.deserialize,
|
|
742
|
+
)
|
|
743
|
+
return self._stubs["modify_column_families"]
|
|
744
|
+
|
|
745
|
+
@property
|
|
746
|
+
def drop_row_range(
|
|
747
|
+
self,
|
|
748
|
+
) -> Callable[
|
|
749
|
+
[bigtable_table_admin.DropRowRangeRequest], Awaitable[empty_pb2.Empty]
|
|
750
|
+
]:
|
|
751
|
+
r"""Return a callable for the drop row range method over gRPC.
|
|
752
|
+
|
|
753
|
+
Permanently drop/delete a row range from a specified
|
|
754
|
+
table. The request can specify whether to delete all
|
|
755
|
+
rows in a table, or only those that match a particular
|
|
756
|
+
prefix.
|
|
757
|
+
|
|
758
|
+
Returns:
|
|
759
|
+
Callable[[~.DropRowRangeRequest],
|
|
760
|
+
Awaitable[~.Empty]]:
|
|
761
|
+
A function that, when called, will call the underlying RPC
|
|
762
|
+
on the server.
|
|
763
|
+
"""
|
|
764
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
765
|
+
# the request.
|
|
766
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
767
|
+
# to pass in the functions for each.
|
|
768
|
+
if "drop_row_range" not in self._stubs:
|
|
769
|
+
self._stubs["drop_row_range"] = self._logged_channel.unary_unary(
|
|
770
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange",
|
|
771
|
+
request_serializer=bigtable_table_admin.DropRowRangeRequest.serialize,
|
|
772
|
+
response_deserializer=empty_pb2.Empty.FromString,
|
|
773
|
+
)
|
|
774
|
+
return self._stubs["drop_row_range"]
|
|
775
|
+
|
|
776
|
+
@property
|
|
777
|
+
def generate_consistency_token(
|
|
778
|
+
self,
|
|
779
|
+
) -> Callable[
|
|
780
|
+
[bigtable_table_admin.GenerateConsistencyTokenRequest],
|
|
781
|
+
Awaitable[bigtable_table_admin.GenerateConsistencyTokenResponse],
|
|
782
|
+
]:
|
|
783
|
+
r"""Return a callable for the generate consistency token method over gRPC.
|
|
784
|
+
|
|
785
|
+
Generates a consistency token for a Table, which can
|
|
786
|
+
be used in CheckConsistency to check whether mutations
|
|
787
|
+
to the table that finished before this call started have
|
|
788
|
+
been replicated. The tokens will be available for 90
|
|
789
|
+
days.
|
|
790
|
+
|
|
791
|
+
Returns:
|
|
792
|
+
Callable[[~.GenerateConsistencyTokenRequest],
|
|
793
|
+
Awaitable[~.GenerateConsistencyTokenResponse]]:
|
|
794
|
+
A function that, when called, will call the underlying RPC
|
|
795
|
+
on the server.
|
|
796
|
+
"""
|
|
797
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
798
|
+
# the request.
|
|
799
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
800
|
+
# to pass in the functions for each.
|
|
801
|
+
if "generate_consistency_token" not in self._stubs:
|
|
802
|
+
self._stubs[
|
|
803
|
+
"generate_consistency_token"
|
|
804
|
+
] = self._logged_channel.unary_unary(
|
|
805
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken",
|
|
806
|
+
request_serializer=bigtable_table_admin.GenerateConsistencyTokenRequest.serialize,
|
|
807
|
+
response_deserializer=bigtable_table_admin.GenerateConsistencyTokenResponse.deserialize,
|
|
808
|
+
)
|
|
809
|
+
return self._stubs["generate_consistency_token"]
|
|
810
|
+
|
|
811
|
+
@property
|
|
812
|
+
def check_consistency(
|
|
813
|
+
self,
|
|
814
|
+
) -> Callable[
|
|
815
|
+
[bigtable_table_admin.CheckConsistencyRequest],
|
|
816
|
+
Awaitable[bigtable_table_admin.CheckConsistencyResponse],
|
|
817
|
+
]:
|
|
818
|
+
r"""Return a callable for the check consistency method over gRPC.
|
|
819
|
+
|
|
820
|
+
Checks replication consistency based on a consistency
|
|
821
|
+
token, that is, if replication has caught up based on
|
|
822
|
+
the conditions specified in the token and the check
|
|
823
|
+
request.
|
|
824
|
+
|
|
825
|
+
Returns:
|
|
826
|
+
Callable[[~.CheckConsistencyRequest],
|
|
827
|
+
Awaitable[~.CheckConsistencyResponse]]:
|
|
828
|
+
A function that, when called, will call the underlying RPC
|
|
829
|
+
on the server.
|
|
830
|
+
"""
|
|
831
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
832
|
+
# the request.
|
|
833
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
834
|
+
# to pass in the functions for each.
|
|
835
|
+
if "check_consistency" not in self._stubs:
|
|
836
|
+
self._stubs["check_consistency"] = self._logged_channel.unary_unary(
|
|
837
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency",
|
|
838
|
+
request_serializer=bigtable_table_admin.CheckConsistencyRequest.serialize,
|
|
839
|
+
response_deserializer=bigtable_table_admin.CheckConsistencyResponse.deserialize,
|
|
840
|
+
)
|
|
841
|
+
return self._stubs["check_consistency"]
|
|
842
|
+
|
|
843
|
+
@property
|
|
844
|
+
def snapshot_table(
|
|
845
|
+
self,
|
|
846
|
+
) -> Callable[
|
|
847
|
+
[bigtable_table_admin.SnapshotTableRequest], Awaitable[operations_pb2.Operation]
|
|
848
|
+
]:
|
|
849
|
+
r"""Return a callable for the snapshot table method over gRPC.
|
|
850
|
+
|
|
851
|
+
Creates a new snapshot in the specified cluster from
|
|
852
|
+
the specified source table. The cluster and the table
|
|
853
|
+
must be in the same instance.
|
|
854
|
+
|
|
855
|
+
Note: This is a private alpha release of Cloud Bigtable
|
|
856
|
+
snapshots. This feature is not currently available to
|
|
857
|
+
most Cloud Bigtable customers. This feature might be
|
|
858
|
+
changed in backward-incompatible ways and is not
|
|
859
|
+
recommended for production use. It is not subject to any
|
|
860
|
+
SLA or deprecation policy.
|
|
861
|
+
|
|
862
|
+
Returns:
|
|
863
|
+
Callable[[~.SnapshotTableRequest],
|
|
864
|
+
Awaitable[~.Operation]]:
|
|
865
|
+
A function that, when called, will call the underlying RPC
|
|
866
|
+
on the server.
|
|
867
|
+
"""
|
|
868
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
869
|
+
# the request.
|
|
870
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
871
|
+
# to pass in the functions for each.
|
|
872
|
+
if "snapshot_table" not in self._stubs:
|
|
873
|
+
self._stubs["snapshot_table"] = self._logged_channel.unary_unary(
|
|
874
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable",
|
|
875
|
+
request_serializer=bigtable_table_admin.SnapshotTableRequest.serialize,
|
|
876
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
877
|
+
)
|
|
878
|
+
return self._stubs["snapshot_table"]
|
|
879
|
+
|
|
880
|
+
@property
|
|
881
|
+
def get_snapshot(
|
|
882
|
+
self,
|
|
883
|
+
) -> Callable[[bigtable_table_admin.GetSnapshotRequest], Awaitable[table.Snapshot]]:
|
|
884
|
+
r"""Return a callable for the get snapshot method over gRPC.
|
|
885
|
+
|
|
886
|
+
Gets metadata information about the specified
|
|
887
|
+
snapshot.
|
|
888
|
+
Note: This is a private alpha release of Cloud Bigtable
|
|
889
|
+
snapshots. This feature is not currently available to
|
|
890
|
+
most Cloud Bigtable customers. This feature might be
|
|
891
|
+
changed in backward-incompatible ways and is not
|
|
892
|
+
recommended for production use. It is not subject to any
|
|
893
|
+
SLA or deprecation policy.
|
|
894
|
+
|
|
895
|
+
Returns:
|
|
896
|
+
Callable[[~.GetSnapshotRequest],
|
|
897
|
+
Awaitable[~.Snapshot]]:
|
|
898
|
+
A function that, when called, will call the underlying RPC
|
|
899
|
+
on the server.
|
|
900
|
+
"""
|
|
901
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
902
|
+
# the request.
|
|
903
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
904
|
+
# to pass in the functions for each.
|
|
905
|
+
if "get_snapshot" not in self._stubs:
|
|
906
|
+
self._stubs["get_snapshot"] = self._logged_channel.unary_unary(
|
|
907
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot",
|
|
908
|
+
request_serializer=bigtable_table_admin.GetSnapshotRequest.serialize,
|
|
909
|
+
response_deserializer=table.Snapshot.deserialize,
|
|
910
|
+
)
|
|
911
|
+
return self._stubs["get_snapshot"]
|
|
912
|
+
|
|
913
|
+
@property
|
|
914
|
+
def list_snapshots(
|
|
915
|
+
self,
|
|
916
|
+
) -> Callable[
|
|
917
|
+
[bigtable_table_admin.ListSnapshotsRequest],
|
|
918
|
+
Awaitable[bigtable_table_admin.ListSnapshotsResponse],
|
|
919
|
+
]:
|
|
920
|
+
r"""Return a callable for the list snapshots method over gRPC.
|
|
921
|
+
|
|
922
|
+
Lists all snapshots associated with the specified
|
|
923
|
+
cluster.
|
|
924
|
+
Note: This is a private alpha release of Cloud Bigtable
|
|
925
|
+
snapshots. This feature is not currently available to
|
|
926
|
+
most Cloud Bigtable customers. This feature might be
|
|
927
|
+
changed in backward-incompatible ways and is not
|
|
928
|
+
recommended for production use. It is not subject to any
|
|
929
|
+
SLA or deprecation policy.
|
|
930
|
+
|
|
931
|
+
Returns:
|
|
932
|
+
Callable[[~.ListSnapshotsRequest],
|
|
933
|
+
Awaitable[~.ListSnapshotsResponse]]:
|
|
934
|
+
A function that, when called, will call the underlying RPC
|
|
935
|
+
on the server.
|
|
936
|
+
"""
|
|
937
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
938
|
+
# the request.
|
|
939
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
940
|
+
# to pass in the functions for each.
|
|
941
|
+
if "list_snapshots" not in self._stubs:
|
|
942
|
+
self._stubs["list_snapshots"] = self._logged_channel.unary_unary(
|
|
943
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots",
|
|
944
|
+
request_serializer=bigtable_table_admin.ListSnapshotsRequest.serialize,
|
|
945
|
+
response_deserializer=bigtable_table_admin.ListSnapshotsResponse.deserialize,
|
|
946
|
+
)
|
|
947
|
+
return self._stubs["list_snapshots"]
|
|
948
|
+
|
|
949
|
+
@property
|
|
950
|
+
def delete_snapshot(
|
|
951
|
+
self,
|
|
952
|
+
) -> Callable[
|
|
953
|
+
[bigtable_table_admin.DeleteSnapshotRequest], Awaitable[empty_pb2.Empty]
|
|
954
|
+
]:
|
|
955
|
+
r"""Return a callable for the delete snapshot method over gRPC.
|
|
956
|
+
|
|
957
|
+
Permanently deletes the specified snapshot.
|
|
958
|
+
|
|
959
|
+
Note: This is a private alpha release of Cloud Bigtable
|
|
960
|
+
snapshots. This feature is not currently available to
|
|
961
|
+
most Cloud Bigtable customers. This feature might be
|
|
962
|
+
changed in backward-incompatible ways and is not
|
|
963
|
+
recommended for production use. It is not subject to any
|
|
964
|
+
SLA or deprecation policy.
|
|
965
|
+
|
|
966
|
+
Returns:
|
|
967
|
+
Callable[[~.DeleteSnapshotRequest],
|
|
968
|
+
Awaitable[~.Empty]]:
|
|
969
|
+
A function that, when called, will call the underlying RPC
|
|
970
|
+
on the server.
|
|
971
|
+
"""
|
|
972
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
973
|
+
# the request.
|
|
974
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
975
|
+
# to pass in the functions for each.
|
|
976
|
+
if "delete_snapshot" not in self._stubs:
|
|
977
|
+
self._stubs["delete_snapshot"] = self._logged_channel.unary_unary(
|
|
978
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot",
|
|
979
|
+
request_serializer=bigtable_table_admin.DeleteSnapshotRequest.serialize,
|
|
980
|
+
response_deserializer=empty_pb2.Empty.FromString,
|
|
981
|
+
)
|
|
982
|
+
return self._stubs["delete_snapshot"]
|
|
983
|
+
|
|
984
|
+
@property
|
|
985
|
+
def create_backup(
|
|
986
|
+
self,
|
|
987
|
+
) -> Callable[
|
|
988
|
+
[bigtable_table_admin.CreateBackupRequest], Awaitable[operations_pb2.Operation]
|
|
989
|
+
]:
|
|
990
|
+
r"""Return a callable for the create backup method over gRPC.
|
|
991
|
+
|
|
992
|
+
Starts creating a new Cloud Bigtable Backup. The returned backup
|
|
993
|
+
[long-running operation][google.longrunning.Operation] can be
|
|
994
|
+
used to track creation of the backup. The
|
|
995
|
+
[metadata][google.longrunning.Operation.metadata] field type is
|
|
996
|
+
[CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata].
|
|
997
|
+
The [response][google.longrunning.Operation.response] field type
|
|
998
|
+
is [Backup][google.bigtable.admin.v2.Backup], if successful.
|
|
999
|
+
Cancelling the returned operation will stop the creation and
|
|
1000
|
+
delete the backup.
|
|
1001
|
+
|
|
1002
|
+
Returns:
|
|
1003
|
+
Callable[[~.CreateBackupRequest],
|
|
1004
|
+
Awaitable[~.Operation]]:
|
|
1005
|
+
A function that, when called, will call the underlying RPC
|
|
1006
|
+
on the server.
|
|
1007
|
+
"""
|
|
1008
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1009
|
+
# the request.
|
|
1010
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1011
|
+
# to pass in the functions for each.
|
|
1012
|
+
if "create_backup" not in self._stubs:
|
|
1013
|
+
self._stubs["create_backup"] = self._logged_channel.unary_unary(
|
|
1014
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CreateBackup",
|
|
1015
|
+
request_serializer=bigtable_table_admin.CreateBackupRequest.serialize,
|
|
1016
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1017
|
+
)
|
|
1018
|
+
return self._stubs["create_backup"]
|
|
1019
|
+
|
|
1020
|
+
@property
|
|
1021
|
+
def get_backup(
|
|
1022
|
+
self,
|
|
1023
|
+
) -> Callable[[bigtable_table_admin.GetBackupRequest], Awaitable[table.Backup]]:
|
|
1024
|
+
r"""Return a callable for the get backup method over gRPC.
|
|
1025
|
+
|
|
1026
|
+
Gets metadata on a pending or completed Cloud
|
|
1027
|
+
Bigtable Backup.
|
|
1028
|
+
|
|
1029
|
+
Returns:
|
|
1030
|
+
Callable[[~.GetBackupRequest],
|
|
1031
|
+
Awaitable[~.Backup]]:
|
|
1032
|
+
A function that, when called, will call the underlying RPC
|
|
1033
|
+
on the server.
|
|
1034
|
+
"""
|
|
1035
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1036
|
+
# the request.
|
|
1037
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1038
|
+
# to pass in the functions for each.
|
|
1039
|
+
if "get_backup" not in self._stubs:
|
|
1040
|
+
self._stubs["get_backup"] = self._logged_channel.unary_unary(
|
|
1041
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GetBackup",
|
|
1042
|
+
request_serializer=bigtable_table_admin.GetBackupRequest.serialize,
|
|
1043
|
+
response_deserializer=table.Backup.deserialize,
|
|
1044
|
+
)
|
|
1045
|
+
return self._stubs["get_backup"]
|
|
1046
|
+
|
|
1047
|
+
@property
|
|
1048
|
+
def update_backup(
|
|
1049
|
+
self,
|
|
1050
|
+
) -> Callable[[bigtable_table_admin.UpdateBackupRequest], Awaitable[table.Backup]]:
|
|
1051
|
+
r"""Return a callable for the update backup method over gRPC.
|
|
1052
|
+
|
|
1053
|
+
Updates a pending or completed Cloud Bigtable Backup.
|
|
1054
|
+
|
|
1055
|
+
Returns:
|
|
1056
|
+
Callable[[~.UpdateBackupRequest],
|
|
1057
|
+
Awaitable[~.Backup]]:
|
|
1058
|
+
A function that, when called, will call the underlying RPC
|
|
1059
|
+
on the server.
|
|
1060
|
+
"""
|
|
1061
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1062
|
+
# the request.
|
|
1063
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1064
|
+
# to pass in the functions for each.
|
|
1065
|
+
if "update_backup" not in self._stubs:
|
|
1066
|
+
self._stubs["update_backup"] = self._logged_channel.unary_unary(
|
|
1067
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup",
|
|
1068
|
+
request_serializer=bigtable_table_admin.UpdateBackupRequest.serialize,
|
|
1069
|
+
response_deserializer=table.Backup.deserialize,
|
|
1070
|
+
)
|
|
1071
|
+
return self._stubs["update_backup"]
|
|
1072
|
+
|
|
1073
|
+
@property
|
|
1074
|
+
def delete_backup(
|
|
1075
|
+
self,
|
|
1076
|
+
) -> Callable[
|
|
1077
|
+
[bigtable_table_admin.DeleteBackupRequest], Awaitable[empty_pb2.Empty]
|
|
1078
|
+
]:
|
|
1079
|
+
r"""Return a callable for the delete backup method over gRPC.
|
|
1080
|
+
|
|
1081
|
+
Deletes a pending or completed Cloud Bigtable backup.
|
|
1082
|
+
|
|
1083
|
+
Returns:
|
|
1084
|
+
Callable[[~.DeleteBackupRequest],
|
|
1085
|
+
Awaitable[~.Empty]]:
|
|
1086
|
+
A function that, when called, will call the underlying RPC
|
|
1087
|
+
on the server.
|
|
1088
|
+
"""
|
|
1089
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1090
|
+
# the request.
|
|
1091
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1092
|
+
# to pass in the functions for each.
|
|
1093
|
+
if "delete_backup" not in self._stubs:
|
|
1094
|
+
self._stubs["delete_backup"] = self._logged_channel.unary_unary(
|
|
1095
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/DeleteBackup",
|
|
1096
|
+
request_serializer=bigtable_table_admin.DeleteBackupRequest.serialize,
|
|
1097
|
+
response_deserializer=empty_pb2.Empty.FromString,
|
|
1098
|
+
)
|
|
1099
|
+
return self._stubs["delete_backup"]
|
|
1100
|
+
|
|
1101
|
+
@property
|
|
1102
|
+
def list_backups(
|
|
1103
|
+
self,
|
|
1104
|
+
) -> Callable[
|
|
1105
|
+
[bigtable_table_admin.ListBackupsRequest],
|
|
1106
|
+
Awaitable[bigtable_table_admin.ListBackupsResponse],
|
|
1107
|
+
]:
|
|
1108
|
+
r"""Return a callable for the list backups method over gRPC.
|
|
1109
|
+
|
|
1110
|
+
Lists Cloud Bigtable backups. Returns both completed
|
|
1111
|
+
and pending backups.
|
|
1112
|
+
|
|
1113
|
+
Returns:
|
|
1114
|
+
Callable[[~.ListBackupsRequest],
|
|
1115
|
+
Awaitable[~.ListBackupsResponse]]:
|
|
1116
|
+
A function that, when called, will call the underlying RPC
|
|
1117
|
+
on the server.
|
|
1118
|
+
"""
|
|
1119
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1120
|
+
# the request.
|
|
1121
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1122
|
+
# to pass in the functions for each.
|
|
1123
|
+
if "list_backups" not in self._stubs:
|
|
1124
|
+
self._stubs["list_backups"] = self._logged_channel.unary_unary(
|
|
1125
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/ListBackups",
|
|
1126
|
+
request_serializer=bigtable_table_admin.ListBackupsRequest.serialize,
|
|
1127
|
+
response_deserializer=bigtable_table_admin.ListBackupsResponse.deserialize,
|
|
1128
|
+
)
|
|
1129
|
+
return self._stubs["list_backups"]
|
|
1130
|
+
|
|
1131
|
+
@property
|
|
1132
|
+
def restore_table(
|
|
1133
|
+
self,
|
|
1134
|
+
) -> Callable[
|
|
1135
|
+
[bigtable_table_admin.RestoreTableRequest], Awaitable[operations_pb2.Operation]
|
|
1136
|
+
]:
|
|
1137
|
+
r"""Return a callable for the restore table method over gRPC.
|
|
1138
|
+
|
|
1139
|
+
Create a new table by restoring from a completed backup. The
|
|
1140
|
+
returned table [long-running
|
|
1141
|
+
operation][google.longrunning.Operation] can be used to track
|
|
1142
|
+
the progress of the operation, and to cancel it. The
|
|
1143
|
+
[metadata][google.longrunning.Operation.metadata] field type is
|
|
1144
|
+
[RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata].
|
|
1145
|
+
The [response][google.longrunning.Operation.response] type is
|
|
1146
|
+
[Table][google.bigtable.admin.v2.Table], if successful.
|
|
1147
|
+
|
|
1148
|
+
Returns:
|
|
1149
|
+
Callable[[~.RestoreTableRequest],
|
|
1150
|
+
Awaitable[~.Operation]]:
|
|
1151
|
+
A function that, when called, will call the underlying RPC
|
|
1152
|
+
on the server.
|
|
1153
|
+
"""
|
|
1154
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1155
|
+
# the request.
|
|
1156
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1157
|
+
# to pass in the functions for each.
|
|
1158
|
+
if "restore_table" not in self._stubs:
|
|
1159
|
+
self._stubs["restore_table"] = self._logged_channel.unary_unary(
|
|
1160
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/RestoreTable",
|
|
1161
|
+
request_serializer=bigtable_table_admin.RestoreTableRequest.serialize,
|
|
1162
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1163
|
+
)
|
|
1164
|
+
return self._stubs["restore_table"]
|
|
1165
|
+
|
|
1166
|
+
@property
|
|
1167
|
+
def copy_backup(
|
|
1168
|
+
self,
|
|
1169
|
+
) -> Callable[
|
|
1170
|
+
[bigtable_table_admin.CopyBackupRequest], Awaitable[operations_pb2.Operation]
|
|
1171
|
+
]:
|
|
1172
|
+
r"""Return a callable for the copy backup method over gRPC.
|
|
1173
|
+
|
|
1174
|
+
Copy a Cloud Bigtable backup to a new backup in the
|
|
1175
|
+
destination cluster located in the destination instance
|
|
1176
|
+
and project.
|
|
1177
|
+
|
|
1178
|
+
Returns:
|
|
1179
|
+
Callable[[~.CopyBackupRequest],
|
|
1180
|
+
Awaitable[~.Operation]]:
|
|
1181
|
+
A function that, when called, will call the underlying RPC
|
|
1182
|
+
on the server.
|
|
1183
|
+
"""
|
|
1184
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1185
|
+
# the request.
|
|
1186
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1187
|
+
# to pass in the functions for each.
|
|
1188
|
+
if "copy_backup" not in self._stubs:
|
|
1189
|
+
self._stubs["copy_backup"] = self._logged_channel.unary_unary(
|
|
1190
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/CopyBackup",
|
|
1191
|
+
request_serializer=bigtable_table_admin.CopyBackupRequest.serialize,
|
|
1192
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1193
|
+
)
|
|
1194
|
+
return self._stubs["copy_backup"]
|
|
1195
|
+
|
|
1196
|
+
@property
|
|
1197
|
+
def get_iam_policy(
|
|
1198
|
+
self,
|
|
1199
|
+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], Awaitable[policy_pb2.Policy]]:
|
|
1200
|
+
r"""Return a callable for the get iam policy method over gRPC.
|
|
1201
|
+
|
|
1202
|
+
Gets the access control policy for a Table or Backup
|
|
1203
|
+
resource. Returns an empty policy if the resource exists
|
|
1204
|
+
but does not have a policy set.
|
|
1205
|
+
|
|
1206
|
+
Returns:
|
|
1207
|
+
Callable[[~.GetIamPolicyRequest],
|
|
1208
|
+
Awaitable[~.Policy]]:
|
|
1209
|
+
A function that, when called, will call the underlying RPC
|
|
1210
|
+
on the server.
|
|
1211
|
+
"""
|
|
1212
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1213
|
+
# the request.
|
|
1214
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1215
|
+
# to pass in the functions for each.
|
|
1216
|
+
if "get_iam_policy" not in self._stubs:
|
|
1217
|
+
self._stubs["get_iam_policy"] = self._logged_channel.unary_unary(
|
|
1218
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/GetIamPolicy",
|
|
1219
|
+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
|
|
1220
|
+
response_deserializer=policy_pb2.Policy.FromString,
|
|
1221
|
+
)
|
|
1222
|
+
return self._stubs["get_iam_policy"]
|
|
1223
|
+
|
|
1224
|
+
@property
|
|
1225
|
+
def set_iam_policy(
|
|
1226
|
+
self,
|
|
1227
|
+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], Awaitable[policy_pb2.Policy]]:
|
|
1228
|
+
r"""Return a callable for the set iam policy method over gRPC.
|
|
1229
|
+
|
|
1230
|
+
Sets the access control policy on a Table or Backup
|
|
1231
|
+
resource. Replaces any existing policy.
|
|
1232
|
+
|
|
1233
|
+
Returns:
|
|
1234
|
+
Callable[[~.SetIamPolicyRequest],
|
|
1235
|
+
Awaitable[~.Policy]]:
|
|
1236
|
+
A function that, when called, will call the underlying RPC
|
|
1237
|
+
on the server.
|
|
1238
|
+
"""
|
|
1239
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1240
|
+
# the request.
|
|
1241
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1242
|
+
# to pass in the functions for each.
|
|
1243
|
+
if "set_iam_policy" not in self._stubs:
|
|
1244
|
+
self._stubs["set_iam_policy"] = self._logged_channel.unary_unary(
|
|
1245
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/SetIamPolicy",
|
|
1246
|
+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
|
|
1247
|
+
response_deserializer=policy_pb2.Policy.FromString,
|
|
1248
|
+
)
|
|
1249
|
+
return self._stubs["set_iam_policy"]
|
|
1250
|
+
|
|
1251
|
+
@property
|
|
1252
|
+
def test_iam_permissions(
|
|
1253
|
+
self,
|
|
1254
|
+
) -> Callable[
|
|
1255
|
+
[iam_policy_pb2.TestIamPermissionsRequest],
|
|
1256
|
+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
|
|
1257
|
+
]:
|
|
1258
|
+
r"""Return a callable for the test iam permissions method over gRPC.
|
|
1259
|
+
|
|
1260
|
+
Returns permissions that the caller has on the
|
|
1261
|
+
specified Table or Backup resource.
|
|
1262
|
+
|
|
1263
|
+
Returns:
|
|
1264
|
+
Callable[[~.TestIamPermissionsRequest],
|
|
1265
|
+
Awaitable[~.TestIamPermissionsResponse]]:
|
|
1266
|
+
A function that, when called, will call the underlying RPC
|
|
1267
|
+
on the server.
|
|
1268
|
+
"""
|
|
1269
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1270
|
+
# the request.
|
|
1271
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1272
|
+
# to pass in the functions for each.
|
|
1273
|
+
if "test_iam_permissions" not in self._stubs:
|
|
1274
|
+
self._stubs["test_iam_permissions"] = self._logged_channel.unary_unary(
|
|
1275
|
+
"/google.bigtable.admin.v2.BigtableTableAdmin/TestIamPermissions",
|
|
1276
|
+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
|
|
1277
|
+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
|
|
1278
|
+
)
|
|
1279
|
+
return self._stubs["test_iam_permissions"]
|
|
1280
|
+
|
|
1281
|
+
def _prep_wrapped_messages(self, client_info):
|
|
1282
|
+
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
|
|
1283
|
+
self._wrapped_methods = {
|
|
1284
|
+
self.create_table: self._wrap_method(
|
|
1285
|
+
self.create_table,
|
|
1286
|
+
default_timeout=300.0,
|
|
1287
|
+
client_info=client_info,
|
|
1288
|
+
),
|
|
1289
|
+
self.create_table_from_snapshot: self._wrap_method(
|
|
1290
|
+
self.create_table_from_snapshot,
|
|
1291
|
+
default_timeout=None,
|
|
1292
|
+
client_info=client_info,
|
|
1293
|
+
),
|
|
1294
|
+
self.list_tables: self._wrap_method(
|
|
1295
|
+
self.list_tables,
|
|
1296
|
+
default_retry=retries.AsyncRetry(
|
|
1297
|
+
initial=1.0,
|
|
1298
|
+
maximum=60.0,
|
|
1299
|
+
multiplier=2,
|
|
1300
|
+
predicate=retries.if_exception_type(
|
|
1301
|
+
core_exceptions.DeadlineExceeded,
|
|
1302
|
+
core_exceptions.ServiceUnavailable,
|
|
1303
|
+
),
|
|
1304
|
+
deadline=60.0,
|
|
1305
|
+
),
|
|
1306
|
+
default_timeout=60.0,
|
|
1307
|
+
client_info=client_info,
|
|
1308
|
+
),
|
|
1309
|
+
self.get_table: self._wrap_method(
|
|
1310
|
+
self.get_table,
|
|
1311
|
+
default_retry=retries.AsyncRetry(
|
|
1312
|
+
initial=1.0,
|
|
1313
|
+
maximum=60.0,
|
|
1314
|
+
multiplier=2,
|
|
1315
|
+
predicate=retries.if_exception_type(
|
|
1316
|
+
core_exceptions.DeadlineExceeded,
|
|
1317
|
+
core_exceptions.ServiceUnavailable,
|
|
1318
|
+
),
|
|
1319
|
+
deadline=60.0,
|
|
1320
|
+
),
|
|
1321
|
+
default_timeout=60.0,
|
|
1322
|
+
client_info=client_info,
|
|
1323
|
+
),
|
|
1324
|
+
self.update_table: self._wrap_method(
|
|
1325
|
+
self.update_table,
|
|
1326
|
+
default_timeout=None,
|
|
1327
|
+
client_info=client_info,
|
|
1328
|
+
),
|
|
1329
|
+
self.delete_table: self._wrap_method(
|
|
1330
|
+
self.delete_table,
|
|
1331
|
+
default_timeout=300.0,
|
|
1332
|
+
client_info=client_info,
|
|
1333
|
+
),
|
|
1334
|
+
self.undelete_table: self._wrap_method(
|
|
1335
|
+
self.undelete_table,
|
|
1336
|
+
default_timeout=None,
|
|
1337
|
+
client_info=client_info,
|
|
1338
|
+
),
|
|
1339
|
+
self.create_authorized_view: self._wrap_method(
|
|
1340
|
+
self.create_authorized_view,
|
|
1341
|
+
default_timeout=None,
|
|
1342
|
+
client_info=client_info,
|
|
1343
|
+
),
|
|
1344
|
+
self.list_authorized_views: self._wrap_method(
|
|
1345
|
+
self.list_authorized_views,
|
|
1346
|
+
default_timeout=None,
|
|
1347
|
+
client_info=client_info,
|
|
1348
|
+
),
|
|
1349
|
+
self.get_authorized_view: self._wrap_method(
|
|
1350
|
+
self.get_authorized_view,
|
|
1351
|
+
default_timeout=None,
|
|
1352
|
+
client_info=client_info,
|
|
1353
|
+
),
|
|
1354
|
+
self.update_authorized_view: self._wrap_method(
|
|
1355
|
+
self.update_authorized_view,
|
|
1356
|
+
default_timeout=None,
|
|
1357
|
+
client_info=client_info,
|
|
1358
|
+
),
|
|
1359
|
+
self.delete_authorized_view: self._wrap_method(
|
|
1360
|
+
self.delete_authorized_view,
|
|
1361
|
+
default_timeout=None,
|
|
1362
|
+
client_info=client_info,
|
|
1363
|
+
),
|
|
1364
|
+
self.modify_column_families: self._wrap_method(
|
|
1365
|
+
self.modify_column_families,
|
|
1366
|
+
default_timeout=300.0,
|
|
1367
|
+
client_info=client_info,
|
|
1368
|
+
),
|
|
1369
|
+
self.drop_row_range: self._wrap_method(
|
|
1370
|
+
self.drop_row_range,
|
|
1371
|
+
default_timeout=3600.0,
|
|
1372
|
+
client_info=client_info,
|
|
1373
|
+
),
|
|
1374
|
+
self.generate_consistency_token: self._wrap_method(
|
|
1375
|
+
self.generate_consistency_token,
|
|
1376
|
+
default_retry=retries.AsyncRetry(
|
|
1377
|
+
initial=1.0,
|
|
1378
|
+
maximum=60.0,
|
|
1379
|
+
multiplier=2,
|
|
1380
|
+
predicate=retries.if_exception_type(
|
|
1381
|
+
core_exceptions.DeadlineExceeded,
|
|
1382
|
+
core_exceptions.ServiceUnavailable,
|
|
1383
|
+
),
|
|
1384
|
+
deadline=60.0,
|
|
1385
|
+
),
|
|
1386
|
+
default_timeout=60.0,
|
|
1387
|
+
client_info=client_info,
|
|
1388
|
+
),
|
|
1389
|
+
self.check_consistency: self._wrap_method(
|
|
1390
|
+
self.check_consistency,
|
|
1391
|
+
default_retry=retries.AsyncRetry(
|
|
1392
|
+
initial=1.0,
|
|
1393
|
+
maximum=60.0,
|
|
1394
|
+
multiplier=2,
|
|
1395
|
+
predicate=retries.if_exception_type(
|
|
1396
|
+
core_exceptions.DeadlineExceeded,
|
|
1397
|
+
core_exceptions.ServiceUnavailable,
|
|
1398
|
+
),
|
|
1399
|
+
deadline=3600.0,
|
|
1400
|
+
),
|
|
1401
|
+
default_timeout=3600.0,
|
|
1402
|
+
client_info=client_info,
|
|
1403
|
+
),
|
|
1404
|
+
self.snapshot_table: self._wrap_method(
|
|
1405
|
+
self.snapshot_table,
|
|
1406
|
+
default_timeout=None,
|
|
1407
|
+
client_info=client_info,
|
|
1408
|
+
),
|
|
1409
|
+
self.get_snapshot: self._wrap_method(
|
|
1410
|
+
self.get_snapshot,
|
|
1411
|
+
default_retry=retries.AsyncRetry(
|
|
1412
|
+
initial=1.0,
|
|
1413
|
+
maximum=60.0,
|
|
1414
|
+
multiplier=2,
|
|
1415
|
+
predicate=retries.if_exception_type(
|
|
1416
|
+
core_exceptions.DeadlineExceeded,
|
|
1417
|
+
core_exceptions.ServiceUnavailable,
|
|
1418
|
+
),
|
|
1419
|
+
deadline=60.0,
|
|
1420
|
+
),
|
|
1421
|
+
default_timeout=60.0,
|
|
1422
|
+
client_info=client_info,
|
|
1423
|
+
),
|
|
1424
|
+
self.list_snapshots: self._wrap_method(
|
|
1425
|
+
self.list_snapshots,
|
|
1426
|
+
default_retry=retries.AsyncRetry(
|
|
1427
|
+
initial=1.0,
|
|
1428
|
+
maximum=60.0,
|
|
1429
|
+
multiplier=2,
|
|
1430
|
+
predicate=retries.if_exception_type(
|
|
1431
|
+
core_exceptions.DeadlineExceeded,
|
|
1432
|
+
core_exceptions.ServiceUnavailable,
|
|
1433
|
+
),
|
|
1434
|
+
deadline=60.0,
|
|
1435
|
+
),
|
|
1436
|
+
default_timeout=60.0,
|
|
1437
|
+
client_info=client_info,
|
|
1438
|
+
),
|
|
1439
|
+
self.delete_snapshot: self._wrap_method(
|
|
1440
|
+
self.delete_snapshot,
|
|
1441
|
+
default_timeout=300.0,
|
|
1442
|
+
client_info=client_info,
|
|
1443
|
+
),
|
|
1444
|
+
self.create_backup: self._wrap_method(
|
|
1445
|
+
self.create_backup,
|
|
1446
|
+
default_timeout=60.0,
|
|
1447
|
+
client_info=client_info,
|
|
1448
|
+
),
|
|
1449
|
+
self.get_backup: self._wrap_method(
|
|
1450
|
+
self.get_backup,
|
|
1451
|
+
default_retry=retries.AsyncRetry(
|
|
1452
|
+
initial=1.0,
|
|
1453
|
+
maximum=60.0,
|
|
1454
|
+
multiplier=2,
|
|
1455
|
+
predicate=retries.if_exception_type(
|
|
1456
|
+
core_exceptions.DeadlineExceeded,
|
|
1457
|
+
core_exceptions.ServiceUnavailable,
|
|
1458
|
+
),
|
|
1459
|
+
deadline=60.0,
|
|
1460
|
+
),
|
|
1461
|
+
default_timeout=60.0,
|
|
1462
|
+
client_info=client_info,
|
|
1463
|
+
),
|
|
1464
|
+
self.update_backup: self._wrap_method(
|
|
1465
|
+
self.update_backup,
|
|
1466
|
+
default_timeout=60.0,
|
|
1467
|
+
client_info=client_info,
|
|
1468
|
+
),
|
|
1469
|
+
self.delete_backup: self._wrap_method(
|
|
1470
|
+
self.delete_backup,
|
|
1471
|
+
default_timeout=300.0,
|
|
1472
|
+
client_info=client_info,
|
|
1473
|
+
),
|
|
1474
|
+
self.list_backups: self._wrap_method(
|
|
1475
|
+
self.list_backups,
|
|
1476
|
+
default_retry=retries.AsyncRetry(
|
|
1477
|
+
initial=1.0,
|
|
1478
|
+
maximum=60.0,
|
|
1479
|
+
multiplier=2,
|
|
1480
|
+
predicate=retries.if_exception_type(
|
|
1481
|
+
core_exceptions.DeadlineExceeded,
|
|
1482
|
+
core_exceptions.ServiceUnavailable,
|
|
1483
|
+
),
|
|
1484
|
+
deadline=60.0,
|
|
1485
|
+
),
|
|
1486
|
+
default_timeout=60.0,
|
|
1487
|
+
client_info=client_info,
|
|
1488
|
+
),
|
|
1489
|
+
self.restore_table: self._wrap_method(
|
|
1490
|
+
self.restore_table,
|
|
1491
|
+
default_timeout=60.0,
|
|
1492
|
+
client_info=client_info,
|
|
1493
|
+
),
|
|
1494
|
+
self.copy_backup: self._wrap_method(
|
|
1495
|
+
self.copy_backup,
|
|
1496
|
+
default_timeout=None,
|
|
1497
|
+
client_info=client_info,
|
|
1498
|
+
),
|
|
1499
|
+
self.get_iam_policy: self._wrap_method(
|
|
1500
|
+
self.get_iam_policy,
|
|
1501
|
+
default_retry=retries.AsyncRetry(
|
|
1502
|
+
initial=1.0,
|
|
1503
|
+
maximum=60.0,
|
|
1504
|
+
multiplier=2,
|
|
1505
|
+
predicate=retries.if_exception_type(
|
|
1506
|
+
core_exceptions.DeadlineExceeded,
|
|
1507
|
+
core_exceptions.ServiceUnavailable,
|
|
1508
|
+
),
|
|
1509
|
+
deadline=60.0,
|
|
1510
|
+
),
|
|
1511
|
+
default_timeout=60.0,
|
|
1512
|
+
client_info=client_info,
|
|
1513
|
+
),
|
|
1514
|
+
self.set_iam_policy: self._wrap_method(
|
|
1515
|
+
self.set_iam_policy,
|
|
1516
|
+
default_timeout=60.0,
|
|
1517
|
+
client_info=client_info,
|
|
1518
|
+
),
|
|
1519
|
+
self.test_iam_permissions: self._wrap_method(
|
|
1520
|
+
self.test_iam_permissions,
|
|
1521
|
+
default_retry=retries.AsyncRetry(
|
|
1522
|
+
initial=1.0,
|
|
1523
|
+
maximum=60.0,
|
|
1524
|
+
multiplier=2,
|
|
1525
|
+
predicate=retries.if_exception_type(
|
|
1526
|
+
core_exceptions.DeadlineExceeded,
|
|
1527
|
+
core_exceptions.ServiceUnavailable,
|
|
1528
|
+
),
|
|
1529
|
+
deadline=60.0,
|
|
1530
|
+
),
|
|
1531
|
+
default_timeout=60.0,
|
|
1532
|
+
client_info=client_info,
|
|
1533
|
+
),
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
def _wrap_method(self, func, *args, **kwargs):
|
|
1537
|
+
if self._wrap_with_kind: # pragma: NO COVER
|
|
1538
|
+
kwargs["kind"] = self.kind
|
|
1539
|
+
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
|
|
1540
|
+
|
|
1541
|
+
def close(self):
|
|
1542
|
+
return self._logged_channel.close()
|
|
1543
|
+
|
|
1544
|
+
@property
|
|
1545
|
+
def kind(self) -> str:
|
|
1546
|
+
return "grpc_asyncio"
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
__all__ = ("BigtableTableAdminGrpcAsyncIOTransport",)
|