Skip to content

Commit

Permalink
feat: Added REGIONAL tier support in the v1 API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 582440290
  • Loading branch information
Google APIs authored and Copybara-Service committed Nov 14, 2023
1 parent 49c44ef commit d30f933
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 17 deletions.
1 change: 1 addition & 0 deletions google/cloud/filestore/v1/BUILD.bazel
Expand Up @@ -144,6 +144,7 @@ go_gapic_library(
deps = [
":filestore_go_proto",
"//google/cloud/common:common_go_proto",
"//google/cloud/location:location_go_proto",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go_longrunning//:go_default_library",
"@com_google_cloud_go_longrunning//autogen:go_default_library",
Expand Down
56 changes: 55 additions & 1 deletion google/cloud/filestore/v1/cloud_filestore_service.proto
Expand Up @@ -123,6 +123,19 @@ service CloudFilestoreManager {
};
}

// Revert an existing instance's file system to a specified snapshot.
rpc RevertInstance(RevertInstanceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/instances/*}:revert"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "Instance"
metadata_type: "google.cloud.common.OperationMetadata"
};
}

// Deletes an instance.
rpc DeleteInstance(DeleteInstanceRequest)
returns (google.longrunning.Operation) {
Expand Down Expand Up @@ -317,7 +330,10 @@ message NetworkConfig {

// File share configuration for the instance.
message FileShareConfig {
// The name of the file share (must be 16 characters or less).
// Required. The name of the file share. Must use 1-16 characters for the
// basic service tier and 1-63 characters for all other service tiers.
// Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must
// start with a letter. Immutable.
string name = 1;

// File share capacity in gigabytes (GB).
Expand Down Expand Up @@ -442,6 +458,9 @@ message Instance {

// The instance is in the process of becoming active.
RESUMING = 10;

// The instance is reverting to a snapshot.
REVERTING = 12;
}

// Available service tiers.
Expand Down Expand Up @@ -472,6 +491,14 @@ message Instance {
// ENTERPRISE instances offer the features and availability needed for
// mission-critical workloads.
ENTERPRISE = 6;

// ZONAL instances offer expanded capacity and performance scaling
// capabilities.
ZONAL = 7;

// REGIONAL instances offer the features and availability needed for
// mission-critical workloads.
REGIONAL = 8;
}

// SuspensionReason contains the possible reasons for a suspension.
Expand Down Expand Up @@ -522,6 +549,9 @@ message Instance {
google.protobuf.BoolValue satisfies_pzs = 13
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Reserved for future use.
bool satisfies_pzi = 18 [(google.api.field_behavior) = OUTPUT_ONLY];

// KMS key name used for data encryption.
string kms_key_name = 14;

Expand Down Expand Up @@ -599,6 +629,23 @@ message RestoreInstanceRequest {
}
}

// RevertInstanceRequest reverts the given instance's file share to the
// specified snapshot.
message RevertInstanceRequest {
// Required.
// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
// The resource name of the instance, in the format
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
];

// 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}`
string target_snapshot_id = 2 [(google.api.field_behavior) = REQUIRED];
}

// DeleteInstanceRequest deletes an instance.
message DeleteInstanceRequest {
// Required. The instance resource name, in the format
Expand Down Expand Up @@ -814,6 +861,10 @@ message Backup {

// Backup is being deleted.
DELETING = 4;

// Backup is not valid and cannot be used for creating new instances or
// restoring existing instances.
INVALID = 5;
}

// Output only. The resource name of the backup, in the format
Expand Down Expand Up @@ -866,6 +917,9 @@ message Backup {
google.protobuf.BoolValue satisfies_pzs = 12
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Reserved for future use.
bool satisfies_pzi = 14 [(google.api.field_behavior) = OUTPUT_ONLY];

// Immutable. KMS key name used for data encryption.
string kms_key = 13 [(google.api.field_behavior) = IMMUTABLE];
}
Expand Down
18 changes: 2 additions & 16 deletions google/cloud/filestore/v1/file_v1.yaml
Expand Up @@ -5,6 +5,8 @@ title: Cloud Filestore API

apis:
- name: google.cloud.filestore.v1.CloudFilestoreManager
- name: google.cloud.location.Locations
- name: google.longrunning.Operations

documentation:
summary: |-
Expand All @@ -17,22 +19,6 @@ documentation:
- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.

- selector: google.longrunning.Operations.ListOperations
description: |-
Lists operations that match the specified filter in the request. If
the server doesn't support this method, it returns `UNIMPLEMENTED`.
backend:
rules:
- selector: 'google.cloud.filestore.v1.CloudFilestoreManager.*'
deadline: 60.0
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.longrunning.Operations.*'
deadline: 60.0

http:
rules:
- selector: google.cloud.location.Locations.GetLocation
Expand Down

0 comments on commit d30f933

Please sign in to comment.