certificate_issuance_config.proto 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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.certificatemanager.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.CertificateManager.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/certificatemanager/v1;certificatemanager";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "CertificateIssuanceConfigProto";
  24. option java_package = "com.google.cloud.certificatemanager.v1";
  25. option php_namespace = "Google\\Cloud\\CertificateManager\\V1";
  26. option ruby_package = "Google::Cloud::CertificateManager::V1";
  27. option (google.api.resource_definition) = {
  28. type: "privateca.googleapis.com/CaPool"
  29. pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}"
  30. };
  31. // Request for the `ListCertificateIssuanceConfigs` method.
  32. message ListCertificateIssuanceConfigsRequest {
  33. // Required. The project and location from which the certificate should be
  34. // listed, specified in the format `projects/*/locations/*`.
  35. string parent = 1 [
  36. (google.api.field_behavior) = REQUIRED,
  37. (google.api.resource_reference) = {
  38. type: "locations.googleapis.com/Location"
  39. }
  40. ];
  41. // Maximum number of certificate configs to return per call.
  42. int32 page_size = 2;
  43. // The value returned by the last `ListCertificateIssuanceConfigsResponse`.
  44. // Indicates that this is a continuation of a prior
  45. // `ListCertificateIssuanceConfigs` call, and that the system should return
  46. // the next page of data.
  47. string page_token = 3;
  48. // Filter expression to restrict the Certificates Configs returned.
  49. string filter = 4;
  50. // A list of Certificate Config field names used to specify the order of the
  51. // returned results. The default sorting order is ascending. To specify
  52. // descending order for a field, add a suffix " desc".
  53. string order_by = 5;
  54. }
  55. // Response for the `ListCertificateIssuanceConfigs` method.
  56. message ListCertificateIssuanceConfigsResponse {
  57. // A list of certificate configs for the parent resource.
  58. repeated CertificateIssuanceConfig certificate_issuance_configs = 1;
  59. // If there might be more results than those appearing in this response, then
  60. // `next_page_token` is included. To get the next set of results, call this
  61. // method again using the value of `next_page_token` as `page_token`.
  62. string next_page_token = 2;
  63. // Locations that could not be reached.
  64. repeated string unreachable = 3;
  65. }
  66. // Request for the `GetCertificateIssuanceConfig` method.
  67. message GetCertificateIssuanceConfigRequest {
  68. // Required. A name of the certificate issuance config to describe. Must be in
  69. // the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
  70. string name = 1 [
  71. (google.api.field_behavior) = REQUIRED,
  72. (google.api.resource_reference) = {
  73. type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
  74. }
  75. ];
  76. }
  77. // Request for the `CreateCertificateIssuanceConfig` method.
  78. message CreateCertificateIssuanceConfigRequest {
  79. // Required. The parent resource of the certificate issuance config. Must be
  80. // in the format `projects/*/locations/*`.
  81. string parent = 1 [
  82. (google.api.field_behavior) = REQUIRED,
  83. (google.api.resource_reference) = {
  84. type: "locations.googleapis.com/Location"
  85. }
  86. ];
  87. // Required. A user-provided name of the certificate config.
  88. string certificate_issuance_config_id = 2
  89. [(google.api.field_behavior) = REQUIRED];
  90. // Required. A definition of the certificate issuance config to create.
  91. CertificateIssuanceConfig certificate_issuance_config = 3
  92. [(google.api.field_behavior) = REQUIRED];
  93. }
  94. // Request for the `DeleteCertificateIssuanceConfig` method.
  95. message DeleteCertificateIssuanceConfigRequest {
  96. // Required. A name of the certificate issuance config to delete. Must be in
  97. // the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
  98. string name = 1 [
  99. (google.api.field_behavior) = REQUIRED,
  100. (google.api.resource_reference) = {
  101. type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
  102. }
  103. ];
  104. }
  105. // CertificateIssuanceConfig specifies how to issue and manage a certificate.
  106. message CertificateIssuanceConfig {
  107. option (google.api.resource) = {
  108. type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
  109. pattern: "projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}"
  110. };
  111. // The CA that issues the workload certificate. It includes CA address, type,
  112. // authentication to CA service, etc.
  113. message CertificateAuthorityConfig {
  114. // Contains information required to contact CA service.
  115. message CertificateAuthorityServiceConfig {
  116. // Required. A CA pool resource used to issue a certificate.
  117. // The CA pool string has a relative resource path following the form
  118. // "projects/{project}/locations/{location}/caPools/{ca_pool}".
  119. string ca_pool = 1 [
  120. (google.api.field_behavior) = REQUIRED,
  121. (google.api.resource_reference) = {
  122. type: "privateca.googleapis.com/CaPool"
  123. }
  124. ];
  125. }
  126. oneof kind {
  127. // Defines a CertificateAuthorityServiceConfig.
  128. CertificateAuthorityServiceConfig certificate_authority_service_config =
  129. 1;
  130. }
  131. }
  132. // The type of keypair to generate.
  133. enum KeyAlgorithm {
  134. // Unspecified key algorithm.
  135. KEY_ALGORITHM_UNSPECIFIED = 0;
  136. // Specifies RSA with a 2048-bit modulus.
  137. RSA_2048 = 1;
  138. // Specifies ECDSA with curve P256.
  139. ECDSA_P256 = 4;
  140. }
  141. // A user-defined name of the certificate issuance config.
  142. // CertificateIssuanceConfig names must be unique globally and match pattern
  143. // `projects/*/locations/*/certificateIssuanceConfigs/*`.
  144. string name = 1;
  145. // Output only. The creation timestamp of a CertificateIssuanceConfig.
  146. google.protobuf.Timestamp create_time = 2
  147. [(google.api.field_behavior) = OUTPUT_ONLY];
  148. // Output only. The last update timestamp of a CertificateIssuanceConfig.
  149. google.protobuf.Timestamp update_time = 3
  150. [(google.api.field_behavior) = OUTPUT_ONLY];
  151. // Set of labels associated with a CertificateIssuanceConfig.
  152. map<string, string> labels = 4;
  153. // One or more paragraphs of text description of a CertificateIssuanceConfig.
  154. string description = 5;
  155. // Required. The CA that issues the workload certificate. It includes the CA
  156. // address, type, authentication to CA service, etc.
  157. CertificateAuthorityConfig certificate_authority_config = 6
  158. [(google.api.field_behavior) = REQUIRED];
  159. // Required. Workload certificate lifetime requested.
  160. google.protobuf.Duration lifetime = 7
  161. [(google.api.field_behavior) = REQUIRED];
  162. // Required. Specifies the percentage of elapsed time of the certificate
  163. // lifetime to wait before renewing the certificate. Must be a number between
  164. // 1-99, inclusive.
  165. int32 rotation_window_percentage = 8 [(google.api.field_behavior) = REQUIRED];
  166. // Required. The key algorithm to use when generating the private key.
  167. KeyAlgorithm key_algorithm = 9 [(google.api.field_behavior) = REQUIRED];
  168. }