clouddms_platform_logs.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. // Copyright 2022 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.clouddms.logging.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/protobuf/duration.proto";
  18. import "google/protobuf/timestamp.proto";
  19. import "google/rpc/status.proto";
  20. option csharp_namespace = "Google.Cloud.CloudDms.Logging.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/clouddms/logging/v1;logging";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "ClouddmsPlatformLogsProto";
  24. option java_package = "com.google.cloud.clouddms.logging.v1";
  25. option php_namespace = "Google\\Cloud\\CloudDms\\Logging\\V1";
  26. option ruby_package = "Google::Cloud::CloudDMS::Logging::V1";
  27. // The database engines.
  28. enum DatabaseEngine {
  29. // The source database engine of the migration job is unknown.
  30. DATABASE_ENGINE_UNSPECIFIED = 0;
  31. // The source engine is MySQL.
  32. MYSQL = 1;
  33. // The source engine is PostgreSQL.
  34. POSTGRESQL = 2;
  35. // The source engine is SQL Server.
  36. SQLSERVER = 3;
  37. // The source engine is Oracle (for heterogeneous migrations).
  38. ORACLE = 4;
  39. // The engine is Spanner (for heterogeneous migrations).
  40. SPANNER = 5;
  41. }
  42. // The database providers.
  43. enum DatabaseProvider {
  44. // The database provider is unknown.
  45. DATABASE_PROVIDER_UNSPECIFIED = 0;
  46. // CloudSQL runs the database.
  47. CLOUDSQL = 1;
  48. // RDS runs the database.
  49. RDS = 2;
  50. // Amazon Aurora.
  51. AURORA = 3;
  52. // AlloyDB.
  53. ALLOYDB = 4;
  54. }
  55. // A message defining the database engine and provider.
  56. message DatabaseType {
  57. // The database provider.
  58. DatabaseProvider provider = 1;
  59. // The database engine.
  60. DatabaseEngine engine = 2;
  61. }
  62. // Migration job as stored in Cloud Logging logs.
  63. // NEXT_TAG = 36.
  64. message LoggedMigrationJob {
  65. // The migration job states enum.
  66. enum State {
  67. // The state of the migration job is unknown.
  68. STATE_UNSPECIFIED = 0;
  69. // The migration job is down for maintenance.
  70. MAINTENANCE = 1;
  71. // The migration job is in draft mode and fully editable.
  72. DRAFT = 2;
  73. // The migration job is being created.
  74. CREATING = 3;
  75. // The migration job is created and not started.
  76. NOT_STARTED = 4;
  77. // The migration job is running
  78. RUNNING = 5;
  79. // The migration job failed.
  80. FAILED = 6;
  81. // The migration job has been completed.
  82. COMPLETED = 7;
  83. // The migration job is being deleted.
  84. DELETING = 8;
  85. // The migration job is being stopped.
  86. STOPPING = 9;
  87. // The migration job is currently stopped.
  88. STOPPED = 10;
  89. // The migration job has been deleted.
  90. DELETED = 11;
  91. // The migration job is being updated.
  92. UPDATING = 12;
  93. // The migration job is starting.
  94. STARTING = 13;
  95. // The migration job is restarting.
  96. RESTARTING = 14;
  97. // The migration job is resuming.
  98. RESUMING = 15;
  99. }
  100. // The migration job phases enum.
  101. enum Phase {
  102. // The phase of the migration job is unknown.
  103. PHASE_UNSPECIFIED = 0;
  104. // The migration job is in the full dump phase.
  105. FULL_DUMP = 1;
  106. // The migration job is CDC phase.
  107. CDC = 2;
  108. // The migration job is running the promote phase.
  109. PROMOTE_IN_PROGRESS = 3;
  110. // Only RDS flow - waiting for source writes to stop
  111. WAITING_FOR_SOURCE_WRITES_TO_STOP = 4;
  112. // Only RDS flow - the sources writes stopped, waiting for dump to begin
  113. PREPARING_THE_DUMP = 5;
  114. }
  115. // The migration job types.
  116. enum Type {
  117. // The type of the migration job is unknown.
  118. TYPE_UNSPECIFIED = 0;
  119. // The migration job is a one time migration.
  120. ONE_TIME = 1;
  121. // The migration job is a continuous migration.
  122. CONTINUOUS = 2;
  123. }
  124. // Type of connectivity to source database.
  125. enum ConnectivityType {
  126. // No data defined.
  127. CONNECTIVITY_TYPE_UNSPECIFIED = 0;
  128. // Connect using static IO
  129. STATIC_IP = 1;
  130. // Use reverse SSH connectivity.
  131. REVERSE_SSH = 2;
  132. // Use VPC Peering connectivity.
  133. VPC_PEERING = 3;
  134. }
  135. // Required. The unique identifier for a migration job.
  136. string name = 1 [(google.api.field_behavior) = REQUIRED];
  137. // Required. Labels.
  138. map<string, string> labels = 2 [(google.api.field_behavior) = REQUIRED];
  139. // Required. The display name.
  140. string display_name = 3 [(google.api.field_behavior) = REQUIRED];
  141. // Required. The current migration job state.
  142. State state = 4 [(google.api.field_behavior) = REQUIRED];
  143. // Required. The current migration job phase.
  144. Phase phase = 5 [(google.api.field_behavior) = REQUIRED];
  145. // Required. The migration job type.
  146. Type type = 6 [(google.api.field_behavior) = REQUIRED];
  147. // Optional. An optional dump path (gs://[BUCKET_NAME]/[OBJECT_NAME]).
  148. string dump_path = 7 [(google.api.field_behavior) = OPTIONAL];
  149. // Required. The migration job source connection profile name.
  150. string source = 8 [(google.api.field_behavior) = REQUIRED];
  151. // Required. The migration job destination connection profile name.
  152. string destination = 9 [(google.api.field_behavior) = REQUIRED];
  153. // Required. the migration job duration in seconds.
  154. google.protobuf.Duration duration = 10 [(google.api.field_behavior) = REQUIRED];
  155. // Required. Type of connectivity to source database.
  156. ConnectivityType connectivity_type = 11 [(google.api.field_behavior) = REQUIRED];
  157. // Required. The error details in case of state FAILED.
  158. google.rpc.Status error = 12 [(google.api.field_behavior) = REQUIRED];
  159. // Required. The time when this migration job was completed. Should only be set when the
  160. // phase of the migration job is COMPLETED.
  161. google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = REQUIRED];
  162. // Required. The indicative source database.
  163. DatabaseType source_database = 14 [(google.api.field_behavior) = REQUIRED];
  164. // Required. The indicative destination database.
  165. DatabaseType destination_database = 15 [(google.api.field_behavior) = REQUIRED];
  166. }
  167. // An MySQL database connection profile.
  168. message MySqlConnectionProfile {
  169. // The MySQL database version.
  170. enum Version {
  171. // Unspecified version.
  172. VERSION_UNSPECIFIED = 0;
  173. // MySQL 5.5.
  174. V5_5 = 1;
  175. // MySQL 5.6.
  176. V5_6 = 2;
  177. // MySQL 5.7.
  178. V5_7 = 3;
  179. // MySQL 8.0.
  180. V8_0 = 4;
  181. }
  182. // The database version.
  183. Version version = 1;
  184. // The Cloud SQL id for a Cloud SQL instance.
  185. string cloud_sql_id = 2;
  186. }
  187. // An PostgreSQL connection profile.
  188. message PostgreSqlConnectionProfile {
  189. // The PostgreSQL database version.
  190. enum Version {
  191. // Unspecified version.
  192. VERSION_UNSPECIFIED = 0;
  193. // PostgreSQL 9.6.
  194. V9_6 = 1;
  195. // PostgreSQL 11.
  196. V11 = 2;
  197. // PostgreSQL 10.
  198. V10 = 3;
  199. // PostgreSQL 12.
  200. V12 = 4;
  201. // PostgreSQL 13.
  202. V13 = 5;
  203. }
  204. // The database version.
  205. Version version = 1;
  206. // The Cloud SQL id for a Cloud SQL instance.
  207. string cloud_sql_id = 2;
  208. }
  209. // A CloudSQL connection profile.
  210. message CloudSqlConnectionProfile {
  211. // The Cloud SQL id.
  212. string cloud_sql_id = 1;
  213. }
  214. // An Oracle connection profile.
  215. message OracleConnectionProfile {
  216. // Connectivity options used to establish a connection to the profile.
  217. enum ConnectivityType {
  218. // No data defined.
  219. CONNECTIVITY_TYPE_UNSPECIFIED = 0;
  220. // Static Service IP connectivity.
  221. STATIC_SERVICE_IP = 1;
  222. // Forward SSH tunnel connectivity.
  223. FORWARD_SSH_TUNNEL = 2;
  224. // Private connectivity.
  225. PRIVATE_CONNECTIVITY = 3;
  226. }
  227. // Required. Type of connectivity to source database.
  228. ConnectivityType connectivity_type = 1 [(google.api.field_behavior) = REQUIRED];
  229. }
  230. // An producer connection profile definition.
  231. // NEXT_TAG = 8.
  232. message LoggedConnectionProfile {
  233. // The connection profile states enum.
  234. enum State {
  235. // The state of the connection profile is unknown.
  236. STATE_UNSPECIFIED = 0;
  237. // The connection profile is in draft mode and fully editable.
  238. DRAFT = 1;
  239. // The connection profile is being created.
  240. CREATING = 2;
  241. // The connection profile is ready.
  242. READY = 3;
  243. // The connection profile is being updated.
  244. UPDATING = 4;
  245. // The connection profile is being deleted.
  246. DELETING = 5;
  247. // The connection profile has been deleted.
  248. DELETED = 6;
  249. // The last action on the connection profile failed.
  250. FAILED = 7;
  251. }
  252. // The unique identifier for a connection profile.
  253. string name = 1;
  254. // Labels.
  255. map<string, string> labels = 2;
  256. // The current connection profile state.
  257. State state = 3;
  258. // The display name.
  259. string display_name = 4;
  260. // The connection profile definition
  261. oneof connection_profile {
  262. // A MySQL database connection profile.
  263. MySqlConnectionProfile mysql = 100;
  264. // A PostgreSQL database connection profile.
  265. PostgreSqlConnectionProfile postgresql = 101;
  266. // A CloudSQL database connection profile.
  267. CloudSqlConnectionProfile cloudsql = 102;
  268. // An Oracle database connection profile.
  269. OracleConnectionProfile oracle = 103;
  270. }
  271. // The error details in case of state FAILED.
  272. google.rpc.Status error = 5;
  273. // The database provider.
  274. DatabaseProvider provider = 6;
  275. }
  276. // Log definition for Migration Job event
  277. message MigrationJobEventLog {
  278. // The migration job resource
  279. LoggedMigrationJob migration_job = 1;
  280. // Timestamp of the event
  281. google.protobuf.Timestamp occurrence_timestamp = 2;
  282. // Event code
  283. int32 code = 3;
  284. // Event message
  285. string text_message = 4;
  286. // Original event data
  287. oneof original_cause {
  288. // Original event code
  289. int32 original_code = 200;
  290. // Original event message
  291. string original_message = 201;
  292. }
  293. }
  294. // Log definition for Connection Profile event
  295. message ConnectionProfileEventLog {
  296. // The connection profilr resource
  297. LoggedConnectionProfile connection_profile = 1;
  298. // Timestamp of the event
  299. google.protobuf.Timestamp occurrence_timestamp = 2;
  300. // Event code
  301. int32 code = 3;
  302. // Event message
  303. string text_message = 4;
  304. // Original event data
  305. oneof original_cause {
  306. // Original event code
  307. int32 original_code = 200;
  308. // Original event message
  309. string original_message = 201;
  310. }
  311. }
  312. // The PrivateConnection resource is used to establish private connectivity
  313. // with the customer's network.
  314. message LoggedPrivateConnection {
  315. // Private Connection state.
  316. enum State {
  317. // Unspecified state.
  318. STATE_UNSPECIFIED = 0;
  319. // The private connection is in creation state - creating resources.
  320. CREATING = 1;
  321. // The private connection has been created with all of its resources.
  322. CREATED = 2;
  323. // The private connection creation has failed.
  324. FAILED = 3;
  325. // The private connection is being deleted.
  326. DELETING = 4;
  327. // Delete request has failed, resource is in invalid state.
  328. FAILED_TO_DELETE = 5;
  329. // The private connection has been deleted.
  330. DELETED = 6;
  331. }
  332. // The resource's name.
  333. string name = 1;
  334. // Labels.
  335. map<string, string> labels = 2;
  336. // Display name.
  337. string display_name = 3;
  338. // The state of the Private Connection.
  339. State state = 4;
  340. // The error details in case of state FAILED.
  341. google.rpc.Status error = 5;
  342. // VPC Peering Config.
  343. VpcPeeringConfig vpc_peering_config = 100;
  344. }
  345. // The VPC Peering configuration is used to create VPC peering between
  346. // the data plane and the consumer's VPC.
  347. message VpcPeeringConfig {
  348. // Fully qualified name of the VPC DMS will peer to.
  349. string vpc_name = 1;
  350. // The subnet that will be peered to. (CIDR of /29).
  351. string subnet = 2;
  352. }
  353. // Log definition for a Private Connection event.
  354. message PrivateConnectionEventLog {
  355. // The private connection resource.
  356. LoggedPrivateConnection private_connection = 1;
  357. // Timestamp of the event.
  358. google.protobuf.Timestamp occurrence_timestamp = 2;
  359. // Event code.
  360. int32 code = 3;
  361. // Event message.
  362. string text_message = 4;
  363. // Original event data.
  364. oneof original_cause {
  365. // Original event code.
  366. int32 original_code = 200;
  367. // Original event message.
  368. string original_message = 201;
  369. }
  370. }