google-cloud-security-private_ca-v1 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/security/private_ca/v1/bindings_override.rb +185 -0
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb +2877 -0
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb +795 -0
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb +1776 -0
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb +58 -0
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb +6 -0
- data/lib/google/cloud/security/private_ca/v1/rest.rb +40 -0
- data/lib/google/cloud/security/private_ca/v1/version.rb +1 -1
- data/lib/google/cloud/security/private_ca/v1.rb +5 -0
- metadata +19 -11
@@ -0,0 +1,2877 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/security/privateca/v1/service_pb"
|
21
|
+
require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module Security
|
28
|
+
module PrivateCA
|
29
|
+
module V1
|
30
|
+
module CertificateAuthorityService
|
31
|
+
module Rest
|
32
|
+
##
|
33
|
+
# REST client for the CertificateAuthorityService service.
|
34
|
+
#
|
35
|
+
# [Certificate Authority
|
36
|
+
# Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
|
37
|
+
# manages private certificate authorities and issued certificates.
|
38
|
+
#
|
39
|
+
class Client
|
40
|
+
include Paths
|
41
|
+
|
42
|
+
# @private
|
43
|
+
attr_reader :certificate_authority_service_stub
|
44
|
+
|
45
|
+
##
|
46
|
+
# Configure the CertificateAuthorityService Client class.
|
47
|
+
#
|
48
|
+
# See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration}
|
49
|
+
# for a description of the configuration fields.
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
#
|
53
|
+
# # Modify the configuration for all CertificateAuthorityService clients
|
54
|
+
# ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config|
|
55
|
+
# config.timeout = 10.0
|
56
|
+
# end
|
57
|
+
#
|
58
|
+
# @yield [config] Configure the Client client.
|
59
|
+
# @yieldparam config [Client::Configuration]
|
60
|
+
#
|
61
|
+
# @return [Client::Configuration]
|
62
|
+
#
|
63
|
+
def self.configure
|
64
|
+
@configure ||= begin
|
65
|
+
namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"]
|
66
|
+
parent_config = while namespace.any?
|
67
|
+
parent_name = namespace.join "::"
|
68
|
+
parent_const = const_get parent_name
|
69
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
70
|
+
namespace.pop
|
71
|
+
end
|
72
|
+
default_config = Client::Configuration.new parent_config
|
73
|
+
|
74
|
+
default_config.timeout = 60.0
|
75
|
+
default_config.retry_policy = {
|
76
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4]
|
77
|
+
}
|
78
|
+
|
79
|
+
default_config
|
80
|
+
end
|
81
|
+
yield @configure if block_given?
|
82
|
+
@configure
|
83
|
+
end
|
84
|
+
|
85
|
+
##
|
86
|
+
# Configure the CertificateAuthorityService Client instance.
|
87
|
+
#
|
88
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
89
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
90
|
+
# should be made on {Client.configure}.
|
91
|
+
#
|
92
|
+
# See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration}
|
93
|
+
# for a description of the configuration fields.
|
94
|
+
#
|
95
|
+
# @yield [config] Configure the Client client.
|
96
|
+
# @yieldparam config [Client::Configuration]
|
97
|
+
#
|
98
|
+
# @return [Client::Configuration]
|
99
|
+
#
|
100
|
+
def configure
|
101
|
+
yield @config if block_given?
|
102
|
+
@config
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Create a new CertificateAuthorityService REST client object.
|
107
|
+
#
|
108
|
+
# @example
|
109
|
+
#
|
110
|
+
# # Create a client using the default configuration
|
111
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
|
112
|
+
#
|
113
|
+
# # Create a client using a custom configuration
|
114
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config|
|
115
|
+
# config.timeout = 10.0
|
116
|
+
# end
|
117
|
+
#
|
118
|
+
# @yield [config] Configure the CertificateAuthorityService client.
|
119
|
+
# @yieldparam config [Client::Configuration]
|
120
|
+
#
|
121
|
+
def initialize
|
122
|
+
# Create the configuration object
|
123
|
+
@config = Configuration.new Client.configure
|
124
|
+
|
125
|
+
# Yield the configuration if needed
|
126
|
+
yield @config if block_given?
|
127
|
+
|
128
|
+
# Create credentials
|
129
|
+
credentials = @config.credentials
|
130
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
131
|
+
# but only if the default endpoint does not have a region prefix.
|
132
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
133
|
+
!@config.endpoint.split(".").first.include?("-")
|
134
|
+
credentials ||= Credentials.default scope: @config.scope,
|
135
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
136
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
137
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
138
|
+
end
|
139
|
+
|
140
|
+
@quota_project_id = @config.quota_project
|
141
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
142
|
+
|
143
|
+
@operations_client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.quota_project = @quota_project_id
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
149
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
150
|
+
config.credentials = credentials
|
151
|
+
config.quota_project = @quota_project_id
|
152
|
+
config.endpoint = @config.endpoint
|
153
|
+
config.bindings_override = @config.bindings_override
|
154
|
+
end
|
155
|
+
|
156
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
157
|
+
config.credentials = credentials
|
158
|
+
config.quota_project = @quota_project_id
|
159
|
+
config.endpoint = @config.endpoint
|
160
|
+
config.bindings_override = @config.bindings_override
|
161
|
+
end
|
162
|
+
|
163
|
+
@certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Get the associated client for long-running operations.
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations]
|
170
|
+
#
|
171
|
+
attr_reader :operations_client
|
172
|
+
|
173
|
+
##
|
174
|
+
# Get the associated client for mix-in of the Locations.
|
175
|
+
#
|
176
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
177
|
+
#
|
178
|
+
attr_reader :location_client
|
179
|
+
|
180
|
+
##
|
181
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
182
|
+
#
|
183
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
184
|
+
#
|
185
|
+
attr_reader :iam_policy_client
|
186
|
+
|
187
|
+
# Service calls
|
188
|
+
|
189
|
+
##
|
190
|
+
# Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
|
191
|
+
# in a given Project, Location from a particular
|
192
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
193
|
+
#
|
194
|
+
# @overload create_certificate(request, options = nil)
|
195
|
+
# Pass arguments to `create_certificate` via a request object, either of type
|
196
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash.
|
197
|
+
#
|
198
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash]
|
199
|
+
# A request object representing the call parameters. Required. To specify no
|
200
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
201
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
202
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
203
|
+
#
|
204
|
+
# @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil)
|
205
|
+
# Pass arguments to `create_certificate` via keyword arguments. Note that at
|
206
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
207
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
208
|
+
#
|
209
|
+
# @param parent [::String]
|
210
|
+
# Required. The resource name of the
|
211
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
|
212
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the
|
213
|
+
# format `projects/*/locations/*/caPools/*`.
|
214
|
+
# @param certificate_id [::String]
|
215
|
+
# Optional. It must be unique within a location and match the regular
|
216
|
+
# expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a
|
217
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
218
|
+
# in the Enterprise [CertificateAuthority.Tier][], but is optional and its
|
219
|
+
# value is ignored otherwise.
|
220
|
+
# @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash]
|
221
|
+
# Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
|
222
|
+
# with initial field values.
|
223
|
+
# @param request_id [::String]
|
224
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
225
|
+
# if you must retry your request, the server will know to ignore the request
|
226
|
+
# if it has already been completed. The server will guarantee that for at
|
227
|
+
# least 60 minutes since the first request.
|
228
|
+
#
|
229
|
+
# For example, consider a situation where you make an initial request and the
|
230
|
+
# request times out. If you make the request again with the same request ID,
|
231
|
+
# the server can check if original operation with the same request ID was
|
232
|
+
# received, and if so, will ignore the second request. This prevents clients
|
233
|
+
# from accidentally creating duplicate commitments.
|
234
|
+
#
|
235
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
236
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
237
|
+
# @param validate_only [::Boolean]
|
238
|
+
# Optional. If this is true, no
|
239
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will
|
240
|
+
# be persisted regardless of the
|
241
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s
|
242
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned
|
243
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not
|
244
|
+
# contain the
|
245
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate}
|
246
|
+
# field.
|
247
|
+
# @param issuing_certificate_authority_id [::String]
|
248
|
+
# Optional. The resource ID of the
|
249
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
250
|
+
# that should issue the certificate. This optional field will ignore the
|
251
|
+
# load-balancing scheme of the Pool and directly issue the certificate from
|
252
|
+
# the CA with the specified ID, contained in the same
|
253
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`.
|
254
|
+
# Per-CA quota rules apply. If left empty, a
|
255
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
256
|
+
# will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}
|
257
|
+
# by the service. For example, to issue a
|
258
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a
|
259
|
+
# Certificate Authority with resource name
|
260
|
+
# "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca",
|
261
|
+
# you can set the
|
262
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent}
|
263
|
+
# to "projects/my-project/locations/us-central1/caPools/my-pool" and the
|
264
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id}
|
265
|
+
# to "my-ca".
|
266
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
267
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
268
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
269
|
+
#
|
270
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
271
|
+
#
|
272
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
273
|
+
def create_certificate request, options = nil
|
274
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
275
|
+
|
276
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest
|
277
|
+
|
278
|
+
# Converts hash and nil to an options object
|
279
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
280
|
+
|
281
|
+
# Customize the options with defaults
|
282
|
+
call_metadata = @config.rpcs.create_certificate.metadata.to_h
|
283
|
+
|
284
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
285
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
286
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
287
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
288
|
+
transports_version_send: [:rest]
|
289
|
+
|
290
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
|
293
|
+
metadata: call_metadata,
|
294
|
+
retry_policy: @config.rpcs.create_certificate.retry_policy
|
295
|
+
|
296
|
+
options.apply_defaults timeout: @config.timeout,
|
297
|
+
metadata: @config.metadata,
|
298
|
+
retry_policy: @config.retry_policy
|
299
|
+
|
300
|
+
@certificate_authority_service_stub.create_certificate request, options do |result, operation|
|
301
|
+
yield result, operation if block_given?
|
302
|
+
return result
|
303
|
+
end
|
304
|
+
rescue ::Gapic::Rest::Error => e
|
305
|
+
raise ::Google::Cloud::Error.from_error(e)
|
306
|
+
end
|
307
|
+
|
308
|
+
##
|
309
|
+
# Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
|
310
|
+
#
|
311
|
+
# @overload get_certificate(request, options = nil)
|
312
|
+
# Pass arguments to `get_certificate` via a request object, either of type
|
313
|
+
# {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash.
|
314
|
+
#
|
315
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash]
|
316
|
+
# A request object representing the call parameters. Required. To specify no
|
317
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
318
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
319
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
320
|
+
#
|
321
|
+
# @overload get_certificate(name: nil)
|
322
|
+
# Pass arguments to `get_certificate` via keyword arguments. Note that at
|
323
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
324
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
325
|
+
#
|
326
|
+
# @param name [::String]
|
327
|
+
# Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name}
|
328
|
+
# of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to
|
329
|
+
# get.
|
330
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
331
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
332
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
333
|
+
#
|
334
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
335
|
+
#
|
336
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
337
|
+
def get_certificate request, options = nil
|
338
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
339
|
+
|
340
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest
|
341
|
+
|
342
|
+
# Converts hash and nil to an options object
|
343
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
344
|
+
|
345
|
+
# Customize the options with defaults
|
346
|
+
call_metadata = @config.rpcs.get_certificate.metadata.to_h
|
347
|
+
|
348
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
349
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
350
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
351
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
352
|
+
transports_version_send: [:rest]
|
353
|
+
|
354
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
355
|
+
|
356
|
+
options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
|
357
|
+
metadata: call_metadata,
|
358
|
+
retry_policy: @config.rpcs.get_certificate.retry_policy
|
359
|
+
|
360
|
+
options.apply_defaults timeout: @config.timeout,
|
361
|
+
metadata: @config.metadata,
|
362
|
+
retry_policy: @config.retry_policy
|
363
|
+
|
364
|
+
@certificate_authority_service_stub.get_certificate request, options do |result, operation|
|
365
|
+
yield result, operation if block_given?
|
366
|
+
return result
|
367
|
+
end
|
368
|
+
rescue ::Gapic::Rest::Error => e
|
369
|
+
raise ::Google::Cloud::Error.from_error(e)
|
370
|
+
end
|
371
|
+
|
372
|
+
##
|
373
|
+
# Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}.
|
374
|
+
#
|
375
|
+
# @overload list_certificates(request, options = nil)
|
376
|
+
# Pass arguments to `list_certificates` via a request object, either of type
|
377
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash.
|
378
|
+
#
|
379
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash]
|
380
|
+
# A request object representing the call parameters. Required. To specify no
|
381
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
382
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
383
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
384
|
+
#
|
385
|
+
# @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
386
|
+
# Pass arguments to `list_certificates` via keyword arguments. Note that at
|
387
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
388
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
389
|
+
#
|
390
|
+
# @param parent [::String]
|
391
|
+
# Required. The resource name of the location associated with the
|
392
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the
|
393
|
+
# format `projects/*/locations/*/caPools/*`.
|
394
|
+
# @param page_size [::Integer]
|
395
|
+
# Optional. Limit on the number of
|
396
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include
|
397
|
+
# in the response. Further
|
398
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can
|
399
|
+
# subsequently be obtained by including the
|
400
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}
|
401
|
+
# in a subsequent request. If unspecified, the server will pick an
|
402
|
+
# appropriate default.
|
403
|
+
# @param page_token [::String]
|
404
|
+
# Optional. Pagination token, returned earlier via
|
405
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}.
|
406
|
+
# @param filter [::String]
|
407
|
+
# Optional. Only include resources that match the filter in the response. For
|
408
|
+
# details on supported filters and syntax, see [Certificates Filtering
|
409
|
+
# documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).
|
410
|
+
# @param order_by [::String]
|
411
|
+
# Optional. Specify how the results should be sorted. For details on
|
412
|
+
# supported fields and syntax, see [Certificates Sorting
|
413
|
+
# documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).
|
414
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
415
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse]
|
416
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
417
|
+
#
|
418
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse]
|
419
|
+
#
|
420
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
421
|
+
def list_certificates request, options = nil
|
422
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
423
|
+
|
424
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest
|
425
|
+
|
426
|
+
# Converts hash and nil to an options object
|
427
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
428
|
+
|
429
|
+
# Customize the options with defaults
|
430
|
+
call_metadata = @config.rpcs.list_certificates.metadata.to_h
|
431
|
+
|
432
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
433
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
434
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
435
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
436
|
+
transports_version_send: [:rest]
|
437
|
+
|
438
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
439
|
+
|
440
|
+
options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
|
441
|
+
metadata: call_metadata,
|
442
|
+
retry_policy: @config.rpcs.list_certificates.retry_policy
|
443
|
+
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata,
|
446
|
+
retry_policy: @config.retry_policy
|
447
|
+
|
448
|
+
@certificate_authority_service_stub.list_certificates request, options do |result, operation|
|
449
|
+
yield result, operation if block_given?
|
450
|
+
return result
|
451
|
+
end
|
452
|
+
rescue ::Gapic::Rest::Error => e
|
453
|
+
raise ::Google::Cloud::Error.from_error(e)
|
454
|
+
end
|
455
|
+
|
456
|
+
##
|
457
|
+
# Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
|
458
|
+
#
|
459
|
+
# @overload revoke_certificate(request, options = nil)
|
460
|
+
# Pass arguments to `revoke_certificate` via a request object, either of type
|
461
|
+
# {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash.
|
462
|
+
#
|
463
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash]
|
464
|
+
# A request object representing the call parameters. Required. To specify no
|
465
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
466
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
467
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
468
|
+
#
|
469
|
+
# @overload revoke_certificate(name: nil, reason: nil, request_id: nil)
|
470
|
+
# Pass arguments to `revoke_certificate` via keyword arguments. Note that at
|
471
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
472
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
473
|
+
#
|
474
|
+
# @param name [::String]
|
475
|
+
# Required. The resource name for this
|
476
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format
|
477
|
+
# `projects/*/locations/*/caPools/*/certificates/*`.
|
478
|
+
# @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason]
|
479
|
+
# Required. The
|
480
|
+
# {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for
|
481
|
+
# revoking this certificate.
|
482
|
+
# @param request_id [::String]
|
483
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
484
|
+
# if you must retry your request, the server will know to ignore the request
|
485
|
+
# if it has already been completed. The server will guarantee that for at
|
486
|
+
# least 60 minutes since the first request.
|
487
|
+
#
|
488
|
+
# For example, consider a situation where you make an initial request and
|
489
|
+
# the request times out. If you make the request again with the same request
|
490
|
+
# ID, the server can check if original operation with the same request ID
|
491
|
+
# was received, and if so, will ignore the second request. This prevents
|
492
|
+
# clients from accidentally creating duplicate commitments.
|
493
|
+
#
|
494
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
495
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
496
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
497
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
498
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
499
|
+
#
|
500
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
501
|
+
#
|
502
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
503
|
+
def revoke_certificate request, options = nil
|
504
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
505
|
+
|
506
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest
|
507
|
+
|
508
|
+
# Converts hash and nil to an options object
|
509
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
510
|
+
|
511
|
+
# Customize the options with defaults
|
512
|
+
call_metadata = @config.rpcs.revoke_certificate.metadata.to_h
|
513
|
+
|
514
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
515
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
516
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
517
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
518
|
+
transports_version_send: [:rest]
|
519
|
+
|
520
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
521
|
+
|
522
|
+
options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
|
523
|
+
metadata: call_metadata,
|
524
|
+
retry_policy: @config.rpcs.revoke_certificate.retry_policy
|
525
|
+
|
526
|
+
options.apply_defaults timeout: @config.timeout,
|
527
|
+
metadata: @config.metadata,
|
528
|
+
retry_policy: @config.retry_policy
|
529
|
+
|
530
|
+
@certificate_authority_service_stub.revoke_certificate request, options do |result, operation|
|
531
|
+
yield result, operation if block_given?
|
532
|
+
return result
|
533
|
+
end
|
534
|
+
rescue ::Gapic::Rest::Error => e
|
535
|
+
raise ::Google::Cloud::Error.from_error(e)
|
536
|
+
end
|
537
|
+
|
538
|
+
##
|
539
|
+
# Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}.
|
540
|
+
# Currently, the only field you can update is the
|
541
|
+
# {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field.
|
542
|
+
#
|
543
|
+
# @overload update_certificate(request, options = nil)
|
544
|
+
# Pass arguments to `update_certificate` via a request object, either of type
|
545
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash.
|
546
|
+
#
|
547
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash]
|
548
|
+
# A request object representing the call parameters. Required. To specify no
|
549
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
550
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
551
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
552
|
+
#
|
553
|
+
# @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil)
|
554
|
+
# Pass arguments to `update_certificate` via keyword arguments. Note that at
|
555
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
556
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
557
|
+
#
|
558
|
+
# @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash]
|
559
|
+
# Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}
|
560
|
+
# with updated values.
|
561
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
562
|
+
# Required. A list of fields to be updated in this request.
|
563
|
+
# @param request_id [::String]
|
564
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
565
|
+
# if you must retry your request, the server will know to ignore the request
|
566
|
+
# if it has already been completed. The server will guarantee that for at
|
567
|
+
# least 60 minutes since the first request.
|
568
|
+
#
|
569
|
+
# For example, consider a situation where you make an initial request and
|
570
|
+
# the request times out. If you make the request again with the same request
|
571
|
+
# ID, the server can check if original operation with the same request ID
|
572
|
+
# was received, and if so, will ignore the second request. This prevents
|
573
|
+
# clients from accidentally creating duplicate commitments.
|
574
|
+
#
|
575
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
576
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
577
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
578
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
579
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
580
|
+
#
|
581
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
|
582
|
+
#
|
583
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
584
|
+
def update_certificate request, options = nil
|
585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
586
|
+
|
587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest
|
588
|
+
|
589
|
+
# Converts hash and nil to an options object
|
590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
591
|
+
|
592
|
+
# Customize the options with defaults
|
593
|
+
call_metadata = @config.rpcs.update_certificate.metadata.to_h
|
594
|
+
|
595
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
596
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
598
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
599
|
+
transports_version_send: [:rest]
|
600
|
+
|
601
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
|
+
|
603
|
+
options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
|
604
|
+
metadata: call_metadata,
|
605
|
+
retry_policy: @config.rpcs.update_certificate.retry_policy
|
606
|
+
|
607
|
+
options.apply_defaults timeout: @config.timeout,
|
608
|
+
metadata: @config.metadata,
|
609
|
+
retry_policy: @config.retry_policy
|
610
|
+
|
611
|
+
@certificate_authority_service_stub.update_certificate request, options do |result, operation|
|
612
|
+
yield result, operation if block_given?
|
613
|
+
return result
|
614
|
+
end
|
615
|
+
rescue ::Gapic::Rest::Error => e
|
616
|
+
raise ::Google::Cloud::Error.from_error(e)
|
617
|
+
end
|
618
|
+
|
619
|
+
##
|
620
|
+
# Activate a
|
621
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
622
|
+
# that is in state
|
623
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION}
|
624
|
+
# and is of type
|
625
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}.
|
626
|
+
# After the parent Certificate Authority signs a certificate signing request
|
627
|
+
# from
|
628
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr},
|
629
|
+
# this method can complete the activation process.
|
630
|
+
#
|
631
|
+
# @overload activate_certificate_authority(request, options = nil)
|
632
|
+
# Pass arguments to `activate_certificate_authority` via a request object, either of type
|
633
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash.
|
634
|
+
#
|
635
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash]
|
636
|
+
# A request object representing the call parameters. Required. To specify no
|
637
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
638
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
639
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
640
|
+
#
|
641
|
+
# @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil)
|
642
|
+
# Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at
|
643
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
644
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
645
|
+
#
|
646
|
+
# @param name [::String]
|
647
|
+
# Required. The resource name for this
|
648
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
649
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
650
|
+
# @param pem_ca_certificate [::String]
|
651
|
+
# Required. The signed CA certificate issued from
|
652
|
+
# {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}.
|
653
|
+
# @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash]
|
654
|
+
# Required. Must include information about the issuer of
|
655
|
+
# 'pem_ca_certificate', and any further issuers until the self-signed CA.
|
656
|
+
# @param request_id [::String]
|
657
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
658
|
+
# if you must retry your request, the server will know to ignore the request
|
659
|
+
# if it has already been completed. The server will guarantee that for at
|
660
|
+
# least 60 minutes since the first request.
|
661
|
+
#
|
662
|
+
# For example, consider a situation where you make an initial request and
|
663
|
+
# the request times out. If you make the request again with the same request
|
664
|
+
# ID, the server can check if original operation with the same request ID
|
665
|
+
# was received, and if so, will ignore the second request. This prevents
|
666
|
+
# clients from accidentally creating duplicate commitments.
|
667
|
+
#
|
668
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
669
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
670
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
671
|
+
# @yieldparam result [::Gapic::Operation]
|
672
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
673
|
+
#
|
674
|
+
# @return [::Gapic::Operation]
|
675
|
+
#
|
676
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
677
|
+
def activate_certificate_authority request, options = nil
|
678
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
679
|
+
|
680
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest
|
681
|
+
|
682
|
+
# Converts hash and nil to an options object
|
683
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
684
|
+
|
685
|
+
# Customize the options with defaults
|
686
|
+
call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h
|
687
|
+
|
688
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
689
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
690
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
691
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
692
|
+
transports_version_send: [:rest]
|
693
|
+
|
694
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
695
|
+
|
696
|
+
options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
|
697
|
+
metadata: call_metadata,
|
698
|
+
retry_policy: @config.rpcs.activate_certificate_authority.retry_policy
|
699
|
+
|
700
|
+
options.apply_defaults timeout: @config.timeout,
|
701
|
+
metadata: @config.metadata,
|
702
|
+
retry_policy: @config.retry_policy
|
703
|
+
|
704
|
+
@certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation|
|
705
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
706
|
+
yield result, operation if block_given?
|
707
|
+
return result
|
708
|
+
end
|
709
|
+
rescue ::Gapic::Rest::Error => e
|
710
|
+
raise ::Google::Cloud::Error.from_error(e)
|
711
|
+
end
|
712
|
+
|
713
|
+
##
|
714
|
+
# Create a new
|
715
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
716
|
+
# in a given Project and Location.
|
717
|
+
#
|
718
|
+
# @overload create_certificate_authority(request, options = nil)
|
719
|
+
# Pass arguments to `create_certificate_authority` via a request object, either of type
|
720
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash.
|
721
|
+
#
|
722
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash]
|
723
|
+
# A request object representing the call parameters. Required. To specify no
|
724
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
725
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
726
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
727
|
+
#
|
728
|
+
# @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil)
|
729
|
+
# Pass arguments to `create_certificate_authority` via keyword arguments. Note that at
|
730
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
731
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
732
|
+
#
|
733
|
+
# @param parent [::String]
|
734
|
+
# Required. The resource name of the
|
735
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
|
736
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities},
|
737
|
+
# in the format `projects/*/locations/*/caPools/*`.
|
738
|
+
# @param certificate_authority_id [::String]
|
739
|
+
# Required. It must be unique within a location and match the regular
|
740
|
+
# expression `[a-zA-Z0-9_-]{1,63}`
|
741
|
+
# @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash]
|
742
|
+
# Required. A
|
743
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
744
|
+
# with initial field values.
|
745
|
+
# @param request_id [::String]
|
746
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
747
|
+
# if you must retry your request, the server will know to ignore the request
|
748
|
+
# if it has already been completed. The server will guarantee that for at
|
749
|
+
# least 60 minutes since the first request.
|
750
|
+
#
|
751
|
+
# For example, consider a situation where you make an initial request and
|
752
|
+
# the request times out. If you make the request again with the same request
|
753
|
+
# ID, the server can check if original operation with the same request ID
|
754
|
+
# was received, and if so, will ignore the second request. This prevents
|
755
|
+
# clients from accidentally creating duplicate commitments.
|
756
|
+
#
|
757
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
758
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
759
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
760
|
+
# @yieldparam result [::Gapic::Operation]
|
761
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
762
|
+
#
|
763
|
+
# @return [::Gapic::Operation]
|
764
|
+
#
|
765
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
766
|
+
def create_certificate_authority request, options = nil
|
767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
768
|
+
|
769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest
|
770
|
+
|
771
|
+
# Converts hash and nil to an options object
|
772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
773
|
+
|
774
|
+
# Customize the options with defaults
|
775
|
+
call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h
|
776
|
+
|
777
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
778
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
780
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
781
|
+
transports_version_send: [:rest]
|
782
|
+
|
783
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
784
|
+
|
785
|
+
options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
|
786
|
+
metadata: call_metadata,
|
787
|
+
retry_policy: @config.rpcs.create_certificate_authority.retry_policy
|
788
|
+
|
789
|
+
options.apply_defaults timeout: @config.timeout,
|
790
|
+
metadata: @config.metadata,
|
791
|
+
retry_policy: @config.retry_policy
|
792
|
+
|
793
|
+
@certificate_authority_service_stub.create_certificate_authority request, options do |result, operation|
|
794
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
795
|
+
yield result, operation if block_given?
|
796
|
+
return result
|
797
|
+
end
|
798
|
+
rescue ::Gapic::Rest::Error => e
|
799
|
+
raise ::Google::Cloud::Error.from_error(e)
|
800
|
+
end
|
801
|
+
|
802
|
+
##
|
803
|
+
# Disable a
|
804
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
|
805
|
+
#
|
806
|
+
# @overload disable_certificate_authority(request, options = nil)
|
807
|
+
# Pass arguments to `disable_certificate_authority` via a request object, either of type
|
808
|
+
# {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash.
|
809
|
+
#
|
810
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash]
|
811
|
+
# A request object representing the call parameters. Required. To specify no
|
812
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
813
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
814
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
815
|
+
#
|
816
|
+
# @overload disable_certificate_authority(name: nil, request_id: nil)
|
817
|
+
# Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at
|
818
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
819
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
820
|
+
#
|
821
|
+
# @param name [::String]
|
822
|
+
# Required. The resource name for this
|
823
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
824
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
825
|
+
# @param request_id [::String]
|
826
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
827
|
+
# if you must retry your request, the server will know to ignore the request
|
828
|
+
# if it has already been completed. The server will guarantee that for at
|
829
|
+
# least 60 minutes since the first request.
|
830
|
+
#
|
831
|
+
# For example, consider a situation where you make an initial request and
|
832
|
+
# the request times out. If you make the request again with the same request
|
833
|
+
# ID, the server can check if original operation with the same request ID
|
834
|
+
# was received, and if so, will ignore the second request. This prevents
|
835
|
+
# clients from accidentally creating duplicate commitments.
|
836
|
+
#
|
837
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
838
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
839
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
840
|
+
# @yieldparam result [::Gapic::Operation]
|
841
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
842
|
+
#
|
843
|
+
# @return [::Gapic::Operation]
|
844
|
+
#
|
845
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
846
|
+
def disable_certificate_authority request, options = nil
|
847
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
848
|
+
|
849
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest
|
850
|
+
|
851
|
+
# Converts hash and nil to an options object
|
852
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
853
|
+
|
854
|
+
# Customize the options with defaults
|
855
|
+
call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h
|
856
|
+
|
857
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
858
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
859
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
860
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
861
|
+
transports_version_send: [:rest]
|
862
|
+
|
863
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
864
|
+
|
865
|
+
options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
|
866
|
+
metadata: call_metadata,
|
867
|
+
retry_policy: @config.rpcs.disable_certificate_authority.retry_policy
|
868
|
+
|
869
|
+
options.apply_defaults timeout: @config.timeout,
|
870
|
+
metadata: @config.metadata,
|
871
|
+
retry_policy: @config.retry_policy
|
872
|
+
|
873
|
+
@certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation|
|
874
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
875
|
+
yield result, operation if block_given?
|
876
|
+
return result
|
877
|
+
end
|
878
|
+
rescue ::Gapic::Rest::Error => e
|
879
|
+
raise ::Google::Cloud::Error.from_error(e)
|
880
|
+
end
|
881
|
+
|
882
|
+
##
|
883
|
+
# Enable a
|
884
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
|
885
|
+
#
|
886
|
+
# @overload enable_certificate_authority(request, options = nil)
|
887
|
+
# Pass arguments to `enable_certificate_authority` via a request object, either of type
|
888
|
+
# {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash.
|
889
|
+
#
|
890
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash]
|
891
|
+
# A request object representing the call parameters. Required. To specify no
|
892
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
893
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
894
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
895
|
+
#
|
896
|
+
# @overload enable_certificate_authority(name: nil, request_id: nil)
|
897
|
+
# Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at
|
898
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
899
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
900
|
+
#
|
901
|
+
# @param name [::String]
|
902
|
+
# Required. The resource name for this
|
903
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
904
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
905
|
+
# @param request_id [::String]
|
906
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
907
|
+
# if you must retry your request, the server will know to ignore the request
|
908
|
+
# if it has already been completed. The server will guarantee that for at
|
909
|
+
# least 60 minutes since the first request.
|
910
|
+
#
|
911
|
+
# For example, consider a situation where you make an initial request and
|
912
|
+
# the request times out. If you make the request again with the same request
|
913
|
+
# ID, the server can check if original operation with the same request ID
|
914
|
+
# was received, and if so, will ignore the second request. This prevents
|
915
|
+
# clients from accidentally creating duplicate commitments.
|
916
|
+
#
|
917
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
918
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
919
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
920
|
+
# @yieldparam result [::Gapic::Operation]
|
921
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
922
|
+
#
|
923
|
+
# @return [::Gapic::Operation]
|
924
|
+
#
|
925
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
926
|
+
def enable_certificate_authority request, options = nil
|
927
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
928
|
+
|
929
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest
|
930
|
+
|
931
|
+
# Converts hash and nil to an options object
|
932
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
933
|
+
|
934
|
+
# Customize the options with defaults
|
935
|
+
call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h
|
936
|
+
|
937
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
938
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
939
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
940
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
941
|
+
transports_version_send: [:rest]
|
942
|
+
|
943
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
944
|
+
|
945
|
+
options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
|
946
|
+
metadata: call_metadata,
|
947
|
+
retry_policy: @config.rpcs.enable_certificate_authority.retry_policy
|
948
|
+
|
949
|
+
options.apply_defaults timeout: @config.timeout,
|
950
|
+
metadata: @config.metadata,
|
951
|
+
retry_policy: @config.retry_policy
|
952
|
+
|
953
|
+
@certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation|
|
954
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
955
|
+
yield result, operation if block_given?
|
956
|
+
return result
|
957
|
+
end
|
958
|
+
rescue ::Gapic::Rest::Error => e
|
959
|
+
raise ::Google::Cloud::Error.from_error(e)
|
960
|
+
end
|
961
|
+
|
962
|
+
##
|
963
|
+
# Fetch a certificate signing request (CSR) from a
|
964
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
965
|
+
# that is in state
|
966
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION}
|
967
|
+
# and is of type
|
968
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}.
|
969
|
+
# The CSR must then be signed by the desired parent Certificate Authority,
|
970
|
+
# which could be another
|
971
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
972
|
+
# resource, or could be an on-prem certificate authority. See also
|
973
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}.
|
974
|
+
#
|
975
|
+
# @overload fetch_certificate_authority_csr(request, options = nil)
|
976
|
+
# Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type
|
977
|
+
# {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash.
|
978
|
+
#
|
979
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash]
|
980
|
+
# A request object representing the call parameters. Required. To specify no
|
981
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
982
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
983
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
984
|
+
#
|
985
|
+
# @overload fetch_certificate_authority_csr(name: nil)
|
986
|
+
# Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at
|
987
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
988
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
989
|
+
#
|
990
|
+
# @param name [::String]
|
991
|
+
# Required. The resource name for this
|
992
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
993
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
994
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
995
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse]
|
996
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
997
|
+
#
|
998
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse]
|
999
|
+
#
|
1000
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1001
|
+
def fetch_certificate_authority_csr request, options = nil
|
1002
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1003
|
+
|
1004
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest
|
1005
|
+
|
1006
|
+
# Converts hash and nil to an options object
|
1007
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1008
|
+
|
1009
|
+
# Customize the options with defaults
|
1010
|
+
call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h
|
1011
|
+
|
1012
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1013
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1014
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1015
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1016
|
+
transports_version_send: [:rest]
|
1017
|
+
|
1018
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1019
|
+
|
1020
|
+
options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
|
1021
|
+
metadata: call_metadata,
|
1022
|
+
retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy
|
1023
|
+
|
1024
|
+
options.apply_defaults timeout: @config.timeout,
|
1025
|
+
metadata: @config.metadata,
|
1026
|
+
retry_policy: @config.retry_policy
|
1027
|
+
|
1028
|
+
@certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation|
|
1029
|
+
yield result, operation if block_given?
|
1030
|
+
return result
|
1031
|
+
end
|
1032
|
+
rescue ::Gapic::Rest::Error => e
|
1033
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
##
|
1037
|
+
# Returns a
|
1038
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
|
1039
|
+
#
|
1040
|
+
# @overload get_certificate_authority(request, options = nil)
|
1041
|
+
# Pass arguments to `get_certificate_authority` via a request object, either of type
|
1042
|
+
# {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash.
|
1043
|
+
#
|
1044
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash]
|
1045
|
+
# A request object representing the call parameters. Required. To specify no
|
1046
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1047
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1048
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1049
|
+
#
|
1050
|
+
# @overload get_certificate_authority(name: nil)
|
1051
|
+
# Pass arguments to `get_certificate_authority` via keyword arguments. Note that at
|
1052
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1053
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1054
|
+
#
|
1055
|
+
# @param name [::String]
|
1056
|
+
# Required. The
|
1057
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the
|
1058
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1059
|
+
# to get.
|
1060
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1061
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority]
|
1062
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1063
|
+
#
|
1064
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority]
|
1065
|
+
#
|
1066
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1067
|
+
def get_certificate_authority request, options = nil
|
1068
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1069
|
+
|
1070
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest
|
1071
|
+
|
1072
|
+
# Converts hash and nil to an options object
|
1073
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1074
|
+
|
1075
|
+
# Customize the options with defaults
|
1076
|
+
call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h
|
1077
|
+
|
1078
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1079
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1080
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1081
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1082
|
+
transports_version_send: [:rest]
|
1083
|
+
|
1084
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1085
|
+
|
1086
|
+
options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
|
1087
|
+
metadata: call_metadata,
|
1088
|
+
retry_policy: @config.rpcs.get_certificate_authority.retry_policy
|
1089
|
+
|
1090
|
+
options.apply_defaults timeout: @config.timeout,
|
1091
|
+
metadata: @config.metadata,
|
1092
|
+
retry_policy: @config.retry_policy
|
1093
|
+
|
1094
|
+
@certificate_authority_service_stub.get_certificate_authority request, options do |result, operation|
|
1095
|
+
yield result, operation if block_given?
|
1096
|
+
return result
|
1097
|
+
end
|
1098
|
+
rescue ::Gapic::Rest::Error => e
|
1099
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
##
|
1103
|
+
# Lists
|
1104
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}.
|
1105
|
+
#
|
1106
|
+
# @overload list_certificate_authorities(request, options = nil)
|
1107
|
+
# Pass arguments to `list_certificate_authorities` via a request object, either of type
|
1108
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash.
|
1109
|
+
#
|
1110
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash]
|
1111
|
+
# A request object representing the call parameters. Required. To specify no
|
1112
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1113
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1114
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1115
|
+
#
|
1116
|
+
# @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1117
|
+
# Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at
|
1118
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1119
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1120
|
+
#
|
1121
|
+
# @param parent [::String]
|
1122
|
+
# Required. The resource name of the
|
1123
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the
|
1124
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities},
|
1125
|
+
# in the format `projects/*/locations/*/caPools/*`.
|
1126
|
+
# @param page_size [::Integer]
|
1127
|
+
# Optional. Limit on the number of
|
1128
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}
|
1129
|
+
# to include in the response. Further
|
1130
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}
|
1131
|
+
# can subsequently be obtained by including the
|
1132
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}
|
1133
|
+
# in a subsequent request. If unspecified, the server will pick an
|
1134
|
+
# appropriate default.
|
1135
|
+
# @param page_token [::String]
|
1136
|
+
# Optional. Pagination token, returned earlier via
|
1137
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}.
|
1138
|
+
# @param filter [::String]
|
1139
|
+
# Optional. Only include resources that match the filter in the response.
|
1140
|
+
# @param order_by [::String]
|
1141
|
+
# Optional. Specify how the results should be sorted.
|
1142
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1143
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse]
|
1144
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1145
|
+
#
|
1146
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse]
|
1147
|
+
#
|
1148
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1149
|
+
def list_certificate_authorities request, options = nil
|
1150
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1151
|
+
|
1152
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest
|
1153
|
+
|
1154
|
+
# Converts hash and nil to an options object
|
1155
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1156
|
+
|
1157
|
+
# Customize the options with defaults
|
1158
|
+
call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h
|
1159
|
+
|
1160
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1161
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1162
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1163
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1164
|
+
transports_version_send: [:rest]
|
1165
|
+
|
1166
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1167
|
+
|
1168
|
+
options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
|
1169
|
+
metadata: call_metadata,
|
1170
|
+
retry_policy: @config.rpcs.list_certificate_authorities.retry_policy
|
1171
|
+
|
1172
|
+
options.apply_defaults timeout: @config.timeout,
|
1173
|
+
metadata: @config.metadata,
|
1174
|
+
retry_policy: @config.retry_policy
|
1175
|
+
|
1176
|
+
@certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation|
|
1177
|
+
yield result, operation if block_given?
|
1178
|
+
return result
|
1179
|
+
end
|
1180
|
+
rescue ::Gapic::Rest::Error => e
|
1181
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
##
|
1185
|
+
# Undelete a
|
1186
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1187
|
+
# that has been deleted.
|
1188
|
+
#
|
1189
|
+
# @overload undelete_certificate_authority(request, options = nil)
|
1190
|
+
# Pass arguments to `undelete_certificate_authority` via a request object, either of type
|
1191
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash.
|
1192
|
+
#
|
1193
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash]
|
1194
|
+
# A request object representing the call parameters. Required. To specify no
|
1195
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1196
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1197
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1198
|
+
#
|
1199
|
+
# @overload undelete_certificate_authority(name: nil, request_id: nil)
|
1200
|
+
# Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at
|
1201
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1202
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1203
|
+
#
|
1204
|
+
# @param name [::String]
|
1205
|
+
# Required. The resource name for this
|
1206
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1207
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
1208
|
+
# @param request_id [::String]
|
1209
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1210
|
+
# if you must retry your request, the server will know to ignore the request
|
1211
|
+
# if it has already been completed. The server will guarantee that for at
|
1212
|
+
# least 60 minutes since the first request.
|
1213
|
+
#
|
1214
|
+
# For example, consider a situation where you make an initial request and
|
1215
|
+
# the request times out. If you make the request again with the same request
|
1216
|
+
# ID, the server can check if original operation with the same request ID
|
1217
|
+
# was received, and if so, will ignore the second request. This prevents
|
1218
|
+
# clients from accidentally creating duplicate commitments.
|
1219
|
+
#
|
1220
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1221
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1222
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1223
|
+
# @yieldparam result [::Gapic::Operation]
|
1224
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1225
|
+
#
|
1226
|
+
# @return [::Gapic::Operation]
|
1227
|
+
#
|
1228
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1229
|
+
def undelete_certificate_authority request, options = nil
|
1230
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1231
|
+
|
1232
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest
|
1233
|
+
|
1234
|
+
# Converts hash and nil to an options object
|
1235
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1236
|
+
|
1237
|
+
# Customize the options with defaults
|
1238
|
+
call_metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h
|
1239
|
+
|
1240
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1241
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1242
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1243
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1244
|
+
transports_version_send: [:rest]
|
1245
|
+
|
1246
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1247
|
+
|
1248
|
+
options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout,
|
1249
|
+
metadata: call_metadata,
|
1250
|
+
retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy
|
1251
|
+
|
1252
|
+
options.apply_defaults timeout: @config.timeout,
|
1253
|
+
metadata: @config.metadata,
|
1254
|
+
retry_policy: @config.retry_policy
|
1255
|
+
|
1256
|
+
@certificate_authority_service_stub.undelete_certificate_authority request, options do |result, operation|
|
1257
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1258
|
+
yield result, operation if block_given?
|
1259
|
+
return result
|
1260
|
+
end
|
1261
|
+
rescue ::Gapic::Rest::Error => e
|
1262
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
##
|
1266
|
+
# Delete a
|
1267
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
|
1268
|
+
#
|
1269
|
+
# @overload delete_certificate_authority(request, options = nil)
|
1270
|
+
# Pass arguments to `delete_certificate_authority` via a request object, either of type
|
1271
|
+
# {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash.
|
1272
|
+
#
|
1273
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash]
|
1274
|
+
# A request object representing the call parameters. Required. To specify no
|
1275
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1276
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1277
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1278
|
+
#
|
1279
|
+
# @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil)
|
1280
|
+
# Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at
|
1281
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1282
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1283
|
+
#
|
1284
|
+
# @param name [::String]
|
1285
|
+
# Required. The resource name for this
|
1286
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1287
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
1288
|
+
# @param request_id [::String]
|
1289
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1290
|
+
# if you must retry your request, the server will know to ignore the request
|
1291
|
+
# if it has already been completed. The server will guarantee that for at
|
1292
|
+
# least 60 minutes since the first request.
|
1293
|
+
#
|
1294
|
+
# For example, consider a situation where you make an initial request and
|
1295
|
+
# the request times out. If you make the request again with the same request
|
1296
|
+
# ID, the server can check if original operation with the same request ID
|
1297
|
+
# was received, and if so, will ignore the second request. This prevents
|
1298
|
+
# clients from accidentally creating duplicate commitments.
|
1299
|
+
#
|
1300
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1301
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1302
|
+
# @param ignore_active_certificates [::Boolean]
|
1303
|
+
# Optional. This field allows the CA to be deleted even if the CA has
|
1304
|
+
# active certs. Active certs include both unrevoked and unexpired certs.
|
1305
|
+
# @param skip_grace_period [::Boolean]
|
1306
|
+
# Optional. If this flag is set, the Certificate Authority will be deleted as
|
1307
|
+
# soon as possible without a 30-day grace period where undeletion would have
|
1308
|
+
# been allowed. If you proceed, there will be no way to recover this CA.
|
1309
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1310
|
+
# @yieldparam result [::Gapic::Operation]
|
1311
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1312
|
+
#
|
1313
|
+
# @return [::Gapic::Operation]
|
1314
|
+
#
|
1315
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1316
|
+
def delete_certificate_authority request, options = nil
|
1317
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1318
|
+
|
1319
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest
|
1320
|
+
|
1321
|
+
# Converts hash and nil to an options object
|
1322
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1323
|
+
|
1324
|
+
# Customize the options with defaults
|
1325
|
+
call_metadata = @config.rpcs.delete_certificate_authority.metadata.to_h
|
1326
|
+
|
1327
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1328
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1329
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1330
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1331
|
+
transports_version_send: [:rest]
|
1332
|
+
|
1333
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1334
|
+
|
1335
|
+
options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout,
|
1336
|
+
metadata: call_metadata,
|
1337
|
+
retry_policy: @config.rpcs.delete_certificate_authority.retry_policy
|
1338
|
+
|
1339
|
+
options.apply_defaults timeout: @config.timeout,
|
1340
|
+
metadata: @config.metadata,
|
1341
|
+
retry_policy: @config.retry_policy
|
1342
|
+
|
1343
|
+
@certificate_authority_service_stub.delete_certificate_authority request, options do |result, operation|
|
1344
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1345
|
+
yield result, operation if block_given?
|
1346
|
+
return result
|
1347
|
+
end
|
1348
|
+
rescue ::Gapic::Rest::Error => e
|
1349
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
##
|
1353
|
+
# Update a
|
1354
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}.
|
1355
|
+
#
|
1356
|
+
# @overload update_certificate_authority(request, options = nil)
|
1357
|
+
# Pass arguments to `update_certificate_authority` via a request object, either of type
|
1358
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash.
|
1359
|
+
#
|
1360
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash]
|
1361
|
+
# A request object representing the call parameters. Required. To specify no
|
1362
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1363
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1364
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1365
|
+
#
|
1366
|
+
# @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil)
|
1367
|
+
# Pass arguments to `update_certificate_authority` via keyword arguments. Note that at
|
1368
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1369
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1370
|
+
#
|
1371
|
+
# @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash]
|
1372
|
+
# Required.
|
1373
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1374
|
+
# with updated values.
|
1375
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1376
|
+
# Required. A list of fields to be updated in this request.
|
1377
|
+
# @param request_id [::String]
|
1378
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1379
|
+
# if you must retry your request, the server will know to ignore the request
|
1380
|
+
# if it has already been completed. The server will guarantee that for at
|
1381
|
+
# least 60 minutes since the first request.
|
1382
|
+
#
|
1383
|
+
# For example, consider a situation where you make an initial request and
|
1384
|
+
# the request times out. If you make the request again with the same request
|
1385
|
+
# ID, the server can check if original operation with the same request ID
|
1386
|
+
# was received, and if so, will ignore the second request. This prevents
|
1387
|
+
# clients from accidentally creating duplicate commitments.
|
1388
|
+
#
|
1389
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1390
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1391
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1392
|
+
# @yieldparam result [::Gapic::Operation]
|
1393
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1394
|
+
#
|
1395
|
+
# @return [::Gapic::Operation]
|
1396
|
+
#
|
1397
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1398
|
+
def update_certificate_authority request, options = nil
|
1399
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1400
|
+
|
1401
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest
|
1402
|
+
|
1403
|
+
# Converts hash and nil to an options object
|
1404
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1405
|
+
|
1406
|
+
# Customize the options with defaults
|
1407
|
+
call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h
|
1408
|
+
|
1409
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1410
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1411
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1412
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1413
|
+
transports_version_send: [:rest]
|
1414
|
+
|
1415
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1416
|
+
|
1417
|
+
options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
|
1418
|
+
metadata: call_metadata,
|
1419
|
+
retry_policy: @config.rpcs.update_certificate_authority.retry_policy
|
1420
|
+
|
1421
|
+
options.apply_defaults timeout: @config.timeout,
|
1422
|
+
metadata: @config.metadata,
|
1423
|
+
retry_policy: @config.retry_policy
|
1424
|
+
|
1425
|
+
@certificate_authority_service_stub.update_certificate_authority request, options do |result, operation|
|
1426
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1427
|
+
yield result, operation if block_given?
|
1428
|
+
return result
|
1429
|
+
end
|
1430
|
+
rescue ::Gapic::Rest::Error => e
|
1431
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
##
|
1435
|
+
# Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
1436
|
+
#
|
1437
|
+
# @overload create_ca_pool(request, options = nil)
|
1438
|
+
# Pass arguments to `create_ca_pool` via a request object, either of type
|
1439
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash.
|
1440
|
+
#
|
1441
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash]
|
1442
|
+
# A request object representing the call parameters. Required. To specify no
|
1443
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1444
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1445
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1446
|
+
#
|
1447
|
+
# @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil)
|
1448
|
+
# Pass arguments to `create_ca_pool` via keyword arguments. Note that at
|
1449
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1450
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1451
|
+
#
|
1452
|
+
# @param parent [::String]
|
1453
|
+
# Required. The resource name of the location associated with the
|
1454
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format
|
1455
|
+
# `projects/*/locations/*`.
|
1456
|
+
# @param ca_pool_id [::String]
|
1457
|
+
# Required. It must be unique within a location and match the regular
|
1458
|
+
# expression `[a-zA-Z0-9_-]{1,63}`
|
1459
|
+
# @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash]
|
1460
|
+
# Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with
|
1461
|
+
# initial field values.
|
1462
|
+
# @param request_id [::String]
|
1463
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1464
|
+
# if you must retry your request, the server will know to ignore the request
|
1465
|
+
# if it has already been completed. The server will guarantee that for at
|
1466
|
+
# least 60 minutes since the first request.
|
1467
|
+
#
|
1468
|
+
# For example, consider a situation where you make an initial request and
|
1469
|
+
# the request times out. If you make the request again with the same request
|
1470
|
+
# ID, the server can check if original operation with the same request ID
|
1471
|
+
# was received, and if so, will ignore the second request. This prevents
|
1472
|
+
# clients from accidentally creating duplicate commitments.
|
1473
|
+
#
|
1474
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1475
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1476
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1477
|
+
# @yieldparam result [::Gapic::Operation]
|
1478
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1479
|
+
#
|
1480
|
+
# @return [::Gapic::Operation]
|
1481
|
+
#
|
1482
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1483
|
+
def create_ca_pool request, options = nil
|
1484
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1485
|
+
|
1486
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest
|
1487
|
+
|
1488
|
+
# Converts hash and nil to an options object
|
1489
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1490
|
+
|
1491
|
+
# Customize the options with defaults
|
1492
|
+
call_metadata = @config.rpcs.create_ca_pool.metadata.to_h
|
1493
|
+
|
1494
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1495
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1496
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1497
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1498
|
+
transports_version_send: [:rest]
|
1499
|
+
|
1500
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1501
|
+
|
1502
|
+
options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout,
|
1503
|
+
metadata: call_metadata,
|
1504
|
+
retry_policy: @config.rpcs.create_ca_pool.retry_policy
|
1505
|
+
|
1506
|
+
options.apply_defaults timeout: @config.timeout,
|
1507
|
+
metadata: @config.metadata,
|
1508
|
+
retry_policy: @config.retry_policy
|
1509
|
+
|
1510
|
+
@certificate_authority_service_stub.create_ca_pool request, options do |result, operation|
|
1511
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1512
|
+
yield result, operation if block_given?
|
1513
|
+
return result
|
1514
|
+
end
|
1515
|
+
rescue ::Gapic::Rest::Error => e
|
1516
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1517
|
+
end
|
1518
|
+
|
1519
|
+
##
|
1520
|
+
# Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
1521
|
+
#
|
1522
|
+
# @overload update_ca_pool(request, options = nil)
|
1523
|
+
# Pass arguments to `update_ca_pool` via a request object, either of type
|
1524
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash.
|
1525
|
+
#
|
1526
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash]
|
1527
|
+
# A request object representing the call parameters. Required. To specify no
|
1528
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1529
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1530
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1531
|
+
#
|
1532
|
+
# @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil)
|
1533
|
+
# Pass arguments to `update_ca_pool` via keyword arguments. Note that at
|
1534
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1535
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1536
|
+
#
|
1537
|
+
# @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash]
|
1538
|
+
# Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated
|
1539
|
+
# values.
|
1540
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1541
|
+
# Required. A list of fields to be updated in this request.
|
1542
|
+
# @param request_id [::String]
|
1543
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1544
|
+
# if you must retry your request, the server will know to ignore the request
|
1545
|
+
# if it has already been completed. The server will guarantee that for at
|
1546
|
+
# least 60 minutes since the first request.
|
1547
|
+
#
|
1548
|
+
# For example, consider a situation where you make an initial request and
|
1549
|
+
# the request times out. If you make the request again with the same request
|
1550
|
+
# ID, the server can check if original operation with the same request ID
|
1551
|
+
# was received, and if so, will ignore the second request. This prevents
|
1552
|
+
# clients from accidentally creating duplicate commitments.
|
1553
|
+
#
|
1554
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1555
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1556
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1557
|
+
# @yieldparam result [::Gapic::Operation]
|
1558
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1559
|
+
#
|
1560
|
+
# @return [::Gapic::Operation]
|
1561
|
+
#
|
1562
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1563
|
+
def update_ca_pool request, options = nil
|
1564
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1565
|
+
|
1566
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest
|
1567
|
+
|
1568
|
+
# Converts hash and nil to an options object
|
1569
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1570
|
+
|
1571
|
+
# Customize the options with defaults
|
1572
|
+
call_metadata = @config.rpcs.update_ca_pool.metadata.to_h
|
1573
|
+
|
1574
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1575
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1576
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1577
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1578
|
+
transports_version_send: [:rest]
|
1579
|
+
|
1580
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1581
|
+
|
1582
|
+
options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout,
|
1583
|
+
metadata: call_metadata,
|
1584
|
+
retry_policy: @config.rpcs.update_ca_pool.retry_policy
|
1585
|
+
|
1586
|
+
options.apply_defaults timeout: @config.timeout,
|
1587
|
+
metadata: @config.metadata,
|
1588
|
+
retry_policy: @config.retry_policy
|
1589
|
+
|
1590
|
+
@certificate_authority_service_stub.update_ca_pool request, options do |result, operation|
|
1591
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1592
|
+
yield result, operation if block_given?
|
1593
|
+
return result
|
1594
|
+
end
|
1595
|
+
rescue ::Gapic::Rest::Error => e
|
1596
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1597
|
+
end
|
1598
|
+
|
1599
|
+
##
|
1600
|
+
# Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
1601
|
+
#
|
1602
|
+
# @overload get_ca_pool(request, options = nil)
|
1603
|
+
# Pass arguments to `get_ca_pool` via a request object, either of type
|
1604
|
+
# {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash.
|
1605
|
+
#
|
1606
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash]
|
1607
|
+
# A request object representing the call parameters. Required. To specify no
|
1608
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1609
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1610
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1611
|
+
#
|
1612
|
+
# @overload get_ca_pool(name: nil)
|
1613
|
+
# Pass arguments to `get_ca_pool` via keyword arguments. Note that at
|
1614
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1615
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1616
|
+
#
|
1617
|
+
# @param name [::String]
|
1618
|
+
# Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the
|
1619
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get.
|
1620
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1621
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool]
|
1622
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1623
|
+
#
|
1624
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::CaPool]
|
1625
|
+
#
|
1626
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1627
|
+
def get_ca_pool request, options = nil
|
1628
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1629
|
+
|
1630
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest
|
1631
|
+
|
1632
|
+
# Converts hash and nil to an options object
|
1633
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1634
|
+
|
1635
|
+
# Customize the options with defaults
|
1636
|
+
call_metadata = @config.rpcs.get_ca_pool.metadata.to_h
|
1637
|
+
|
1638
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1639
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1640
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1641
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1642
|
+
transports_version_send: [:rest]
|
1643
|
+
|
1644
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1645
|
+
|
1646
|
+
options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout,
|
1647
|
+
metadata: call_metadata,
|
1648
|
+
retry_policy: @config.rpcs.get_ca_pool.retry_policy
|
1649
|
+
|
1650
|
+
options.apply_defaults timeout: @config.timeout,
|
1651
|
+
metadata: @config.metadata,
|
1652
|
+
retry_policy: @config.retry_policy
|
1653
|
+
|
1654
|
+
@certificate_authority_service_stub.get_ca_pool request, options do |result, operation|
|
1655
|
+
yield result, operation if block_given?
|
1656
|
+
return result
|
1657
|
+
end
|
1658
|
+
rescue ::Gapic::Rest::Error => e
|
1659
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1660
|
+
end
|
1661
|
+
|
1662
|
+
##
|
1663
|
+
# Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}.
|
1664
|
+
#
|
1665
|
+
# @overload list_ca_pools(request, options = nil)
|
1666
|
+
# Pass arguments to `list_ca_pools` via a request object, either of type
|
1667
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash.
|
1668
|
+
#
|
1669
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash]
|
1670
|
+
# A request object representing the call parameters. Required. To specify no
|
1671
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1672
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1673
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1674
|
+
#
|
1675
|
+
# @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1676
|
+
# Pass arguments to `list_ca_pools` via keyword arguments. Note that at
|
1677
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1678
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1679
|
+
#
|
1680
|
+
# @param parent [::String]
|
1681
|
+
# Required. The resource name of the location associated with the
|
1682
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format
|
1683
|
+
# `projects/*/locations/*`.
|
1684
|
+
# @param page_size [::Integer]
|
1685
|
+
# Optional. Limit on the number of
|
1686
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the
|
1687
|
+
# response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can
|
1688
|
+
# subsequently be obtained by including the
|
1689
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}
|
1690
|
+
# in a subsequent request. If unspecified, the server will pick an
|
1691
|
+
# appropriate default.
|
1692
|
+
# @param page_token [::String]
|
1693
|
+
# Optional. Pagination token, returned earlier via
|
1694
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}.
|
1695
|
+
# @param filter [::String]
|
1696
|
+
# Optional. Only include resources that match the filter in the response.
|
1697
|
+
# @param order_by [::String]
|
1698
|
+
# Optional. Specify how the results should be sorted.
|
1699
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1700
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse]
|
1701
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1702
|
+
#
|
1703
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse]
|
1704
|
+
#
|
1705
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1706
|
+
def list_ca_pools request, options = nil
|
1707
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1708
|
+
|
1709
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest
|
1710
|
+
|
1711
|
+
# Converts hash and nil to an options object
|
1712
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1713
|
+
|
1714
|
+
# Customize the options with defaults
|
1715
|
+
call_metadata = @config.rpcs.list_ca_pools.metadata.to_h
|
1716
|
+
|
1717
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1718
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1719
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1720
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1721
|
+
transports_version_send: [:rest]
|
1722
|
+
|
1723
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1724
|
+
|
1725
|
+
options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout,
|
1726
|
+
metadata: call_metadata,
|
1727
|
+
retry_policy: @config.rpcs.list_ca_pools.retry_policy
|
1728
|
+
|
1729
|
+
options.apply_defaults timeout: @config.timeout,
|
1730
|
+
metadata: @config.metadata,
|
1731
|
+
retry_policy: @config.retry_policy
|
1732
|
+
|
1733
|
+
@certificate_authority_service_stub.list_ca_pools request, options do |result, operation|
|
1734
|
+
yield result, operation if block_given?
|
1735
|
+
return result
|
1736
|
+
end
|
1737
|
+
rescue ::Gapic::Rest::Error => e
|
1738
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
##
|
1742
|
+
# Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
1743
|
+
#
|
1744
|
+
# @overload delete_ca_pool(request, options = nil)
|
1745
|
+
# Pass arguments to `delete_ca_pool` via a request object, either of type
|
1746
|
+
# {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash.
|
1747
|
+
#
|
1748
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash]
|
1749
|
+
# A request object representing the call parameters. Required. To specify no
|
1750
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1751
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1752
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1753
|
+
#
|
1754
|
+
# @overload delete_ca_pool(name: nil, request_id: nil)
|
1755
|
+
# Pass arguments to `delete_ca_pool` via keyword arguments. Note that at
|
1756
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1757
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1758
|
+
#
|
1759
|
+
# @param name [::String]
|
1760
|
+
# Required. The resource name for this
|
1761
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format
|
1762
|
+
# `projects/*/locations/*/caPools/*`.
|
1763
|
+
# @param request_id [::String]
|
1764
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1765
|
+
# if you must retry your request, the server will know to ignore the request
|
1766
|
+
# if it has already been completed. The server will guarantee that for at
|
1767
|
+
# least 60 minutes since the first request.
|
1768
|
+
#
|
1769
|
+
# For example, consider a situation where you make an initial request and
|
1770
|
+
# the request times out. If you make the request again with the same request
|
1771
|
+
# ID, the server can check if original operation with the same request ID
|
1772
|
+
# was received, and if so, will ignore the second request. This prevents
|
1773
|
+
# clients from accidentally creating duplicate commitments.
|
1774
|
+
#
|
1775
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1776
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1777
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1778
|
+
# @yieldparam result [::Gapic::Operation]
|
1779
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1780
|
+
#
|
1781
|
+
# @return [::Gapic::Operation]
|
1782
|
+
#
|
1783
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1784
|
+
def delete_ca_pool request, options = nil
|
1785
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1786
|
+
|
1787
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest
|
1788
|
+
|
1789
|
+
# Converts hash and nil to an options object
|
1790
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1791
|
+
|
1792
|
+
# Customize the options with defaults
|
1793
|
+
call_metadata = @config.rpcs.delete_ca_pool.metadata.to_h
|
1794
|
+
|
1795
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1796
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1797
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1798
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1799
|
+
transports_version_send: [:rest]
|
1800
|
+
|
1801
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1802
|
+
|
1803
|
+
options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout,
|
1804
|
+
metadata: call_metadata,
|
1805
|
+
retry_policy: @config.rpcs.delete_ca_pool.retry_policy
|
1806
|
+
|
1807
|
+
options.apply_defaults timeout: @config.timeout,
|
1808
|
+
metadata: @config.metadata,
|
1809
|
+
retry_policy: @config.retry_policy
|
1810
|
+
|
1811
|
+
@certificate_authority_service_stub.delete_ca_pool request, options do |result, operation|
|
1812
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1813
|
+
yield result, operation if block_given?
|
1814
|
+
return result
|
1815
|
+
end
|
1816
|
+
rescue ::Gapic::Rest::Error => e
|
1817
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1818
|
+
end
|
1819
|
+
|
1820
|
+
##
|
1821
|
+
# FetchCaCerts returns the current trust anchor for the
|
1822
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA
|
1823
|
+
# certificate chains for all ACTIVE
|
1824
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}
|
1825
|
+
# resources in the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}.
|
1826
|
+
#
|
1827
|
+
# @overload fetch_ca_certs(request, options = nil)
|
1828
|
+
# Pass arguments to `fetch_ca_certs` via a request object, either of type
|
1829
|
+
# {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash.
|
1830
|
+
#
|
1831
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash]
|
1832
|
+
# A request object representing the call parameters. Required. To specify no
|
1833
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1834
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1835
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1836
|
+
#
|
1837
|
+
# @overload fetch_ca_certs(ca_pool: nil, request_id: nil)
|
1838
|
+
# Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at
|
1839
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1840
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1841
|
+
#
|
1842
|
+
# @param ca_pool [::String]
|
1843
|
+
# Required. The resource name for the
|
1844
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format
|
1845
|
+
# `projects/*/locations/*/caPools/*`.
|
1846
|
+
# @param request_id [::String]
|
1847
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
1848
|
+
# if you must retry your request, the server will know to ignore the request
|
1849
|
+
# if it has already been completed. The server will guarantee that for at
|
1850
|
+
# least 60 minutes since the first request.
|
1851
|
+
#
|
1852
|
+
# For example, consider a situation where you make an initial request and
|
1853
|
+
# the request times out. If you make the request again with the same request
|
1854
|
+
# ID, the server can check if original operation with the same request ID
|
1855
|
+
# was received, and if so, will ignore the second request. This prevents
|
1856
|
+
# clients from accidentally creating duplicate commitments.
|
1857
|
+
#
|
1858
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1859
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1860
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1861
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse]
|
1862
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1863
|
+
#
|
1864
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse]
|
1865
|
+
#
|
1866
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1867
|
+
def fetch_ca_certs request, options = nil
|
1868
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1869
|
+
|
1870
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest
|
1871
|
+
|
1872
|
+
# Converts hash and nil to an options object
|
1873
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1874
|
+
|
1875
|
+
# Customize the options with defaults
|
1876
|
+
call_metadata = @config.rpcs.fetch_ca_certs.metadata.to_h
|
1877
|
+
|
1878
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1879
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1880
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1881
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1882
|
+
transports_version_send: [:rest]
|
1883
|
+
|
1884
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1885
|
+
|
1886
|
+
options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout,
|
1887
|
+
metadata: call_metadata,
|
1888
|
+
retry_policy: @config.rpcs.fetch_ca_certs.retry_policy
|
1889
|
+
|
1890
|
+
options.apply_defaults timeout: @config.timeout,
|
1891
|
+
metadata: @config.metadata,
|
1892
|
+
retry_policy: @config.retry_policy
|
1893
|
+
|
1894
|
+
@certificate_authority_service_stub.fetch_ca_certs request, options do |result, operation|
|
1895
|
+
yield result, operation if block_given?
|
1896
|
+
return result
|
1897
|
+
end
|
1898
|
+
rescue ::Gapic::Rest::Error => e
|
1899
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1900
|
+
end
|
1901
|
+
|
1902
|
+
##
|
1903
|
+
# Returns a
|
1904
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}.
|
1905
|
+
#
|
1906
|
+
# @overload get_certificate_revocation_list(request, options = nil)
|
1907
|
+
# Pass arguments to `get_certificate_revocation_list` via a request object, either of type
|
1908
|
+
# {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash.
|
1909
|
+
#
|
1910
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash]
|
1911
|
+
# A request object representing the call parameters. Required. To specify no
|
1912
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1913
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1914
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1915
|
+
#
|
1916
|
+
# @overload get_certificate_revocation_list(name: nil)
|
1917
|
+
# Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at
|
1918
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1919
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1920
|
+
#
|
1921
|
+
# @param name [::String]
|
1922
|
+
# Required. The
|
1923
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name}
|
1924
|
+
# of the
|
1925
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}
|
1926
|
+
# to get.
|
1927
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1928
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList]
|
1929
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1930
|
+
#
|
1931
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList]
|
1932
|
+
#
|
1933
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1934
|
+
def get_certificate_revocation_list request, options = nil
|
1935
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1936
|
+
|
1937
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest
|
1938
|
+
|
1939
|
+
# Converts hash and nil to an options object
|
1940
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1941
|
+
|
1942
|
+
# Customize the options with defaults
|
1943
|
+
call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h
|
1944
|
+
|
1945
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1946
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1947
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1948
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
1949
|
+
transports_version_send: [:rest]
|
1950
|
+
|
1951
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1952
|
+
|
1953
|
+
options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
|
1954
|
+
metadata: call_metadata,
|
1955
|
+
retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy
|
1956
|
+
|
1957
|
+
options.apply_defaults timeout: @config.timeout,
|
1958
|
+
metadata: @config.metadata,
|
1959
|
+
retry_policy: @config.retry_policy
|
1960
|
+
|
1961
|
+
@certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation|
|
1962
|
+
yield result, operation if block_given?
|
1963
|
+
return result
|
1964
|
+
end
|
1965
|
+
rescue ::Gapic::Rest::Error => e
|
1966
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1967
|
+
end
|
1968
|
+
|
1969
|
+
##
|
1970
|
+
# Lists
|
1971
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}.
|
1972
|
+
#
|
1973
|
+
# @overload list_certificate_revocation_lists(request, options = nil)
|
1974
|
+
# Pass arguments to `list_certificate_revocation_lists` via a request object, either of type
|
1975
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash.
|
1976
|
+
#
|
1977
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash]
|
1978
|
+
# A request object representing the call parameters. Required. To specify no
|
1979
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1980
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1981
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1982
|
+
#
|
1983
|
+
# @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1984
|
+
# Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at
|
1985
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1986
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1987
|
+
#
|
1988
|
+
# @param parent [::String]
|
1989
|
+
# Required. The resource name of the location associated with the
|
1990
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists},
|
1991
|
+
# in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
|
1992
|
+
# @param page_size [::Integer]
|
1993
|
+
# Optional. Limit on the number of
|
1994
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}
|
1995
|
+
# to include in the response. Further
|
1996
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}
|
1997
|
+
# can subsequently be obtained by including the
|
1998
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}
|
1999
|
+
# in a subsequent request. If unspecified, the server will pick an
|
2000
|
+
# appropriate default.
|
2001
|
+
# @param page_token [::String]
|
2002
|
+
# Optional. Pagination token, returned earlier via
|
2003
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}.
|
2004
|
+
# @param filter [::String]
|
2005
|
+
# Optional. Only include resources that match the filter in the response.
|
2006
|
+
# @param order_by [::String]
|
2007
|
+
# Optional. Specify how the results should be sorted.
|
2008
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2009
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse]
|
2010
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2011
|
+
#
|
2012
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse]
|
2013
|
+
#
|
2014
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2015
|
+
def list_certificate_revocation_lists request, options = nil
|
2016
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2017
|
+
|
2018
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest
|
2019
|
+
|
2020
|
+
# Converts hash and nil to an options object
|
2021
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2022
|
+
|
2023
|
+
# Customize the options with defaults
|
2024
|
+
call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h
|
2025
|
+
|
2026
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2027
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2028
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2029
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2030
|
+
transports_version_send: [:rest]
|
2031
|
+
|
2032
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2033
|
+
|
2034
|
+
options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
|
2035
|
+
metadata: call_metadata,
|
2036
|
+
retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy
|
2037
|
+
|
2038
|
+
options.apply_defaults timeout: @config.timeout,
|
2039
|
+
metadata: @config.metadata,
|
2040
|
+
retry_policy: @config.retry_policy
|
2041
|
+
|
2042
|
+
@certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation|
|
2043
|
+
yield result, operation if block_given?
|
2044
|
+
return result
|
2045
|
+
end
|
2046
|
+
rescue ::Gapic::Rest::Error => e
|
2047
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
##
|
2051
|
+
# Update a
|
2052
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}.
|
2053
|
+
#
|
2054
|
+
# @overload update_certificate_revocation_list(request, options = nil)
|
2055
|
+
# Pass arguments to `update_certificate_revocation_list` via a request object, either of type
|
2056
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash.
|
2057
|
+
#
|
2058
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash]
|
2059
|
+
# A request object representing the call parameters. Required. To specify no
|
2060
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2061
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2062
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2063
|
+
#
|
2064
|
+
# @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil)
|
2065
|
+
# Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at
|
2066
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2067
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2068
|
+
#
|
2069
|
+
# @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash]
|
2070
|
+
# Required.
|
2071
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}
|
2072
|
+
# with updated values.
|
2073
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2074
|
+
# Required. A list of fields to be updated in this request.
|
2075
|
+
# @param request_id [::String]
|
2076
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
2077
|
+
# if you must retry your request, the server will know to ignore the request
|
2078
|
+
# if it has already been completed. The server will guarantee that for at
|
2079
|
+
# least 60 minutes since the first request.
|
2080
|
+
#
|
2081
|
+
# For example, consider a situation where you make an initial request and
|
2082
|
+
# the request times out. If you make the request again with the same request
|
2083
|
+
# ID, the server can check if original operation with the same request ID
|
2084
|
+
# was received, and if so, will ignore the second request. This prevents
|
2085
|
+
# clients from accidentally creating duplicate commitments.
|
2086
|
+
#
|
2087
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2088
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2089
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2090
|
+
# @yieldparam result [::Gapic::Operation]
|
2091
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2092
|
+
#
|
2093
|
+
# @return [::Gapic::Operation]
|
2094
|
+
#
|
2095
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2096
|
+
def update_certificate_revocation_list request, options = nil
|
2097
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2098
|
+
|
2099
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest
|
2100
|
+
|
2101
|
+
# Converts hash and nil to an options object
|
2102
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2103
|
+
|
2104
|
+
# Customize the options with defaults
|
2105
|
+
call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h
|
2106
|
+
|
2107
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2108
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2109
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2110
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2111
|
+
transports_version_send: [:rest]
|
2112
|
+
|
2113
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2114
|
+
|
2115
|
+
options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
|
2116
|
+
metadata: call_metadata,
|
2117
|
+
retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy
|
2118
|
+
|
2119
|
+
options.apply_defaults timeout: @config.timeout,
|
2120
|
+
metadata: @config.metadata,
|
2121
|
+
retry_policy: @config.retry_policy
|
2122
|
+
|
2123
|
+
@certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation|
|
2124
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2125
|
+
yield result, operation if block_given?
|
2126
|
+
return result
|
2127
|
+
end
|
2128
|
+
rescue ::Gapic::Rest::Error => e
|
2129
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2130
|
+
end
|
2131
|
+
|
2132
|
+
##
|
2133
|
+
# Create a new
|
2134
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
|
2135
|
+
# in a given Project and Location.
|
2136
|
+
#
|
2137
|
+
# @overload create_certificate_template(request, options = nil)
|
2138
|
+
# Pass arguments to `create_certificate_template` via a request object, either of type
|
2139
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash.
|
2140
|
+
#
|
2141
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash]
|
2142
|
+
# A request object representing the call parameters. Required. To specify no
|
2143
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2144
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2145
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2146
|
+
#
|
2147
|
+
# @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil)
|
2148
|
+
# Pass arguments to `create_certificate_template` via keyword arguments. Note that at
|
2149
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2150
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2151
|
+
#
|
2152
|
+
# @param parent [::String]
|
2153
|
+
# Required. The resource name of the location associated with the
|
2154
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate},
|
2155
|
+
# in the format `projects/*/locations/*`.
|
2156
|
+
# @param certificate_template_id [::String]
|
2157
|
+
# Required. It must be unique within a location and match the regular
|
2158
|
+
# expression `[a-zA-Z0-9_-]{1,63}`
|
2159
|
+
# @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash]
|
2160
|
+
# Required. A
|
2161
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
|
2162
|
+
# with initial field values.
|
2163
|
+
# @param request_id [::String]
|
2164
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
2165
|
+
# if you must retry your request, the server will know to ignore the request
|
2166
|
+
# if it has already been completed. The server will guarantee that for at
|
2167
|
+
# least 60 minutes since the first request.
|
2168
|
+
#
|
2169
|
+
# For example, consider a situation where you make an initial request and
|
2170
|
+
# the request times out. If you make the request again with the same request
|
2171
|
+
# ID, the server can check if original operation with the same request ID
|
2172
|
+
# was received, and if so, will ignore the second request. This prevents
|
2173
|
+
# clients from accidentally creating duplicate commitments.
|
2174
|
+
#
|
2175
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2176
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2177
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2178
|
+
# @yieldparam result [::Gapic::Operation]
|
2179
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2180
|
+
#
|
2181
|
+
# @return [::Gapic::Operation]
|
2182
|
+
#
|
2183
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2184
|
+
def create_certificate_template request, options = nil
|
2185
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2186
|
+
|
2187
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest
|
2188
|
+
|
2189
|
+
# Converts hash and nil to an options object
|
2190
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2191
|
+
|
2192
|
+
# Customize the options with defaults
|
2193
|
+
call_metadata = @config.rpcs.create_certificate_template.metadata.to_h
|
2194
|
+
|
2195
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2196
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2197
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2198
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2199
|
+
transports_version_send: [:rest]
|
2200
|
+
|
2201
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2202
|
+
|
2203
|
+
options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout,
|
2204
|
+
metadata: call_metadata,
|
2205
|
+
retry_policy: @config.rpcs.create_certificate_template.retry_policy
|
2206
|
+
|
2207
|
+
options.apply_defaults timeout: @config.timeout,
|
2208
|
+
metadata: @config.metadata,
|
2209
|
+
retry_policy: @config.retry_policy
|
2210
|
+
|
2211
|
+
@certificate_authority_service_stub.create_certificate_template request, options do |result, operation|
|
2212
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2213
|
+
yield result, operation if block_given?
|
2214
|
+
return result
|
2215
|
+
end
|
2216
|
+
rescue ::Gapic::Rest::Error => e
|
2217
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2218
|
+
end
|
2219
|
+
|
2220
|
+
##
|
2221
|
+
# DeleteCertificateTemplate deletes a
|
2222
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
|
2223
|
+
#
|
2224
|
+
# @overload delete_certificate_template(request, options = nil)
|
2225
|
+
# Pass arguments to `delete_certificate_template` via a request object, either of type
|
2226
|
+
# {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash.
|
2227
|
+
#
|
2228
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash]
|
2229
|
+
# A request object representing the call parameters. Required. To specify no
|
2230
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2231
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2233
|
+
#
|
2234
|
+
# @overload delete_certificate_template(name: nil, request_id: nil)
|
2235
|
+
# Pass arguments to `delete_certificate_template` via keyword arguments. Note that at
|
2236
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2237
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2238
|
+
#
|
2239
|
+
# @param name [::String]
|
2240
|
+
# Required. The resource name for this
|
2241
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
|
2242
|
+
# in the format `projects/*/locations/*/certificateTemplates/*`.
|
2243
|
+
# @param request_id [::String]
|
2244
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
2245
|
+
# if you must retry your request, the server will know to ignore the request
|
2246
|
+
# if it has already been completed. The server will guarantee that for at
|
2247
|
+
# least 60 minutes since the first request.
|
2248
|
+
#
|
2249
|
+
# For example, consider a situation where you make an initial request and
|
2250
|
+
# the request times out. If you make the request again with the same request
|
2251
|
+
# ID, the server can check if original operation with the same request ID
|
2252
|
+
# was received, and if so, will ignore the second request. This prevents
|
2253
|
+
# clients from accidentally creating duplicate commitments.
|
2254
|
+
#
|
2255
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2256
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2257
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2258
|
+
# @yieldparam result [::Gapic::Operation]
|
2259
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2260
|
+
#
|
2261
|
+
# @return [::Gapic::Operation]
|
2262
|
+
#
|
2263
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2264
|
+
def delete_certificate_template request, options = nil
|
2265
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2266
|
+
|
2267
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest
|
2268
|
+
|
2269
|
+
# Converts hash and nil to an options object
|
2270
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2271
|
+
|
2272
|
+
# Customize the options with defaults
|
2273
|
+
call_metadata = @config.rpcs.delete_certificate_template.metadata.to_h
|
2274
|
+
|
2275
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2276
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2277
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2278
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2279
|
+
transports_version_send: [:rest]
|
2280
|
+
|
2281
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2282
|
+
|
2283
|
+
options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout,
|
2284
|
+
metadata: call_metadata,
|
2285
|
+
retry_policy: @config.rpcs.delete_certificate_template.retry_policy
|
2286
|
+
|
2287
|
+
options.apply_defaults timeout: @config.timeout,
|
2288
|
+
metadata: @config.metadata,
|
2289
|
+
retry_policy: @config.retry_policy
|
2290
|
+
|
2291
|
+
@certificate_authority_service_stub.delete_certificate_template request, options do |result, operation|
|
2292
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2293
|
+
yield result, operation if block_given?
|
2294
|
+
return result
|
2295
|
+
end
|
2296
|
+
rescue ::Gapic::Rest::Error => e
|
2297
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2298
|
+
end
|
2299
|
+
|
2300
|
+
##
|
2301
|
+
# Returns a
|
2302
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
|
2303
|
+
#
|
2304
|
+
# @overload get_certificate_template(request, options = nil)
|
2305
|
+
# Pass arguments to `get_certificate_template` via a request object, either of type
|
2306
|
+
# {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash.
|
2307
|
+
#
|
2308
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash]
|
2309
|
+
# A request object representing the call parameters. Required. To specify no
|
2310
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2311
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2312
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2313
|
+
#
|
2314
|
+
# @overload get_certificate_template(name: nil)
|
2315
|
+
# Pass arguments to `get_certificate_template` via keyword arguments. Note that at
|
2316
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2317
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2318
|
+
#
|
2319
|
+
# @param name [::String]
|
2320
|
+
# Required. The
|
2321
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the
|
2322
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
|
2323
|
+
# to get.
|
2324
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2325
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate]
|
2326
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2327
|
+
#
|
2328
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate]
|
2329
|
+
#
|
2330
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2331
|
+
def get_certificate_template request, options = nil
|
2332
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2333
|
+
|
2334
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest
|
2335
|
+
|
2336
|
+
# Converts hash and nil to an options object
|
2337
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2338
|
+
|
2339
|
+
# Customize the options with defaults
|
2340
|
+
call_metadata = @config.rpcs.get_certificate_template.metadata.to_h
|
2341
|
+
|
2342
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2343
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2344
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2345
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2346
|
+
transports_version_send: [:rest]
|
2347
|
+
|
2348
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2349
|
+
|
2350
|
+
options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout,
|
2351
|
+
metadata: call_metadata,
|
2352
|
+
retry_policy: @config.rpcs.get_certificate_template.retry_policy
|
2353
|
+
|
2354
|
+
options.apply_defaults timeout: @config.timeout,
|
2355
|
+
metadata: @config.metadata,
|
2356
|
+
retry_policy: @config.retry_policy
|
2357
|
+
|
2358
|
+
@certificate_authority_service_stub.get_certificate_template request, options do |result, operation|
|
2359
|
+
yield result, operation if block_given?
|
2360
|
+
return result
|
2361
|
+
end
|
2362
|
+
rescue ::Gapic::Rest::Error => e
|
2363
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2364
|
+
end
|
2365
|
+
|
2366
|
+
##
|
2367
|
+
# Lists
|
2368
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}.
|
2369
|
+
#
|
2370
|
+
# @overload list_certificate_templates(request, options = nil)
|
2371
|
+
# Pass arguments to `list_certificate_templates` via a request object, either of type
|
2372
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash.
|
2373
|
+
#
|
2374
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash]
|
2375
|
+
# A request object representing the call parameters. Required. To specify no
|
2376
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2377
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2378
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2379
|
+
#
|
2380
|
+
# @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2381
|
+
# Pass arguments to `list_certificate_templates` via keyword arguments. Note that at
|
2382
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2383
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2384
|
+
#
|
2385
|
+
# @param parent [::String]
|
2386
|
+
# Required. The resource name of the location associated with the
|
2387
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates},
|
2388
|
+
# in the format `projects/*/locations/*`.
|
2389
|
+
# @param page_size [::Integer]
|
2390
|
+
# Optional. Limit on the number of
|
2391
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}
|
2392
|
+
# to include in the response. Further
|
2393
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}
|
2394
|
+
# can subsequently be obtained by including the
|
2395
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}
|
2396
|
+
# in a subsequent request. If unspecified, the server will pick an
|
2397
|
+
# appropriate default.
|
2398
|
+
# @param page_token [::String]
|
2399
|
+
# Optional. Pagination token, returned earlier via
|
2400
|
+
# {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}.
|
2401
|
+
# @param filter [::String]
|
2402
|
+
# Optional. Only include resources that match the filter in the response.
|
2403
|
+
# @param order_by [::String]
|
2404
|
+
# Optional. Specify how the results should be sorted.
|
2405
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2406
|
+
# @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse]
|
2407
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2408
|
+
#
|
2409
|
+
# @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse]
|
2410
|
+
#
|
2411
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2412
|
+
def list_certificate_templates request, options = nil
|
2413
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2414
|
+
|
2415
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest
|
2416
|
+
|
2417
|
+
# Converts hash and nil to an options object
|
2418
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2419
|
+
|
2420
|
+
# Customize the options with defaults
|
2421
|
+
call_metadata = @config.rpcs.list_certificate_templates.metadata.to_h
|
2422
|
+
|
2423
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2424
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2425
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2426
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2427
|
+
transports_version_send: [:rest]
|
2428
|
+
|
2429
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2430
|
+
|
2431
|
+
options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout,
|
2432
|
+
metadata: call_metadata,
|
2433
|
+
retry_policy: @config.rpcs.list_certificate_templates.retry_policy
|
2434
|
+
|
2435
|
+
options.apply_defaults timeout: @config.timeout,
|
2436
|
+
metadata: @config.metadata,
|
2437
|
+
retry_policy: @config.retry_policy
|
2438
|
+
|
2439
|
+
@certificate_authority_service_stub.list_certificate_templates request, options do |result, operation|
|
2440
|
+
yield result, operation if block_given?
|
2441
|
+
return result
|
2442
|
+
end
|
2443
|
+
rescue ::Gapic::Rest::Error => e
|
2444
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2445
|
+
end
|
2446
|
+
|
2447
|
+
##
|
2448
|
+
# Update a
|
2449
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}.
|
2450
|
+
#
|
2451
|
+
# @overload update_certificate_template(request, options = nil)
|
2452
|
+
# Pass arguments to `update_certificate_template` via a request object, either of type
|
2453
|
+
# {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash.
|
2454
|
+
#
|
2455
|
+
# @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash]
|
2456
|
+
# A request object representing the call parameters. Required. To specify no
|
2457
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2458
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2459
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2460
|
+
#
|
2461
|
+
# @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil)
|
2462
|
+
# Pass arguments to `update_certificate_template` via keyword arguments. Note that at
|
2463
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2464
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2465
|
+
#
|
2466
|
+
# @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash]
|
2467
|
+
# Required.
|
2468
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}
|
2469
|
+
# with updated values.
|
2470
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2471
|
+
# Required. A list of fields to be updated in this request.
|
2472
|
+
# @param request_id [::String]
|
2473
|
+
# Optional. An ID to identify requests. Specify a unique request ID so that
|
2474
|
+
# if you must retry your request, the server will know to ignore the request
|
2475
|
+
# if it has already been completed. The server will guarantee that for at
|
2476
|
+
# least 60 minutes since the first request.
|
2477
|
+
#
|
2478
|
+
# For example, consider a situation where you make an initial request and
|
2479
|
+
# the request times out. If you make the request again with the same request
|
2480
|
+
# ID, the server can check if original operation with the same request ID
|
2481
|
+
# was received, and if so, will ignore the second request. This prevents
|
2482
|
+
# clients from accidentally creating duplicate commitments.
|
2483
|
+
#
|
2484
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2485
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2486
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2487
|
+
# @yieldparam result [::Gapic::Operation]
|
2488
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2489
|
+
#
|
2490
|
+
# @return [::Gapic::Operation]
|
2491
|
+
#
|
2492
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2493
|
+
def update_certificate_template request, options = nil
|
2494
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2495
|
+
|
2496
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest
|
2497
|
+
|
2498
|
+
# Converts hash and nil to an options object
|
2499
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2500
|
+
|
2501
|
+
# Customize the options with defaults
|
2502
|
+
call_metadata = @config.rpcs.update_certificate_template.metadata.to_h
|
2503
|
+
|
2504
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2505
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2506
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2507
|
+
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION,
|
2508
|
+
transports_version_send: [:rest]
|
2509
|
+
|
2510
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2511
|
+
|
2512
|
+
options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout,
|
2513
|
+
metadata: call_metadata,
|
2514
|
+
retry_policy: @config.rpcs.update_certificate_template.retry_policy
|
2515
|
+
|
2516
|
+
options.apply_defaults timeout: @config.timeout,
|
2517
|
+
metadata: @config.metadata,
|
2518
|
+
retry_policy: @config.retry_policy
|
2519
|
+
|
2520
|
+
@certificate_authority_service_stub.update_certificate_template request, options do |result, operation|
|
2521
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2522
|
+
yield result, operation if block_given?
|
2523
|
+
return result
|
2524
|
+
end
|
2525
|
+
rescue ::Gapic::Rest::Error => e
|
2526
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2527
|
+
end
|
2528
|
+
|
2529
|
+
##
|
2530
|
+
# Configuration class for the CertificateAuthorityService REST API.
|
2531
|
+
#
|
2532
|
+
# This class represents the configuration for CertificateAuthorityService REST,
|
2533
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2534
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2535
|
+
# applied individually to specific RPCs. See
|
2536
|
+
# {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs}
|
2537
|
+
# for a list of RPCs that can be configured independently.
|
2538
|
+
#
|
2539
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2540
|
+
# on construction.
|
2541
|
+
#
|
2542
|
+
# @example
|
2543
|
+
#
|
2544
|
+
# # Modify the global config, setting the timeout for
|
2545
|
+
# # create_certificate to 20 seconds,
|
2546
|
+
# # and all remaining timeouts to 10 seconds.
|
2547
|
+
# ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config|
|
2548
|
+
# config.timeout = 10.0
|
2549
|
+
# config.rpcs.create_certificate.timeout = 20.0
|
2550
|
+
# end
|
2551
|
+
#
|
2552
|
+
# # Apply the above configuration only to a new client.
|
2553
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config|
|
2554
|
+
# config.timeout = 10.0
|
2555
|
+
# config.rpcs.create_certificate.timeout = 20.0
|
2556
|
+
# end
|
2557
|
+
#
|
2558
|
+
# @!attribute [rw] endpoint
|
2559
|
+
# The hostname or hostname:port of the service endpoint.
|
2560
|
+
# Defaults to `"privateca.googleapis.com"`.
|
2561
|
+
# @return [::String]
|
2562
|
+
# @!attribute [rw] credentials
|
2563
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2564
|
+
# * (`String`) The path to a service account key file in JSON format
|
2565
|
+
# * (`Hash`) A service account key as a Hash
|
2566
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2567
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2568
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2569
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2570
|
+
# * (`nil`) indicating no credentials
|
2571
|
+
# @return [::Object]
|
2572
|
+
# @!attribute [rw] scope
|
2573
|
+
# The OAuth scopes
|
2574
|
+
# @return [::Array<::String>]
|
2575
|
+
# @!attribute [rw] lib_name
|
2576
|
+
# The library name as recorded in instrumentation and logging
|
2577
|
+
# @return [::String]
|
2578
|
+
# @!attribute [rw] lib_version
|
2579
|
+
# The library version as recorded in instrumentation and logging
|
2580
|
+
# @return [::String]
|
2581
|
+
# @!attribute [rw] timeout
|
2582
|
+
# The call timeout in seconds.
|
2583
|
+
# @return [::Numeric]
|
2584
|
+
# @!attribute [rw] metadata
|
2585
|
+
# Additional headers to be sent with the call.
|
2586
|
+
# @return [::Hash{::Symbol=>::String}]
|
2587
|
+
# @!attribute [rw] retry_policy
|
2588
|
+
# The retry policy. The value is a hash with the following keys:
|
2589
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2590
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2591
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2592
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2593
|
+
# trigger a retry.
|
2594
|
+
# @return [::Hash]
|
2595
|
+
# @!attribute [rw] quota_project
|
2596
|
+
# A separate project against which to charge quota.
|
2597
|
+
# @return [::String]
|
2598
|
+
#
|
2599
|
+
class Configuration
|
2600
|
+
extend ::Gapic::Config
|
2601
|
+
|
2602
|
+
config_attr :endpoint, "privateca.googleapis.com", ::String
|
2603
|
+
config_attr :credentials, nil do |value|
|
2604
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2605
|
+
allowed.any? { |klass| klass === value }
|
2606
|
+
end
|
2607
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2608
|
+
config_attr :lib_name, nil, ::String, nil
|
2609
|
+
config_attr :lib_version, nil, ::String, nil
|
2610
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2611
|
+
config_attr :metadata, nil, ::Hash, nil
|
2612
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2613
|
+
config_attr :quota_project, nil, ::String, nil
|
2614
|
+
|
2615
|
+
# @private
|
2616
|
+
# Overrides for http bindings for the RPCs of this service
|
2617
|
+
# are only used when this service is used as mixin, and only
|
2618
|
+
# by the host service.
|
2619
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2620
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
2621
|
+
|
2622
|
+
# @private
|
2623
|
+
def initialize parent_config = nil
|
2624
|
+
@parent_config = parent_config unless parent_config.nil?
|
2625
|
+
|
2626
|
+
yield self if block_given?
|
2627
|
+
end
|
2628
|
+
|
2629
|
+
##
|
2630
|
+
# Configurations for individual RPCs
|
2631
|
+
# @return [Rpcs]
|
2632
|
+
#
|
2633
|
+
def rpcs
|
2634
|
+
@rpcs ||= begin
|
2635
|
+
parent_rpcs = nil
|
2636
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2637
|
+
Rpcs.new parent_rpcs
|
2638
|
+
end
|
2639
|
+
end
|
2640
|
+
|
2641
|
+
##
|
2642
|
+
# Configuration RPC class for the CertificateAuthorityService API.
|
2643
|
+
#
|
2644
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2645
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2646
|
+
# the following configuration fields:
|
2647
|
+
#
|
2648
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2649
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
2650
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2651
|
+
# include the following keys:
|
2652
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2653
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2654
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2655
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2656
|
+
# trigger a retry.
|
2657
|
+
#
|
2658
|
+
class Rpcs
|
2659
|
+
##
|
2660
|
+
# RPC-specific configuration for `create_certificate`
|
2661
|
+
# @return [::Gapic::Config::Method]
|
2662
|
+
#
|
2663
|
+
attr_reader :create_certificate
|
2664
|
+
##
|
2665
|
+
# RPC-specific configuration for `get_certificate`
|
2666
|
+
# @return [::Gapic::Config::Method]
|
2667
|
+
#
|
2668
|
+
attr_reader :get_certificate
|
2669
|
+
##
|
2670
|
+
# RPC-specific configuration for `list_certificates`
|
2671
|
+
# @return [::Gapic::Config::Method]
|
2672
|
+
#
|
2673
|
+
attr_reader :list_certificates
|
2674
|
+
##
|
2675
|
+
# RPC-specific configuration for `revoke_certificate`
|
2676
|
+
# @return [::Gapic::Config::Method]
|
2677
|
+
#
|
2678
|
+
attr_reader :revoke_certificate
|
2679
|
+
##
|
2680
|
+
# RPC-specific configuration for `update_certificate`
|
2681
|
+
# @return [::Gapic::Config::Method]
|
2682
|
+
#
|
2683
|
+
attr_reader :update_certificate
|
2684
|
+
##
|
2685
|
+
# RPC-specific configuration for `activate_certificate_authority`
|
2686
|
+
# @return [::Gapic::Config::Method]
|
2687
|
+
#
|
2688
|
+
attr_reader :activate_certificate_authority
|
2689
|
+
##
|
2690
|
+
# RPC-specific configuration for `create_certificate_authority`
|
2691
|
+
# @return [::Gapic::Config::Method]
|
2692
|
+
#
|
2693
|
+
attr_reader :create_certificate_authority
|
2694
|
+
##
|
2695
|
+
# RPC-specific configuration for `disable_certificate_authority`
|
2696
|
+
# @return [::Gapic::Config::Method]
|
2697
|
+
#
|
2698
|
+
attr_reader :disable_certificate_authority
|
2699
|
+
##
|
2700
|
+
# RPC-specific configuration for `enable_certificate_authority`
|
2701
|
+
# @return [::Gapic::Config::Method]
|
2702
|
+
#
|
2703
|
+
attr_reader :enable_certificate_authority
|
2704
|
+
##
|
2705
|
+
# RPC-specific configuration for `fetch_certificate_authority_csr`
|
2706
|
+
# @return [::Gapic::Config::Method]
|
2707
|
+
#
|
2708
|
+
attr_reader :fetch_certificate_authority_csr
|
2709
|
+
##
|
2710
|
+
# RPC-specific configuration for `get_certificate_authority`
|
2711
|
+
# @return [::Gapic::Config::Method]
|
2712
|
+
#
|
2713
|
+
attr_reader :get_certificate_authority
|
2714
|
+
##
|
2715
|
+
# RPC-specific configuration for `list_certificate_authorities`
|
2716
|
+
# @return [::Gapic::Config::Method]
|
2717
|
+
#
|
2718
|
+
attr_reader :list_certificate_authorities
|
2719
|
+
##
|
2720
|
+
# RPC-specific configuration for `undelete_certificate_authority`
|
2721
|
+
# @return [::Gapic::Config::Method]
|
2722
|
+
#
|
2723
|
+
attr_reader :undelete_certificate_authority
|
2724
|
+
##
|
2725
|
+
# RPC-specific configuration for `delete_certificate_authority`
|
2726
|
+
# @return [::Gapic::Config::Method]
|
2727
|
+
#
|
2728
|
+
attr_reader :delete_certificate_authority
|
2729
|
+
##
|
2730
|
+
# RPC-specific configuration for `update_certificate_authority`
|
2731
|
+
# @return [::Gapic::Config::Method]
|
2732
|
+
#
|
2733
|
+
attr_reader :update_certificate_authority
|
2734
|
+
##
|
2735
|
+
# RPC-specific configuration for `create_ca_pool`
|
2736
|
+
# @return [::Gapic::Config::Method]
|
2737
|
+
#
|
2738
|
+
attr_reader :create_ca_pool
|
2739
|
+
##
|
2740
|
+
# RPC-specific configuration for `update_ca_pool`
|
2741
|
+
# @return [::Gapic::Config::Method]
|
2742
|
+
#
|
2743
|
+
attr_reader :update_ca_pool
|
2744
|
+
##
|
2745
|
+
# RPC-specific configuration for `get_ca_pool`
|
2746
|
+
# @return [::Gapic::Config::Method]
|
2747
|
+
#
|
2748
|
+
attr_reader :get_ca_pool
|
2749
|
+
##
|
2750
|
+
# RPC-specific configuration for `list_ca_pools`
|
2751
|
+
# @return [::Gapic::Config::Method]
|
2752
|
+
#
|
2753
|
+
attr_reader :list_ca_pools
|
2754
|
+
##
|
2755
|
+
# RPC-specific configuration for `delete_ca_pool`
|
2756
|
+
# @return [::Gapic::Config::Method]
|
2757
|
+
#
|
2758
|
+
attr_reader :delete_ca_pool
|
2759
|
+
##
|
2760
|
+
# RPC-specific configuration for `fetch_ca_certs`
|
2761
|
+
# @return [::Gapic::Config::Method]
|
2762
|
+
#
|
2763
|
+
attr_reader :fetch_ca_certs
|
2764
|
+
##
|
2765
|
+
# RPC-specific configuration for `get_certificate_revocation_list`
|
2766
|
+
# @return [::Gapic::Config::Method]
|
2767
|
+
#
|
2768
|
+
attr_reader :get_certificate_revocation_list
|
2769
|
+
##
|
2770
|
+
# RPC-specific configuration for `list_certificate_revocation_lists`
|
2771
|
+
# @return [::Gapic::Config::Method]
|
2772
|
+
#
|
2773
|
+
attr_reader :list_certificate_revocation_lists
|
2774
|
+
##
|
2775
|
+
# RPC-specific configuration for `update_certificate_revocation_list`
|
2776
|
+
# @return [::Gapic::Config::Method]
|
2777
|
+
#
|
2778
|
+
attr_reader :update_certificate_revocation_list
|
2779
|
+
##
|
2780
|
+
# RPC-specific configuration for `create_certificate_template`
|
2781
|
+
# @return [::Gapic::Config::Method]
|
2782
|
+
#
|
2783
|
+
attr_reader :create_certificate_template
|
2784
|
+
##
|
2785
|
+
# RPC-specific configuration for `delete_certificate_template`
|
2786
|
+
# @return [::Gapic::Config::Method]
|
2787
|
+
#
|
2788
|
+
attr_reader :delete_certificate_template
|
2789
|
+
##
|
2790
|
+
# RPC-specific configuration for `get_certificate_template`
|
2791
|
+
# @return [::Gapic::Config::Method]
|
2792
|
+
#
|
2793
|
+
attr_reader :get_certificate_template
|
2794
|
+
##
|
2795
|
+
# RPC-specific configuration for `list_certificate_templates`
|
2796
|
+
# @return [::Gapic::Config::Method]
|
2797
|
+
#
|
2798
|
+
attr_reader :list_certificate_templates
|
2799
|
+
##
|
2800
|
+
# RPC-specific configuration for `update_certificate_template`
|
2801
|
+
# @return [::Gapic::Config::Method]
|
2802
|
+
#
|
2803
|
+
attr_reader :update_certificate_template
|
2804
|
+
|
2805
|
+
# @private
|
2806
|
+
def initialize parent_rpcs = nil
|
2807
|
+
create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate
|
2808
|
+
@create_certificate = ::Gapic::Config::Method.new create_certificate_config
|
2809
|
+
get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate
|
2810
|
+
@get_certificate = ::Gapic::Config::Method.new get_certificate_config
|
2811
|
+
list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates
|
2812
|
+
@list_certificates = ::Gapic::Config::Method.new list_certificates_config
|
2813
|
+
revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate
|
2814
|
+
@revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config
|
2815
|
+
update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate
|
2816
|
+
@update_certificate = ::Gapic::Config::Method.new update_certificate_config
|
2817
|
+
activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority
|
2818
|
+
@activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config
|
2819
|
+
create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority
|
2820
|
+
@create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config
|
2821
|
+
disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority
|
2822
|
+
@disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config
|
2823
|
+
enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority
|
2824
|
+
@enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config
|
2825
|
+
fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr
|
2826
|
+
@fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config
|
2827
|
+
get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority
|
2828
|
+
@get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config
|
2829
|
+
list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities
|
2830
|
+
@list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config
|
2831
|
+
undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority
|
2832
|
+
@undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config
|
2833
|
+
delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority
|
2834
|
+
@delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config
|
2835
|
+
update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority
|
2836
|
+
@update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config
|
2837
|
+
create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool
|
2838
|
+
@create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config
|
2839
|
+
update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool
|
2840
|
+
@update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config
|
2841
|
+
get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool
|
2842
|
+
@get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config
|
2843
|
+
list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools
|
2844
|
+
@list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config
|
2845
|
+
delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool
|
2846
|
+
@delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config
|
2847
|
+
fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs
|
2848
|
+
@fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config
|
2849
|
+
get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list
|
2850
|
+
@get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config
|
2851
|
+
list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists
|
2852
|
+
@list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config
|
2853
|
+
update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list
|
2854
|
+
@update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config
|
2855
|
+
create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template
|
2856
|
+
@create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config
|
2857
|
+
delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template
|
2858
|
+
@delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config
|
2859
|
+
get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template
|
2860
|
+
@get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config
|
2861
|
+
list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates
|
2862
|
+
@list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config
|
2863
|
+
update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template
|
2864
|
+
@update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config
|
2865
|
+
|
2866
|
+
yield self if block_given?
|
2867
|
+
end
|
2868
|
+
end
|
2869
|
+
end
|
2870
|
+
end
|
2871
|
+
end
|
2872
|
+
end
|
2873
|
+
end
|
2874
|
+
end
|
2875
|
+
end
|
2876
|
+
end
|
2877
|
+
end
|