config_common.proto 3.7 KB

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