From d92f1c1f86e4c70856acd00da33e4bf3df863a92 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 12 Mar 2024 07:08:27 +0000 Subject: [PATCH] feat(file): update the api #### file:v1beta1 The following keys were added: - resources.projects.resources.locations.resources.instances.methods.promoteReplica (Total Keys: 12) - schemas.PromoteReplicaRequest (Total Keys: 2) --- .../file_v1.projects.locations.instances.html | 2 +- ..._v1beta1.projects.locations.instances.html | 72 +++++++++++++++---- .../discovery_cache/documents/file.v1.json | 4 +- .../documents/file.v1beta1.json | 52 +++++++++++--- 4 files changed, 105 insertions(+), 25 deletions(-) diff --git a/docs/dyn/file_v1.projects.locations.instances.html b/docs/dyn/file_v1.projects.locations.instances.html index 37a700333f..b1a7bb806f 100644 --- a/docs/dyn/file_v1.projects.locations.instances.html +++ b/docs/dyn/file_v1.projects.locations.instances.html @@ -530,7 +530,7 @@

Method Details

Revert an existing instance's file system to a specified snapshot.
 
 Args:
-  name: string, Required. `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. The resource name of the instance, in the format (required)
+  name: string, Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. (required)
   body: object, The request body.
     The object takes the form of:
 
diff --git a/docs/dyn/file_v1beta1.projects.locations.instances.html b/docs/dyn/file_v1beta1.projects.locations.instances.html
index 507acbfc4e..3de5db2651 100644
--- a/docs/dyn/file_v1beta1.projects.locations.instances.html
+++ b/docs/dyn/file_v1beta1.projects.locations.instances.html
@@ -105,6 +105,9 @@ 

Instance Methods

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates the settings of a specific instance.

+

+ promoteReplica(name, body=None, x__xgafv=None)

+

Promote an standby instance (replica).

restore(name, body=None, x__xgafv=None)

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).

@@ -131,10 +134,10 @@

Method Details

"capacityStepSizeGb": "A String", # Output only. The increase/decrease capacity step size. "createTime": "A String", # Output only. The time when the instance was created. "description": "A String", # The description of the instance (2048 characters or less). - "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". + "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". "managedActiveDirectory": { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory. - "computer": "A String", # The computer name is used as a prefix to the mount remote target. Example: if the computer_name is `my-computer`, the mount command will look like: `$mount -o vers=4,sec=krb5 my-computer.filestore.:`. - "domain": "A String", # Fully qualified domain name. + "computer": "A String", # Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `. + "domain": "A String", # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`. }, }, "etag": "A String", # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. @@ -276,10 +279,10 @@

Method Details

"capacityStepSizeGb": "A String", # Output only. The increase/decrease capacity step size. "createTime": "A String", # Output only. The time when the instance was created. "description": "A String", # The description of the instance (2048 characters or less). - "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". + "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". "managedActiveDirectory": { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory. - "computer": "A String", # The computer name is used as a prefix to the mount remote target. Example: if the computer_name is `my-computer`, the mount command will look like: `$mount -o vers=4,sec=krb5 my-computer.filestore.:`. - "domain": "A String", # Fully qualified domain name. + "computer": "A String", # Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `. + "domain": "A String", # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`. }, }, "etag": "A String", # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. @@ -362,10 +365,10 @@

Method Details

"capacityStepSizeGb": "A String", # Output only. The increase/decrease capacity step size. "createTime": "A String", # Output only. The time when the instance was created. "description": "A String", # The description of the instance (2048 characters or less). - "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". + "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". "managedActiveDirectory": { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory. - "computer": "A String", # The computer name is used as a prefix to the mount remote target. Example: if the computer_name is `my-computer`, the mount command will look like: `$mount -o vers=4,sec=krb5 my-computer.filestore.:`. - "domain": "A String", # Fully qualified domain name. + "computer": "A String", # Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `. + "domain": "A String", # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`. }, }, "etag": "A String", # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. @@ -457,10 +460,10 @@

Method Details

"capacityStepSizeGb": "A String", # Output only. The increase/decrease capacity step size. "createTime": "A String", # Output only. The time when the instance was created. "description": "A String", # The description of the instance (2048 characters or less). - "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". + "directoryServices": { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1". "managedActiveDirectory": { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory. - "computer": "A String", # The computer name is used as a prefix to the mount remote target. Example: if the computer_name is `my-computer`, the mount command will look like: `$mount -o vers=4,sec=krb5 my-computer.filestore.:`. - "domain": "A String", # Fully qualified domain name. + "computer": "A String", # Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `. + "domain": "A String", # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`. }, }, "etag": "A String", # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. @@ -517,7 +520,48 @@

Method Details

"tier": "A String", # The service tier of the instance. } - updateMask: string, Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * "description" * "file_shares" * "labels" + updateMask: string, Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * "description" * "directory_services" * "file_shares" * "labels" + 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, successful response of the operation. 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. + }, +}
+ + +
+ promoteReplica(name, body=None, x__xgafv=None) +
Promote an standby instance (replica).
+
+Args:
+  name: string, Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # PromoteReplicaRequest promotes a Filestore standby instance (replica).
+}
+
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -596,7 +640,7 @@ 

Method Details

Revert an existing instance's file system to a specified snapshot.
 
 Args:
-  name: string, Required. `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. The resource name of the instance, in the format (required)
+  name: string, Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. (required)
   body: object, The request body.
     The object takes the form of:
 
diff --git a/googleapiclient/discovery_cache/documents/file.v1.json b/googleapiclient/discovery_cache/documents/file.v1.json
index e77c632ea1..7ef9a620aa 100644
--- a/googleapiclient/discovery_cache/documents/file.v1.json
+++ b/googleapiclient/discovery_cache/documents/file.v1.json
@@ -557,7 +557,7 @@
 ],
 "parameters": {
 "name": {
-"description": "Required. `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. The resource name of the instance, in the format",
+"description": "Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
 "required": true,
@@ -874,7 +874,7 @@
 }
 }
 },
-"revision": "20240126",
+"revision": "20240304",
 "rootUrl": "https://file.googleapis.com/",
 "schemas": {
 "Backup": {
diff --git a/googleapiclient/discovery_cache/documents/file.v1beta1.json b/googleapiclient/discovery_cache/documents/file.v1beta1.json
index 93ad5fe2a5..f644a6b1c9 100644
--- a/googleapiclient/discovery_cache/documents/file.v1beta1.json
+++ b/googleapiclient/discovery_cache/documents/file.v1beta1.json
@@ -502,7 +502,7 @@
 "type": "string"
 },
 "updateMask": {
-"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"file_shares\" * \"labels\"",
+"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"directory_services\" * \"file_shares\" * \"labels\"",
 "format": "google-fieldmask",
 "location": "query",
 "type": "string"
@@ -519,6 +519,34 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"promoteReplica": {
+"description": "Promote an standby instance (replica).",
+"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:promoteReplica",
+"httpMethod": "POST",
+"id": "file.projects.locations.instances.promoteReplica",
+"parameterOrder": [
+"name"
+],
+"parameters": {
+"name": {
+"description": "Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1beta1/{+name}:promoteReplica",
+"request": {
+"$ref": "PromoteReplicaRequest"
+},
+"response": {
+"$ref": "Operation"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "restore": {
 "description": "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).",
 "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:restore",
@@ -557,7 +585,7 @@
 ],
 "parameters": {
 "name": {
-"description": "Required. `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. The resource name of the instance, in the format",
+"description": "Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
 "required": true,
@@ -1041,7 +1069,7 @@
 }
 }
 },
-"revision": "20240126",
+"revision": "20240304",
 "rootUrl": "https://file.googleapis.com/",
 "schemas": {
 "Backup": {
@@ -1570,7 +1598,7 @@
 },
 "directoryServices": {
 "$ref": "DirectoryServicesConfig",
-"description": "Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is \"NFS_V4_1\"."
+"description": "Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is \"NFS_V4_1\"."
 },
 "etag": {
 "description": "Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.",
@@ -1658,7 +1686,8 @@
 "SUSPENDED",
 "REVERTING",
 "SUSPENDING",
-"RESUMING"
+"RESUMING",
+"PROMOTING"
 ],
 "enumDescriptions": [
 "State not set.",
@@ -1671,7 +1700,8 @@
 "The instance is suspended. You can get further details from the `suspension_reasons` field of the `Instance` resource.",
 "The instance is reverting to a snapshot.",
 "The instance is in the process of becoming suspended.",
-"The instance is in the process of becoming active."
+"The instance is in the process of becoming active.",
+"The replica instance is being promoted."
 ],
 "readOnly": true,
 "type": "string"
@@ -1959,11 +1989,11 @@
 "id": "ManagedActiveDirectoryConfig",
 "properties": {
 "computer": {
-"description": "The computer name is used as a prefix to the mount remote target. Example: if the computer_name is `my-computer`, the mount command will look like: `$mount -o vers=4,sec=krb5 my-computer.filestore.:`.",
+"description": "Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `.",
 "type": "string"
 },
 "domain": {
-"description": "Fully qualified domain name.",
+"description": "Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`.",
 "type": "string"
 }
 },
@@ -2173,6 +2203,12 @@
 },
 "type": "object"
 },
+"PromoteReplicaRequest": {
+"description": "PromoteReplicaRequest promotes a Filestore standby instance (replica).",
+"id": "PromoteReplicaRequest",
+"properties": {},
+"type": "object"
+},
 "RestoreInstanceRequest": {
 "description": "RestoreInstanceRequest restores an existing instance's file share from a backup.",
 "id": "RestoreInstanceRequest",