From 4b424cf2d71fa9d77702efe543ba28ec31e30a49 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 25 Oct 2022 07:24:21 +0000 Subject: [PATCH] feat(bigtableadmin): update the api #### bigtableadmin:v2 The following keys were added: - resources.projects.resources.instances.resources.clusters.resources.backups.methods.copy (Total Keys: 12) - schemas.Backup.properties.sourceBackup (Total Keys: 2) - schemas.BackupInfo.properties.sourceBackup (Total Keys: 2) - schemas.CopyBackupMetadata (Total Keys: 5) - schemas.CopyBackupRequest (Total Keys: 6) --- ...2.projects.instances.clusters.backups.html | 52 ++++++++++++ ...bleadmin_v2.projects.instances.tables.html | 5 ++ .../documents/bigtableadmin.v2.json | 83 ++++++++++++++++++- 3 files changed, 139 insertions(+), 1 deletion(-) diff --git a/docs/dyn/bigtableadmin_v2.projects.instances.clusters.backups.html b/docs/dyn/bigtableadmin_v2.projects.instances.clusters.backups.html index d9fefdfab84..0c29dfc1e4c 100644 --- a/docs/dyn/bigtableadmin_v2.projects.instances.clusters.backups.html +++ b/docs/dyn/bigtableadmin_v2.projects.instances.clusters.backups.html @@ -77,6 +77,9 @@

Instance Methods

close()

Close httplib2 connections.

+

+ copy(parent, body=None, x__xgafv=None)

+

Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.

create(parent, backupId=None, body=None, x__xgafv=None)

Starts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup.

@@ -110,6 +113,50 @@

Method Details

Close httplib2 connections.
+
+ copy(parent, body=None, x__xgafv=None) +
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.
+
+Args:
+  parent: string, Required. The name of the destination cluster that will contain the backup copy. The cluster must already exists. Values are of the form: `projects/{project}/instances/{instance}/clusters/{cluster}`. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # The request for CopyBackup.
+  "backupId": "A String", # Required. The id of the new backup. The `backup_id` along with `parent` are combined as {parent}/backups/{backup_id} to create the full backup name, of the form: `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This string must be between 1 and 50 characters in length and match the regex _a-zA-Z0-9*.
+  "expireTime": "A String", # Required. Required. The expiration time of the copied backup with microsecond granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup.
+  "sourceBackup": "A String", # Required. The source backup to be copied from. The source backup needs to be in READY state for it to be copied. Copying a copied backup is not allowed. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//clusters//backups/`.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # This resource represents a long-running operation that is the result of a network API call.
+  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
+  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
+    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
+    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
+      {
+        "a_key": "", # Properties of the object. Contains field @type with type URL.
+      },
+    ],
+    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
+  },
+  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
+  "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+}
+
+
create(parent, backupId=None, body=None, x__xgafv=None)
Starts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup.
@@ -137,6 +184,7 @@ 

Method Details

"expireTime": "A String", # Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. "name": "A String", # A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. "sizeBytes": "A String", # Output only. Size of the backup in bytes. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. "startTime": "A String", # Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. "state": "A String", # Output only. The current state of the backup. @@ -222,6 +270,7 @@

Method Details

"expireTime": "A String", # Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. "name": "A String", # A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. "sizeBytes": "A String", # Output only. Size of the backup in bytes. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. "startTime": "A String", # Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. "state": "A String", # Output only. The current state of the backup. @@ -322,6 +371,7 @@

Method Details

"expireTime": "A String", # Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. "name": "A String", # A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. "sizeBytes": "A String", # Output only. Size of the backup in bytes. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. "startTime": "A String", # Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. "state": "A String", # Output only. The current state of the backup. @@ -372,6 +422,7 @@

Method Details

"expireTime": "A String", # Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. "name": "A String", # A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. "sizeBytes": "A String", # Output only. Size of the backup in bytes. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. "startTime": "A String", # Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. "state": "A String", # Output only. The current state of the backup. @@ -404,6 +455,7 @@

Method Details

"expireTime": "A String", # Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup. "name": "A String", # A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. "sizeBytes": "A String", # Output only. Size of the backup in bytes. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`. "startTime": "A String", # Output only. `start_time` is the time that the backup was started (i.e. approximately the time the CreateBackup request is received). The row data in this backup will be no older than this timestamp. "state": "A String", # Output only. The current state of the backup. diff --git a/docs/dyn/bigtableadmin_v2.projects.instances.tables.html b/docs/dyn/bigtableadmin_v2.projects.instances.tables.html index 339be6db05c..9e4e3159808 100644 --- a/docs/dyn/bigtableadmin_v2.projects.instances.tables.html +++ b/docs/dyn/bigtableadmin_v2.projects.instances.tables.html @@ -211,6 +211,7 @@

Method Details

"backupInfo": { # Information about a backup. # Information about the backup used to restore the table. The backup may no longer exist. "backup": "A String", # Output only. Name of the backup. "endTime": "A String", # Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Output only. Name of the table the backup was created from. "startTime": "A String", # Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. }, @@ -273,6 +274,7 @@

Method Details

"backupInfo": { # Information about a backup. # Information about the backup used to restore the table. The backup may no longer exist. "backup": "A String", # Output only. Name of the backup. "endTime": "A String", # Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Output only. Name of the table the backup was created from. "startTime": "A String", # Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. }, @@ -417,6 +419,7 @@

Method Details

"backupInfo": { # Information about a backup. # Information about the backup used to restore the table. The backup may no longer exist. "backup": "A String", # Output only. Name of the backup. "endTime": "A String", # Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Output only. Name of the table the backup was created from. "startTime": "A String", # Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. }, @@ -553,6 +556,7 @@

Method Details

"backupInfo": { # Information about a backup. # Information about the backup used to restore the table. The backup may no longer exist. "backup": "A String", # Output only. Name of the backup. "endTime": "A String", # Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Output only. Name of the table the backup was created from. "startTime": "A String", # Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. }, @@ -680,6 +684,7 @@

Method Details

"backupInfo": { # Information about a backup. # Information about the backup used to restore the table. The backup may no longer exist. "backup": "A String", # Output only. Name of the backup. "endTime": "A String", # Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. + "sourceBackup": "A String", # Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/. "sourceTable": "A String", # Output only. Name of the table the backup was created from. "startTime": "A String", # Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. }, diff --git a/googleapiclient/discovery_cache/documents/bigtableadmin.v2.json b/googleapiclient/discovery_cache/documents/bigtableadmin.v2.json index c5bc1128d1b..f5ba794e8a1 100644 --- a/googleapiclient/discovery_cache/documents/bigtableadmin.v2.json +++ b/googleapiclient/discovery_cache/documents/bigtableadmin.v2.json @@ -999,6 +999,38 @@ "resources": { "backups": { "methods": { + "copy": { + "description": "Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", + "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}/backups:copy", + "httpMethod": "POST", + "id": "bigtableadmin.projects.instances.clusters.backups.copy", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the destination cluster that will contain the backup copy. The cluster must already exists. Values are of the form: `projects/{project}/instances/{instance}/clusters/{cluster}`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/backups:copy", + "request": { + "$ref": "CopyBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigtable.admin", + "https://www.googleapis.com/auth/bigtable.admin.table", + "https://www.googleapis.com/auth/cloud-bigtable.admin", + "https://www.googleapis.com/auth/cloud-bigtable.admin.table", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Starts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup.", "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}/backups", @@ -1892,7 +1924,7 @@ } } }, - "revision": "20220926", + "revision": "20221018", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2034,6 +2066,11 @@ "readOnly": true, "type": "string" }, + "sourceBackup": { + "description": "Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/.", + "readOnly": true, + "type": "string" + }, "sourceTable": { "description": "Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`.", "type": "string" @@ -2077,6 +2114,11 @@ "readOnly": true, "type": "string" }, + "sourceBackup": { + "description": "Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/.", + "readOnly": true, + "type": "string" + }, "sourceTable": { "description": "Output only. Name of the table the backup was created from.", "readOnly": true, @@ -2269,6 +2311,45 @@ }, "type": "object" }, + "CopyBackupMetadata": { + "description": "Metadata type for the google.longrunning.Operation returned by CopyBackup.", + "id": "CopyBackupMetadata", + "properties": { + "name": { + "description": "The name of the backup being created through the copy operation. Values are of the form `projects//instances//clusters//backups/`.", + "type": "string" + }, + "progress": { + "$ref": "OperationProgress", + "description": "The progress of the CopyBackup operation." + }, + "sourceBackupInfo": { + "$ref": "BackupInfo", + "description": "Information about the source backup that is being copied from." + } + }, + "type": "object" + }, + "CopyBackupRequest": { + "description": "The request for CopyBackup.", + "id": "CopyBackupRequest", + "properties": { + "backupId": { + "description": "Required. The id of the new backup. The `backup_id` along with `parent` are combined as {parent}/backups/{backup_id} to create the full backup name, of the form: `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This string must be between 1 and 50 characters in length and match the regex _a-zA-Z0-9*.", + "type": "string" + }, + "expireTime": { + "description": "Required. Required. The expiration time of the copied backup with microsecond granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup.", + "format": "google-datetime", + "type": "string" + }, + "sourceBackup": { + "description": "Required. The source backup to be copied from. The source backup needs to be in READY state for it to be copied. Copying a copied backup is not allowed. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//clusters//backups/`.", + "type": "string" + } + }, + "type": "object" + }, "CreateBackupMetadata": { "description": "Metadata type for the operation returned by CreateBackup.", "id": "CreateBackupMetadata",