config_common.proto 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.osconfig.v1alpha;
  16. option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "ConfigCommonProto";
  20. option java_package = "com.google.cloud.osconfig.v1alpha";
  21. option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha";
  22. option ruby_package = "Google::Cloud::OsConfig::V1alpha";
  23. // Step performed by the OS Config agent for configuring an `OSPolicyResource`
  24. // to its desired state.
  25. message OSPolicyResourceConfigStep {
  26. option deprecated = true;
  27. // Supported configuration step types
  28. enum Type {
  29. option deprecated = true;
  30. // Default value. This value is unused.
  31. TYPE_UNSPECIFIED = 0;
  32. // Validation to detect resource conflicts, schema errors, etc.
  33. VALIDATION = 1;
  34. // Check the current desired state status of the resource.
  35. DESIRED_STATE_CHECK = 2;
  36. // Enforce the desired state for a resource that is not in desired state.
  37. DESIRED_STATE_ENFORCEMENT = 3;
  38. // Re-check desired state status for a resource after enforcement of all
  39. // resources in the current configuration run.
  40. //
  41. // This step is used to determine the final desired state status for the
  42. // resource. It accounts for any resources that might have drifted from
  43. // their desired state due to side effects from configuring other resources
  44. // during the current configuration run.
  45. DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4;
  46. }
  47. // Supported outcomes for a configuration step.
  48. enum Outcome {
  49. option deprecated = true;
  50. // Default value. This value is unused.
  51. OUTCOME_UNSPECIFIED = 0;
  52. // The step succeeded.
  53. SUCCEEDED = 1;
  54. // The step failed.
  55. FAILED = 2;
  56. }
  57. // Configuration step type.
  58. Type type = 1;
  59. // Outcome of the configuration step.
  60. Outcome outcome = 2;
  61. // An error message recorded during the execution of this step.
  62. // Only populated when outcome is FAILED.
  63. string error_message = 3;
  64. }
  65. // Compliance data for an OS policy resource.
  66. message OSPolicyResourceCompliance {
  67. option deprecated = true;
  68. // ExecResource specific output.
  69. message ExecResourceOutput {
  70. option deprecated = true;
  71. // Output from Enforcement phase output file (if run).
  72. // Output size is limited to 100K bytes.
  73. bytes enforcement_output = 2;
  74. }
  75. // The id of the OS policy resource.
  76. string os_policy_resource_id = 1;
  77. // Ordered list of configuration steps taken by the agent for the OS policy
  78. // resource.
  79. repeated OSPolicyResourceConfigStep config_steps = 2;
  80. // Compliance state of the OS policy resource.
  81. OSPolicyComplianceState state = 3;
  82. // Resource specific output.
  83. oneof output {
  84. // ExecResource specific output.
  85. ExecResourceOutput exec_resource_output = 4;
  86. }
  87. }
  88. // Supported OSPolicy compliance states.
  89. enum OSPolicyComplianceState {
  90. option deprecated = true;
  91. // Default value. This value is unused.
  92. OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0;
  93. // Compliant state.
  94. COMPLIANT = 1;
  95. // Non-compliant state
  96. NON_COMPLIANT = 2;
  97. // Unknown compliance state.
  98. UNKNOWN = 3;
  99. // No applicable OS policies were found for the instance.
  100. // This state is only applicable to the instance.
  101. NO_OS_POLICIES_APPLICABLE = 4;
  102. }