Skip to content

Commit f5d74a0

Browse files
fix: update backup timeouts (via synth) (#82)
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * remove _pb2 files and multiprocessing due to docs failures Co-authored-by: larkee <larkee@users.noreply.github.com>
1 parent b8c1a67 commit f5d74a0

File tree

12 files changed

+189
-195
lines changed

12 files changed

+189
-195
lines changed

.kokoro/publish-docs.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
#!/bin/bash
17-
1816
set -eo pipefail
1917

2018
# Disable buffering, so that the logs stream through.

google/cloud/spanner_admin_database_v1/gapic/database_admin_client.py

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ def create_database(
273273
Args:
274274
parent (str): Required. The name of the instance that will serve the new database.
275275
Values are of the form ``projects/<project>/instances/<instance>``.
276-
create_statement (str): Required. A ``CREATE DATABASE`` statement, which specifies the ID of the
277-
new database. The database ID must conform to the regular expression
276+
create_statement (str): Required. A ``CREATE DATABASE`` statement, which specifies the ID of
277+
the new database. The database ID must conform to the regular expression
278278
``[a-z][a-z0-9_\-]*[a-z0-9]`` and be between 2 and 30 characters in
279279
length. If the database ID is a reserved word or if it contains a
280-
hyphen, the database ID must be enclosed in backticks (`````).
280+
hyphen, the database ID must be enclosed in backticks (:literal:`\``).
281281
extra_statements (list[str]): Optional. A list of DDL statements to run inside the newly created
282282
database. Statements can create tables, indexes, etc. These
283283
statements execute atomically with the creation of the database:
@@ -451,9 +451,9 @@ def update_database_ddl(
451451
Args:
452452
database (str): Required. The database to update.
453453
statements (list[str]): Required. DDL statements to be applied to the database.
454-
operation_id (str): If empty, the new update request is assigned an automatically-generated
455-
operation ID. Otherwise, ``operation_id`` is used to construct the name
456-
of the resulting ``Operation``.
454+
operation_id (str): If empty, the new update request is assigned an
455+
automatically-generated operation ID. Otherwise, ``operation_id`` is
456+
used to construct the name of the resulting ``Operation``.
457457
458458
Specifying an explicit operation ID simplifies determining whether the
459459
statements were executed in the event that the ``UpdateDatabaseDdl``
@@ -530,8 +530,8 @@ def drop_database(
530530
metadata=None,
531531
):
532532
"""
533-
Drops (aka deletes) a Cloud Spanner database. Completed backups for the
534-
database will be retained according to their ``expire_time``.
533+
Drops (aka deletes) a Cloud Spanner database. Completed backups for
534+
the database will be retained according to their ``expire_time``.
535535
536536
Example:
537537
>>> from google.cloud import spanner_admin_database_v1
@@ -597,9 +597,9 @@ def get_database_ddl(
597597
metadata=None,
598598
):
599599
"""
600-
Returns the schema of a Cloud Spanner database as a list of formatted
601-
DDL statements. This method does not show pending schema updates, those
602-
may be queried using the ``Operations`` API.
600+
Returns the schema of a Cloud Spanner database as a list of
601+
formatted DDL statements. This method does not show pending schema
602+
updates, those may be queried using the ``Operations`` API.
603603
604604
Example:
605605
>>> from google.cloud import spanner_admin_database_v1
@@ -845,10 +845,10 @@ def test_iam_permissions(
845845
backup resource.
846846
847847
Attempting this RPC on a non-existent Cloud Spanner database will result
848-
in a NOT\_FOUND error if the user has ``spanner.databases.list``
848+
in a NOT_FOUND error if the user has ``spanner.databases.list``
849849
permission on the containing Cloud Spanner instance. Otherwise returns
850850
an empty set of permissions. Calling this method on a backup that does
851-
not exist will result in a NOT\_FOUND error if the user has
851+
not exist will result in a NOT_FOUND error if the user has
852852
``spanner.backups.list`` permission on the containing instance.
853853
854854
Example:
@@ -867,8 +867,8 @@ def test_iam_permissions(
867867
Args:
868868
resource (str): REQUIRED: The resource for which the policy detail is being requested.
869869
See the operation documentation for the appropriate value for this field.
870-
permissions (list[str]): The set of permissions to check for the ``resource``. Permissions with
871-
wildcards (such as '*' or 'storage.*') are not allowed. For more
870+
permissions (list[str]): The set of permissions to check for the ``resource``. Permissions
871+
with wildcards (such as '*' or 'storage.*') are not allowed. For more
872872
information see `IAM
873873
Overview <https://cloud.google.com/iam/docs/overview#permissions>`__.
874874
retry (Optional[google.api_core.retry.Retry]): A retry object used
@@ -966,13 +966,13 @@ def create_backup(
966966
>>> metadata = response.metadata()
967967
968968
Args:
969-
parent (str): Required. The name of the instance in which the backup will be created.
970-
This must be the same instance that contains the database the backup
971-
will be created from. The backup will be stored in the location(s)
972-
specified in the instance configuration of this instance. Values are of
973-
the form ``projects/<project>/instances/<instance>``.
974-
backup_id (str): Required. The id of the backup to be created. The ``backup_id`` appended
975-
to ``parent`` forms the full backup name of the form
969+
parent (str): Required. The name of the instance in which the backup will be
970+
created. This must be the same instance that contains the database the
971+
backup will be created from. The backup will be stored in the
972+
location(s) specified in the instance configuration of this instance.
973+
Values are of the form ``projects/<project>/instances/<instance>``.
974+
backup_id (str): Required. The id of the backup to be created. The ``backup_id``
975+
appended to ``parent`` forms the full backup name of the form
976976
``projects/<project>/instances/<instance>/backups/<backup_id>``.
977977
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to create.
978978
@@ -1129,18 +1129,18 @@ def update_backup(
11291129
>>> response = client.update_backup(backup, update_mask)
11301130
11311131
Args:
1132-
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to update. ``backup.name``, and the fields to be
1133-
updated as specified by ``update_mask`` are required. Other fields are
1134-
ignored. Update is only supported for the following fields:
1132+
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to update. ``backup.name``, and the fields to
1133+
be updated as specified by ``update_mask`` are required. Other fields
1134+
are ignored. Update is only supported for the following fields:
11351135
11361136
- ``backup.expire_time``.
11371137
11381138
If a dict is provided, it must be of the same form as the protobuf
11391139
message :class:`~google.cloud.spanner_admin_database_v1.types.Backup`
1140-
update_mask (Union[dict, ~google.cloud.spanner_admin_database_v1.types.FieldMask]): Required. A mask specifying which fields (e.g. ``expire_time``) in the
1141-
Backup resource should be updated. This mask is relative to the Backup
1142-
resource, not to the request message. The field mask must always be
1143-
specified; this prevents any future fields from being erased
1140+
update_mask (Union[dict, ~google.cloud.spanner_admin_database_v1.types.FieldMask]): Required. A mask specifying which fields (e.g. ``expire_time``) in
1141+
the Backup resource should be updated. This mask is relative to the
1142+
Backup resource, not to the request message. The field mask must always
1143+
be specified; this prevents any future fields from being erased
11441144
accidentally by clients that do not know about them.
11451145
11461146
If a dict is provided, it must be of the same form as the protobuf
@@ -1450,9 +1450,9 @@ def restore_database(
14501450
database. This instance must be in the same project and have the same
14511451
instance configuration as the instance containing the source backup.
14521452
Values are of the form ``projects/<project>/instances/<instance>``.
1453-
database_id (str): Required. The id of the database to create and restore to. This database
1454-
must not already exist. The ``database_id`` appended to ``parent`` forms
1455-
the full database name of the form
1453+
database_id (str): Required. The id of the database to create and restore to. This
1454+
database must not already exist. The ``database_id`` appended to
1455+
``parent`` forms the full database name of the form
14561456
``projects/<project>/instances/<instance>/databases/<database_id>``.
14571457
backup (str): Name of the backup from which to restore. Values are of the form
14581458
``projects/<project>/instances/<instance>/backups/<backup>``.
@@ -1526,8 +1526,8 @@ def list_database_operations(
15261526
metadata=None,
15271527
):
15281528
"""
1529-
Lists database ``longrunning-operations``. A database operation has a
1530-
name of the form
1529+
Lists database ``longrunning-operations``. A database operation has
1530+
a name of the form
15311531
``projects/<project>/instances/<instance>/databases/<database>/operations/<operation>``.
15321532
The long-running operation ``metadata`` field type ``metadata.type_url``
15331533
describes the type of the metadata. Operations returned include those
@@ -1594,8 +1594,8 @@ def list_database_operations(
15941594
15951595
- The operation's metadata type is ``RestoreDatabaseMetadata``.
15961596
- The database is restored from a backup.
1597-
- The backup name contains "backup\_howl".
1598-
- The restored database's name contains "restored\_howl".
1597+
- The backup name contains "backup_howl".
1598+
- The restored database's name contains "restored_howl".
15991599
- The operation started before 2018-03-28T14:50:00Z.
16001600
- The operation resulted in an error.
16011601
page_size (int): The maximum number of resources contained in the
@@ -1677,8 +1677,8 @@ def list_backup_operations(
16771677
metadata=None,
16781678
):
16791679
"""
1680-
Lists the backup ``long-running operations`` in the given instance. A
1681-
backup operation has a name of the form
1680+
Lists the backup ``long-running operations`` in the given instance.
1681+
A backup operation has a name of the form
16821682
``projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>``.
16831683
The long-running operation ``metadata`` field type ``metadata.type_url``
16841684
describes the type of the metadata. Operations returned include those
@@ -1709,8 +1709,8 @@ def list_backup_operations(
17091709
... pass
17101710
17111711
Args:
1712-
parent (str): Required. The instance of the backup operations. Values are of the form
1713-
``projects/<project>/instances/<instance>``.
1712+
parent (str): Required. The instance of the backup operations. Values are of the
1713+
form ``projects/<project>/instances/<instance>``.
17141714
filter_ (str): An expression that filters the list of returned backup operations.
17151715
17161716
A filter expression consists of a field name, a comparison operator, and
@@ -1851,8 +1851,8 @@ def list_databases(
18511851
... pass
18521852
18531853
Args:
1854-
parent (str): Required. The instance whose databases should be listed. Values are of
1855-
the form ``projects/<project>/instances/<instance>``.
1854+
parent (str): Required. The instance whose databases should be listed. Values are
1855+
of the form ``projects/<project>/instances/<instance>``.
18561856
page_size (int): The maximum number of resources contained in the
18571857
underlying API response. If page streaming is performed per-
18581858
resource, this parameter does not affect the return value. If page

google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
"retry_params_name": "default",
6464
},
6565
"GetBackup": {
66-
"timeout_millis": 30000,
66+
"timeout_millis": 600000,
6767
"retry_codes_name": "idempotent",
6868
"retry_params_name": "default",
6969
},
7070
"UpdateBackup": {
71-
"timeout_millis": 30000,
71+
"timeout_millis": 600000,
7272
"retry_codes_name": "non_idempotent",
7373
"retry_params_name": "default",
7474
},
@@ -78,7 +78,7 @@
7878
"retry_params_name": "default",
7979
},
8080
"ListBackups": {
81-
"timeout_millis": 30000,
81+
"timeout_millis": 600000,
8282
"retry_codes_name": "idempotent",
8383
"retry_params_name": "default",
8484
},
@@ -88,12 +88,12 @@
8888
"retry_params_name": "default",
8989
},
9090
"ListDatabaseOperations": {
91-
"timeout_millis": 30000,
91+
"timeout_millis": 600000,
9292
"retry_codes_name": "idempotent",
9393
"retry_params_name": "default",
9494
},
9595
"ListBackupOperations": {
96-
"timeout_millis": 30000,
96+
"timeout_millis": 600000,
9797
"retry_codes_name": "idempotent",
9898
"retry_params_name": "default",
9999
},

google/cloud/spanner_admin_database_v1/gapic/enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class State(enum.IntEnum):
3939
4040
Attributes:
4141
STATE_UNSPECIFIED (int): Not specified.
42-
CREATING (int): The pending backup is still being created. Operations on the backup may
43-
fail with ``FAILED_PRECONDITION`` in this state.
42+
CREATING (int): The pending backup is still being created. Operations on the backup
43+
may fail with ``FAILED_PRECONDITION`` in this state.
4444
READY (int): The backup is complete and ready for use.
4545
"""
4646

@@ -56,8 +56,8 @@ class State(enum.IntEnum):
5656
5757
Attributes:
5858
STATE_UNSPECIFIED (int): Not specified.
59-
CREATING (int): The database is still being created. Operations on the database may fail
60-
with ``FAILED_PRECONDITION`` in this state.
59+
CREATING (int): The database is still being created. Operations on the database may
60+
fail with ``FAILED_PRECONDITION`` in this state.
6161
READY (int): The database is fully created and ready for use.
6262
READY_OPTIMIZING (int): The database is fully created and ready for use, but is still being
6363
optimized for performance and cannot handle full load.

google/cloud/spanner_admin_database_v1/gapic/transports/database_admin_grpc_transport.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ def update_database_ddl(self):
173173
def drop_database(self):
174174
"""Return the gRPC stub for :meth:`DatabaseAdminClient.drop_database`.
175175
176-
Drops (aka deletes) a Cloud Spanner database. Completed backups for the
177-
database will be retained according to their ``expire_time``.
176+
Drops (aka deletes) a Cloud Spanner database. Completed backups for
177+
the database will be retained according to their ``expire_time``.
178178
179179
Returns:
180180
Callable: A callable which accepts the appropriate
@@ -187,9 +187,9 @@ def drop_database(self):
187187
def get_database_ddl(self):
188188
"""Return the gRPC stub for :meth:`DatabaseAdminClient.get_database_ddl`.
189189
190-
Returns the schema of a Cloud Spanner database as a list of formatted
191-
DDL statements. This method does not show pending schema updates, those
192-
may be queried using the ``Operations`` API.
190+
Returns the schema of a Cloud Spanner database as a list of
191+
formatted DDL statements. This method does not show pending schema
192+
updates, those may be queried using the ``Operations`` API.
193193
194194
Returns:
195195
Callable: A callable which accepts the appropriate
@@ -243,10 +243,10 @@ def test_iam_permissions(self):
243243
backup resource.
244244
245245
Attempting this RPC on a non-existent Cloud Spanner database will result
246-
in a NOT\_FOUND error if the user has ``spanner.databases.list``
246+
in a NOT_FOUND error if the user has ``spanner.databases.list``
247247
permission on the containing Cloud Spanner instance. Otherwise returns
248248
an empty set of permissions. Calling this method on a backup that does
249-
not exist will result in a NOT\_FOUND error if the user has
249+
not exist will result in a NOT_FOUND error if the user has
250250
``spanner.backups.list`` permission on the containing instance.
251251
252252
Returns:
@@ -360,8 +360,8 @@ def restore_database(self):
360360
def list_database_operations(self):
361361
"""Return the gRPC stub for :meth:`DatabaseAdminClient.list_database_operations`.
362362
363-
Lists database ``longrunning-operations``. A database operation has a
364-
name of the form
363+
Lists database ``longrunning-operations``. A database operation has
364+
a name of the form
365365
``projects/<project>/instances/<instance>/databases/<database>/operations/<operation>``.
366366
The long-running operation ``metadata`` field type ``metadata.type_url``
367367
describes the type of the metadata. Operations returned include those
@@ -379,8 +379,8 @@ def list_database_operations(self):
379379
def list_backup_operations(self):
380380
"""Return the gRPC stub for :meth:`DatabaseAdminClient.list_backup_operations`.
381381
382-
Lists the backup ``long-running operations`` in the given instance. A
383-
backup operation has a name of the form
382+
Lists the backup ``long-running operations`` in the given instance.
383+
A backup operation has a name of the form
384384
``projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>``.
385385
The long-running operation ``metadata`` field type ``metadata.type_url``
386386
describes the type of the metadata. Operations returned include those

google/cloud/spanner_admin_instance_v1/gapic/enums.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class ReplicaType(enum.IntEnum):
5454
- Can vote whether to commit a write.
5555
- Participate in leadership election.
5656
- Are eligible to become a leader.
57-
READ_ONLY (int): Read-only replicas only support reads (not writes). Read-only replicas:
57+
READ_ONLY (int): Read-only replicas only support reads (not writes). Read-only
58+
replicas:
5859
5960
- Maintain a full copy of your data.
6061
- Serve reads.

0 commit comments

Comments
 (0)