1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.baremetalsolution.v2; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21 22option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; 23option go_package = "cloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb"; 24option java_multiple_files = true; 25option java_outer_classname = "SshKeyProto"; 26option java_package = "com.google.cloud.baremetalsolution.v2"; 27option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; 28option ruby_package = "Google::Cloud::BareMetalSolution::V2"; 29 30// An SSH key, used for authorizing with the interactive serial console feature. 31message SSHKey { 32 option (google.api.resource) = { 33 type: "baremetalsolution.googleapis.com/SshKey" 34 pattern: "projects/{project}/locations/{location}/sshKeys/{ssh_key}" 35 }; 36 37 // Output only. The name of this SSH key. 38 // Currently, the only valid value for the location is "global". 39 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 40 41 // The public SSH key. This must be in OpenSSH .authorized_keys format. 42 string public_key = 2; 43} 44 45// Message for listing the public SSH keys in a project. 46message ListSSHKeysRequest { 47 // Required. The parent containing the SSH keys. 48 // Currently, the only valid value for the location is "global". 49 string parent = 1 [ 50 (google.api.field_behavior) = REQUIRED, 51 (google.api.resource_reference) = { 52 type: "locations.googleapis.com/Location" 53 } 54 ]; 55 56 // The maximum number of items to return. 57 int32 page_size = 2; 58 59 // The next_page_token value returned from a previous List request, if any. 60 string page_token = 3; 61} 62 63// Message for response of ListSSHKeys. 64message ListSSHKeysResponse { 65 // The SSH keys registered in the project. 66 repeated SSHKey ssh_keys = 1; 67 68 // Token to retrieve the next page of results, or empty if there are no more 69 // results in the list. 70 string next_page_token = 90; 71} 72 73// Message for registering a public SSH key in a project. 74message CreateSSHKeyRequest { 75 // Required. The parent containing the SSH keys. 76 string parent = 1 [ 77 (google.api.field_behavior) = REQUIRED, 78 (google.api.resource_reference) = { 79 type: "locations.googleapis.com/Location" 80 } 81 ]; 82 83 // Required. The SSH key to register. 84 SSHKey ssh_key = 2 [(google.api.field_behavior) = REQUIRED]; 85 86 // Required. The ID to use for the key, which will become the final component 87 // of the key's resource name. 88 // 89 // This value must match the regex: 90 // [a-zA-Z0-9@.\-_]{1,64} 91 string ssh_key_id = 3 [(google.api.field_behavior) = REQUIRED]; 92} 93 94// Message for deleting an SSH key from a project. 95message DeleteSSHKeyRequest { 96 // Required. The name of the SSH key to delete. 97 // Currently, the only valid value for the location is "global". 98 string name = 1 [ 99 (google.api.field_behavior) = REQUIRED, 100 (google.api.resource_reference) = { 101 type: "baremetalsolution.googleapis.com/SshKey" 102 } 103 ]; 104} 105