Skip to content
Permalink
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>
  • Loading branch information
yoshi-automation and larkee committed May 14, 2020
1 parent b8c1a67 commit f5d74a03d5cc84befa3817f83ad2655af6fe5741
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#!/bin/bash

set -eo pipefail

# Disable buffering, so that the logs stream through.
@@ -273,11 +273,11 @@ def create_database(
Args:
parent (str): Required. The name of the instance that will serve the new database.
Values are of the form ``projects/<project>/instances/<instance>``.
create_statement (str): Required. A ``CREATE DATABASE`` statement, which specifies the ID of the
new database. The database ID must conform to the regular expression
create_statement (str): Required. A ``CREATE DATABASE`` statement, which specifies the ID of
the new database. The database ID must conform to the regular expression
``[a-z][a-z0-9_\-]*[a-z0-9]`` and be between 2 and 30 characters in
length. If the database ID is a reserved word or if it contains a
hyphen, the database ID must be enclosed in backticks (`````).
hyphen, the database ID must be enclosed in backticks (:literal:`\``).
extra_statements (list[str]): Optional. A list of DDL statements to run inside the newly created
database. Statements can create tables, indexes, etc. These
statements execute atomically with the creation of the database:
@@ -451,9 +451,9 @@ def update_database_ddl(
Args:
database (str): Required. The database to update.
statements (list[str]): Required. DDL statements to be applied to the database.
operation_id (str): If empty, the new update request is assigned an automatically-generated
operation ID. Otherwise, ``operation_id`` is used to construct the name
of the resulting ``Operation``.
operation_id (str): If empty, the new update request is assigned an
automatically-generated operation ID. Otherwise, ``operation_id`` is
used to construct the name of the resulting ``Operation``.
Specifying an explicit operation ID simplifies determining whether the
statements were executed in the event that the ``UpdateDatabaseDdl``
@@ -530,8 +530,8 @@ def drop_database(
metadata=None,
):
"""
Drops (aka deletes) a Cloud Spanner database. Completed backups for the
database will be retained according to their ``expire_time``.
Drops (aka deletes) a Cloud Spanner database. Completed backups for
the database will be retained according to their ``expire_time``.
Example:
>>> from google.cloud import spanner_admin_database_v1
@@ -597,9 +597,9 @@ def get_database_ddl(
metadata=None,
):
"""
Returns the schema of a Cloud Spanner database as a list of formatted
DDL statements. This method does not show pending schema updates, those
may be queried using the ``Operations`` API.
Returns the schema of a Cloud Spanner database as a list of
formatted DDL statements. This method does not show pending schema
updates, those may be queried using the ``Operations`` API.
Example:
>>> from google.cloud import spanner_admin_database_v1
@@ -845,10 +845,10 @@ def test_iam_permissions(
backup resource.
Attempting this RPC on a non-existent Cloud Spanner database will result
in a NOT\_FOUND error if the user has ``spanner.databases.list``
in a NOT_FOUND error if the user has ``spanner.databases.list``
permission on the containing Cloud Spanner instance. Otherwise returns
an empty set of permissions. Calling this method on a backup that does
not exist will result in a NOT\_FOUND error if the user has
not exist will result in a NOT_FOUND error if the user has
``spanner.backups.list`` permission on the containing instance.
Example:
@@ -867,8 +867,8 @@ def test_iam_permissions(
Args:
resource (str): REQUIRED: The resource for which the policy detail is being requested.
See the operation documentation for the appropriate value for this field.
permissions (list[str]): The set of permissions to check for the ``resource``. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more
permissions (list[str]): The set of permissions to check for the ``resource``. Permissions
with wildcards (such as '*' or 'storage.*') are not allowed. For more
information see `IAM
Overview <https://cloud.google.com/iam/docs/overview#permissions>`__.
retry (Optional[google.api_core.retry.Retry]): A retry object used
@@ -966,13 +966,13 @@ def create_backup(
>>> metadata = response.metadata()
Args:
parent (str): Required. The name of the instance in which the backup will be created.
This must be the same instance that contains the database the backup
will be created from. The backup will be stored in the location(s)
specified in the instance configuration of this instance. Values are of
the form ``projects/<project>/instances/<instance>``.
backup_id (str): Required. The id of the backup to be created. The ``backup_id`` appended
to ``parent`` forms the full backup name of the form
parent (str): Required. The name of the instance in which the backup will be
created. This must be the same instance that contains the database the
backup will be created from. The backup will be stored in the
location(s) specified in the instance configuration of this instance.
Values are of the form ``projects/<project>/instances/<instance>``.
backup_id (str): Required. The id of the backup to be created. The ``backup_id``
appended to ``parent`` forms the full backup name of the form
``projects/<project>/instances/<instance>/backups/<backup_id>``.
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to create.
@@ -1129,18 +1129,18 @@ def update_backup(
>>> response = client.update_backup(backup, update_mask)
Args:
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to update. ``backup.name``, and the fields to be
updated as specified by ``update_mask`` are required. Other fields are
ignored. Update is only supported for the following fields:
backup (Union[dict, ~google.cloud.spanner_admin_database_v1.types.Backup]): Required. The backup to update. ``backup.name``, and the fields to
be updated as specified by ``update_mask`` are required. Other fields
are ignored. Update is only supported for the following fields:
- ``backup.expire_time``.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.spanner_admin_database_v1.types.Backup`
update_mask (Union[dict, ~google.cloud.spanner_admin_database_v1.types.FieldMask]): Required. A mask specifying which fields (e.g. ``expire_time``) in the
Backup resource should be updated. This mask is relative to the Backup
resource, not to the request message. The field mask must always be
specified; this prevents any future fields from being erased
update_mask (Union[dict, ~google.cloud.spanner_admin_database_v1.types.FieldMask]): Required. A mask specifying which fields (e.g. ``expire_time``) in
the Backup resource should be updated. This mask is relative to the
Backup resource, not to the request message. The field mask must always
be specified; this prevents any future fields from being erased
accidentally by clients that do not know about them.
If a dict is provided, it must be of the same form as the protobuf
@@ -1450,9 +1450,9 @@ def restore_database(
database. This instance must be in the same project and have the same
instance configuration as the instance containing the source backup.
Values are of the form ``projects/<project>/instances/<instance>``.
database_id (str): Required. The id of the database to create and restore to. This database
must not already exist. The ``database_id`` appended to ``parent`` forms
the full database name of the form
database_id (str): Required. The id of the database to create and restore to. This
database must not already exist. The ``database_id`` appended to
``parent`` forms the full database name of the form
``projects/<project>/instances/<instance>/databases/<database_id>``.
backup (str): Name of the backup from which to restore. Values are of the form
``projects/<project>/instances/<instance>/backups/<backup>``.
@@ -1526,8 +1526,8 @@ def list_database_operations(
metadata=None,
):
"""
Lists database ``longrunning-operations``. A database operation has a
name of the form
Lists database ``longrunning-operations``. A database operation has
a name of the form
``projects/<project>/instances/<instance>/databases/<database>/operations/<operation>``.
The long-running operation ``metadata`` field type ``metadata.type_url``
describes the type of the metadata. Operations returned include those
@@ -1594,8 +1594,8 @@ def list_database_operations(
- The operation's metadata type is ``RestoreDatabaseMetadata``.
- The database is restored from a backup.
- The backup name contains "backup\_howl".
- The restored database's name contains "restored\_howl".
- The backup name contains "backup_howl".
- The restored database's name contains "restored_howl".
- The operation started before 2018-03-28T14:50:00Z.
- The operation resulted in an error.
page_size (int): The maximum number of resources contained in the
@@ -1677,8 +1677,8 @@ def list_backup_operations(
metadata=None,
):
"""
Lists the backup ``long-running operations`` in the given instance. A
backup operation has a name of the form
Lists the backup ``long-running operations`` in the given instance.
A backup operation has a name of the form
``projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>``.
The long-running operation ``metadata`` field type ``metadata.type_url``
describes the type of the metadata. Operations returned include those
@@ -1709,8 +1709,8 @@ def list_backup_operations(
... pass
Args:
parent (str): Required. The instance of the backup operations. Values are of the form
``projects/<project>/instances/<instance>``.
parent (str): Required. The instance of the backup operations. Values are of the
form ``projects/<project>/instances/<instance>``.
filter_ (str): An expression that filters the list of returned backup operations.
A filter expression consists of a field name, a comparison operator, and
@@ -1851,8 +1851,8 @@ def list_databases(
... pass
Args:
parent (str): Required. The instance whose databases should be listed. Values are of
the form ``projects/<project>/instances/<instance>``.
parent (str): Required. The instance whose databases should be listed. Values are
of the form ``projects/<project>/instances/<instance>``.
page_size (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
@@ -63,12 +63,12 @@
"retry_params_name": "default",
},
"GetBackup": {
"timeout_millis": 30000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"UpdateBackup": {
"timeout_millis": 30000,
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
@@ -78,7 +78,7 @@
"retry_params_name": "default",
},
"ListBackups": {
"timeout_millis": 30000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
@@ -88,12 +88,12 @@
"retry_params_name": "default",
},
"ListDatabaseOperations": {
"timeout_millis": 30000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListBackupOperations": {
"timeout_millis": 30000,
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
@@ -39,8 +39,8 @@ class State(enum.IntEnum):
Attributes:
STATE_UNSPECIFIED (int): Not specified.
CREATING (int): The pending backup is still being created. Operations on the backup may
fail with ``FAILED_PRECONDITION`` in this state.
CREATING (int): The pending backup is still being created. Operations on the backup
may fail with ``FAILED_PRECONDITION`` in this state.
READY (int): The backup is complete and ready for use.
"""

@@ -56,8 +56,8 @@ class State(enum.IntEnum):
Attributes:
STATE_UNSPECIFIED (int): Not specified.
CREATING (int): The database is still being created. Operations on the database may fail
with ``FAILED_PRECONDITION`` in this state.
CREATING (int): The database is still being created. Operations on the database may
fail with ``FAILED_PRECONDITION`` in this state.
READY (int): The database is fully created and ready for use.
READY_OPTIMIZING (int): The database is fully created and ready for use, but is still being
optimized for performance and cannot handle full load.
@@ -173,8 +173,8 @@ def update_database_ddl(self):
def drop_database(self):
"""Return the gRPC stub for :meth:`DatabaseAdminClient.drop_database`.
Drops (aka deletes) a Cloud Spanner database. Completed backups for the
database will be retained according to their ``expire_time``.
Drops (aka deletes) a Cloud Spanner database. Completed backups for
the database will be retained according to their ``expire_time``.
Returns:
Callable: A callable which accepts the appropriate
@@ -187,9 +187,9 @@ def drop_database(self):
def get_database_ddl(self):
"""Return the gRPC stub for :meth:`DatabaseAdminClient.get_database_ddl`.
Returns the schema of a Cloud Spanner database as a list of formatted
DDL statements. This method does not show pending schema updates, those
may be queried using the ``Operations`` API.
Returns the schema of a Cloud Spanner database as a list of
formatted DDL statements. This method does not show pending schema
updates, those may be queried using the ``Operations`` API.
Returns:
Callable: A callable which accepts the appropriate
@@ -243,10 +243,10 @@ def test_iam_permissions(self):
backup resource.
Attempting this RPC on a non-existent Cloud Spanner database will result
in a NOT\_FOUND error if the user has ``spanner.databases.list``
in a NOT_FOUND error if the user has ``spanner.databases.list``
permission on the containing Cloud Spanner instance. Otherwise returns
an empty set of permissions. Calling this method on a backup that does
not exist will result in a NOT\_FOUND error if the user has
not exist will result in a NOT_FOUND error if the user has
``spanner.backups.list`` permission on the containing instance.
Returns:
@@ -360,8 +360,8 @@ def restore_database(self):
def list_database_operations(self):
"""Return the gRPC stub for :meth:`DatabaseAdminClient.list_database_operations`.
Lists database ``longrunning-operations``. A database operation has a
name of the form
Lists database ``longrunning-operations``. A database operation has
a name of the form
``projects/<project>/instances/<instance>/databases/<database>/operations/<operation>``.
The long-running operation ``metadata`` field type ``metadata.type_url``
describes the type of the metadata. Operations returned include those
@@ -379,8 +379,8 @@ def list_database_operations(self):
def list_backup_operations(self):
"""Return the gRPC stub for :meth:`DatabaseAdminClient.list_backup_operations`.
Lists the backup ``long-running operations`` in the given instance. A
backup operation has a name of the form
Lists the backup ``long-running operations`` in the given instance.
A backup operation has a name of the form
``projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>``.
The long-running operation ``metadata`` field type ``metadata.type_url``
describes the type of the metadata. Operations returned include those
@@ -54,7 +54,8 @@ class ReplicaType(enum.IntEnum):
- Can vote whether to commit a write.
- Participate in leadership election.
- Are eligible to become a leader.
READ_ONLY (int): Read-only replicas only support reads (not writes). Read-only replicas:
READ_ONLY (int): Read-only replicas only support reads (not writes). Read-only
replicas:
- Maintain a full copy of your data.
- Serve reads.

0 comments on commit f5d74a0

Please sign in to comment.