diff --git a/google/cloud/netapp/v1/BUILD.bazel b/google/cloud/netapp/v1/BUILD.bazel new file mode 100644 index 0000000000..da73d50e40 --- /dev/null +++ b/google/cloud/netapp/v1/BUILD.bazel @@ -0,0 +1,388 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/rules_gapic/tree/master/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "netapp_proto", + srcs = [ + "active_directory.proto", + "cloud_netapp_service.proto", + "common.proto", + "kms.proto", + "replication.proto", + "snapshot.proto", + "storage_pool.proto", + "volume.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "netapp_proto_with_info", + deps = [ + ":netapp_proto", + "//google/cloud:common_resources_proto", + "//google/cloud/location:location_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "netapp_java_proto", + deps = [":netapp_proto"], +) + +java_grpc_library( + name = "netapp_java_grpc", + srcs = [":netapp_proto"], + deps = [":netapp_java_proto"], +) + +java_gapic_library( + name = "netapp_java_gapic", + srcs = [":netapp_proto_with_info"], + gapic_yaml = None, + grpc_service_config = "netapp_v1_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + test_deps = [ + "//google/cloud/location:location_java_grpc", + ":netapp_java_grpc", + ], + transport = "grpc+rest", + deps = [ + ":netapp_java_proto", + "//google/api:api_java_proto", + "//google/cloud/location:location_java_proto", + ], +) + +java_gapic_test( + name = "netapp_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.netapp.v1.NetAppClientHttpJsonTest", + "com.google.cloud.netapp.v1.NetAppClientTest", + ], + runtime_deps = [":netapp_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-netapp-v1-java", + include_samples = True, + transport = "grpc+rest", + deps = [ + ":netapp_java_gapic", + ":netapp_java_grpc", + ":netapp_java_proto", + ":netapp_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", +) + +go_proto_library( + name = "netapp_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "cloud.google.com/go/netapp/apiv1/netapppb", + protos = [":netapp_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + ], +) + +go_gapic_library( + name = "netapp_go_gapic", + srcs = [":netapp_proto_with_info"], + grpc_service_config = "netapp_v1_grpc_service_config.json", + importpath = "cloud.google.com/go/netapp/apiv1;netapp", + metadata = True, + release_level = "beta", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + transport = "grpc+rest", + deps = [ + ":netapp_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", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-netapp-v1-go", + deps = [ + ":netapp_go_gapic", + ":netapp_go_gapic_srcjar-metadata.srcjar", + ":netapp_go_gapic_srcjar-snippets.srcjar", + ":netapp_go_gapic_srcjar-test.srcjar", + ":netapp_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_test", +) + +py_gapic_library( + name = "netapp_py_gapic", + srcs = [":netapp_proto"], + grpc_service_config = "netapp_v1_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + transport = "grpc+rest", + deps = [ + ], +) + +py_test( + name = "netapp_py_gapic_test", + srcs = [ + "netapp_py_gapic_pytest.py", + "netapp_py_gapic_test.py", + ], + legacy_create_init = False, + deps = [":netapp_py_gapic"], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "netapp-v1-py", + deps = [ + ":netapp_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_proto_library", +) + +php_proto_library( + name = "netapp_php_proto", + deps = [":netapp_proto"], +) + +php_gapic_library( + name = "netapp_php_gapic", + srcs = [":netapp_proto_with_info"], + grpc_service_config = "netapp_v1_grpc_service_config.json", + migration_mode = "NEW_SURFACE_ONLY", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + transport = "grpc+rest", + deps = [ + ":netapp_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-netapp-v1-php", + deps = [ + ":netapp_php_gapic", + ":netapp_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "netapp_nodejs_gapic", + package_name = "@google-cloud/netapp", + src = ":netapp_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "netapp_v1_grpc_service_config.json", + package = "google.cloud.netapp.v1", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + transport = "grpc+rest", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "netapp-v1-nodejs", + deps = [ + ":netapp_nodejs_gapic", + ":netapp_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "netapp_ruby_proto", + deps = [":netapp_proto"], +) + +ruby_grpc_library( + name = "netapp_ruby_grpc", + srcs = [":netapp_proto"], + deps = [":netapp_ruby_proto"], +) + +ruby_cloud_gapic_library( + name = "netapp_ruby_gapic", + srcs = [":netapp_proto_with_info"], + extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-netapp-v1"], + grpc_service_config = "netapp_v1_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + transport = "grpc+rest", + deps = [ + ":netapp_ruby_grpc", + ":netapp_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-netapp-v1-ruby", + deps = [ + ":netapp_ruby_gapic", + ":netapp_ruby_grpc", + ":netapp_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "netapp_csharp_proto", + deps = [":netapp_proto"], +) + +csharp_grpc_library( + name = "netapp_csharp_grpc", + srcs = [":netapp_proto"], + deps = [":netapp_csharp_proto"], +) + +csharp_gapic_library( + name = "netapp_csharp_gapic", + srcs = [":netapp_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "netapp_v1_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "netapp_v1.yaml", + deps = [ + ":netapp_csharp_grpc", + ":netapp_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-netapp-v1-csharp", + deps = [ + ":netapp_csharp_gapic", + ":netapp_csharp_grpc", + ":netapp_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "netapp_cc_proto", + deps = [":netapp_proto"], +) + +cc_grpc_library( + name = "netapp_cc_grpc", + srcs = [":netapp_proto"], + grpc_only = True, + deps = [":netapp_cc_proto"], +) diff --git a/google/cloud/netapp/v1/active_directory.proto b/google/cloud/netapp/v1/active_directory.proto new file mode 100644 index 0000000000..79293e524f --- /dev/null +++ b/google/cloud/netapp/v1/active_directory.proto @@ -0,0 +1,223 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ActiveDirectoryProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListActiveDirectoriesRequest for requesting multiple active directories. +message ListActiveDirectoriesRequest { + // Required. Parent value for ListActiveDirectoriesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// ListActiveDirectoriesResponse contains all the active directories requested. +message ListActiveDirectoriesResponse { + // The list of active directories. + repeated ActiveDirectory active_directories = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetActiveDirectory for getting a single active directory. +message GetActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// CreateActiveDirectoryRequest for creating an active directory. +message CreateActiveDirectoryRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Required. Fields of the to be created active directory. + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the active directory to create. + string active_directory_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateActiveDirectoryRequest for updating an active directory. +message UpdateActiveDirectoryRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Active Directory resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteActiveDirectoryRequest for deleting a single active directory. +message DeleteActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// ActiveDirectory is the public representation of the active directory config. +message ActiveDirectory { + option (google.api.resource) = { + type: "netapp.googleapis.com/ActiveDirectory" + pattern: "projects/{project}/locations/{location}/activeDirectories/{active_directory}" + }; + + // The Active Directory States + enum State { + // Unspecified Active Directory State + STATE_UNSPECIFIED = 0; + + // Active Directory State is Creating + CREATING = 1; + + // Active Directory State is Ready + READY = 2; + + // Active Directory State is Updating + UPDATING = 3; + + // Active Directory State is In use + IN_USE = 4; + + // Active Directory State is Deleting + DELETING = 5; + + // Active Directory State is Error + ERROR = 6; + } + + // Output only. The resource name of the active directory. + // Format: + // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the active directory. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the AD. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Name of the Active Directory domain + string domain = 4 [(google.api.field_behavior) = REQUIRED]; + + // The Active Directory site the service will limit Domain Controller + // discovery too. + string site = 5; + + // Required. Comma separated list of DNS server IP addresses for the Active + // Directory domain. + string dns = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. NetBIOSPrefix is used as a prefix for SMB server name. + string net_bios_prefix = 7 [(google.api.field_behavior) = REQUIRED]; + + // The Organizational Unit (OU) within the Windows Active Directory the user + // belongs to. + string organizational_unit = 8; + + // If enabled, AES encryption will be enabled for SMB communication. + bool aes_encryption = 9; + + // Required. Username of the Active Directory domain administrator. + string username = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Password of the Active Directory domain administrator. + string password = 11 [(google.api.field_behavior) = REQUIRED]; + + // Users to be added to the Built-in Backup Operator active directory group. + repeated string backup_operators = 12; + + // Domain users to be given the SeSecurityPrivilege. + repeated string security_operators = 13; + + // Name of the active directory machine. This optional parameter is used only + // while creating kerberos volume + string kdc_hostname = 14; + + // KDC server IP address for the active directory machine. + string kdc_ip = 15; + + // If enabled, will allow access to local users and LDAP users. If access is + // needed for only LDAP users, it has to be disabled. + bool nfs_users_with_ldap = 16; + + // Description of the active directory. + string description = 17; + + // Specifies whether or not the LDAP traffic needs to be signed. + bool ldap_signing = 18; + + // If enabled, traffic between the SMB server to Domain Controller (DC) will + // be encrypted. + bool encrypt_dc_connections = 19; + + // Labels for the active directory. + map labels = 20; + + // Output only. The state details of the Active Directory. + string state_details = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/netapp/v1/cloud_netapp_service.proto b/google/cloud/netapp/v1/cloud_netapp_service.proto new file mode 100644 index 0000000000..2eec5a18da --- /dev/null +++ b/google/cloud/netapp/v1/cloud_netapp_service.proto @@ -0,0 +1,502 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/active_directory.proto"; +import "google/cloud/netapp/v1/kms.proto"; +import "google/cloud/netapp/v1/replication.proto"; +import "google/cloud/netapp/v1/snapshot.proto"; +import "google/cloud/netapp/v1/storage_pool.proto"; +import "google/cloud/netapp/v1/volume.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CloudNetappServiceProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; + +// NetApp Files Google Cloud Service +service NetApp { + option (google.api.default_host) = "netapp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns descriptions of all storage pools owned by the caller. + rpc ListStoragePools(ListStoragePoolsRequest) + returns (ListStoragePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/storagePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new storage pool. + rpc CreateStoragePool(CreateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/storagePools" + body: "storage_pool" + }; + option (google.api.method_signature) = + "parent,storage_pool,storage_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified storage pool by poolId. + rpc GetStoragePool(GetStoragePoolRequest) returns (StoragePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the storage pool properties with the full spec + rpc UpdateStoragePool(UpdateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}" + body: "storage_pool" + }; + option (google.api.method_signature) = "storage_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the storage pool. + rpc DeleteStoragePool(DeleteStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Volumes in a given project. + rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/volumes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Volume. + rpc GetVolume(GetVolumeRequest) returns (Volume) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Volume in a given project and location. + rpc CreateVolume(CreateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/volumes" + body: "volume" + }; + option (google.api.method_signature) = "parent,volume,volume_id"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Volume. + rpc UpdateVolume(UpdateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{volume.name=projects/*/locations/*/volumes/*}" + body: "volume" + }; + option (google.api.method_signature) = "volume,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Volume. + rpc DeleteVolume(DeleteVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Revert an existing volume to a specified snapshot. + // Warning! This operation will permanently revert all changes made after the + // snapshot was created. + rpc RevertVolume(RevertVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:revert" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all snapshots for a volume. + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a snapshot for a volume. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new snapshot for a volume. + rpc CreateSnapshot(CreateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + body: "snapshot" + }; + option (google.api.method_signature) = "parent,snapshot,snapshot_id"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a snapshot. + rpc DeleteSnapshot(DeleteSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific snapshot. + rpc UpdateSnapshot(UpdateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}" + body: "snapshot" + }; + option (google.api.method_signature) = "snapshot,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Lists active directories. + rpc ListActiveDirectories(ListActiveDirectoriesRequest) + returns (ListActiveDirectoriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/activeDirectories" + }; + option (google.api.method_signature) = "parent"; + } + + // Describes a specified active directory. + rpc GetActiveDirectory(GetActiveDirectoryRequest) returns (ActiveDirectory) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateActiveDirectory + // Creates the active directory specified in the request. + rpc CreateActiveDirectory(CreateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/activeDirectories" + body: "active_directory" + }; + option (google.api.method_signature) = + "parent,active_directory,active_directory_id"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Update the parameters of an active directories. + rpc UpdateActiveDirectory(UpdateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}" + body: "active_directory" + }; + option (google.api.method_signature) = "active_directory,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Delete the active directory specified in the request. + rpc DeleteActiveDirectory(DeleteActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all KMS configs owned by the caller. + rpc ListKmsConfigs(ListKmsConfigsRequest) returns (ListKmsConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new KMS config. + rpc CreateKmsConfig(CreateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + body: "kms_config" + }; + option (google.api.method_signature) = "parent,kms_config,kms_config_id"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified KMS config by kms_config_id. + rpc GetKmsConfig(GetKmsConfigRequest) returns (KmsConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Kms config properties with the full spec + rpc UpdateKmsConfig(UpdateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}" + body: "kms_config" + }; + option (google.api.method_signature) = "kms_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Encrypt the existing volumes without CMEK encryption with the desired the + // KMS config for the whole region. + rpc EncryptVolumes(EncryptVolumesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Verifies KMS config reachability. + rpc VerifyKmsConfig(VerifyKmsConfigRequest) + returns (VerifyKmsConfigResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify" + body: "*" + }; + } + + // Warning! This operation will permanently delete the Kms config. + rpc DeleteKmsConfig(DeleteKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all replications for a volume. + rpc ListReplications(ListReplicationsRequest) + returns (ListReplicationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a replication for a volume. + rpc GetReplication(GetReplicationRequest) returns (Replication) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new replication for a volume. + rpc CreateReplication(CreateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + body: "replication" + }; + option (google.api.method_signature) = "parent,replication,replication_id"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a replication. + rpc DeleteReplication(DeleteReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific replication. + rpc UpdateReplication(UpdateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}" + body: "replication" + }; + option (google.api.method_signature) = "replication,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Stop Cross Region Replication. + rpc StopReplication(StopReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Resume Cross Region Replication. + rpc ResumeReplication(ResumeReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Reverses direction of replication. Source becomes destination and + // destination becomes source. + rpc ReverseReplicationDirection(ReverseReplicationDirectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been canceled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/netapp/v1/common.proto b/google/cloud/netapp/v1/common.proto new file mode 100644 index 0000000000..2aa2ba6a32 --- /dev/null +++ b/google/cloud/netapp/v1/common.proto @@ -0,0 +1,49 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// The service levels - Storage Pool, Volumes +enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0; + + PREMIUM = 1; + + EXTREME = 2; + + // Standard (Software offering) + STANDARD = 3; +} + +// Defined the current volume encryption key source. +enum EncryptionType { + // The source of encryption key is not specified. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // Google managed encryption key. + SERVICE_MANAGED = 1; + + // Customer managed encryption key, which is stored in KMS. + CLOUD_KMS = 2; +} diff --git a/google/cloud/netapp/v1/kms.proto b/google/cloud/netapp/v1/kms.proto new file mode 100644 index 0000000000..97221e3bfb --- /dev/null +++ b/google/cloud/netapp/v1/kms.proto @@ -0,0 +1,232 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "KmsProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +message GetKmsConfigRequest { + // Required. Name of the KmsConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +message ListKmsConfigsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +message ListKmsConfigsResponse { + // The list of KmsConfigs + repeated KmsConfig kms_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +message CreateKmsConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Required. Id of the requesting KmsConfig + // If auto-generating Id server-side, remove this field and + // id from the method_signature of Create RPC + string kms_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new KmsConfig. + KmsConfig kms_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +message UpdateKmsConfigRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // KmsConfig resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The KmsConfig being updated + KmsConfig kms_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteKmsConfigRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// EncryptVolumesRequest specifies the KMS config to encrypt existing volumes. +message EncryptVolumesRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigRequest specifies the KMS config to be validated. +message VerifyKmsConfigRequest { + // Required. Name of the KMS Config to be verified. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigResponse contains the information if the config is correctly +// and error message. +message VerifyKmsConfigResponse { + // Output only. If the customer key configured correctly to the encrypt + // volume. + bool healthy = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message if config is not healthy. + string health_error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Instructions for the customers to provide the access to the + // encryption key. + string instructions = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// KmsConfig is the customer managed encryption key(CMEK) configuration. +message KmsConfig { + option (google.api.resource) = { + type: "netapp.googleapis.com/KmsConfig" + pattern: "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" + }; + + // The KmsConfig States + enum State { + // Unspecified KmsConfig State + STATE_UNSPECIFIED = 0; + + // KmsConfig State is Ready + READY = 1; + + // KmsConfig State is Creating + CREATING = 2; + + // KmsConfig State is Deleting + DELETING = 3; + + // KmsConfig State is Updating + UPDATING = 4; + + // KmsConfig State is In Use. + IN_USE = 5; + + // KmsConfig State is Error + ERROR = 6; + + // KmsConfig State is Pending to verify crypto key access. + KEY_CHECK_PENDING = 7; + + // KmsConfig State is Not accessbile by the SDE service account to the + // crypto key. + KEY_NOT_REACHABLE = 8; + + // KmsConfig State is Disabling. + DISABLING = 9; + + // KmsConfig State is Disabled. + DISABLED = 10; + + // KmsConfig State is Migrating. + // The existing volumes are migrating from SMEK to CMEK. + MIGRATING = 11; + } + + // Output only. Name of the KmsConfig. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Customer managed crypto key resource full name. Format: + // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the KmsConfig. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the KmsConfig. + string state_details = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the KmsConfig. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the KmsConfig. + string description = 6; + + // Labels as key value pairs + map labels = 7; + + // Output only. Instructions to provide the access to the customer provided + // encryption key. + string instructions = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Service account which will have access to the customer + // provided encryption key. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/cloud/netapp/v1/netapp_v1.yaml b/google/cloud/netapp/v1/netapp_v1.yaml new file mode 100644 index 0000000000..2b969393cc --- /dev/null +++ b/google/cloud/netapp/v1/netapp_v1.yaml @@ -0,0 +1,98 @@ +type: google.api.Service +config_version: 3 +name: netapp.googleapis.com +title: NetApp API + +apis: +- name: google.cloud.location.Locations +- name: google.cloud.netapp.v1.NetApp +- name: google.longrunning.Operations + +types: +- name: google.cloud.netapp.v1.OperationMetadata + +documentation: + summary: |- + Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage + service that provides advanced data management capabilities and highly + scalable performance with global availability. + rules: + - selector: google.cloud.location.Locations.GetLocation + description: Gets information about a location. + + - selector: google.cloud.location.Locations.ListLocations + description: Lists information about the supported locations for this service. + +backend: + rules: + - selector: google.cloud.location.Locations.GetLocation + deadline: 60.0 + - selector: google.cloud.location.Locations.ListLocations + deadline: 60.0 + - selector: 'google.cloud.netapp.v1.NetApp.*' + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +authentication: + rules: + - selector: google.cloud.location.Locations.GetLocation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.location.Locations.ListLocations + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.netapp.v1.NetApp.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + +publishing: + new_issue_uri: https://issuetracker.google.com/issues/new?component=1144971 + documentation_uri: https://cloud.google.com/netapp/volumes/docs/discover/overview + api_short_name: netapp + github_label: 'api: netapp' + doc_tag_prefix: netapp + organization: CLOUD + library_settings: + - version: google.cloud.netapp.v1 + launch_stage: GA + java_settings: + common: + destinations: + - PACKAGE_MANAGER + cpp_settings: + common: + destinations: + - PACKAGE_MANAGER + php_settings: + common: + destinations: + - PACKAGE_MANAGER + python_settings: + common: + destinations: + - PACKAGE_MANAGER + node_settings: + common: + destinations: + - PACKAGE_MANAGER + dotnet_settings: + common: + destinations: + - PACKAGE_MANAGER + ruby_settings: + common: + destinations: + - PACKAGE_MANAGER + go_settings: + common: + destinations: + - PACKAGE_MANAGER + proto_reference_documentation_uri: https://cloud.google.com/netapp/volumes/docs/reference/rest diff --git a/google/cloud/netapp/v1/netapp_v1_grpc_service_config.json b/google/cloud/netapp/v1/netapp_v1_grpc_service_config.json new file mode 100644 index 0000000000..af37664d82 --- /dev/null +++ b/google/cloud/netapp/v1/netapp_v1_grpc_service_config.json @@ -0,0 +1,225 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListStoragePools" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetStoragePool" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListVolumes" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetVolume" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListSnapshots" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetSnapshot" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListActiveDirectories" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetActiveDirectory" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListKmsConfigs" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetKmsConfig" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListReplications" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListBackupVaults" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetBackupVault" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListBackups" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetBackup" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ListBackupPolicies" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "GetBackupPolicy" + } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }, + { + "name": [ + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateStoragePool" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteStoragePool" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateStoragePool" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateVolume" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteVolume" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateVolume" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "RevertVolume" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "EncryptVolumes" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateSnapshot" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteSnapshot" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateSnapshot" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateActiveDirectory" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteActiveDirectory" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateActiveDirectory" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateKmsConfig" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteKmsConfig" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateKmsConfig" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "VerifyKmsConfig" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "StopReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ResumeReplication" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "ReverseReplicationDirection" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateBackupVault" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteBackupVault" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateBackupVault" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateBackup" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteBackup" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateBackup" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "CreateBackupPolicy" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "DeleteBackupPolicy" + }, + { + "service": "google.cloud.netapp.v1.NetApp", + "method": "UpdateBackupPolicy" + } + ], + "timeout": "60s" + } + ] +} diff --git a/google/cloud/netapp/v1/replication.proto b/google/cloud/netapp/v1/replication.proto new file mode 100644 index 0000000000..b11f4497c6 --- /dev/null +++ b/google/cloud/netapp/v1/replication.proto @@ -0,0 +1,366 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ReplicationProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// TransferStats reports all statistics related to replication transfer. +message TransferStats { + // bytes trasferred so far in current transfer. + optional int64 transfer_bytes = 1; + + // Total time taken during transfer. + optional google.protobuf.Duration total_transfer_duration = 2; + + // Last transfer size in bytes. + optional int64 last_transfer_bytes = 3; + + // Time taken during last transfer. + optional google.protobuf.Duration last_transfer_duration = 4; + + // Lag duration indicates the duration by which Destination region volume + // content lags behind the primary region volume content. + optional google.protobuf.Duration lag_duration = 5; + + // Time when progress was updated last. + optional google.protobuf.Timestamp update_time = 6; + + // Time when last transfer completed. + optional google.protobuf.Timestamp last_transfer_end_time = 7; + + // A message describing the cause of the last transfer failure. + optional string last_transfer_error = 8; +} + +// Replication is a nested resource under Volume, that describes a +// cross-region replication relationship between 2 volumes in different +// regions. +message Replication { + option (google.api.resource) = { + type: "netapp.googleapis.com/Replication" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" + }; + + // The replication states + // New enum values may be added in future to indicate possible new states. + enum State { + // Unspecified replication State + STATE_UNSPECIFIED = 0; + + // Replication is creating. + CREATING = 1; + + // Replication is ready. + READY = 2; + + // Replication is updating. + UPDATING = 3; + + // Replication is deleting. + DELETING = 5; + + // Replication is in error state. + ERROR = 6; + } + + // New enum values may be added in future to support different replication + // topology. + enum ReplicationRole { + // Unspecified replication role + REPLICATION_ROLE_UNSPECIFIED = 0; + + // Indicates Source volume. + SOURCE = 1; + + // Indicates Destination volume. + DESTINATION = 2; + } + + // Schedule for Replication. + // New enum values may be added in future to support different frequency of + // replication. + enum ReplicationSchedule { + // Unspecified ReplicationSchedule + REPLICATION_SCHEDULE_UNSPECIFIED = 0; + + // Replication happens once every 10 minutes. + EVERY_10_MINUTES = 1; + + // Replication happens once every hour. + HOURLY = 2; + + // Replication happens once every day. + DAILY = 3; + } + + // Mirroring states. + // No new value is expected to be added in future. + enum MirrorState { + // Unspecified MirrorState + MIRROR_STATE_UNSPECIFIED = 0; + + // Destination volume is being prepared. + PREPARING = 1; + + // Destination volume has been initialized and is ready to receive + // replication transfers. + MIRRORED = 2; + + // Destination volume is not receiving replication transfers. + STOPPED = 3; + + // Replication is in progress. + TRANSFERRING = 4; + } + + // Output only. The resource name of the Replication. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the replication. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the replication. + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether this points to source or destination. + ReplicationRole role = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Indicates the schedule for replication. + ReplicationSchedule replication_schedule = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Indicates the state of mirroring. + MirrorState mirror_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Condition of the relationship. Can be one of the following: + // - true: The replication relationship is healthy. It has not missed the most + // recent scheduled transfer. + // - false: The replication relationship is not healthy. It has missed the + // most recent scheduled transfer. + optional bool healthy = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Replication create time. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Full name of destination volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string destination_volume = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Replication transfer statistics. + TransferStats transfer_stats = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 12; + + // A description about this replication relationship. + optional string description = 13; + + // Required. Input only. Destination volume parameters + DestinationVolumeParameters destination_volume_parameters = 14 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Full name of source volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string source_volume = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; +} + +// ListReplications lists replications. +message ListReplicationsRequest { + // Required. The volume for which to retrieve replication information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListReplicationsResponse is the result of ListReplicationsRequest. +message ListReplicationsResponse { + // A list of replications in the project for the specified volume. + repeated Replication replications = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetReplicationRequest gets the state of a replication. +message GetReplicationRequest { + // Required. The replication resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// DestinationVolumeParameters specify input parameters used for creating +// destination volume. +message DestinationVolumeParameters { + // Required. Existing destination StoragePool name. + string storage_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Desired destination volume resource id. If not specified, source volume's + // resource id will be used. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string volume_id = 2; + + // Destination volume's share name. If not specified, source volume's share + // name will be used. + string share_name = 3; + + // Description for the destination volume. + optional string description = 4; +} + +// CreateReplicationRequest creates a replication. +message CreateReplicationRequest { + // Required. The NetApp volume to create the replications of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the replication to create. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string replication_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteReplicationRequest deletes a replication. +message DeleteReplicationRequest { + // Required. The replication resource name, in the format + // `projects/*/locations/*/volumes/*/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// UpdateReplicationRequest updates description and/or labels for a replication. +message UpdateReplicationRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// StopReplicationRequest stops a replication until resumed. +message StopReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; + + // Indicates whether to stop replication forcefully while data transfer is in + // progress. + // Warning! if force is true, this will abort any current transfers + // and can lead to data loss due to partial transfer. + // If force is false, stop replication will fail while data transfer is in + // progress and you will need to retry later. + bool force = 2; +} + +// ResumeReplicationRequest resumes a stopped replication. +message ResumeReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// ReverseReplicationDirectionRequest reverses direction of replication. Source +// becomes destination and destination becomes source. +message ReverseReplicationDirectionRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} diff --git a/google/cloud/netapp/v1/snapshot.proto b/google/cloud/netapp/v1/snapshot.proto new file mode 100644 index 0000000000..4dd2213ec2 --- /dev/null +++ b/google/cloud/netapp/v1/snapshot.proto @@ -0,0 +1,176 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "SnapshotProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListSnapshotsRequest lists snapshots. +message ListSnapshotsRequest { + // Required. The volume for which to retrieve snapshot information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListSnapshotsResponse is the result of ListSnapshotsRequest. +message ListSnapshotsResponse { + // A list of snapshots in the project for the specified volume. + repeated Snapshot snapshots = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetSnapshotRequest gets the state of a snapshot. +message GetSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// CreateSnapshotRequest creates a snapshot. +message CreateSnapshotRequest { + // Required. The NetApp volume to create the snapshots of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the snapshot to create. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteSnapshotRequest deletes a snapshot. +message DeleteSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// UpdateSnapshotRequest updates description and/or labels for a snapshot. +message UpdateSnapshotRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message Snapshot { + option (google.api.resource) = { + type: "netapp.googleapis.com/Snapshot" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" + }; + + // The Snapshot States + enum State { + // Unspecified Snapshot State + STATE_UNSPECIFIED = 0; + + // Snapshot State is Ready + READY = 1; + + // Snapshot State is Creating + CREATING = 2; + + // Snapshot State is Deleting + DELETING = 3; + + // Snapshot State is Updating + UPDATING = 4; + + // Snapshot State is Disabled + DISABLED = 5; + + // Snapshot State is Error + ERROR = 6; + } + + // Output only. The resource name of the snapshot. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The snapshot state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of the snapshot with 2048 characters or less. + // Requests with longer descriptions will be rejected. + string description = 4; + + // Output only. Current storage usage for the snapshot in bytes. + double used_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the snapshot was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 7; +} diff --git a/google/cloud/netapp/v1/storage_pool.proto b/google/cloud/netapp/v1/storage_pool.proto new file mode 100644 index 0000000000..a207204de7 --- /dev/null +++ b/google/cloud/netapp/v1/storage_pool.proto @@ -0,0 +1,216 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "StoragePoolProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +message GetStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +message ListStoragePoolsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +message ListStoragePoolsResponse { + // The list of StoragePools + repeated StoragePool storage_pools = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +message CreateStoragePoolRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Required. Id of the requesting storage pool + // If auto-generating Id server-side, remove this field and + // id from the method_signature of Create RPC + string storage_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new storage pool. + StoragePool storage_pool = 3 [(google.api.field_behavior) = REQUIRED]; +} + +message UpdateStoragePoolRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // StoragePool resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The pool being updated + StoragePool storage_pool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// StoragePool is a container for volumes with a service level and capacity. +// Volumes can be created in a pool of sufficient available capacity. +// StoragePool capacity is what you are billed for. +message StoragePool { + option (google.api.resource) = { + type: "netapp.googleapis.com/StoragePool" + pattern: "projects/{project}/locations/{location}/storagePools/{storage_pool}" + }; + + // The Storage Pool States + enum State { + // Unspecified Storage Pool State + STATE_UNSPECIFIED = 0; + + // Storage Pool State is Ready + READY = 1; + + // Storage Pool State is Creating + CREATING = 2; + + // Storage Pool State is Deleting + DELETING = 3; + + // Storage Pool State is Updating + UPDATING = 4; + + // Storage Pool State is Restoring + RESTORING = 5; + + // Storage Pool State is Disabled + DISABLED = 6; + + // Storage Pool State is Error + ERROR = 7; + } + + // Output only. Name of the storage pool + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Service level of the storage pool + ServiceLevel service_level = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Capacity in GIB of the pool + int64 capacity_gib = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Allocated size of all volumes in GIB in the storage pool + int64 volume_capacity_gib = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Volume count of the storage pool + int32 volume_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the storage pool + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the storage pool + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the storage pool + string description = 9; + + // Labels as key value pairs + map labels = 10; + + // Required. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 11 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Specifies the Active Directory to be used for creating a SMB volume. + string active_directory = 12 [(google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + }]; + + // Specifies the KMS config to be used for volume encryption. + string kms_config = 13 [(google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + }]; + + // Flag indicating if the pool is NFS LDAP enabled or not. + bool ldap_enabled = 14; + + // Name of the Private Service Access allocated range. If + // not provided, any available range will be chosen. + string psa_range = 15; + + // Output only. Specifies the current pool encryption key source. + EncryptionType encryption_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Allows SO pool to access AD or DNS server from other regions. + optional bool global_access_allowed = 17 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/netapp/v1/volume.proto b/google/cloud/netapp/v1/volume.proto new file mode 100644 index 0000000000..e1242e9893 --- /dev/null +++ b/google/cloud/netapp/v1/volume.proto @@ -0,0 +1,527 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "VolumeProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +enum Protocols { + // Unspecified protocol + PROTOCOLS_UNSPECIFIED = 0; + + // NFS V3 protocol + NFSV3 = 1; + + // NFS V4 protocol + NFSV4 = 2; + + // SMB protocol + SMB = 3; +} + +enum AccessType { + // Unspecified Access Type + ACCESS_TYPE_UNSPECIFIED = 0; + + // Read Only + READ_ONLY = 1; + + // Read Write + READ_WRITE = 2; + + // None + READ_NONE = 3; +} + +// SMBSettings +// Modifies the behaviour of a SMB volume. +enum SMBSettings { + // Unspecified default option + SMB_SETTINGS_UNSPECIFIED = 0; + + // SMB setting encrypt data + ENCRYPT_DATA = 1; + + // SMB setting browsable + BROWSABLE = 2; + + // SMB setting notify change + CHANGE_NOTIFY = 3; + + // SMB setting not to notify change + NON_BROWSABLE = 4; + + // SMB setting oplocks + OPLOCKS = 5; + + // SMB setting to show snapshots + SHOW_SNAPSHOT = 6; + + // SMB setting to show previous versions + SHOW_PREVIOUS_VERSIONS = 7; + + // SMB setting to access volume based on enumerartion + ACCESS_BASED_ENUMERATION = 8; + + // Continuously available enumeration + CONTINUOUSLY_AVAILABLE = 9; +} + +// The security style of the volume, can be either UNIX or NTFS. +enum SecurityStyle { + // SecurityStyle is unspecified + SECURITY_STYLE_UNSPECIFIED = 0; + + // SecurityStyle uses NTFS + NTFS = 1; + + // SecurityStyle uses NTFS + UNIX = 2; +} + +// Message for requesting list of Volumes +message ListVolumesRequest { + // Required. Parent value for ListVolumesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Volumes +message ListVolumesResponse { + // The list of Volume + repeated Volume volumes = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Volume +message GetVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; +} + +// Message for creating a Volume +message CreateVolumeRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Required. Id of the requesting volume + // If auto-generating Id server-side, remove this field and + // Id from the method_signature of Create RPC + string volume_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being created. + Volume volume = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for updating a Volume +message UpdateVolumeRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Volume resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + Volume volume = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for deleting a Volume +message DeleteVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // If this field is set as true, CCFE will not block the volume resource + // deletion even if it has any snapshots resource. (Otherwise, the request + // will only work if the volume has no snapshots.) + bool force = 2; +} + +// RevertVolumeRequest reverts the given volume to the specified snapshot. +message RevertVolumeRequest { + // Required. The resource name of the volume, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // 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}/volumes/{volume_id}/snapshots/{snapshot_id} + string snapshot_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Volume provides a filesystem that you can mount. +message Volume { + option (google.api.resource) = { + type: "netapp.googleapis.com/Volume" + pattern: "projects/{project}/locations/{location}/volumes/{volume}" + }; + + // The volume states + enum State { + // Unspecified Volume State + STATE_UNSPECIFIED = 0; + + // Volume State is Ready + READY = 1; + + // Volume State is Creating + CREATING = 2; + + // Volume State is Deleting + DELETING = 3; + + // Volume State is Updating + UPDATING = 4; + + // Volume State is Restoring + RESTORING = 5; + + // Volume State is Disabled + DISABLED = 6; + + // Volume State is Error + ERROR = 7; + } + + // Output only. Name of the volume + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the volume + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the volume + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the volume + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Share name of the volume + string share_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Name of the Private Service Access allocated range. This is + // optional. If not provided, any available range will be chosen. + string psa_range = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. StoragePool name of the volume + string storage_pool = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Output only. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. Service level of the volume + ServiceLevel service_level = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Capacity in GIB of the volume + int64 capacity_gib = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Export policy of the volume + ExportPolicy export_policy = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Protocols required for the volume + repeated Protocols protocols = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SMB share settings for the volume. + repeated SMBSettings smb_settings = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Mount options of this volume + repeated MountOption mount_options = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Default unix style permission (e.g. 777) the mount point will be + // created with. Applicable for NFS protocol types only. + string unix_permissions = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels as key value pairs + map labels = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the volume + string description = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SnapshotPolicy for a volume. + SnapshotPolicy snapshot_policy = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snap_reserve specifies percentage of volume storage reserved for + // snapshot storage. Default is 0 percent. + double snap_reserve = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snapshot_directory if enabled (true) the volume will contain a + // read-only .snapshot directory which provides access to each of the volume's + // snapshots. + bool snapshot_directory = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Used capacity in GIB of the volume. This is computed + // periodically and it does not represent the realtime usage. + int64 used_gib = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Security Style of the Volume + SecurityStyle security_style = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating if the volume is a kerberos volume or not, export + // policy rules control kerberos security modes (krb5, krb5i, krb5p). + bool kerberos_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Flag indicating if the volume is NFS LDAP enabled or not. + bool ldap_enabled = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the ActiveDirectory name of a SMB volume. + string active_directory = 25 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Optional. Specifies the source of the volume to be created from. + RestoreParameters restore_parameters = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Specifies the KMS config to be used for volume encryption. + string kms_config = 27 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Output only. Specified the current volume encryption key source. + EncryptionType encryption_type = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the volume is part of a replication + // relationship. + bool has_replication = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines the export policy for the volume. +message ExportPolicy { + // Required. List of export policy rules + repeated SimpleExportPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// An export policy rule describing various export options. +message SimpleExportPolicyRule { + // Comma separated list of allowed clients IP addresses + optional string allowed_clients = 1; + + // Whether Unix root access will be granted. + optional string has_root_access = 2; + + // Access type (ReadWrite, ReadOnly, None) + optional AccessType access_type = 3; + + // NFS V3 protocol. + optional bool nfsv3 = 4; + + // NFS V4 protocol. + optional bool nfsv4 = 5; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'authentication' kerberos security mode. + optional bool kerberos_5_read_only = 6; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'authentication' kerberos security mode. The + // 'kerberos5ReadOnly' value be ignored if this is enabled. + optional bool kerberos_5_read_write = 7; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'integrity' kerberos security mode. + optional bool kerberos_5i_read_only = 8; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5i_read_write = 9; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'privacy' kerberos security mode. + optional bool kerberos_5p_read_only = 10; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5p_read_write = 11; +} + +// Snapshot Policy for a volume. +message SnapshotPolicy { + // If enabled, make snapshots automatically according to the schedules. + // Default is false. + optional bool enabled = 1; + + // Hourly schedule policy. + optional HourlySchedule hourly_schedule = 2; + + // Daily schedule policy. + optional DailySchedule daily_schedule = 3; + + // Weekly schedule policy. + optional WeeklySchedule weekly_schedule = 4; + + // Monthly schedule policy. + optional MonthlySchedule monthly_schedule = 5; +} + +// Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. +message HourlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; +} + +// Make a snapshot every day e.g. at 04:00, 05:20, 23:50 +message DailySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; +} + +// Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday +// 23:50 +message WeeklySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the week to make a snapshot. Accepts a comma + // separated days of the week. Defaults to 'Sunday'. + optional string day = 4; +} + +// Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 +message MonthlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the month to make a snapshot (1-31). Accepts a + // comma separated number of days. Defaults to '1'. + optional string days_of_month = 4; +} + +// View only mount options for a volume. +message MountOption { + // Export string + string export = 1; + + // Full export string + string export_full = 2; + + // Protocol to mount with. + Protocols protocol = 3; + + // Instructions for mounting + string instructions = 4; +} + +// The RestoreParameters if volume is created from a snapshot or backup. +message RestoreParameters { + // The source that the volume is created from. + oneof source { + // Full name of the snapshot resource. + // Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + string source_snapshot = 1; + } +}