Skip to content

Commit fe486dd

Browse files
Google APIscopybara-github
authored andcommitted
feat: added support for Private Trust to Certificate Manager API
docs: See https://cloud.google.com/certificate-manager/docs/deploy-google-managed-cas PiperOrigin-RevId: 478406005
1 parent 8cb255f commit fe486dd

File tree

4 files changed

+440
-107
lines changed

4 files changed

+440
-107
lines changed

google/cloud/certificatemanager/v1/BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
2121
proto_library(
2222
name = "certificatemanager_proto",
2323
srcs = [
24+
"certificate_issuance_config.proto",
2425
"certificate_manager.proto",
2526
],
2627
deps = [
@@ -29,6 +30,7 @@ proto_library(
2930
"//google/api:field_behavior_proto",
3031
"//google/api:resource_proto",
3132
"//google/longrunning:operations_proto",
33+
"@com_google_protobuf//:duration_proto",
3234
"@com_google_protobuf//:field_mask_proto",
3335
"@com_google_protobuf//:timestamp_proto",
3436
],
@@ -71,6 +73,7 @@ java_gapic_library(
7173
srcs = [":certificatemanager_proto_with_info"],
7274
gapic_yaml = None,
7375
grpc_service_config = "certificatemanager_grpc_service_config.json",
76+
rest_numeric_enums = False,
7477
service_yaml = "certificatemanager_v1.yaml",
7578
test_deps = [
7679
":certificatemanager_java_grpc",
@@ -134,6 +137,7 @@ go_gapic_library(
134137
grpc_service_config = "certificatemanager_grpc_service_config.json",
135138
importpath = "cloud.google.com/go/certificatemanager/apiv1;certificatemanager",
136139
metadata = True,
140+
rest_numeric_enums = False,
137141
service_yaml = "certificatemanager_v1.yaml",
138142
transport = "grpc+rest",
139143
deps = [
@@ -142,6 +146,7 @@ go_gapic_library(
142146
"//google/longrunning:longrunning_go_proto",
143147
"@com_google_cloud_go//longrunning:go_default_library",
144148
"@com_google_cloud_go//longrunning/autogen:go_default_library",
149+
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
145150
],
146151
)
147152

@@ -182,8 +187,11 @@ py_gapic_library(
182187
"python-gapic-namespace=google.cloud",
183188
"warehouse-package-name=google-cloud-certificate-manager",
184189
],
190+
rest_numeric_enums = False,
185191
service_yaml = "certificatemanager_v1.yaml",
186192
transport = "grpc",
193+
deps = [
194+
],
187195
)
188196

189197
py_test(
@@ -230,6 +238,7 @@ php_gapic_library(
230238
name = "certificatemanager_php_gapic",
231239
srcs = [":certificatemanager_proto_with_info"],
232240
grpc_service_config = "certificatemanager_grpc_service_config.json",
241+
rest_numeric_enums = False,
233242
service_yaml = "certificatemanager_v1.yaml",
234243
deps = [
235244
":certificatemanager_php_grpc",
@@ -263,6 +272,7 @@ nodejs_gapic_library(
263272
extra_protoc_parameters = ["metadata"],
264273
grpc_service_config = "certificatemanager_grpc_service_config.json",
265274
package = "google.cloud.certificatemanager.v1",
275+
rest_numeric_enums = False,
266276
service_yaml = "certificatemanager_v1.yaml",
267277
deps = [],
268278
)
@@ -307,6 +317,7 @@ ruby_cloud_gapic_library(
307317
"ruby-cloud-product-url=https://cloud.google.com/certificate-manager",
308318
],
309319
grpc_service_config = "certificatemanager_grpc_service_config.json",
320+
rest_numeric_enums = False,
310321
ruby_cloud_description = "Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud.",
311322
ruby_cloud_title = "Certificate Manager V1",
312323
service_yaml = "certificatemanager_v1.yaml",
@@ -353,6 +364,7 @@ csharp_gapic_library(
353364
srcs = [":certificatemanager_proto_with_info"],
354365
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
355366
grpc_service_config = "certificatemanager_grpc_service_config.json",
367+
rest_numeric_enums = False,
356368
service_yaml = "certificatemanager_v1.yaml",
357369
deps = [
358370
":certificatemanager_csharp_grpc",
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.certificatemanager.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/protobuf/duration.proto";
22+
import "google/protobuf/timestamp.proto";
23+
24+
option csharp_namespace = "Google.Cloud.CertificateManager.V1";
25+
option go_package = "google.golang.org/genproto/googleapis/cloud/certificatemanager/v1;certificatemanager";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "CertificateIssuanceConfigProto";
28+
option java_package = "com.google.cloud.certificatemanager.v1";
29+
option php_namespace = "Google\\Cloud\\CertificateManager\\V1";
30+
option ruby_package = "Google::Cloud::CertificateManager::V1";
31+
option (google.api.resource_definition) = {
32+
type: "privateca.googleapis.com/CaPool"
33+
pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}"
34+
};
35+
36+
// Request for the `ListCertificateIssuanceConfigs` method.
37+
message ListCertificateIssuanceConfigsRequest {
38+
// Required. The project and location from which the certificate should be
39+
// listed, specified in the format `projects/*/locations/*`.
40+
string parent = 1 [
41+
(google.api.field_behavior) = REQUIRED,
42+
(google.api.resource_reference) = {
43+
type: "locations.googleapis.com/Location"
44+
}
45+
];
46+
47+
// Maximum number of certificate configs to return per call.
48+
int32 page_size = 2;
49+
50+
// The value returned by the last `ListCertificateIssuanceConfigsResponse`.
51+
// Indicates that this is a continuation of a prior
52+
// `ListCertificateIssuanceConfigs` call, and that the system should return
53+
// the next page of data.
54+
string page_token = 3;
55+
56+
// Filter expression to restrict the Certificates Configs returned.
57+
string filter = 4;
58+
59+
// A list of Certificate Config field names used to specify the order of the
60+
// returned results. The default sorting order is ascending. To specify
61+
// descending order for a field, add a suffix " desc".
62+
string order_by = 5;
63+
}
64+
65+
// Response for the `ListCertificateIssuanceConfigs` method.
66+
message ListCertificateIssuanceConfigsResponse {
67+
// A list of certificate configs for the parent resource.
68+
repeated CertificateIssuanceConfig certificate_issuance_configs = 1;
69+
70+
// If there might be more results than those appearing in this response, then
71+
// `next_page_token` is included. To get the next set of results, call this
72+
// method again using the value of `next_page_token` as `page_token`.
73+
string next_page_token = 2;
74+
75+
// Locations that could not be reached.
76+
repeated string unreachable = 3;
77+
}
78+
79+
// Request for the `GetCertificateIssuanceConfig` method.
80+
message GetCertificateIssuanceConfigRequest {
81+
// Required. A name of the certificate issuance config to describe. Must be in
82+
// the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
83+
string name = 1 [
84+
(google.api.field_behavior) = REQUIRED,
85+
(google.api.resource_reference) = {
86+
type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
87+
}
88+
];
89+
}
90+
91+
// Request for the `CreateCertificateIssuanceConfig` method.
92+
message CreateCertificateIssuanceConfigRequest {
93+
// Required. The parent resource of the certificate issuance config. Must be
94+
// in the format `projects/*/locations/*`.
95+
string parent = 1 [
96+
(google.api.field_behavior) = REQUIRED,
97+
(google.api.resource_reference) = {
98+
type: "locations.googleapis.com/Location"
99+
}
100+
];
101+
102+
// Required. A user-provided name of the certificate config.
103+
string certificate_issuance_config_id = 2
104+
[(google.api.field_behavior) = REQUIRED];
105+
106+
// Required. A definition of the certificate issuance config to create.
107+
CertificateIssuanceConfig certificate_issuance_config = 3
108+
[(google.api.field_behavior) = REQUIRED];
109+
}
110+
111+
// Request for the `DeleteCertificateIssuanceConfig` method.
112+
message DeleteCertificateIssuanceConfigRequest {
113+
// Required. A name of the certificate issuance config to delete. Must be in
114+
// the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
115+
string name = 1 [
116+
(google.api.field_behavior) = REQUIRED,
117+
(google.api.resource_reference) = {
118+
type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
119+
}
120+
];
121+
}
122+
123+
// CertificateIssuanceConfig specifies how to issue and manage a certificate.
124+
message CertificateIssuanceConfig {
125+
option (google.api.resource) = {
126+
type: "certificatemanager.googleapis.com/CertificateIssuanceConfig"
127+
pattern: "projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}"
128+
};
129+
130+
// The CA that issues the workload certificate. It includes CA address, type,
131+
// authentication to CA service, etc.
132+
message CertificateAuthorityConfig {
133+
// Contains information required to contact CA service.
134+
message CertificateAuthorityServiceConfig {
135+
// Required. A CA pool resource used to issue a certificate.
136+
// The CA pool string has a relative resource path following the form
137+
// "projects/{project}/locations/{location}/caPools/{ca_pool}".
138+
string ca_pool = 1 [
139+
(google.api.field_behavior) = REQUIRED,
140+
(google.api.resource_reference) = {
141+
type: "privateca.googleapis.com/CaPool"
142+
}
143+
];
144+
}
145+
146+
oneof kind {
147+
// Defines a CertificateAuthorityServiceConfig.
148+
CertificateAuthorityServiceConfig certificate_authority_service_config =
149+
1;
150+
}
151+
}
152+
153+
// The type of keypair to generate.
154+
enum KeyAlgorithm {
155+
// Unspecified key algorithm.
156+
KEY_ALGORITHM_UNSPECIFIED = 0;
157+
158+
// Specifies RSA with a 2048-bit modulus.
159+
RSA_2048 = 1;
160+
161+
// Specifies ECDSA with curve P256.
162+
ECDSA_P256 = 4;
163+
}
164+
165+
// A user-defined name of the certificate issuance config.
166+
// CertificateIssuanceConfig names must be unique globally and match pattern
167+
// `projects/*/locations/*/certificateIssuanceConfigs/*`.
168+
string name = 1;
169+
170+
// Output only. The creation timestamp of a CertificateIssuanceConfig.
171+
google.protobuf.Timestamp create_time = 2
172+
[(google.api.field_behavior) = OUTPUT_ONLY];
173+
174+
// Output only. The last update timestamp of a CertificateIssuanceConfig.
175+
google.protobuf.Timestamp update_time = 3
176+
[(google.api.field_behavior) = OUTPUT_ONLY];
177+
178+
// Set of labels associated with a CertificateIssuanceConfig.
179+
map<string, string> labels = 4;
180+
181+
// One or more paragraphs of text description of a CertificateIssuanceConfig.
182+
string description = 5;
183+
184+
// Required. The CA that issues the workload certificate. It includes the CA
185+
// address, type, authentication to CA service, etc.
186+
CertificateAuthorityConfig certificate_authority_config = 6
187+
[(google.api.field_behavior) = REQUIRED];
188+
189+
// Required. Workload certificate lifetime requested.
190+
google.protobuf.Duration lifetime = 7
191+
[(google.api.field_behavior) = REQUIRED];
192+
193+
// Required. Specifies the percentage of elapsed time of the certificate
194+
// lifetime to wait before renewing the certificate. Must be a number between
195+
// 1-99, inclusive.
196+
int32 rotation_window_percentage = 8 [(google.api.field_behavior) = REQUIRED];
197+
198+
// Required. The key algorithm to use when generating the private key.
199+
KeyAlgorithm key_algorithm = 9 [(google.api.field_behavior) = REQUIRED];
200+
}

0 commit comments

Comments
 (0)