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