Skip to content

Commit 3508025

Browse files
feat(file): update the api
#### file:v1beta1 The following keys were added: - resources.projects.resources.locations.resources.instances.methods.revert (Total Keys: 12) - schemas.RevertInstanceRequest (Total Keys: 3)
1 parent b937f67 commit 3508025

File tree

4 files changed

+94
-8
lines changed

4 files changed

+94
-8
lines changed

docs/dyn/file_v1.projects.locations.instances.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ <h3>Method Details</h3>
458458
body: object, The request body.
459459
The object takes the form of:
460460

461-
{ # RestoreInstanceRequest restores an existing instances&#x27;s file share from a backup.
461+
{ # RestoreInstanceRequest restores an existing instance&#x27;s file share from a backup.
462462
&quot;fileShare&quot;: &quot;A String&quot;, # Required. Name of the file share in the Cloud Filestore instance that the backup is being restored to.
463463
&quot;sourceBackup&quot;: &quot;A String&quot;, # The resource name of the backup, in the format `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
464464
}

docs/dyn/file_v1beta1.projects.locations.instances.html

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ <h2>Instance Methods</h2>
103103
<p class="toc_element">
104104
<code><a href="#restore">restore(name, body=None, x__xgafv=None)</a></code></p>
105105
<p class="firstline">Restores an existing instance's file share from a backup. The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).</p>
106+
<p class="toc_element">
107+
<code><a href="#revert">revert(name, body=None, x__xgafv=None)</a></code></p>
108+
<p class="firstline">Revert an existing instance's file system to a specified snapshot.</p>
106109
<h3>Method Details</h3>
107110
<div class="method">
108111
<code class="details" id="close">close()</code>
@@ -484,7 +487,7 @@ <h3>Method Details</h3>
484487
body: object, The request body.
485488
The object takes the form of:
486489

487-
{ # RestoreInstanceRequest restores an existing instances&#x27;s file share from a snapshot or backup.
490+
{ # RestoreInstanceRequest restores an existing instance&#x27;s file share from a snapshot or backup.
488491
&quot;fileShare&quot;: &quot;A String&quot;, # Required. Name of the file share in the Cloud Filestore instance that the snapshot is being restored to.
489492
&quot;sourceBackup&quot;: &quot;A String&quot;, # The resource name of the backup, in the format `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
490493
&quot;sourceSnapshot&quot;: &quot;A String&quot;, # The resource name of the snapshot, in the format `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
@@ -519,4 +522,46 @@ <h3>Method Details</h3>
519522
}</pre>
520523
</div>
521524

525+
<div class="method">
526+
<code class="details" id="revert">revert(name, body=None, x__xgafv=None)</code>
527+
<pre>Revert an existing instance&#x27;s file system to a specified snapshot.
528+
529+
Args:
530+
name: string, Required. projects/{project_id}/locations/{location_id}/instances/{instance_id}. The resource name of the instance, in the format (required)
531+
body: object, The request body.
532+
The object takes the form of:
533+
534+
{ # RevertInstanceRequest reverts the given instance&#x27;s file share to the specified snapshot.
535+
&quot;targetSnapshotId&quot;: &quot;A String&quot;, # Required. The snapshot resource ID, in the format &#x27;my-snapshot&#x27;, where the specified ID is the {snapshot_id} of the fully qualified name like projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
536+
}
537+
538+
x__xgafv: string, V1 error format.
539+
Allowed values
540+
1 - v1 error format
541+
2 - v2 error format
542+
543+
Returns:
544+
An object of the form:
545+
546+
{ # This resource represents a long-running operation that is the result of a network API call.
547+
&quot;done&quot;: 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.
548+
&quot;error&quot;: { # 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.
549+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
550+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
551+
{
552+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
553+
},
554+
],
555+
&quot;message&quot;: &quot;A String&quot;, # 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.
556+
},
557+
&quot;metadata&quot;: { # 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.
558+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
559+
},
560+
&quot;name&quot;: &quot;A String&quot;, # 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}`.
561+
&quot;response&quot;: { # 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`.
562+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
563+
},
564+
}</pre>
565+
</div>
566+
522567
</body></html>

googleapiclient/discovery_cache/documents/file.v1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@
672672
}
673673
}
674674
},
675-
"revision": "20210924",
675+
"revision": "20211017",
676676
"rootUrl": "https://file.googleapis.com/",
677677
"schemas": {
678678
"Backup": {
@@ -1574,7 +1574,7 @@
15741574
"type": "object"
15751575
},
15761576
"RestoreInstanceRequest": {
1577-
"description": "RestoreInstanceRequest restores an existing instances's file share from a backup.",
1577+
"description": "RestoreInstanceRequest restores an existing instance's file share from a backup.",
15781578
"id": "RestoreInstanceRequest",
15791579
"properties": {
15801580
"fileShare": {

googleapiclient/discovery_cache/documents/file.v1beta1.json

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,34 @@
546546
"scopes": [
547547
"https://www.googleapis.com/auth/cloud-platform"
548548
]
549+
},
550+
"revert": {
551+
"description": "Revert an existing instance's file system to a specified snapshot.",
552+
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:revert",
553+
"httpMethod": "POST",
554+
"id": "file.projects.locations.instances.revert",
555+
"parameterOrder": [
556+
"name"
557+
],
558+
"parameters": {
559+
"name": {
560+
"description": "Required. projects/{project_id}/locations/{location_id}/instances/{instance_id}. The resource name of the instance, in the format",
561+
"location": "path",
562+
"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
563+
"required": true,
564+
"type": "string"
565+
}
566+
},
567+
"path": "v1beta1/{+name}:revert",
568+
"request": {
569+
"$ref": "RevertInstanceRequest"
570+
},
571+
"response": {
572+
"$ref": "Operation"
573+
},
574+
"scopes": [
575+
"https://www.googleapis.com/auth/cloud-platform"
576+
]
549577
}
550578
},
551579
"resources": {
@@ -846,7 +874,7 @@
846874
}
847875
}
848876
},
849-
"revision": "20210924",
877+
"revision": "20211017",
850878
"rootUrl": "https://file.googleapis.com/",
851879
"schemas": {
852880
"Backup": {
@@ -1358,7 +1386,8 @@
13581386
"DELETING",
13591387
"ERROR",
13601388
"RESTORING",
1361-
"SUSPENDED"
1389+
"SUSPENDED",
1390+
"REVERTING"
13621391
],
13631392
"enumDescriptions": [
13641393
"State not set.",
@@ -1368,7 +1397,8 @@
13681397
"The instance is shutting down.",
13691398
"The instance is experiencing an issue and might be unusable. You can get further details from the `statusMessage` field of the `Instance` resource.",
13701399
"The instance is restoring a snapshot or backup to an existing file share and may be unusable during this time.",
1371-
"The instance is suspended. You can get further details from the `suspension_reasons` field of the `Instance` resource."
1400+
"The instance is suspended. You can get further details from the `suspension_reasons` field of the `Instance` resource.",
1401+
"The instance is reverting to a snapshot."
13721402
],
13731403
"readOnly": true,
13741404
"type": "string"
@@ -1806,7 +1836,7 @@
18061836
"type": "object"
18071837
},
18081838
"RestoreInstanceRequest": {
1809-
"description": "RestoreInstanceRequest restores an existing instances's file share from a snapshot or backup.",
1839+
"description": "RestoreInstanceRequest restores an existing instance's file share from a snapshot or backup.",
18101840
"id": "RestoreInstanceRequest",
18111841
"properties": {
18121842
"fileShare": {
@@ -1824,6 +1854,17 @@
18241854
},
18251855
"type": "object"
18261856
},
1857+
"RevertInstanceRequest": {
1858+
"description": "RevertInstanceRequest reverts the given instance's file share to the specified snapshot.",
1859+
"id": "RevertInstanceRequest",
1860+
"properties": {
1861+
"targetSnapshotId": {
1862+
"description": "Required. The snapshot resource ID, in the format 'my-snapshot', where the specified ID is the {snapshot_id} of the fully qualified name like projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}",
1863+
"type": "string"
1864+
}
1865+
},
1866+
"type": "object"
1867+
},
18271868
"Schedule": {
18281869
"description": "Configure the schedule.",
18291870
"id": "Schedule",

0 commit comments

Comments
 (0)