complete_deployment.proto 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.cloudsetup.logging.v1;
  16. import "google/api/resource.proto";
  17. import "google/rpc/status.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/cloudsetup/logging/v1;logging";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "CompleteDeploymentProto";
  21. option java_package = "com.google.cloud.cloudsetup.logging.v1";
  22. option csharp_namespace = "Google.Cloud.CloudSetup.Logging.V1";
  23. option php_namespace = "Google\\Cloud\\CloudSetup\\Logging\\V1";
  24. option ruby_package = "Google::Cloud::CloudSetup::Logging::V1";
  25. // JSON payload for the Cloud Logging event:
  26. // `organizations/[organizationId]/logs/cloudsetup.googleapis.com%2Fcomplete_deployment`.
  27. // This event gets emitted upon completion of a config deployment as part of the
  28. // Cloud Setup Checklist.
  29. //
  30. // The deployment can fail even if it returns a
  31. // `config.googleapis.com/Deployment`. The state of that message will be
  32. // `FAILED`. Hence, if there is a `value` present, the `state` can still be,
  33. // `FAILED`. The message for the error or failure will be on the `error` or the
  34. // `value` if the Operation results in an error or if the `state` of the
  35. // Deployment is `FAILED`, respectively.
  36. message CompleteDeploymentEvent {
  37. // State of the completed deployment.
  38. enum State {
  39. // The zero value. It is applied when `state` is unset. Do not use.
  40. STATE_UNSPECIFIED = 0;
  41. // Indicates that a Deployment value was present when the config deployment
  42. // finished and the State was anything other than FAILED.
  43. SUCCEEDED = 1;
  44. // Indicates that the Operation result was an error or the Deployment
  45. // `state` was FAILED.
  46. FAILED = 2;
  47. }
  48. oneof result {
  49. // Result of the Deployment recorded upon completion.
  50. CompleteDeploymentResult value = 1;
  51. // Result of the Deployment if the `Operation` results in an error.
  52. google.rpc.Status error = 2;
  53. }
  54. // The `state` of this deployment completion event.
  55. State state = 3;
  56. // Flag to indicate if deployment is preview only.
  57. bool preview_only = 4;
  58. }
  59. // This message is used when the CompleteDeploymentEvent has a value.
  60. message CompleteDeploymentResult {
  61. // This is the Deployment that completed.
  62. // Format is projects/{project}/locations/{location}/deployments/{name}.
  63. string deployment = 1 [(google.api.resource_reference) = {
  64. type: "config.googleapis.com/Deployment"
  65. }];
  66. // This is the Preview that completed.
  67. // Format is projects/{project}/locations/{location}/previews/{preview}
  68. string preview = 3 [
  69. (google.api.resource_reference) = { type: "config.googleapis.com/Preview" }
  70. ];
  71. // The message that is returned when a deployment completes. This **can** be
  72. // an error message if the `Deployment` `state` is `FAILED`.
  73. string message = 2;
  74. }