cloud_sql_flags.proto 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // Copyright 2021 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. syntax = "proto3";
  15. package google.cloud.sql.v1;
  16. import "google/api/annotations.proto";
  17. import "google/cloud/sql/v1/cloud_sql_resources.proto";
  18. import "google/protobuf/wrappers.proto";
  19. import "google/api/client.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1;sql";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "CloudSqlFlagsProto";
  23. option java_package = "com.google.cloud.sql.v1";
  24. // LINT: LEGACY_NAMES
  25. // Service to manage database flags for Cloud SQL instances.
  26. service SqlFlagsService {
  27. option (google.api.default_host) = "sqladmin.googleapis.com";
  28. option (google.api.oauth_scopes) =
  29. "https://www.googleapis.com/auth/cloud-platform,"
  30. "https://www.googleapis.com/auth/sqlservice.admin";
  31. // Lists all available database flags for Cloud SQL instances.
  32. rpc List(SqlFlagsListRequest) returns (FlagsListResponse) {
  33. option (google.api.http) = {
  34. get: "/v1/flags"
  35. };
  36. }
  37. }
  38. // Flags list request.
  39. message SqlFlagsListRequest {
  40. // Database type and version you want to retrieve flags for. By default, this
  41. // method returns flags for all database types and versions.
  42. string database_version = 1;
  43. }
  44. // Flags list response.
  45. message FlagsListResponse {
  46. // This is always **sql#flagsList**.
  47. string kind = 1;
  48. // List of flags.
  49. repeated Flag items = 2;
  50. }
  51. // A flag resource.
  52. message Flag {
  53. // This is the name of the flag. Flag names always use underscores, not
  54. // hyphens, for example: **max_allowed_packet**
  55. string name = 1;
  56. // The type of the flag. Flags are typed to being **BOOLEAN**, **STRING**,
  57. // **INTEGER** or **NONE**. **NONE** is used for flags which do not take a
  58. // value, such as **skip_grant_tables**.
  59. SqlFlagType type = 2;
  60. // The database version this flag applies to. Can be **MYSQL_8_0**,
  61. // **MYSQL_5_6**, or **MYSQL_5_7**.
  62. repeated SqlDatabaseVersion applies_to = 3;
  63. // For **STRING** flags, a list of strings that the value can be set to.
  64. repeated string allowed_string_values = 4;
  65. // For **INTEGER** flags, the minimum allowed value.
  66. google.protobuf.Int64Value min_value = 5;
  67. // For **INTEGER** flags, the maximum allowed value.
  68. google.protobuf.Int64Value max_value = 6;
  69. // Indicates whether changing this flag will trigger a database restart. Only
  70. // applicable to Second Generation instances.
  71. google.protobuf.BoolValue requires_restart = 7;
  72. // This is always **sql#flag**.
  73. string kind = 8;
  74. // Whether or not the flag is considered in beta.
  75. google.protobuf.BoolValue in_beta = 9;
  76. // Use this field if only certain integers are accepted. Can be combined
  77. // with min_value and max_value to add additional values.
  78. repeated int64 allowed_int_values = 10;
  79. }
  80. enum SqlFlagType {
  81. // This is an unknown flag type.
  82. SQL_FLAG_TYPE_UNSPECIFIED = 0;
  83. // Boolean type flag.
  84. BOOLEAN = 1;
  85. // String type flag.
  86. STRING = 2;
  87. // Integer type flag.
  88. INTEGER = 3;
  89. // Flag type used for a server startup option.
  90. NONE = 4;
  91. // Type introduced specially for MySQL TimeZone offset. Accept a string value
  92. // with the format [-12:59, 13:00].
  93. MYSQL_TIMEZONE_OFFSET = 5;
  94. // Float type flag.
  95. FLOAT = 6;
  96. // Comma-separated list of the strings in a SqlFlagType enum.
  97. REPEATED_STRING = 7;
  98. }