Skip to content

Commit

Permalink
feat(file): update the api
Browse files Browse the repository at this point in the history
#### file:v1beta1

The following keys were added:
- resources.projects.resources.locations.resources.instances.methods.promoteReplica (Total Keys: 12)
- schemas.PromoteReplicaRequest (Total Keys: 2)
  • Loading branch information
yoshi-automation committed Mar 12, 2024
1 parent 3e175d8 commit d92f1c1
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/dyn/file_v1.projects.locations.instances.html
Expand Up @@ -530,7 +530,7 @@ <h3>Method Details</h3>
<pre>Revert an existing instance&#x27;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:

Expand Down
72 changes: 58 additions & 14 deletions docs/dyn/file_v1beta1.projects.locations.instances.html
Expand Up @@ -105,6 +105,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates the settings of a specific instance.</p>
<p class="toc_element">
<code><a href="#promoteReplica">promoteReplica(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Promote an standby instance (replica).</p>
<p class="toc_element">
<code><a href="#restore">restore(name, body=None, x__xgafv=None)</a></code></p>
<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>
Expand All @@ -131,10 +134,10 @@ <h3>Method Details</h3>
&quot;capacityStepSizeGb&quot;: &quot;A String&quot;, # Output only. The increase/decrease capacity step size.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created.
&quot;description&quot;: &quot;A String&quot;, # The description of the instance (2048 characters or less).
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;managedActiveDirectory&quot;: { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory.
&quot;computer&quot;: &quot;A String&quot;, # 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.:`.
&quot;domain&quot;: &quot;A String&quot;, # Fully qualified domain name.
&quot;computer&quot;: &quot;A String&quot;, # 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.: `.
&quot;domain&quot;: &quot;A String&quot;, # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`.
},
},
&quot;etag&quot;: &quot;A String&quot;, # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.
Expand Down Expand Up @@ -276,10 +279,10 @@ <h3>Method Details</h3>
&quot;capacityStepSizeGb&quot;: &quot;A String&quot;, # Output only. The increase/decrease capacity step size.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created.
&quot;description&quot;: &quot;A String&quot;, # The description of the instance (2048 characters or less).
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;managedActiveDirectory&quot;: { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory.
&quot;computer&quot;: &quot;A String&quot;, # 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.:`.
&quot;domain&quot;: &quot;A String&quot;, # Fully qualified domain name.
&quot;computer&quot;: &quot;A String&quot;, # 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.: `.
&quot;domain&quot;: &quot;A String&quot;, # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`.
},
},
&quot;etag&quot;: &quot;A String&quot;, # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.
Expand Down Expand Up @@ -362,10 +365,10 @@ <h3>Method Details</h3>
&quot;capacityStepSizeGb&quot;: &quot;A String&quot;, # Output only. The increase/decrease capacity step size.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created.
&quot;description&quot;: &quot;A String&quot;, # The description of the instance (2048 characters or less).
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;managedActiveDirectory&quot;: { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory.
&quot;computer&quot;: &quot;A String&quot;, # 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.:`.
&quot;domain&quot;: &quot;A String&quot;, # Fully qualified domain name.
&quot;computer&quot;: &quot;A String&quot;, # 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.: `.
&quot;domain&quot;: &quot;A String&quot;, # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`.
},
},
&quot;etag&quot;: &quot;A String&quot;, # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.
Expand Down Expand Up @@ -457,10 +460,10 @@ <h3>Method Details</h3>
&quot;capacityStepSizeGb&quot;: &quot;A String&quot;, # Output only. The increase/decrease capacity step size.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the instance was created.
&quot;description&quot;: &quot;A String&quot;, # The description of the instance (2048 characters or less).
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;directoryServices&quot;: { # Directory Services configuration for Kerberos-based authentication. # Optional. Directory Services configuration for Kerberos-based authentication. Should only be set if protocol is &quot;NFS_V4_1&quot;.
&quot;managedActiveDirectory&quot;: { # ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory. # Configuration for Managed Service for Microsoft Active Directory.
&quot;computer&quot;: &quot;A String&quot;, # 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.:`.
&quot;domain&quot;: &quot;A String&quot;, # Fully qualified domain name.
&quot;computer&quot;: &quot;A String&quot;, # 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.: `.
&quot;domain&quot;: &quot;A String&quot;, # Required. The domain resource name, in the format `projects/{project_id}/locations/global/domains/{domain}`.
},
},
&quot;etag&quot;: &quot;A String&quot;, # Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.
Expand Down Expand Up @@ -517,7 +520,48 @@ <h3>Method Details</h3>
&quot;tier&quot;: &quot;A String&quot;, # 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: * &quot;description&quot; * &quot;file_shares&quot; * &quot;labels&quot;
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: * &quot;description&quot; * &quot;directory_services&quot; * &quot;file_shares&quot; * &quot;labels&quot;
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.
&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.
&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.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&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.
},
&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.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&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}`.
&quot;response&quot;: { # 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`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="promoteReplica">promoteReplica(name, body=None, x__xgafv=None)</code>
<pre>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
Expand Down Expand Up @@ -596,7 +640,7 @@ <h3>Method Details</h3>
<pre>Revert an existing instance&#x27;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:

Expand Down
4 changes: 2 additions & 2 deletions googleapiclient/discovery_cache/documents/file.v1.json
Expand Up @@ -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,
Expand Down Expand Up @@ -874,7 +874,7 @@
}
}
},
"revision": "20240126",
"revision": "20240304",
"rootUrl": "https://file.googleapis.com/",
"schemas": {
"Backup": {
Expand Down
52 changes: 44 additions & 8 deletions googleapiclient/discovery_cache/documents/file.v1beta1.json
Expand Up @@ -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"
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1041,7 +1069,7 @@
}
}
},
"revision": "20240126",
"revision": "20240304",
"rootUrl": "https://file.googleapis.com/",
"schemas": {
"Backup": {
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -1658,7 +1686,8 @@
"SUSPENDED",
"REVERTING",
"SUSPENDING",
"RESUMING"
"RESUMING",
"PROMOTING"
],
"enumDescriptions": [
"State not set.",
Expand All @@ -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"
Expand Down Expand Up @@ -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"
}
},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit d92f1c1

Please sign in to comment.