google-cloud-kms-v1 0.8.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/kms/v1/iam_policy/client.rb +60 -9
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +579 -80
- data/lib/google/cloud/kms/v1/resources_pb.rb +8 -2
- data/lib/google/cloud/kms/v1/service_pb.rb +5 -2
- data/lib/google/cloud/kms/v1/service_services_pb.rb +1 -1
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/kms/v1/resources.rb +18 -0
- data/proto_docs/google/cloud/kms/v1/service.rb +31 -1
- metadata +3 -3
@@ -184,6 +184,21 @@ module Google
|
|
184
184
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
185
185
|
}
|
186
186
|
|
187
|
+
default_config.rpcs.mac_sign.timeout = 60.0
|
188
|
+
default_config.rpcs.mac_sign.retry_policy = {
|
189
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
190
|
+
}
|
191
|
+
|
192
|
+
default_config.rpcs.mac_verify.timeout = 60.0
|
193
|
+
default_config.rpcs.mac_verify.retry_policy = {
|
194
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
195
|
+
}
|
196
|
+
|
197
|
+
default_config.rpcs.generate_random_bytes.timeout = 60.0
|
198
|
+
default_config.rpcs.generate_random_bytes.retry_policy = {
|
199
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
200
|
+
}
|
201
|
+
|
187
202
|
default_config
|
188
203
|
end
|
189
204
|
yield @configure if block_given?
|
@@ -312,6 +327,27 @@ module Google
|
|
312
327
|
#
|
313
328
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
314
329
|
#
|
330
|
+
# @example Basic example
|
331
|
+
# require "google/cloud/kms/v1"
|
332
|
+
#
|
333
|
+
# # Create a client object. The client can be reused for multiple calls.
|
334
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
335
|
+
#
|
336
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
337
|
+
# request = Google::Cloud::Kms::V1::ListKeyRingsRequest.new
|
338
|
+
#
|
339
|
+
# # Call the list_key_rings method.
|
340
|
+
# result = client.list_key_rings request
|
341
|
+
#
|
342
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
343
|
+
# # iterate over all elements by calling #each, and the enumerable
|
344
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
345
|
+
# # methods are also available for managing paging directly.
|
346
|
+
# result.each do |response|
|
347
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::KeyRing.
|
348
|
+
# p response
|
349
|
+
# end
|
350
|
+
#
|
315
351
|
def list_key_rings request, options = nil
|
316
352
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
317
353
|
|
@@ -329,9 +365,11 @@ module Google
|
|
329
365
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
330
366
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
331
367
|
|
332
|
-
header_params = {
|
333
|
-
|
334
|
-
|
368
|
+
header_params = {}
|
369
|
+
if request.parent
|
370
|
+
header_params["parent"] = request.parent
|
371
|
+
end
|
372
|
+
|
335
373
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
336
374
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
337
375
|
|
@@ -402,6 +440,27 @@ module Google
|
|
402
440
|
#
|
403
441
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
404
442
|
#
|
443
|
+
# @example Basic example
|
444
|
+
# require "google/cloud/kms/v1"
|
445
|
+
#
|
446
|
+
# # Create a client object. The client can be reused for multiple calls.
|
447
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
448
|
+
#
|
449
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
450
|
+
# request = Google::Cloud::Kms::V1::ListCryptoKeysRequest.new
|
451
|
+
#
|
452
|
+
# # Call the list_crypto_keys method.
|
453
|
+
# result = client.list_crypto_keys request
|
454
|
+
#
|
455
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
456
|
+
# # iterate over all elements by calling #each, and the enumerable
|
457
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
458
|
+
# # methods are also available for managing paging directly.
|
459
|
+
# result.each do |response|
|
460
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::CryptoKey.
|
461
|
+
# p response
|
462
|
+
# end
|
463
|
+
#
|
405
464
|
def list_crypto_keys request, options = nil
|
406
465
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
407
466
|
|
@@ -419,9 +478,11 @@ module Google
|
|
419
478
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
420
479
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
421
480
|
|
422
|
-
header_params = {
|
423
|
-
|
424
|
-
|
481
|
+
header_params = {}
|
482
|
+
if request.parent
|
483
|
+
header_params["parent"] = request.parent
|
484
|
+
end
|
485
|
+
|
425
486
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
426
487
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
427
488
|
|
@@ -493,6 +554,27 @@ module Google
|
|
493
554
|
#
|
494
555
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
495
556
|
#
|
557
|
+
# @example Basic example
|
558
|
+
# require "google/cloud/kms/v1"
|
559
|
+
#
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
561
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
562
|
+
#
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
564
|
+
# request = Google::Cloud::Kms::V1::ListCryptoKeyVersionsRequest.new
|
565
|
+
#
|
566
|
+
# # Call the list_crypto_key_versions method.
|
567
|
+
# result = client.list_crypto_key_versions request
|
568
|
+
#
|
569
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
570
|
+
# # iterate over all elements by calling #each, and the enumerable
|
571
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
572
|
+
# # methods are also available for managing paging directly.
|
573
|
+
# result.each do |response|
|
574
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::CryptoKeyVersion.
|
575
|
+
# p response
|
576
|
+
# end
|
577
|
+
#
|
496
578
|
def list_crypto_key_versions request, options = nil
|
497
579
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
498
580
|
|
@@ -510,9 +592,11 @@ module Google
|
|
510
592
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
511
593
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
594
|
|
513
|
-
header_params = {
|
514
|
-
|
515
|
-
|
595
|
+
header_params = {}
|
596
|
+
if request.parent
|
597
|
+
header_params["parent"] = request.parent
|
598
|
+
end
|
599
|
+
|
516
600
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
517
601
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
518
602
|
|
@@ -581,6 +665,27 @@ module Google
|
|
581
665
|
#
|
582
666
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
583
667
|
#
|
668
|
+
# @example Basic example
|
669
|
+
# require "google/cloud/kms/v1"
|
670
|
+
#
|
671
|
+
# # Create a client object. The client can be reused for multiple calls.
|
672
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
673
|
+
#
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
675
|
+
# request = Google::Cloud::Kms::V1::ListImportJobsRequest.new
|
676
|
+
#
|
677
|
+
# # Call the list_import_jobs method.
|
678
|
+
# result = client.list_import_jobs request
|
679
|
+
#
|
680
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
681
|
+
# # iterate over all elements by calling #each, and the enumerable
|
682
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
683
|
+
# # methods are also available for managing paging directly.
|
684
|
+
# result.each do |response|
|
685
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::ImportJob.
|
686
|
+
# p response
|
687
|
+
# end
|
688
|
+
#
|
584
689
|
def list_import_jobs request, options = nil
|
585
690
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
586
691
|
|
@@ -598,9 +703,11 @@ module Google
|
|
598
703
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
599
704
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
600
705
|
|
601
|
-
header_params = {
|
602
|
-
|
603
|
-
|
706
|
+
header_params = {}
|
707
|
+
if request.parent
|
708
|
+
header_params["parent"] = request.parent
|
709
|
+
end
|
710
|
+
|
604
711
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
605
712
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
606
713
|
|
@@ -650,6 +757,21 @@ module Google
|
|
650
757
|
#
|
651
758
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
652
759
|
#
|
760
|
+
# @example Basic example
|
761
|
+
# require "google/cloud/kms/v1"
|
762
|
+
#
|
763
|
+
# # Create a client object. The client can be reused for multiple calls.
|
764
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
765
|
+
#
|
766
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
767
|
+
# request = Google::Cloud::Kms::V1::GetKeyRingRequest.new
|
768
|
+
#
|
769
|
+
# # Call the get_key_ring method.
|
770
|
+
# result = client.get_key_ring request
|
771
|
+
#
|
772
|
+
# # The returned object is of type Google::Cloud::Kms::V1::KeyRing.
|
773
|
+
# p result
|
774
|
+
#
|
653
775
|
def get_key_ring request, options = nil
|
654
776
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
655
777
|
|
@@ -667,9 +789,11 @@ module Google
|
|
667
789
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
668
790
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
669
791
|
|
670
|
-
header_params = {
|
671
|
-
|
672
|
-
|
792
|
+
header_params = {}
|
793
|
+
if request.name
|
794
|
+
header_params["name"] = request.name
|
795
|
+
end
|
796
|
+
|
673
797
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
674
798
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
675
799
|
|
@@ -719,6 +843,21 @@ module Google
|
|
719
843
|
#
|
720
844
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
721
845
|
#
|
846
|
+
# @example Basic example
|
847
|
+
# require "google/cloud/kms/v1"
|
848
|
+
#
|
849
|
+
# # Create a client object. The client can be reused for multiple calls.
|
850
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
851
|
+
#
|
852
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
853
|
+
# request = Google::Cloud::Kms::V1::GetCryptoKeyRequest.new
|
854
|
+
#
|
855
|
+
# # Call the get_crypto_key method.
|
856
|
+
# result = client.get_crypto_key request
|
857
|
+
#
|
858
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
859
|
+
# p result
|
860
|
+
#
|
722
861
|
def get_crypto_key request, options = nil
|
723
862
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
724
863
|
|
@@ -736,9 +875,11 @@ module Google
|
|
736
875
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
737
876
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
738
877
|
|
739
|
-
header_params = {
|
740
|
-
|
741
|
-
|
878
|
+
header_params = {}
|
879
|
+
if request.name
|
880
|
+
header_params["name"] = request.name
|
881
|
+
end
|
882
|
+
|
742
883
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
743
884
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
744
885
|
|
@@ -787,6 +928,21 @@ module Google
|
|
787
928
|
#
|
788
929
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
789
930
|
#
|
931
|
+
# @example Basic example
|
932
|
+
# require "google/cloud/kms/v1"
|
933
|
+
#
|
934
|
+
# # Create a client object. The client can be reused for multiple calls.
|
935
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
936
|
+
#
|
937
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
938
|
+
# request = Google::Cloud::Kms::V1::GetCryptoKeyVersionRequest.new
|
939
|
+
#
|
940
|
+
# # Call the get_crypto_key_version method.
|
941
|
+
# result = client.get_crypto_key_version request
|
942
|
+
#
|
943
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
944
|
+
# p result
|
945
|
+
#
|
790
946
|
def get_crypto_key_version request, options = nil
|
791
947
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
792
948
|
|
@@ -804,9 +960,11 @@ module Google
|
|
804
960
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
805
961
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
806
962
|
|
807
|
-
header_params = {
|
808
|
-
|
809
|
-
|
963
|
+
header_params = {}
|
964
|
+
if request.name
|
965
|
+
header_params["name"] = request.name
|
966
|
+
end
|
967
|
+
|
810
968
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
811
969
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
812
970
|
|
@@ -859,6 +1017,21 @@ module Google
|
|
859
1017
|
#
|
860
1018
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
861
1019
|
#
|
1020
|
+
# @example Basic example
|
1021
|
+
# require "google/cloud/kms/v1"
|
1022
|
+
#
|
1023
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1024
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1025
|
+
#
|
1026
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1027
|
+
# request = Google::Cloud::Kms::V1::GetPublicKeyRequest.new
|
1028
|
+
#
|
1029
|
+
# # Call the get_public_key method.
|
1030
|
+
# result = client.get_public_key request
|
1031
|
+
#
|
1032
|
+
# # The returned object is of type Google::Cloud::Kms::V1::PublicKey.
|
1033
|
+
# p result
|
1034
|
+
#
|
862
1035
|
def get_public_key request, options = nil
|
863
1036
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
864
1037
|
|
@@ -876,9 +1049,11 @@ module Google
|
|
876
1049
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
877
1050
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
878
1051
|
|
879
|
-
header_params = {
|
880
|
-
|
881
|
-
|
1052
|
+
header_params = {}
|
1053
|
+
if request.name
|
1054
|
+
header_params["name"] = request.name
|
1055
|
+
end
|
1056
|
+
|
882
1057
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
883
1058
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
884
1059
|
|
@@ -927,6 +1102,21 @@ module Google
|
|
927
1102
|
#
|
928
1103
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
929
1104
|
#
|
1105
|
+
# @example Basic example
|
1106
|
+
# require "google/cloud/kms/v1"
|
1107
|
+
#
|
1108
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1109
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1110
|
+
#
|
1111
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1112
|
+
# request = Google::Cloud::Kms::V1::GetImportJobRequest.new
|
1113
|
+
#
|
1114
|
+
# # Call the get_import_job method.
|
1115
|
+
# result = client.get_import_job request
|
1116
|
+
#
|
1117
|
+
# # The returned object is of type Google::Cloud::Kms::V1::ImportJob.
|
1118
|
+
# p result
|
1119
|
+
#
|
930
1120
|
def get_import_job request, options = nil
|
931
1121
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
932
1122
|
|
@@ -944,9 +1134,11 @@ module Google
|
|
944
1134
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
945
1135
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
946
1136
|
|
947
|
-
header_params = {
|
948
|
-
|
949
|
-
|
1137
|
+
header_params = {}
|
1138
|
+
if request.name
|
1139
|
+
header_params["name"] = request.name
|
1140
|
+
end
|
1141
|
+
|
950
1142
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
951
1143
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
952
1144
|
|
@@ -1001,6 +1193,21 @@ module Google
|
|
1001
1193
|
#
|
1002
1194
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1003
1195
|
#
|
1196
|
+
# @example Basic example
|
1197
|
+
# require "google/cloud/kms/v1"
|
1198
|
+
#
|
1199
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1200
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1201
|
+
#
|
1202
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1203
|
+
# request = Google::Cloud::Kms::V1::CreateKeyRingRequest.new
|
1204
|
+
#
|
1205
|
+
# # Call the create_key_ring method.
|
1206
|
+
# result = client.create_key_ring request
|
1207
|
+
#
|
1208
|
+
# # The returned object is of type Google::Cloud::Kms::V1::KeyRing.
|
1209
|
+
# p result
|
1210
|
+
#
|
1004
1211
|
def create_key_ring request, options = nil
|
1005
1212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1006
1213
|
|
@@ -1018,9 +1225,11 @@ module Google
|
|
1018
1225
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1019
1226
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1020
1227
|
|
1021
|
-
header_params = {
|
1022
|
-
|
1023
|
-
|
1228
|
+
header_params = {}
|
1229
|
+
if request.parent
|
1230
|
+
header_params["parent"] = request.parent
|
1231
|
+
end
|
1232
|
+
|
1024
1233
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1025
1234
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1026
1235
|
|
@@ -1085,6 +1294,21 @@ module Google
|
|
1085
1294
|
#
|
1086
1295
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1087
1296
|
#
|
1297
|
+
# @example Basic example
|
1298
|
+
# require "google/cloud/kms/v1"
|
1299
|
+
#
|
1300
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1301
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1302
|
+
#
|
1303
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1304
|
+
# request = Google::Cloud::Kms::V1::CreateCryptoKeyRequest.new
|
1305
|
+
#
|
1306
|
+
# # Call the create_crypto_key method.
|
1307
|
+
# result = client.create_crypto_key request
|
1308
|
+
#
|
1309
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1310
|
+
# p result
|
1311
|
+
#
|
1088
1312
|
def create_crypto_key request, options = nil
|
1089
1313
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1090
1314
|
|
@@ -1102,9 +1326,11 @@ module Google
|
|
1102
1326
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1103
1327
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1104
1328
|
|
1105
|
-
header_params = {
|
1106
|
-
|
1107
|
-
|
1329
|
+
header_params = {}
|
1330
|
+
if request.parent
|
1331
|
+
header_params["parent"] = request.parent
|
1332
|
+
end
|
1333
|
+
|
1108
1334
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1109
1335
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1110
1336
|
|
@@ -1160,6 +1386,21 @@ module Google
|
|
1160
1386
|
#
|
1161
1387
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1162
1388
|
#
|
1389
|
+
# @example Basic example
|
1390
|
+
# require "google/cloud/kms/v1"
|
1391
|
+
#
|
1392
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1393
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1394
|
+
#
|
1395
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1396
|
+
# request = Google::Cloud::Kms::V1::CreateCryptoKeyVersionRequest.new
|
1397
|
+
#
|
1398
|
+
# # Call the create_crypto_key_version method.
|
1399
|
+
# result = client.create_crypto_key_version request
|
1400
|
+
#
|
1401
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
1402
|
+
# p result
|
1403
|
+
#
|
1163
1404
|
def create_crypto_key_version request, options = nil
|
1164
1405
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1165
1406
|
|
@@ -1177,9 +1418,11 @@ module Google
|
|
1177
1418
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1178
1419
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1179
1420
|
|
1180
|
-
header_params = {
|
1181
|
-
|
1182
|
-
|
1421
|
+
header_params = {}
|
1422
|
+
if request.parent
|
1423
|
+
header_params["parent"] = request.parent
|
1424
|
+
end
|
1425
|
+
|
1183
1426
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1184
1427
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1185
1428
|
|
@@ -1284,6 +1527,21 @@ module Google
|
|
1284
1527
|
#
|
1285
1528
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1286
1529
|
#
|
1530
|
+
# @example Basic example
|
1531
|
+
# require "google/cloud/kms/v1"
|
1532
|
+
#
|
1533
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1534
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1535
|
+
#
|
1536
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1537
|
+
# request = Google::Cloud::Kms::V1::ImportCryptoKeyVersionRequest.new
|
1538
|
+
#
|
1539
|
+
# # Call the import_crypto_key_version method.
|
1540
|
+
# result = client.import_crypto_key_version request
|
1541
|
+
#
|
1542
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
1543
|
+
# p result
|
1544
|
+
#
|
1287
1545
|
def import_crypto_key_version request, options = nil
|
1288
1546
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1289
1547
|
|
@@ -1301,9 +1559,11 @@ module Google
|
|
1301
1559
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1302
1560
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1303
1561
|
|
1304
|
-
header_params = {
|
1305
|
-
|
1306
|
-
|
1562
|
+
header_params = {}
|
1563
|
+
if request.parent
|
1564
|
+
header_params["parent"] = request.parent
|
1565
|
+
end
|
1566
|
+
|
1307
1567
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1308
1568
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1309
1569
|
|
@@ -1360,6 +1620,21 @@ module Google
|
|
1360
1620
|
#
|
1361
1621
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1362
1622
|
#
|
1623
|
+
# @example Basic example
|
1624
|
+
# require "google/cloud/kms/v1"
|
1625
|
+
#
|
1626
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1627
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1628
|
+
#
|
1629
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1630
|
+
# request = Google::Cloud::Kms::V1::CreateImportJobRequest.new
|
1631
|
+
#
|
1632
|
+
# # Call the create_import_job method.
|
1633
|
+
# result = client.create_import_job request
|
1634
|
+
#
|
1635
|
+
# # The returned object is of type Google::Cloud::Kms::V1::ImportJob.
|
1636
|
+
# p result
|
1637
|
+
#
|
1363
1638
|
def create_import_job request, options = nil
|
1364
1639
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1365
1640
|
|
@@ -1377,9 +1652,11 @@ module Google
|
|
1377
1652
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1378
1653
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1379
1654
|
|
1380
|
-
header_params = {
|
1381
|
-
|
1382
|
-
|
1655
|
+
header_params = {}
|
1656
|
+
if request.parent
|
1657
|
+
header_params["parent"] = request.parent
|
1658
|
+
end
|
1659
|
+
|
1383
1660
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1384
1661
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1385
1662
|
|
@@ -1430,6 +1707,21 @@ module Google
|
|
1430
1707
|
#
|
1431
1708
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1432
1709
|
#
|
1710
|
+
# @example Basic example
|
1711
|
+
# require "google/cloud/kms/v1"
|
1712
|
+
#
|
1713
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1714
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1715
|
+
#
|
1716
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1717
|
+
# request = Google::Cloud::Kms::V1::UpdateCryptoKeyRequest.new
|
1718
|
+
#
|
1719
|
+
# # Call the update_crypto_key method.
|
1720
|
+
# result = client.update_crypto_key request
|
1721
|
+
#
|
1722
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1723
|
+
# p result
|
1724
|
+
#
|
1433
1725
|
def update_crypto_key request, options = nil
|
1434
1726
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1435
1727
|
|
@@ -1447,9 +1739,11 @@ module Google
|
|
1447
1739
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1448
1740
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1449
1741
|
|
1450
|
-
header_params = {
|
1451
|
-
|
1452
|
-
|
1742
|
+
header_params = {}
|
1743
|
+
if request.crypto_key&.name
|
1744
|
+
header_params["crypto_key.name"] = request.crypto_key.name
|
1745
|
+
end
|
1746
|
+
|
1453
1747
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1454
1748
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1455
1749
|
|
@@ -1506,6 +1800,21 @@ module Google
|
|
1506
1800
|
#
|
1507
1801
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1508
1802
|
#
|
1803
|
+
# @example Basic example
|
1804
|
+
# require "google/cloud/kms/v1"
|
1805
|
+
#
|
1806
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1807
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1808
|
+
#
|
1809
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1810
|
+
# request = Google::Cloud::Kms::V1::UpdateCryptoKeyVersionRequest.new
|
1811
|
+
#
|
1812
|
+
# # Call the update_crypto_key_version method.
|
1813
|
+
# result = client.update_crypto_key_version request
|
1814
|
+
#
|
1815
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
1816
|
+
# p result
|
1817
|
+
#
|
1509
1818
|
def update_crypto_key_version request, options = nil
|
1510
1819
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1511
1820
|
|
@@ -1523,9 +1832,11 @@ module Google
|
|
1523
1832
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1524
1833
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1525
1834
|
|
1526
|
-
header_params = {
|
1527
|
-
|
1528
|
-
|
1835
|
+
header_params = {}
|
1836
|
+
if request.crypto_key_version&.name
|
1837
|
+
header_params["crypto_key_version.name"] = request.crypto_key_version.name
|
1838
|
+
end
|
1839
|
+
|
1529
1840
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1530
1841
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1531
1842
|
|
@@ -1579,6 +1890,21 @@ module Google
|
|
1579
1890
|
#
|
1580
1891
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1581
1892
|
#
|
1893
|
+
# @example Basic example
|
1894
|
+
# require "google/cloud/kms/v1"
|
1895
|
+
#
|
1896
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1897
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1898
|
+
#
|
1899
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1900
|
+
# request = Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest.new
|
1901
|
+
#
|
1902
|
+
# # Call the update_crypto_key_primary_version method.
|
1903
|
+
# result = client.update_crypto_key_primary_version request
|
1904
|
+
#
|
1905
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1906
|
+
# p result
|
1907
|
+
#
|
1582
1908
|
def update_crypto_key_primary_version request, options = nil
|
1583
1909
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1584
1910
|
|
@@ -1596,9 +1922,11 @@ module Google
|
|
1596
1922
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1597
1923
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1598
1924
|
|
1599
|
-
header_params = {
|
1600
|
-
|
1601
|
-
|
1925
|
+
header_params = {}
|
1926
|
+
if request.name
|
1927
|
+
header_params["name"] = request.name
|
1928
|
+
end
|
1929
|
+
|
1602
1930
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1603
1931
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1604
1932
|
|
@@ -1659,6 +1987,21 @@ module Google
|
|
1659
1987
|
#
|
1660
1988
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1661
1989
|
#
|
1990
|
+
# @example Basic example
|
1991
|
+
# require "google/cloud/kms/v1"
|
1992
|
+
#
|
1993
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1994
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
1995
|
+
#
|
1996
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1997
|
+
# request = Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest.new
|
1998
|
+
#
|
1999
|
+
# # Call the destroy_crypto_key_version method.
|
2000
|
+
# result = client.destroy_crypto_key_version request
|
2001
|
+
#
|
2002
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
2003
|
+
# p result
|
2004
|
+
#
|
1662
2005
|
def destroy_crypto_key_version request, options = nil
|
1663
2006
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1664
2007
|
|
@@ -1676,9 +2019,11 @@ module Google
|
|
1676
2019
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1677
2020
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1678
2021
|
|
1679
|
-
header_params = {
|
1680
|
-
|
1681
|
-
|
2022
|
+
header_params = {}
|
2023
|
+
if request.name
|
2024
|
+
header_params["name"] = request.name
|
2025
|
+
end
|
2026
|
+
|
1682
2027
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1683
2028
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1684
2029
|
|
@@ -1733,6 +2078,21 @@ module Google
|
|
1733
2078
|
#
|
1734
2079
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1735
2080
|
#
|
2081
|
+
# @example Basic example
|
2082
|
+
# require "google/cloud/kms/v1"
|
2083
|
+
#
|
2084
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2085
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2086
|
+
#
|
2087
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2088
|
+
# request = Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest.new
|
2089
|
+
#
|
2090
|
+
# # Call the restore_crypto_key_version method.
|
2091
|
+
# result = client.restore_crypto_key_version request
|
2092
|
+
#
|
2093
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
2094
|
+
# p result
|
2095
|
+
#
|
1736
2096
|
def restore_crypto_key_version request, options = nil
|
1737
2097
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1738
2098
|
|
@@ -1750,9 +2110,11 @@ module Google
|
|
1750
2110
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1751
2111
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1752
2112
|
|
1753
|
-
header_params = {
|
1754
|
-
|
1755
|
-
|
2113
|
+
header_params = {}
|
2114
|
+
if request.name
|
2115
|
+
header_params["name"] = request.name
|
2116
|
+
end
|
2117
|
+
|
1756
2118
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1757
2119
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1758
2120
|
|
@@ -1855,6 +2217,21 @@ module Google
|
|
1855
2217
|
#
|
1856
2218
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1857
2219
|
#
|
2220
|
+
# @example Basic example
|
2221
|
+
# require "google/cloud/kms/v1"
|
2222
|
+
#
|
2223
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2224
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2225
|
+
#
|
2226
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2227
|
+
# request = Google::Cloud::Kms::V1::EncryptRequest.new
|
2228
|
+
#
|
2229
|
+
# # Call the encrypt method.
|
2230
|
+
# result = client.encrypt request
|
2231
|
+
#
|
2232
|
+
# # The returned object is of type Google::Cloud::Kms::V1::EncryptResponse.
|
2233
|
+
# p result
|
2234
|
+
#
|
1858
2235
|
def encrypt request, options = nil
|
1859
2236
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1860
2237
|
|
@@ -1872,9 +2249,11 @@ module Google
|
|
1872
2249
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1873
2250
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1874
2251
|
|
1875
|
-
header_params = {
|
1876
|
-
|
1877
|
-
|
2252
|
+
header_params = {}
|
2253
|
+
if request.name
|
2254
|
+
header_params["name"] = request.name
|
2255
|
+
end
|
2256
|
+
|
1878
2257
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1879
2258
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1880
2259
|
|
@@ -1960,6 +2339,21 @@ module Google
|
|
1960
2339
|
#
|
1961
2340
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1962
2341
|
#
|
2342
|
+
# @example Basic example
|
2343
|
+
# require "google/cloud/kms/v1"
|
2344
|
+
#
|
2345
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2346
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2347
|
+
#
|
2348
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2349
|
+
# request = Google::Cloud::Kms::V1::DecryptRequest.new
|
2350
|
+
#
|
2351
|
+
# # Call the decrypt method.
|
2352
|
+
# result = client.decrypt request
|
2353
|
+
#
|
2354
|
+
# # The returned object is of type Google::Cloud::Kms::V1::DecryptResponse.
|
2355
|
+
# p result
|
2356
|
+
#
|
1963
2357
|
def decrypt request, options = nil
|
1964
2358
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1965
2359
|
|
@@ -1977,9 +2371,11 @@ module Google
|
|
1977
2371
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1978
2372
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1979
2373
|
|
1980
|
-
header_params = {
|
1981
|
-
|
1982
|
-
|
2374
|
+
header_params = {}
|
2375
|
+
if request.name
|
2376
|
+
header_params["name"] = request.name
|
2377
|
+
end
|
2378
|
+
|
1983
2379
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1984
2380
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1985
2381
|
|
@@ -2014,7 +2410,7 @@ module Google
|
|
2014
2410
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2015
2411
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2016
2412
|
#
|
2017
|
-
# @overload asymmetric_sign(name: nil, digest: nil, digest_crc32c: nil)
|
2413
|
+
# @overload asymmetric_sign(name: nil, digest: nil, digest_crc32c: nil, data: nil, data_crc32c: nil)
|
2018
2414
|
# Pass arguments to `asymmetric_sign` via keyword arguments. Note that at
|
2019
2415
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2020
2416
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2022,7 +2418,7 @@ module Google
|
|
2022
2418
|
# @param name [::String]
|
2023
2419
|
# Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for signing.
|
2024
2420
|
# @param digest [::Google::Cloud::Kms::V1::Digest, ::Hash]
|
2025
|
-
#
|
2421
|
+
# Optional. The digest of the data to sign. The digest must be produced with
|
2026
2422
|
# the same digest algorithm as specified by the key version's
|
2027
2423
|
# {::Google::Cloud::Kms::V1::CryptoKeyVersion#algorithm algorithm}.
|
2028
2424
|
# @param digest_crc32c [::Google::Protobuf::Int64Value, ::Hash]
|
@@ -2039,6 +2435,24 @@ module Google
|
|
2039
2435
|
# different languages. However, it is a non-negative integer, which will
|
2040
2436
|
# never exceed 2^32-1, and can be safely downconverted to uint32 in languages
|
2041
2437
|
# that support this type.
|
2438
|
+
# @param data [::String]
|
2439
|
+
# Optional. This field will only be honored for RAW_PKCS1 keys.
|
2440
|
+
# The data to sign. A digest is computed over the data that will be signed,
|
2441
|
+
# PKCS #1 padding is applied to the digest directly and then encrypted.
|
2442
|
+
# @param data_crc32c [::Google::Protobuf::Int64Value, ::Hash]
|
2443
|
+
# Optional. An optional CRC32C checksum of the {::Google::Cloud::Kms::V1::AsymmetricSignRequest#data AsymmetricSignRequest.data}. If
|
2444
|
+
# specified, {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will verify the integrity of the
|
2445
|
+
# received {::Google::Cloud::Kms::V1::AsymmetricSignRequest#data AsymmetricSignRequest.data} using this checksum.
|
2446
|
+
# {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will report an error if the checksum verification
|
2447
|
+
# fails. If you receive a checksum error, your client should verify that
|
2448
|
+
# CRC32C({::Google::Cloud::Kms::V1::AsymmetricSignRequest#data AsymmetricSignRequest.data}) is equal to
|
2449
|
+
# {::Google::Cloud::Kms::V1::AsymmetricSignRequest#data_crc32c AsymmetricSignRequest.data_crc32c}, and if so, perform a limited
|
2450
|
+
# number of retries. A persistent mismatch may indicate an issue in your
|
2451
|
+
# computation of the CRC32C checksum.
|
2452
|
+
# Note: This field is defined as int64 for reasons of compatibility across
|
2453
|
+
# different languages. However, it is a non-negative integer, which will
|
2454
|
+
# never exceed 2^32-1, and can be safely downconverted to uint32 in languages
|
2455
|
+
# that support this type.
|
2042
2456
|
#
|
2043
2457
|
# @yield [response, operation] Access the result along with the RPC operation
|
2044
2458
|
# @yieldparam response [::Google::Cloud::Kms::V1::AsymmetricSignResponse]
|
@@ -2048,6 +2462,21 @@ module Google
|
|
2048
2462
|
#
|
2049
2463
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2050
2464
|
#
|
2465
|
+
# @example Basic example
|
2466
|
+
# require "google/cloud/kms/v1"
|
2467
|
+
#
|
2468
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2469
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2470
|
+
#
|
2471
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2472
|
+
# request = Google::Cloud::Kms::V1::AsymmetricSignRequest.new
|
2473
|
+
#
|
2474
|
+
# # Call the asymmetric_sign method.
|
2475
|
+
# result = client.asymmetric_sign request
|
2476
|
+
#
|
2477
|
+
# # The returned object is of type Google::Cloud::Kms::V1::AsymmetricSignResponse.
|
2478
|
+
# p result
|
2479
|
+
#
|
2051
2480
|
def asymmetric_sign request, options = nil
|
2052
2481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2053
2482
|
|
@@ -2065,9 +2494,11 @@ module Google
|
|
2065
2494
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2066
2495
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2067
2496
|
|
2068
|
-
header_params = {
|
2069
|
-
|
2070
|
-
|
2497
|
+
header_params = {}
|
2498
|
+
if request.name
|
2499
|
+
header_params["name"] = request.name
|
2500
|
+
end
|
2501
|
+
|
2071
2502
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2072
2503
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2073
2504
|
|
@@ -2136,6 +2567,21 @@ module Google
|
|
2136
2567
|
#
|
2137
2568
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2138
2569
|
#
|
2570
|
+
# @example Basic example
|
2571
|
+
# require "google/cloud/kms/v1"
|
2572
|
+
#
|
2573
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2574
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2575
|
+
#
|
2576
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2577
|
+
# request = Google::Cloud::Kms::V1::AsymmetricDecryptRequest.new
|
2578
|
+
#
|
2579
|
+
# # Call the asymmetric_decrypt method.
|
2580
|
+
# result = client.asymmetric_decrypt request
|
2581
|
+
#
|
2582
|
+
# # The returned object is of type Google::Cloud::Kms::V1::AsymmetricDecryptResponse.
|
2583
|
+
# p result
|
2584
|
+
#
|
2139
2585
|
def asymmetric_decrypt request, options = nil
|
2140
2586
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2141
2587
|
|
@@ -2153,9 +2599,11 @@ module Google
|
|
2153
2599
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2154
2600
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2155
2601
|
|
2156
|
-
header_params = {
|
2157
|
-
|
2158
|
-
|
2602
|
+
header_params = {}
|
2603
|
+
if request.name
|
2604
|
+
header_params["name"] = request.name
|
2605
|
+
end
|
2606
|
+
|
2159
2607
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2160
2608
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2161
2609
|
|
@@ -2223,6 +2671,21 @@ module Google
|
|
2223
2671
|
#
|
2224
2672
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2225
2673
|
#
|
2674
|
+
# @example Basic example
|
2675
|
+
# require "google/cloud/kms/v1"
|
2676
|
+
#
|
2677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2678
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2679
|
+
#
|
2680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2681
|
+
# request = Google::Cloud::Kms::V1::MacSignRequest.new
|
2682
|
+
#
|
2683
|
+
# # Call the mac_sign method.
|
2684
|
+
# result = client.mac_sign request
|
2685
|
+
#
|
2686
|
+
# # The returned object is of type Google::Cloud::Kms::V1::MacSignResponse.
|
2687
|
+
# p result
|
2688
|
+
#
|
2226
2689
|
def mac_sign request, options = nil
|
2227
2690
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2228
2691
|
|
@@ -2240,9 +2703,11 @@ module Google
|
|
2240
2703
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2241
2704
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2242
2705
|
|
2243
|
-
header_params = {
|
2244
|
-
|
2245
|
-
|
2706
|
+
header_params = {}
|
2707
|
+
if request.name
|
2708
|
+
header_params["name"] = request.name
|
2709
|
+
end
|
2710
|
+
|
2246
2711
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2247
2712
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2248
2713
|
|
@@ -2326,6 +2791,21 @@ module Google
|
|
2326
2791
|
#
|
2327
2792
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2328
2793
|
#
|
2794
|
+
# @example Basic example
|
2795
|
+
# require "google/cloud/kms/v1"
|
2796
|
+
#
|
2797
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2798
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2799
|
+
#
|
2800
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2801
|
+
# request = Google::Cloud::Kms::V1::MacVerifyRequest.new
|
2802
|
+
#
|
2803
|
+
# # Call the mac_verify method.
|
2804
|
+
# result = client.mac_verify request
|
2805
|
+
#
|
2806
|
+
# # The returned object is of type Google::Cloud::Kms::V1::MacVerifyResponse.
|
2807
|
+
# p result
|
2808
|
+
#
|
2329
2809
|
def mac_verify request, options = nil
|
2330
2810
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2331
2811
|
|
@@ -2343,9 +2823,11 @@ module Google
|
|
2343
2823
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2344
2824
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2345
2825
|
|
2346
|
-
header_params = {
|
2347
|
-
|
2348
|
-
|
2826
|
+
header_params = {}
|
2827
|
+
if request.name
|
2828
|
+
header_params["name"] = request.name
|
2829
|
+
end
|
2830
|
+
|
2349
2831
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2350
2832
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2351
2833
|
|
@@ -2402,6 +2884,21 @@ module Google
|
|
2402
2884
|
#
|
2403
2885
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2404
2886
|
#
|
2887
|
+
# @example Basic example
|
2888
|
+
# require "google/cloud/kms/v1"
|
2889
|
+
#
|
2890
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2891
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Client.new
|
2892
|
+
#
|
2893
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2894
|
+
# request = Google::Cloud::Kms::V1::GenerateRandomBytesRequest.new
|
2895
|
+
#
|
2896
|
+
# # Call the generate_random_bytes method.
|
2897
|
+
# result = client.generate_random_bytes request
|
2898
|
+
#
|
2899
|
+
# # The returned object is of type Google::Cloud::Kms::V1::GenerateRandomBytesResponse.
|
2900
|
+
# p result
|
2901
|
+
#
|
2405
2902
|
def generate_random_bytes request, options = nil
|
2406
2903
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2407
2904
|
|
@@ -2419,9 +2916,11 @@ module Google
|
|
2419
2916
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2420
2917
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2421
2918
|
|
2422
|
-
header_params = {
|
2423
|
-
|
2424
|
-
|
2919
|
+
header_params = {}
|
2920
|
+
if request.location
|
2921
|
+
header_params["location"] = request.location
|
2922
|
+
end
|
2923
|
+
|
2425
2924
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2426
2925
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2427
2926
|
|