google-cloud-security-private_ca-v1 0.1.2 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +11 -29
- data/README.md +2 -2
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb +830 -157
- data/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb +145 -33
- data/lib/google/cloud/security/private_ca/v1/version.rb +1 -1
- data/lib/google/cloud/security/privateca/v1/resources_pb.rb +3 -3
- data/lib/google/cloud/security/privateca/v1/service_pb.rb +2 -2
- data/lib/google/cloud/security/privateca/v1/service_services_pb.rb +1 -1
- data/lib/google-cloud-security-private_ca-v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/security/privateca/v1/resources.rb +13 -12
- data/proto_docs/google/cloud/security/privateca/v1/service.rb +5 -5
- metadata +45 -5
@@ -43,13 +43,12 @@ module Google
|
|
43
43
|
# See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration}
|
44
44
|
# for a description of the configuration fields.
|
45
45
|
#
|
46
|
-
#
|
46
|
+
# @example
|
47
47
|
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# end
|
48
|
+
# # Modify the configuration for all CertificateAuthorityService clients
|
49
|
+
# ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
53
52
|
#
|
54
53
|
# @yield [config] Configure the Client client.
|
55
54
|
# @yieldparam config [Client::Configuration]
|
@@ -101,19 +100,15 @@ module Google
|
|
101
100
|
##
|
102
101
|
# Create a new CertificateAuthorityService client object.
|
103
102
|
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# To create a new CertificateAuthorityService client with the default
|
107
|
-
# configuration:
|
103
|
+
# @example
|
108
104
|
#
|
109
|
-
#
|
105
|
+
# # Create a client using the default configuration
|
106
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
110
107
|
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
# config.timeout = 10.0
|
116
|
-
# end
|
108
|
+
# # Create a client using a custom configuration
|
109
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
|
110
|
+
# config.timeout = 10.0
|
111
|
+
# end
|
117
112
|
#
|
118
113
|
# @yield [config] Configure the CertificateAuthorityService client.
|
119
114
|
# @yieldparam config [Client::Configuration]
|
@@ -133,10 +128,9 @@ module Google
|
|
133
128
|
|
134
129
|
# Create credentials
|
135
130
|
credentials = @config.credentials
|
136
|
-
# Use self-signed JWT if the
|
131
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
137
132
|
# but only if the default endpoint does not have a region prefix.
|
138
|
-
enable_self_signed_jwt = @config.
|
139
|
-
@config.endpoint == Client.configure.endpoint &&
|
133
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
140
134
|
!@config.endpoint.split(".").first.include?("-")
|
141
135
|
credentials ||= Credentials.default scope: @config.scope,
|
142
136
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -148,6 +142,7 @@ module Google
|
|
148
142
|
|
149
143
|
@operations_client = Operations.new do |config|
|
150
144
|
config.credentials = credentials
|
145
|
+
config.quota_project = @quota_project_id
|
151
146
|
config.endpoint = @config.endpoint
|
152
147
|
end
|
153
148
|
|
@@ -204,11 +199,11 @@ module Google
|
|
204
199
|
# already been completed. The server will guarantee that for at least 60
|
205
200
|
# minutes since the first request.
|
206
201
|
#
|
207
|
-
# For example, consider a situation where you make an initial request and
|
208
|
-
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
202
|
+
# For example, consider a situation where you make an initial request and the
|
203
|
+
# request times out. If you make the request again with the same request ID,
|
204
|
+
# the server can check if original operation with the same request ID was
|
205
|
+
# received, and if so, will ignore the second request. This prevents clients
|
206
|
+
# from accidentally creating duplicate commitments.
|
212
207
|
#
|
213
208
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
214
209
|
# not supported (00000000-0000-0000-0000-000000000000).
|
@@ -237,6 +232,21 @@ module Google
|
|
237
232
|
#
|
238
233
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
239
234
|
#
|
235
|
+
# @example Basic example
|
236
|
+
# require "google/cloud/security/private_ca/v1"
|
237
|
+
#
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
239
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
240
|
+
#
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
242
|
+
# request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new
|
243
|
+
#
|
244
|
+
# # Call the create_certificate method.
|
245
|
+
# result = client.create_certificate request
|
246
|
+
#
|
247
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
|
248
|
+
# p result
|
249
|
+
#
|
240
250
|
def create_certificate request, options = nil
|
241
251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
242
252
|
|
@@ -254,16 +264,20 @@ module Google
|
|
254
264
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
255
265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
256
266
|
|
257
|
-
header_params = {
|
258
|
-
|
259
|
-
|
267
|
+
header_params = {}
|
268
|
+
if request.parent
|
269
|
+
header_params["parent"] = request.parent
|
270
|
+
end
|
271
|
+
|
260
272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
261
273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
262
274
|
|
263
275
|
options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
|
264
276
|
metadata: metadata,
|
265
277
|
retry_policy: @config.rpcs.create_certificate.retry_policy
|
266
|
-
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
267
281
|
retry_policy: @config.retry_policy
|
268
282
|
|
269
283
|
@certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation|
|
@@ -303,6 +317,21 @@ module Google
|
|
303
317
|
#
|
304
318
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
305
319
|
#
|
320
|
+
# @example Basic example
|
321
|
+
# require "google/cloud/security/private_ca/v1"
|
322
|
+
#
|
323
|
+
# # Create a client object. The client can be reused for multiple calls.
|
324
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
325
|
+
#
|
326
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
327
|
+
# request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new
|
328
|
+
#
|
329
|
+
# # Call the get_certificate method.
|
330
|
+
# result = client.get_certificate request
|
331
|
+
#
|
332
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
|
333
|
+
# p result
|
334
|
+
#
|
306
335
|
def get_certificate request, options = nil
|
307
336
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
308
337
|
|
@@ -320,16 +349,20 @@ module Google
|
|
320
349
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
321
350
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
322
351
|
|
323
|
-
header_params = {
|
324
|
-
|
325
|
-
|
352
|
+
header_params = {}
|
353
|
+
if request.name
|
354
|
+
header_params["name"] = request.name
|
355
|
+
end
|
356
|
+
|
326
357
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
327
358
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
328
359
|
|
329
360
|
options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
|
330
361
|
metadata: metadata,
|
331
362
|
retry_policy: @config.rpcs.get_certificate.retry_policy
|
332
|
-
|
363
|
+
|
364
|
+
options.apply_defaults timeout: @config.timeout,
|
365
|
+
metadata: @config.metadata,
|
333
366
|
retry_policy: @config.retry_policy
|
334
367
|
|
335
368
|
@certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation|
|
@@ -389,6 +422,27 @@ module Google
|
|
389
422
|
#
|
390
423
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
391
424
|
#
|
425
|
+
# @example Basic example
|
426
|
+
# require "google/cloud/security/private_ca/v1"
|
427
|
+
#
|
428
|
+
# # Create a client object. The client can be reused for multiple calls.
|
429
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
430
|
+
#
|
431
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
432
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new
|
433
|
+
#
|
434
|
+
# # Call the list_certificates method.
|
435
|
+
# result = client.list_certificates request
|
436
|
+
#
|
437
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
438
|
+
# # iterate over all elements by calling #each, and the enumerable
|
439
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
440
|
+
# # methods are also available for managing paging directly.
|
441
|
+
# result.each do |response|
|
442
|
+
# # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate.
|
443
|
+
# p response
|
444
|
+
# end
|
445
|
+
#
|
392
446
|
def list_certificates request, options = nil
|
393
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
394
448
|
|
@@ -406,16 +460,20 @@ module Google
|
|
406
460
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
407
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
408
462
|
|
409
|
-
header_params = {
|
410
|
-
|
411
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.parent
|
465
|
+
header_params["parent"] = request.parent
|
466
|
+
end
|
467
|
+
|
412
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
413
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
414
470
|
|
415
471
|
options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
|
416
472
|
metadata: metadata,
|
417
473
|
retry_policy: @config.rpcs.list_certificates.retry_policy
|
418
|
-
|
474
|
+
|
475
|
+
options.apply_defaults timeout: @config.timeout,
|
476
|
+
metadata: @config.metadata,
|
419
477
|
retry_policy: @config.retry_policy
|
420
478
|
|
421
479
|
@certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation|
|
@@ -474,6 +532,21 @@ module Google
|
|
474
532
|
#
|
475
533
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
476
534
|
#
|
535
|
+
# @example Basic example
|
536
|
+
# require "google/cloud/security/private_ca/v1"
|
537
|
+
#
|
538
|
+
# # Create a client object. The client can be reused for multiple calls.
|
539
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
540
|
+
#
|
541
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
542
|
+
# request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new
|
543
|
+
#
|
544
|
+
# # Call the revoke_certificate method.
|
545
|
+
# result = client.revoke_certificate request
|
546
|
+
#
|
547
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
|
548
|
+
# p result
|
549
|
+
#
|
477
550
|
def revoke_certificate request, options = nil
|
478
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
479
552
|
|
@@ -491,16 +564,20 @@ module Google
|
|
491
564
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
492
565
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
493
566
|
|
494
|
-
header_params = {
|
495
|
-
|
496
|
-
|
567
|
+
header_params = {}
|
568
|
+
if request.name
|
569
|
+
header_params["name"] = request.name
|
570
|
+
end
|
571
|
+
|
497
572
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
498
573
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
499
574
|
|
500
575
|
options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
|
501
576
|
metadata: metadata,
|
502
577
|
retry_policy: @config.rpcs.revoke_certificate.retry_policy
|
503
|
-
|
578
|
+
|
579
|
+
options.apply_defaults timeout: @config.timeout,
|
580
|
+
metadata: @config.metadata,
|
504
581
|
retry_policy: @config.retry_policy
|
505
582
|
|
506
583
|
@certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation|
|
@@ -557,6 +634,21 @@ module Google
|
|
557
634
|
#
|
558
635
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
559
636
|
#
|
637
|
+
# @example Basic example
|
638
|
+
# require "google/cloud/security/private_ca/v1"
|
639
|
+
#
|
640
|
+
# # Create a client object. The client can be reused for multiple calls.
|
641
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
642
|
+
#
|
643
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
644
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new
|
645
|
+
#
|
646
|
+
# # Call the update_certificate method.
|
647
|
+
# result = client.update_certificate request
|
648
|
+
#
|
649
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
|
650
|
+
# p result
|
651
|
+
#
|
560
652
|
def update_certificate request, options = nil
|
561
653
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
562
654
|
|
@@ -574,16 +666,20 @@ module Google
|
|
574
666
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
575
667
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
576
668
|
|
577
|
-
header_params = {
|
578
|
-
|
579
|
-
|
669
|
+
header_params = {}
|
670
|
+
if request.certificate&.name
|
671
|
+
header_params["certificate.name"] = request.certificate.name
|
672
|
+
end
|
673
|
+
|
580
674
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
581
675
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
582
676
|
|
583
677
|
options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
|
584
678
|
metadata: metadata,
|
585
679
|
retry_policy: @config.rpcs.update_certificate.retry_policy
|
586
|
-
|
680
|
+
|
681
|
+
options.apply_defaults timeout: @config.timeout,
|
682
|
+
metadata: @config.metadata,
|
587
683
|
retry_policy: @config.retry_policy
|
588
684
|
|
589
685
|
@certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation|
|
@@ -649,6 +745,28 @@ module Google
|
|
649
745
|
#
|
650
746
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
651
747
|
#
|
748
|
+
# @example Basic example
|
749
|
+
# require "google/cloud/security/private_ca/v1"
|
750
|
+
#
|
751
|
+
# # Create a client object. The client can be reused for multiple calls.
|
752
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
753
|
+
#
|
754
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
755
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new
|
756
|
+
#
|
757
|
+
# # Call the activate_certificate_authority method.
|
758
|
+
# result = client.activate_certificate_authority request
|
759
|
+
#
|
760
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
761
|
+
# # object to check the status of an operation, cancel it, or wait
|
762
|
+
# # for results. Here is how to block until completion:
|
763
|
+
# result.wait_until_done! timeout: 60
|
764
|
+
# if result.response?
|
765
|
+
# p result.response
|
766
|
+
# else
|
767
|
+
# puts "Error!"
|
768
|
+
# end
|
769
|
+
#
|
652
770
|
def activate_certificate_authority request, options = nil
|
653
771
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
654
772
|
|
@@ -666,16 +784,20 @@ module Google
|
|
666
784
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
667
785
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
668
786
|
|
669
|
-
header_params = {
|
670
|
-
|
671
|
-
|
787
|
+
header_params = {}
|
788
|
+
if request.name
|
789
|
+
header_params["name"] = request.name
|
790
|
+
end
|
791
|
+
|
672
792
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
673
793
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
674
794
|
|
675
795
|
options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
|
676
796
|
metadata: metadata,
|
677
797
|
retry_policy: @config.rpcs.activate_certificate_authority.retry_policy
|
678
|
-
|
798
|
+
|
799
|
+
options.apply_defaults timeout: @config.timeout,
|
800
|
+
metadata: @config.metadata,
|
679
801
|
retry_policy: @config.retry_policy
|
680
802
|
|
681
803
|
@certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation|
|
@@ -737,6 +859,28 @@ module Google
|
|
737
859
|
#
|
738
860
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
739
861
|
#
|
862
|
+
# @example Basic example
|
863
|
+
# require "google/cloud/security/private_ca/v1"
|
864
|
+
#
|
865
|
+
# # Create a client object. The client can be reused for multiple calls.
|
866
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
867
|
+
#
|
868
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
869
|
+
# request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new
|
870
|
+
#
|
871
|
+
# # Call the create_certificate_authority method.
|
872
|
+
# result = client.create_certificate_authority request
|
873
|
+
#
|
874
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
875
|
+
# # object to check the status of an operation, cancel it, or wait
|
876
|
+
# # for results. Here is how to block until completion:
|
877
|
+
# result.wait_until_done! timeout: 60
|
878
|
+
# if result.response?
|
879
|
+
# p result.response
|
880
|
+
# else
|
881
|
+
# puts "Error!"
|
882
|
+
# end
|
883
|
+
#
|
740
884
|
def create_certificate_authority request, options = nil
|
741
885
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
742
886
|
|
@@ -754,16 +898,20 @@ module Google
|
|
754
898
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
755
899
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
756
900
|
|
757
|
-
header_params = {
|
758
|
-
|
759
|
-
|
901
|
+
header_params = {}
|
902
|
+
if request.parent
|
903
|
+
header_params["parent"] = request.parent
|
904
|
+
end
|
905
|
+
|
760
906
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
761
907
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
762
908
|
|
763
909
|
options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
|
764
910
|
metadata: metadata,
|
765
911
|
retry_policy: @config.rpcs.create_certificate_authority.retry_policy
|
766
|
-
|
912
|
+
|
913
|
+
options.apply_defaults timeout: @config.timeout,
|
914
|
+
metadata: @config.metadata,
|
767
915
|
retry_policy: @config.retry_policy
|
768
916
|
|
769
917
|
@certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation|
|
@@ -819,6 +967,28 @@ module Google
|
|
819
967
|
#
|
820
968
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
821
969
|
#
|
970
|
+
# @example Basic example
|
971
|
+
# require "google/cloud/security/private_ca/v1"
|
972
|
+
#
|
973
|
+
# # Create a client object. The client can be reused for multiple calls.
|
974
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
975
|
+
#
|
976
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
977
|
+
# request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new
|
978
|
+
#
|
979
|
+
# # Call the disable_certificate_authority method.
|
980
|
+
# result = client.disable_certificate_authority request
|
981
|
+
#
|
982
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
983
|
+
# # object to check the status of an operation, cancel it, or wait
|
984
|
+
# # for results. Here is how to block until completion:
|
985
|
+
# result.wait_until_done! timeout: 60
|
986
|
+
# if result.response?
|
987
|
+
# p result.response
|
988
|
+
# else
|
989
|
+
# puts "Error!"
|
990
|
+
# end
|
991
|
+
#
|
822
992
|
def disable_certificate_authority request, options = nil
|
823
993
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
824
994
|
|
@@ -836,16 +1006,20 @@ module Google
|
|
836
1006
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
837
1007
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
838
1008
|
|
839
|
-
header_params = {
|
840
|
-
|
841
|
-
|
1009
|
+
header_params = {}
|
1010
|
+
if request.name
|
1011
|
+
header_params["name"] = request.name
|
1012
|
+
end
|
1013
|
+
|
842
1014
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
843
1015
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
844
1016
|
|
845
1017
|
options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
|
846
1018
|
metadata: metadata,
|
847
1019
|
retry_policy: @config.rpcs.disable_certificate_authority.retry_policy
|
848
|
-
|
1020
|
+
|
1021
|
+
options.apply_defaults timeout: @config.timeout,
|
1022
|
+
metadata: @config.metadata,
|
849
1023
|
retry_policy: @config.retry_policy
|
850
1024
|
|
851
1025
|
@certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation|
|
@@ -901,6 +1075,28 @@ module Google
|
|
901
1075
|
#
|
902
1076
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
903
1077
|
#
|
1078
|
+
# @example Basic example
|
1079
|
+
# require "google/cloud/security/private_ca/v1"
|
1080
|
+
#
|
1081
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1082
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1083
|
+
#
|
1084
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1085
|
+
# request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new
|
1086
|
+
#
|
1087
|
+
# # Call the enable_certificate_authority method.
|
1088
|
+
# result = client.enable_certificate_authority request
|
1089
|
+
#
|
1090
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1091
|
+
# # object to check the status of an operation, cancel it, or wait
|
1092
|
+
# # for results. Here is how to block until completion:
|
1093
|
+
# result.wait_until_done! timeout: 60
|
1094
|
+
# if result.response?
|
1095
|
+
# p result.response
|
1096
|
+
# else
|
1097
|
+
# puts "Error!"
|
1098
|
+
# end
|
1099
|
+
#
|
904
1100
|
def enable_certificate_authority request, options = nil
|
905
1101
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
1102
|
|
@@ -918,16 +1114,20 @@ module Google
|
|
918
1114
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
919
1115
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
920
1116
|
|
921
|
-
header_params = {
|
922
|
-
|
923
|
-
|
1117
|
+
header_params = {}
|
1118
|
+
if request.name
|
1119
|
+
header_params["name"] = request.name
|
1120
|
+
end
|
1121
|
+
|
924
1122
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
925
1123
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
926
1124
|
|
927
1125
|
options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
|
928
1126
|
metadata: metadata,
|
929
1127
|
retry_policy: @config.rpcs.enable_certificate_authority.retry_policy
|
930
|
-
|
1128
|
+
|
1129
|
+
options.apply_defaults timeout: @config.timeout,
|
1130
|
+
metadata: @config.metadata,
|
931
1131
|
retry_policy: @config.retry_policy
|
932
1132
|
|
933
1133
|
@certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation|
|
@@ -975,6 +1175,21 @@ module Google
|
|
975
1175
|
#
|
976
1176
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
977
1177
|
#
|
1178
|
+
# @example Basic example
|
1179
|
+
# require "google/cloud/security/private_ca/v1"
|
1180
|
+
#
|
1181
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1182
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1183
|
+
#
|
1184
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1185
|
+
# request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new
|
1186
|
+
#
|
1187
|
+
# # Call the fetch_certificate_authority_csr method.
|
1188
|
+
# result = client.fetch_certificate_authority_csr request
|
1189
|
+
#
|
1190
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.
|
1191
|
+
# p result
|
1192
|
+
#
|
978
1193
|
def fetch_certificate_authority_csr request, options = nil
|
979
1194
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
980
1195
|
|
@@ -992,16 +1207,20 @@ module Google
|
|
992
1207
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
993
1208
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
994
1209
|
|
995
|
-
header_params = {
|
996
|
-
|
997
|
-
|
1210
|
+
header_params = {}
|
1211
|
+
if request.name
|
1212
|
+
header_params["name"] = request.name
|
1213
|
+
end
|
1214
|
+
|
998
1215
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
999
1216
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1000
1217
|
|
1001
1218
|
options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
|
1002
1219
|
metadata: metadata,
|
1003
1220
|
retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy
|
1004
|
-
|
1221
|
+
|
1222
|
+
options.apply_defaults timeout: @config.timeout,
|
1223
|
+
metadata: @config.metadata,
|
1005
1224
|
retry_policy: @config.retry_policy
|
1006
1225
|
|
1007
1226
|
@certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation|
|
@@ -1042,6 +1261,21 @@ module Google
|
|
1042
1261
|
#
|
1043
1262
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1044
1263
|
#
|
1264
|
+
# @example Basic example
|
1265
|
+
# require "google/cloud/security/private_ca/v1"
|
1266
|
+
#
|
1267
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1268
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1269
|
+
#
|
1270
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1271
|
+
# request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new
|
1272
|
+
#
|
1273
|
+
# # Call the get_certificate_authority method.
|
1274
|
+
# result = client.get_certificate_authority request
|
1275
|
+
#
|
1276
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
|
1277
|
+
# p result
|
1278
|
+
#
|
1045
1279
|
def get_certificate_authority request, options = nil
|
1046
1280
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1047
1281
|
|
@@ -1059,16 +1293,20 @@ module Google
|
|
1059
1293
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1060
1294
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1061
1295
|
|
1062
|
-
header_params = {
|
1063
|
-
|
1064
|
-
|
1296
|
+
header_params = {}
|
1297
|
+
if request.name
|
1298
|
+
header_params["name"] = request.name
|
1299
|
+
end
|
1300
|
+
|
1065
1301
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1066
1302
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1067
1303
|
|
1068
1304
|
options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
|
1069
1305
|
metadata: metadata,
|
1070
1306
|
retry_policy: @config.rpcs.get_certificate_authority.retry_policy
|
1071
|
-
|
1307
|
+
|
1308
|
+
options.apply_defaults timeout: @config.timeout,
|
1309
|
+
metadata: @config.metadata,
|
1072
1310
|
retry_policy: @config.retry_policy
|
1073
1311
|
|
1074
1312
|
@certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation|
|
@@ -1124,6 +1362,27 @@ module Google
|
|
1124
1362
|
#
|
1125
1363
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1126
1364
|
#
|
1365
|
+
# @example Basic example
|
1366
|
+
# require "google/cloud/security/private_ca/v1"
|
1367
|
+
#
|
1368
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1369
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1370
|
+
#
|
1371
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1372
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new
|
1373
|
+
#
|
1374
|
+
# # Call the list_certificate_authorities method.
|
1375
|
+
# result = client.list_certificate_authorities request
|
1376
|
+
#
|
1377
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1378
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1379
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1380
|
+
# # methods are also available for managing paging directly.
|
1381
|
+
# result.each do |response|
|
1382
|
+
# # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
|
1383
|
+
# p response
|
1384
|
+
# end
|
1385
|
+
#
|
1127
1386
|
def list_certificate_authorities request, options = nil
|
1128
1387
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1129
1388
|
|
@@ -1141,16 +1400,20 @@ module Google
|
|
1141
1400
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1142
1401
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1143
1402
|
|
1144
|
-
header_params = {
|
1145
|
-
|
1146
|
-
|
1403
|
+
header_params = {}
|
1404
|
+
if request.parent
|
1405
|
+
header_params["parent"] = request.parent
|
1406
|
+
end
|
1407
|
+
|
1147
1408
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1148
1409
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1149
1410
|
|
1150
1411
|
options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
|
1151
1412
|
metadata: metadata,
|
1152
1413
|
retry_policy: @config.rpcs.list_certificate_authorities.retry_policy
|
1153
|
-
|
1414
|
+
|
1415
|
+
options.apply_defaults timeout: @config.timeout,
|
1416
|
+
metadata: @config.metadata,
|
1154
1417
|
retry_policy: @config.retry_policy
|
1155
1418
|
|
1156
1419
|
@certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation|
|
@@ -1206,6 +1469,28 @@ module Google
|
|
1206
1469
|
#
|
1207
1470
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1208
1471
|
#
|
1472
|
+
# @example Basic example
|
1473
|
+
# require "google/cloud/security/private_ca/v1"
|
1474
|
+
#
|
1475
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1476
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1477
|
+
#
|
1478
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1479
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new
|
1480
|
+
#
|
1481
|
+
# # Call the undelete_certificate_authority method.
|
1482
|
+
# result = client.undelete_certificate_authority request
|
1483
|
+
#
|
1484
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1485
|
+
# # object to check the status of an operation, cancel it, or wait
|
1486
|
+
# # for results. Here is how to block until completion:
|
1487
|
+
# result.wait_until_done! timeout: 60
|
1488
|
+
# if result.response?
|
1489
|
+
# p result.response
|
1490
|
+
# else
|
1491
|
+
# puts "Error!"
|
1492
|
+
# end
|
1493
|
+
#
|
1209
1494
|
def undelete_certificate_authority request, options = nil
|
1210
1495
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1211
1496
|
|
@@ -1223,16 +1508,20 @@ module Google
|
|
1223
1508
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1224
1509
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1225
1510
|
|
1226
|
-
header_params = {
|
1227
|
-
|
1228
|
-
|
1511
|
+
header_params = {}
|
1512
|
+
if request.name
|
1513
|
+
header_params["name"] = request.name
|
1514
|
+
end
|
1515
|
+
|
1229
1516
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1230
1517
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1231
1518
|
|
1232
1519
|
options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout,
|
1233
1520
|
metadata: metadata,
|
1234
1521
|
retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy
|
1235
|
-
|
1522
|
+
|
1523
|
+
options.apply_defaults timeout: @config.timeout,
|
1524
|
+
metadata: @config.metadata,
|
1236
1525
|
retry_policy: @config.retry_policy
|
1237
1526
|
|
1238
1527
|
@certificate_authority_service_stub.call_rpc :undelete_certificate_authority, request, options: options do |response, operation|
|
@@ -1291,6 +1580,28 @@ module Google
|
|
1291
1580
|
#
|
1292
1581
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1293
1582
|
#
|
1583
|
+
# @example Basic example
|
1584
|
+
# require "google/cloud/security/private_ca/v1"
|
1585
|
+
#
|
1586
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1587
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1588
|
+
#
|
1589
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1590
|
+
# request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new
|
1591
|
+
#
|
1592
|
+
# # Call the delete_certificate_authority method.
|
1593
|
+
# result = client.delete_certificate_authority request
|
1594
|
+
#
|
1595
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1596
|
+
# # object to check the status of an operation, cancel it, or wait
|
1597
|
+
# # for results. Here is how to block until completion:
|
1598
|
+
# result.wait_until_done! timeout: 60
|
1599
|
+
# if result.response?
|
1600
|
+
# p result.response
|
1601
|
+
# else
|
1602
|
+
# puts "Error!"
|
1603
|
+
# end
|
1604
|
+
#
|
1294
1605
|
def delete_certificate_authority request, options = nil
|
1295
1606
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1296
1607
|
|
@@ -1308,16 +1619,20 @@ module Google
|
|
1308
1619
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1309
1620
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1310
1621
|
|
1311
|
-
header_params = {
|
1312
|
-
|
1313
|
-
|
1622
|
+
header_params = {}
|
1623
|
+
if request.name
|
1624
|
+
header_params["name"] = request.name
|
1625
|
+
end
|
1626
|
+
|
1314
1627
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1315
1628
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1316
1629
|
|
1317
1630
|
options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout,
|
1318
1631
|
metadata: metadata,
|
1319
1632
|
retry_policy: @config.rpcs.delete_certificate_authority.retry_policy
|
1320
|
-
|
1633
|
+
|
1634
|
+
options.apply_defaults timeout: @config.timeout,
|
1635
|
+
metadata: @config.metadata,
|
1321
1636
|
retry_policy: @config.retry_policy
|
1322
1637
|
|
1323
1638
|
@certificate_authority_service_stub.call_rpc :delete_certificate_authority, request, options: options do |response, operation|
|
@@ -1374,6 +1689,28 @@ module Google
|
|
1374
1689
|
#
|
1375
1690
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1376
1691
|
#
|
1692
|
+
# @example Basic example
|
1693
|
+
# require "google/cloud/security/private_ca/v1"
|
1694
|
+
#
|
1695
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1696
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1697
|
+
#
|
1698
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1699
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new
|
1700
|
+
#
|
1701
|
+
# # Call the update_certificate_authority method.
|
1702
|
+
# result = client.update_certificate_authority request
|
1703
|
+
#
|
1704
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1705
|
+
# # object to check the status of an operation, cancel it, or wait
|
1706
|
+
# # for results. Here is how to block until completion:
|
1707
|
+
# result.wait_until_done! timeout: 60
|
1708
|
+
# if result.response?
|
1709
|
+
# p result.response
|
1710
|
+
# else
|
1711
|
+
# puts "Error!"
|
1712
|
+
# end
|
1713
|
+
#
|
1377
1714
|
def update_certificate_authority request, options = nil
|
1378
1715
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1379
1716
|
|
@@ -1391,16 +1728,20 @@ module Google
|
|
1391
1728
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1392
1729
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1393
1730
|
|
1394
|
-
header_params = {
|
1395
|
-
|
1396
|
-
|
1731
|
+
header_params = {}
|
1732
|
+
if request.certificate_authority&.name
|
1733
|
+
header_params["certificate_authority.name"] = request.certificate_authority.name
|
1734
|
+
end
|
1735
|
+
|
1397
1736
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1398
1737
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1399
1738
|
|
1400
1739
|
options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
|
1401
1740
|
metadata: metadata,
|
1402
1741
|
retry_policy: @config.rpcs.update_certificate_authority.retry_policy
|
1403
|
-
|
1742
|
+
|
1743
|
+
options.apply_defaults timeout: @config.timeout,
|
1744
|
+
metadata: @config.metadata,
|
1404
1745
|
retry_policy: @config.retry_policy
|
1405
1746
|
|
1406
1747
|
@certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation|
|
@@ -1461,6 +1802,28 @@ module Google
|
|
1461
1802
|
#
|
1462
1803
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1463
1804
|
#
|
1805
|
+
# @example Basic example
|
1806
|
+
# require "google/cloud/security/private_ca/v1"
|
1807
|
+
#
|
1808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1809
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1810
|
+
#
|
1811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1812
|
+
# request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new
|
1813
|
+
#
|
1814
|
+
# # Call the create_ca_pool method.
|
1815
|
+
# result = client.create_ca_pool request
|
1816
|
+
#
|
1817
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1818
|
+
# # object to check the status of an operation, cancel it, or wait
|
1819
|
+
# # for results. Here is how to block until completion:
|
1820
|
+
# result.wait_until_done! timeout: 60
|
1821
|
+
# if result.response?
|
1822
|
+
# p result.response
|
1823
|
+
# else
|
1824
|
+
# puts "Error!"
|
1825
|
+
# end
|
1826
|
+
#
|
1464
1827
|
def create_ca_pool request, options = nil
|
1465
1828
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1466
1829
|
|
@@ -1478,16 +1841,20 @@ module Google
|
|
1478
1841
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1479
1842
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1480
1843
|
|
1481
|
-
header_params = {
|
1482
|
-
|
1483
|
-
|
1844
|
+
header_params = {}
|
1845
|
+
if request.parent
|
1846
|
+
header_params["parent"] = request.parent
|
1847
|
+
end
|
1848
|
+
|
1484
1849
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1485
1850
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1486
1851
|
|
1487
1852
|
options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout,
|
1488
1853
|
metadata: metadata,
|
1489
1854
|
retry_policy: @config.rpcs.create_ca_pool.retry_policy
|
1490
|
-
|
1855
|
+
|
1856
|
+
options.apply_defaults timeout: @config.timeout,
|
1857
|
+
metadata: @config.metadata,
|
1491
1858
|
retry_policy: @config.retry_policy
|
1492
1859
|
|
1493
1860
|
@certificate_authority_service_stub.call_rpc :create_ca_pool, request, options: options do |response, operation|
|
@@ -1544,6 +1911,28 @@ module Google
|
|
1544
1911
|
#
|
1545
1912
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1546
1913
|
#
|
1914
|
+
# @example Basic example
|
1915
|
+
# require "google/cloud/security/private_ca/v1"
|
1916
|
+
#
|
1917
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1918
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
1919
|
+
#
|
1920
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1921
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new
|
1922
|
+
#
|
1923
|
+
# # Call the update_ca_pool method.
|
1924
|
+
# result = client.update_ca_pool request
|
1925
|
+
#
|
1926
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1927
|
+
# # object to check the status of an operation, cancel it, or wait
|
1928
|
+
# # for results. Here is how to block until completion:
|
1929
|
+
# result.wait_until_done! timeout: 60
|
1930
|
+
# if result.response?
|
1931
|
+
# p result.response
|
1932
|
+
# else
|
1933
|
+
# puts "Error!"
|
1934
|
+
# end
|
1935
|
+
#
|
1547
1936
|
def update_ca_pool request, options = nil
|
1548
1937
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1549
1938
|
|
@@ -1561,16 +1950,20 @@ module Google
|
|
1561
1950
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1562
1951
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1563
1952
|
|
1564
|
-
header_params = {
|
1565
|
-
|
1566
|
-
|
1953
|
+
header_params = {}
|
1954
|
+
if request.ca_pool&.name
|
1955
|
+
header_params["ca_pool.name"] = request.ca_pool.name
|
1956
|
+
end
|
1957
|
+
|
1567
1958
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1568
1959
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1569
1960
|
|
1570
1961
|
options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout,
|
1571
1962
|
metadata: metadata,
|
1572
1963
|
retry_policy: @config.rpcs.update_ca_pool.retry_policy
|
1573
|
-
|
1964
|
+
|
1965
|
+
options.apply_defaults timeout: @config.timeout,
|
1966
|
+
metadata: @config.metadata,
|
1574
1967
|
retry_policy: @config.retry_policy
|
1575
1968
|
|
1576
1969
|
@certificate_authority_service_stub.call_rpc :update_ca_pool, request, options: options do |response, operation|
|
@@ -1611,6 +2004,21 @@ module Google
|
|
1611
2004
|
#
|
1612
2005
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1613
2006
|
#
|
2007
|
+
# @example Basic example
|
2008
|
+
# require "google/cloud/security/private_ca/v1"
|
2009
|
+
#
|
2010
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2011
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2012
|
+
#
|
2013
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2014
|
+
# request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new
|
2015
|
+
#
|
2016
|
+
# # Call the get_ca_pool method.
|
2017
|
+
# result = client.get_ca_pool request
|
2018
|
+
#
|
2019
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool.
|
2020
|
+
# p result
|
2021
|
+
#
|
1614
2022
|
def get_ca_pool request, options = nil
|
1615
2023
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1616
2024
|
|
@@ -1628,16 +2036,20 @@ module Google
|
|
1628
2036
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1629
2037
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1630
2038
|
|
1631
|
-
header_params = {
|
1632
|
-
|
1633
|
-
|
2039
|
+
header_params = {}
|
2040
|
+
if request.name
|
2041
|
+
header_params["name"] = request.name
|
2042
|
+
end
|
2043
|
+
|
1634
2044
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1635
2045
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1636
2046
|
|
1637
2047
|
options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout,
|
1638
2048
|
metadata: metadata,
|
1639
2049
|
retry_policy: @config.rpcs.get_ca_pool.retry_policy
|
1640
|
-
|
2050
|
+
|
2051
|
+
options.apply_defaults timeout: @config.timeout,
|
2052
|
+
metadata: @config.metadata,
|
1641
2053
|
retry_policy: @config.retry_policy
|
1642
2054
|
|
1643
2055
|
@certificate_authority_service_stub.call_rpc :get_ca_pool, request, options: options do |response, operation|
|
@@ -1693,6 +2105,27 @@ module Google
|
|
1693
2105
|
#
|
1694
2106
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1695
2107
|
#
|
2108
|
+
# @example Basic example
|
2109
|
+
# require "google/cloud/security/private_ca/v1"
|
2110
|
+
#
|
2111
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2112
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2113
|
+
#
|
2114
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2115
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new
|
2116
|
+
#
|
2117
|
+
# # Call the list_ca_pools method.
|
2118
|
+
# result = client.list_ca_pools request
|
2119
|
+
#
|
2120
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2121
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2122
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2123
|
+
# # methods are also available for managing paging directly.
|
2124
|
+
# result.each do |response|
|
2125
|
+
# # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool.
|
2126
|
+
# p response
|
2127
|
+
# end
|
2128
|
+
#
|
1696
2129
|
def list_ca_pools request, options = nil
|
1697
2130
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1698
2131
|
|
@@ -1710,16 +2143,20 @@ module Google
|
|
1710
2143
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1711
2144
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1712
2145
|
|
1713
|
-
header_params = {
|
1714
|
-
|
1715
|
-
|
2146
|
+
header_params = {}
|
2147
|
+
if request.parent
|
2148
|
+
header_params["parent"] = request.parent
|
2149
|
+
end
|
2150
|
+
|
1716
2151
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1717
2152
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1718
2153
|
|
1719
2154
|
options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout,
|
1720
2155
|
metadata: metadata,
|
1721
2156
|
retry_policy: @config.rpcs.list_ca_pools.retry_policy
|
1722
|
-
|
2157
|
+
|
2158
|
+
options.apply_defaults timeout: @config.timeout,
|
2159
|
+
metadata: @config.metadata,
|
1723
2160
|
retry_policy: @config.retry_policy
|
1724
2161
|
|
1725
2162
|
@certificate_authority_service_stub.call_rpc :list_ca_pools, request, options: options do |response, operation|
|
@@ -1775,6 +2212,28 @@ module Google
|
|
1775
2212
|
#
|
1776
2213
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1777
2214
|
#
|
2215
|
+
# @example Basic example
|
2216
|
+
# require "google/cloud/security/private_ca/v1"
|
2217
|
+
#
|
2218
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2219
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2220
|
+
#
|
2221
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2222
|
+
# request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new
|
2223
|
+
#
|
2224
|
+
# # Call the delete_ca_pool method.
|
2225
|
+
# result = client.delete_ca_pool request
|
2226
|
+
#
|
2227
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2228
|
+
# # object to check the status of an operation, cancel it, or wait
|
2229
|
+
# # for results. Here is how to block until completion:
|
2230
|
+
# result.wait_until_done! timeout: 60
|
2231
|
+
# if result.response?
|
2232
|
+
# p result.response
|
2233
|
+
# else
|
2234
|
+
# puts "Error!"
|
2235
|
+
# end
|
2236
|
+
#
|
1778
2237
|
def delete_ca_pool request, options = nil
|
1779
2238
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1780
2239
|
|
@@ -1792,16 +2251,20 @@ module Google
|
|
1792
2251
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1793
2252
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1794
2253
|
|
1795
|
-
header_params = {
|
1796
|
-
|
1797
|
-
|
2254
|
+
header_params = {}
|
2255
|
+
if request.name
|
2256
|
+
header_params["name"] = request.name
|
2257
|
+
end
|
2258
|
+
|
1798
2259
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1799
2260
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1800
2261
|
|
1801
2262
|
options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout,
|
1802
2263
|
metadata: metadata,
|
1803
2264
|
retry_policy: @config.rpcs.delete_ca_pool.retry_policy
|
1804
|
-
|
2265
|
+
|
2266
|
+
options.apply_defaults timeout: @config.timeout,
|
2267
|
+
metadata: @config.metadata,
|
1805
2268
|
retry_policy: @config.retry_policy
|
1806
2269
|
|
1807
2270
|
@certificate_authority_service_stub.call_rpc :delete_ca_pool, request, options: options do |response, operation|
|
@@ -1859,6 +2322,21 @@ module Google
|
|
1859
2322
|
#
|
1860
2323
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1861
2324
|
#
|
2325
|
+
# @example Basic example
|
2326
|
+
# require "google/cloud/security/private_ca/v1"
|
2327
|
+
#
|
2328
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2329
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2330
|
+
#
|
2331
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2332
|
+
# request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new
|
2333
|
+
#
|
2334
|
+
# # Call the fetch_ca_certs method.
|
2335
|
+
# result = client.fetch_ca_certs request
|
2336
|
+
#
|
2337
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.
|
2338
|
+
# p result
|
2339
|
+
#
|
1862
2340
|
def fetch_ca_certs request, options = nil
|
1863
2341
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1864
2342
|
|
@@ -1876,16 +2354,20 @@ module Google
|
|
1876
2354
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1877
2355
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1878
2356
|
|
1879
|
-
header_params = {
|
1880
|
-
|
1881
|
-
|
2357
|
+
header_params = {}
|
2358
|
+
if request.ca_pool
|
2359
|
+
header_params["ca_pool"] = request.ca_pool
|
2360
|
+
end
|
2361
|
+
|
1882
2362
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1883
2363
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1884
2364
|
|
1885
2365
|
options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout,
|
1886
2366
|
metadata: metadata,
|
1887
2367
|
retry_policy: @config.rpcs.fetch_ca_certs.retry_policy
|
1888
|
-
|
2368
|
+
|
2369
|
+
options.apply_defaults timeout: @config.timeout,
|
2370
|
+
metadata: @config.metadata,
|
1889
2371
|
retry_policy: @config.retry_policy
|
1890
2372
|
|
1891
2373
|
@certificate_authority_service_stub.call_rpc :fetch_ca_certs, request, options: options do |response, operation|
|
@@ -1926,6 +2408,21 @@ module Google
|
|
1926
2408
|
#
|
1927
2409
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1928
2410
|
#
|
2411
|
+
# @example Basic example
|
2412
|
+
# require "google/cloud/security/private_ca/v1"
|
2413
|
+
#
|
2414
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2415
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2416
|
+
#
|
2417
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2418
|
+
# request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new
|
2419
|
+
#
|
2420
|
+
# # Call the get_certificate_revocation_list method.
|
2421
|
+
# result = client.get_certificate_revocation_list request
|
2422
|
+
#
|
2423
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
|
2424
|
+
# p result
|
2425
|
+
#
|
1929
2426
|
def get_certificate_revocation_list request, options = nil
|
1930
2427
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1931
2428
|
|
@@ -1943,16 +2440,20 @@ module Google
|
|
1943
2440
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
1944
2441
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1945
2442
|
|
1946
|
-
header_params = {
|
1947
|
-
|
1948
|
-
|
2443
|
+
header_params = {}
|
2444
|
+
if request.name
|
2445
|
+
header_params["name"] = request.name
|
2446
|
+
end
|
2447
|
+
|
1949
2448
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1950
2449
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1951
2450
|
|
1952
2451
|
options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
|
1953
2452
|
metadata: metadata,
|
1954
2453
|
retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy
|
1955
|
-
|
2454
|
+
|
2455
|
+
options.apply_defaults timeout: @config.timeout,
|
2456
|
+
metadata: @config.metadata,
|
1956
2457
|
retry_policy: @config.retry_policy
|
1957
2458
|
|
1958
2459
|
@certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation|
|
@@ -2008,6 +2509,27 @@ module Google
|
|
2008
2509
|
#
|
2009
2510
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2010
2511
|
#
|
2512
|
+
# @example Basic example
|
2513
|
+
# require "google/cloud/security/private_ca/v1"
|
2514
|
+
#
|
2515
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2516
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2517
|
+
#
|
2518
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2519
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new
|
2520
|
+
#
|
2521
|
+
# # Call the list_certificate_revocation_lists method.
|
2522
|
+
# result = client.list_certificate_revocation_lists request
|
2523
|
+
#
|
2524
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2525
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2526
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2527
|
+
# # methods are also available for managing paging directly.
|
2528
|
+
# result.each do |response|
|
2529
|
+
# # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
|
2530
|
+
# p response
|
2531
|
+
# end
|
2532
|
+
#
|
2011
2533
|
def list_certificate_revocation_lists request, options = nil
|
2012
2534
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2013
2535
|
|
@@ -2025,16 +2547,20 @@ module Google
|
|
2025
2547
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2026
2548
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2027
2549
|
|
2028
|
-
header_params = {
|
2029
|
-
|
2030
|
-
|
2550
|
+
header_params = {}
|
2551
|
+
if request.parent
|
2552
|
+
header_params["parent"] = request.parent
|
2553
|
+
end
|
2554
|
+
|
2031
2555
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2032
2556
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2033
2557
|
|
2034
2558
|
options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
|
2035
2559
|
metadata: metadata,
|
2036
2560
|
retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy
|
2037
|
-
|
2561
|
+
|
2562
|
+
options.apply_defaults timeout: @config.timeout,
|
2563
|
+
metadata: @config.metadata,
|
2038
2564
|
retry_policy: @config.retry_policy
|
2039
2565
|
|
2040
2566
|
@certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation|
|
@@ -2091,6 +2617,28 @@ module Google
|
|
2091
2617
|
#
|
2092
2618
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2093
2619
|
#
|
2620
|
+
# @example Basic example
|
2621
|
+
# require "google/cloud/security/private_ca/v1"
|
2622
|
+
#
|
2623
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2624
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2625
|
+
#
|
2626
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2627
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new
|
2628
|
+
#
|
2629
|
+
# # Call the update_certificate_revocation_list method.
|
2630
|
+
# result = client.update_certificate_revocation_list request
|
2631
|
+
#
|
2632
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2633
|
+
# # object to check the status of an operation, cancel it, or wait
|
2634
|
+
# # for results. Here is how to block until completion:
|
2635
|
+
# result.wait_until_done! timeout: 60
|
2636
|
+
# if result.response?
|
2637
|
+
# p result.response
|
2638
|
+
# else
|
2639
|
+
# puts "Error!"
|
2640
|
+
# end
|
2641
|
+
#
|
2094
2642
|
def update_certificate_revocation_list request, options = nil
|
2095
2643
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2096
2644
|
|
@@ -2108,16 +2656,20 @@ module Google
|
|
2108
2656
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2109
2657
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2110
2658
|
|
2111
|
-
header_params = {
|
2112
|
-
|
2113
|
-
|
2659
|
+
header_params = {}
|
2660
|
+
if request.certificate_revocation_list&.name
|
2661
|
+
header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name
|
2662
|
+
end
|
2663
|
+
|
2114
2664
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2115
2665
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2116
2666
|
|
2117
2667
|
options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
|
2118
2668
|
metadata: metadata,
|
2119
2669
|
retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy
|
2120
|
-
|
2670
|
+
|
2671
|
+
options.apply_defaults timeout: @config.timeout,
|
2672
|
+
metadata: @config.metadata,
|
2121
2673
|
retry_policy: @config.retry_policy
|
2122
2674
|
|
2123
2675
|
@certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation|
|
@@ -2179,6 +2731,28 @@ module Google
|
|
2179
2731
|
#
|
2180
2732
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2181
2733
|
#
|
2734
|
+
# @example Basic example
|
2735
|
+
# require "google/cloud/security/private_ca/v1"
|
2736
|
+
#
|
2737
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2738
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2739
|
+
#
|
2740
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2741
|
+
# request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new
|
2742
|
+
#
|
2743
|
+
# # Call the create_certificate_template method.
|
2744
|
+
# result = client.create_certificate_template request
|
2745
|
+
#
|
2746
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2747
|
+
# # object to check the status of an operation, cancel it, or wait
|
2748
|
+
# # for results. Here is how to block until completion:
|
2749
|
+
# result.wait_until_done! timeout: 60
|
2750
|
+
# if result.response?
|
2751
|
+
# p result.response
|
2752
|
+
# else
|
2753
|
+
# puts "Error!"
|
2754
|
+
# end
|
2755
|
+
#
|
2182
2756
|
def create_certificate_template request, options = nil
|
2183
2757
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2184
2758
|
|
@@ -2196,16 +2770,20 @@ module Google
|
|
2196
2770
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2197
2771
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2198
2772
|
|
2199
|
-
header_params = {
|
2200
|
-
|
2201
|
-
|
2773
|
+
header_params = {}
|
2774
|
+
if request.parent
|
2775
|
+
header_params["parent"] = request.parent
|
2776
|
+
end
|
2777
|
+
|
2202
2778
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2203
2779
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2204
2780
|
|
2205
2781
|
options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout,
|
2206
2782
|
metadata: metadata,
|
2207
2783
|
retry_policy: @config.rpcs.create_certificate_template.retry_policy
|
2208
|
-
|
2784
|
+
|
2785
|
+
options.apply_defaults timeout: @config.timeout,
|
2786
|
+
metadata: @config.metadata,
|
2209
2787
|
retry_policy: @config.retry_policy
|
2210
2788
|
|
2211
2789
|
@certificate_authority_service_stub.call_rpc :create_certificate_template, request, options: options do |response, operation|
|
@@ -2261,6 +2839,28 @@ module Google
|
|
2261
2839
|
#
|
2262
2840
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2263
2841
|
#
|
2842
|
+
# @example Basic example
|
2843
|
+
# require "google/cloud/security/private_ca/v1"
|
2844
|
+
#
|
2845
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2846
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2847
|
+
#
|
2848
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2849
|
+
# request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new
|
2850
|
+
#
|
2851
|
+
# # Call the delete_certificate_template method.
|
2852
|
+
# result = client.delete_certificate_template request
|
2853
|
+
#
|
2854
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2855
|
+
# # object to check the status of an operation, cancel it, or wait
|
2856
|
+
# # for results. Here is how to block until completion:
|
2857
|
+
# result.wait_until_done! timeout: 60
|
2858
|
+
# if result.response?
|
2859
|
+
# p result.response
|
2860
|
+
# else
|
2861
|
+
# puts "Error!"
|
2862
|
+
# end
|
2863
|
+
#
|
2264
2864
|
def delete_certificate_template request, options = nil
|
2265
2865
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2266
2866
|
|
@@ -2278,16 +2878,20 @@ module Google
|
|
2278
2878
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2279
2879
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2280
2880
|
|
2281
|
-
header_params = {
|
2282
|
-
|
2283
|
-
|
2881
|
+
header_params = {}
|
2882
|
+
if request.name
|
2883
|
+
header_params["name"] = request.name
|
2884
|
+
end
|
2885
|
+
|
2284
2886
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2285
2887
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2286
2888
|
|
2287
2889
|
options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout,
|
2288
2890
|
metadata: metadata,
|
2289
2891
|
retry_policy: @config.rpcs.delete_certificate_template.retry_policy
|
2290
|
-
|
2892
|
+
|
2893
|
+
options.apply_defaults timeout: @config.timeout,
|
2894
|
+
metadata: @config.metadata,
|
2291
2895
|
retry_policy: @config.retry_policy
|
2292
2896
|
|
2293
2897
|
@certificate_authority_service_stub.call_rpc :delete_certificate_template, request, options: options do |response, operation|
|
@@ -2329,6 +2933,21 @@ module Google
|
|
2329
2933
|
#
|
2330
2934
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2331
2935
|
#
|
2936
|
+
# @example Basic example
|
2937
|
+
# require "google/cloud/security/private_ca/v1"
|
2938
|
+
#
|
2939
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2940
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
2941
|
+
#
|
2942
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2943
|
+
# request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new
|
2944
|
+
#
|
2945
|
+
# # Call the get_certificate_template method.
|
2946
|
+
# result = client.get_certificate_template request
|
2947
|
+
#
|
2948
|
+
# # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
|
2949
|
+
# p result
|
2950
|
+
#
|
2332
2951
|
def get_certificate_template request, options = nil
|
2333
2952
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2334
2953
|
|
@@ -2346,16 +2965,20 @@ module Google
|
|
2346
2965
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2347
2966
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2348
2967
|
|
2349
|
-
header_params = {
|
2350
|
-
|
2351
|
-
|
2968
|
+
header_params = {}
|
2969
|
+
if request.name
|
2970
|
+
header_params["name"] = request.name
|
2971
|
+
end
|
2972
|
+
|
2352
2973
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2353
2974
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2354
2975
|
|
2355
2976
|
options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout,
|
2356
2977
|
metadata: metadata,
|
2357
2978
|
retry_policy: @config.rpcs.get_certificate_template.retry_policy
|
2358
|
-
|
2979
|
+
|
2980
|
+
options.apply_defaults timeout: @config.timeout,
|
2981
|
+
metadata: @config.metadata,
|
2359
2982
|
retry_policy: @config.retry_policy
|
2360
2983
|
|
2361
2984
|
@certificate_authority_service_stub.call_rpc :get_certificate_template, request, options: options do |response, operation|
|
@@ -2411,6 +3034,27 @@ module Google
|
|
2411
3034
|
#
|
2412
3035
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2413
3036
|
#
|
3037
|
+
# @example Basic example
|
3038
|
+
# require "google/cloud/security/private_ca/v1"
|
3039
|
+
#
|
3040
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3041
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
3042
|
+
#
|
3043
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3044
|
+
# request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new
|
3045
|
+
#
|
3046
|
+
# # Call the list_certificate_templates method.
|
3047
|
+
# result = client.list_certificate_templates request
|
3048
|
+
#
|
3049
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3050
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3051
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3052
|
+
# # methods are also available for managing paging directly.
|
3053
|
+
# result.each do |response|
|
3054
|
+
# # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
|
3055
|
+
# p response
|
3056
|
+
# end
|
3057
|
+
#
|
2414
3058
|
def list_certificate_templates request, options = nil
|
2415
3059
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2416
3060
|
|
@@ -2428,16 +3072,20 @@ module Google
|
|
2428
3072
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2429
3073
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2430
3074
|
|
2431
|
-
header_params = {
|
2432
|
-
|
2433
|
-
|
3075
|
+
header_params = {}
|
3076
|
+
if request.parent
|
3077
|
+
header_params["parent"] = request.parent
|
3078
|
+
end
|
3079
|
+
|
2434
3080
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2435
3081
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2436
3082
|
|
2437
3083
|
options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout,
|
2438
3084
|
metadata: metadata,
|
2439
3085
|
retry_policy: @config.rpcs.list_certificate_templates.retry_policy
|
2440
|
-
|
3086
|
+
|
3087
|
+
options.apply_defaults timeout: @config.timeout,
|
3088
|
+
metadata: @config.metadata,
|
2441
3089
|
retry_policy: @config.retry_policy
|
2442
3090
|
|
2443
3091
|
@certificate_authority_service_stub.call_rpc :list_certificate_templates, request, options: options do |response, operation|
|
@@ -2494,6 +3142,28 @@ module Google
|
|
2494
3142
|
#
|
2495
3143
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2496
3144
|
#
|
3145
|
+
# @example Basic example
|
3146
|
+
# require "google/cloud/security/private_ca/v1"
|
3147
|
+
#
|
3148
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3149
|
+
# client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
|
3150
|
+
#
|
3151
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3152
|
+
# request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new
|
3153
|
+
#
|
3154
|
+
# # Call the update_certificate_template method.
|
3155
|
+
# result = client.update_certificate_template request
|
3156
|
+
#
|
3157
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
3158
|
+
# # object to check the status of an operation, cancel it, or wait
|
3159
|
+
# # for results. Here is how to block until completion:
|
3160
|
+
# result.wait_until_done! timeout: 60
|
3161
|
+
# if result.response?
|
3162
|
+
# p result.response
|
3163
|
+
# else
|
3164
|
+
# puts "Error!"
|
3165
|
+
# end
|
3166
|
+
#
|
2497
3167
|
def update_certificate_template request, options = nil
|
2498
3168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2499
3169
|
|
@@ -2511,16 +3181,20 @@ module Google
|
|
2511
3181
|
gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
|
2512
3182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2513
3183
|
|
2514
|
-
header_params = {
|
2515
|
-
|
2516
|
-
|
3184
|
+
header_params = {}
|
3185
|
+
if request.certificate_template&.name
|
3186
|
+
header_params["certificate_template.name"] = request.certificate_template.name
|
3187
|
+
end
|
3188
|
+
|
2517
3189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2518
3190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2519
3191
|
|
2520
3192
|
options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout,
|
2521
3193
|
metadata: metadata,
|
2522
3194
|
retry_policy: @config.rpcs.update_certificate_template.retry_policy
|
2523
|
-
|
3195
|
+
|
3196
|
+
options.apply_defaults timeout: @config.timeout,
|
3197
|
+
metadata: @config.metadata,
|
2524
3198
|
retry_policy: @config.retry_policy
|
2525
3199
|
|
2526
3200
|
@certificate_authority_service_stub.call_rpc :update_certificate_template, request, options: options do |response, operation|
|
@@ -2545,22 +3219,21 @@ module Google
|
|
2545
3219
|
# Configuration can be applied globally to all clients, or to a single client
|
2546
3220
|
# on construction.
|
2547
3221
|
#
|
2548
|
-
#
|
2549
|
-
#
|
2550
|
-
#
|
2551
|
-
# to 20 seconds,
|
2552
|
-
#
|
2553
|
-
#
|
2554
|
-
#
|
2555
|
-
#
|
2556
|
-
#
|
2557
|
-
#
|
2558
|
-
#
|
2559
|
-
#
|
2560
|
-
#
|
2561
|
-
#
|
2562
|
-
#
|
2563
|
-
# end
|
3222
|
+
# @example
|
3223
|
+
#
|
3224
|
+
# # Modify the global config, setting the timeout for
|
3225
|
+
# # create_certificate to 20 seconds,
|
3226
|
+
# # and all remaining timeouts to 10 seconds.
|
3227
|
+
# ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
|
3228
|
+
# config.timeout = 10.0
|
3229
|
+
# config.rpcs.create_certificate.timeout = 20.0
|
3230
|
+
# end
|
3231
|
+
#
|
3232
|
+
# # Apply the above configuration only to a new client.
|
3233
|
+
# client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
|
3234
|
+
# config.timeout = 10.0
|
3235
|
+
# config.rpcs.create_certificate.timeout = 20.0
|
3236
|
+
# end
|
2564
3237
|
#
|
2565
3238
|
# @!attribute [rw] endpoint
|
2566
3239
|
# The hostname or hostname:port of the service endpoint.
|