google-cloud-kms-v1 0.7.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/kms/v1/iam_policy/client.rb +60 -9
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +610 -91
- data/lib/google/cloud/kms/v1/resources_pb.rb +9 -2
- data/lib/google/cloud/kms/v1/service_pb.rb +6 -2
- data/lib/google/cloud/kms/v1/service_services_pb.rb +11 -9
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/cloud/kms/v1/resources.rb +30 -3
- data/proto_docs/google/cloud/kms/v1/service.rb +52 -3
- metadata +2 -2
@@ -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
|
|
@@ -1200,11 +1443,12 @@ module Google
|
|
1200
1443
|
end
|
1201
1444
|
|
1202
1445
|
##
|
1203
|
-
#
|
1204
|
-
# wrapped key material provided in the request.
|
1446
|
+
# Import wrapped key material into a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}.
|
1205
1447
|
#
|
1206
|
-
#
|
1207
|
-
#
|
1448
|
+
# All requests must specify a {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. If a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} is
|
1449
|
+
# additionally specified in the request, key material will be reimported into
|
1450
|
+
# that version. Otherwise, a new version will be created, and will be
|
1451
|
+
# assigned the next sequential id within the {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}.
|
1208
1452
|
#
|
1209
1453
|
# @overload import_crypto_key_version(request, options = nil)
|
1210
1454
|
# Pass arguments to `import_crypto_key_version` via a request object, either of type
|
@@ -1216,14 +1460,32 @@ module Google
|
|
1216
1460
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1217
1461
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1218
1462
|
#
|
1219
|
-
# @overload import_crypto_key_version(parent: nil, algorithm: nil, import_job: nil, rsa_aes_wrapped_key: nil)
|
1463
|
+
# @overload import_crypto_key_version(parent: nil, crypto_key_version: nil, algorithm: nil, import_job: nil, rsa_aes_wrapped_key: nil)
|
1220
1464
|
# Pass arguments to `import_crypto_key_version` via keyword arguments. Note that at
|
1221
1465
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1222
1466
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1223
1467
|
#
|
1224
1468
|
# @param parent [::String]
|
1225
|
-
# Required. The {::Google::Cloud::Kms::V1::CryptoKey#name name} of the {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} to
|
1226
|
-
#
|
1469
|
+
# Required. The {::Google::Cloud::Kms::V1::CryptoKey#name name} of the {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} to be imported into.
|
1470
|
+
#
|
1471
|
+
# The create permission is only required on this key when creating a new
|
1472
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}.
|
1473
|
+
# @param crypto_key_version [::String]
|
1474
|
+
# Optional. The optional {::Google::Cloud::Kms::V1::CryptoKeyVersion#name name} of an existing
|
1475
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to target for an import operation.
|
1476
|
+
# If this field is not present, a new {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} containing the
|
1477
|
+
# supplied key material is created.
|
1478
|
+
#
|
1479
|
+
# If this field is present, the supplied key material is imported into
|
1480
|
+
# the existing {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. To import into an existing
|
1481
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} must be a child of
|
1482
|
+
# {::Google::Cloud::Kms::V1::ImportCryptoKeyVersionRequest#parent ImportCryptoKeyVersionRequest.parent}, have been previously created via
|
1483
|
+
# [ImportCryptoKeyVersion][], and be in
|
1484
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROYED DESTROYED} or
|
1485
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::IMPORT_FAILED IMPORT_FAILED}
|
1486
|
+
# state. The key material and algorithm must match the previous
|
1487
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} exactly if the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} has ever contained
|
1488
|
+
# key material.
|
1227
1489
|
# @param algorithm [::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm]
|
1228
1490
|
# Required. The {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm algorithm} of
|
1229
1491
|
# the key being imported. This does not need to match the
|
@@ -1265,6 +1527,21 @@ module Google
|
|
1265
1527
|
#
|
1266
1528
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1267
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
|
+
#
|
1268
1545
|
def import_crypto_key_version request, options = nil
|
1269
1546
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1270
1547
|
|
@@ -1282,9 +1559,11 @@ module Google
|
|
1282
1559
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1283
1560
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1284
1561
|
|
1285
|
-
header_params = {
|
1286
|
-
|
1287
|
-
|
1562
|
+
header_params = {}
|
1563
|
+
if request.parent
|
1564
|
+
header_params["parent"] = request.parent
|
1565
|
+
end
|
1566
|
+
|
1288
1567
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1289
1568
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1290
1569
|
|
@@ -1341,6 +1620,21 @@ module Google
|
|
1341
1620
|
#
|
1342
1621
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1343
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
|
+
#
|
1344
1638
|
def create_import_job request, options = nil
|
1345
1639
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1346
1640
|
|
@@ -1358,9 +1652,11 @@ module Google
|
|
1358
1652
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1359
1653
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1360
1654
|
|
1361
|
-
header_params = {
|
1362
|
-
|
1363
|
-
|
1655
|
+
header_params = {}
|
1656
|
+
if request.parent
|
1657
|
+
header_params["parent"] = request.parent
|
1658
|
+
end
|
1659
|
+
|
1364
1660
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1365
1661
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1366
1662
|
|
@@ -1411,6 +1707,21 @@ module Google
|
|
1411
1707
|
#
|
1412
1708
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1413
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
|
+
#
|
1414
1725
|
def update_crypto_key request, options = nil
|
1415
1726
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1416
1727
|
|
@@ -1428,9 +1739,11 @@ module Google
|
|
1428
1739
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1429
1740
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1430
1741
|
|
1431
|
-
header_params = {
|
1432
|
-
|
1433
|
-
|
1742
|
+
header_params = {}
|
1743
|
+
if request.crypto_key&.name
|
1744
|
+
header_params["crypto_key.name"] = request.crypto_key.name
|
1745
|
+
end
|
1746
|
+
|
1434
1747
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1435
1748
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1436
1749
|
|
@@ -1487,6 +1800,21 @@ module Google
|
|
1487
1800
|
#
|
1488
1801
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1489
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
|
+
#
|
1490
1818
|
def update_crypto_key_version request, options = nil
|
1491
1819
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1492
1820
|
|
@@ -1504,9 +1832,11 @@ module Google
|
|
1504
1832
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1505
1833
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1506
1834
|
|
1507
|
-
header_params = {
|
1508
|
-
|
1509
|
-
|
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
|
+
|
1510
1840
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1511
1841
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1512
1842
|
|
@@ -1560,6 +1890,21 @@ module Google
|
|
1560
1890
|
#
|
1561
1891
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1562
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
|
+
#
|
1563
1908
|
def update_crypto_key_primary_version request, options = nil
|
1564
1909
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1565
1910
|
|
@@ -1577,9 +1922,11 @@ module Google
|
|
1577
1922
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1578
1923
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1579
1924
|
|
1580
|
-
header_params = {
|
1581
|
-
|
1582
|
-
|
1925
|
+
header_params = {}
|
1926
|
+
if request.name
|
1927
|
+
header_params["name"] = request.name
|
1928
|
+
end
|
1929
|
+
|
1583
1930
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1584
1931
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1585
1932
|
|
@@ -1603,10 +1950,11 @@ module Google
|
|
1603
1950
|
# Schedule a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} for destruction.
|
1604
1951
|
#
|
1605
1952
|
# Upon calling this method, {::Google::Cloud::Kms::V1::CryptoKeyVersion#state CryptoKeyVersion.state} will be set to
|
1606
|
-
# {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
|
1607
|
-
# and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be set to
|
1608
|
-
#
|
1609
|
-
#
|
1953
|
+
# {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED},
|
1954
|
+
# and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be set to the time
|
1955
|
+
# {::Google::Cloud::Kms::V1::CryptoKey#destroy_scheduled_duration destroy_scheduled_duration} in the
|
1956
|
+
# future. At that time, the {::Google::Cloud::Kms::V1::CryptoKeyVersion#state state} will
|
1957
|
+
# automatically change to
|
1610
1958
|
# {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROYED DESTROYED}, and the key
|
1611
1959
|
# material will be irrevocably destroyed.
|
1612
1960
|
#
|
@@ -1639,6 +1987,21 @@ module Google
|
|
1639
1987
|
#
|
1640
1988
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1641
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
|
+
#
|
1642
2005
|
def destroy_crypto_key_version request, options = nil
|
1643
2006
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1644
2007
|
|
@@ -1656,9 +2019,11 @@ module Google
|
|
1656
2019
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1657
2020
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1658
2021
|
|
1659
|
-
header_params = {
|
1660
|
-
|
1661
|
-
|
2022
|
+
header_params = {}
|
2023
|
+
if request.name
|
2024
|
+
header_params["name"] = request.name
|
2025
|
+
end
|
2026
|
+
|
1662
2027
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1663
2028
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1664
2029
|
|
@@ -1713,6 +2078,21 @@ module Google
|
|
1713
2078
|
#
|
1714
2079
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1715
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
|
+
#
|
1716
2096
|
def restore_crypto_key_version request, options = nil
|
1717
2097
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1718
2098
|
|
@@ -1730,9 +2110,11 @@ module Google
|
|
1730
2110
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1731
2111
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1732
2112
|
|
1733
|
-
header_params = {
|
1734
|
-
|
1735
|
-
|
2113
|
+
header_params = {}
|
2114
|
+
if request.name
|
2115
|
+
header_params["name"] = request.name
|
2116
|
+
end
|
2117
|
+
|
1736
2118
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1737
2119
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1738
2120
|
|
@@ -1835,6 +2217,21 @@ module Google
|
|
1835
2217
|
#
|
1836
2218
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1837
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
|
+
#
|
1838
2235
|
def encrypt request, options = nil
|
1839
2236
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1840
2237
|
|
@@ -1852,9 +2249,11 @@ module Google
|
|
1852
2249
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1853
2250
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1854
2251
|
|
1855
|
-
header_params = {
|
1856
|
-
|
1857
|
-
|
2252
|
+
header_params = {}
|
2253
|
+
if request.name
|
2254
|
+
header_params["name"] = request.name
|
2255
|
+
end
|
2256
|
+
|
1858
2257
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1859
2258
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1860
2259
|
|
@@ -1940,6 +2339,21 @@ module Google
|
|
1940
2339
|
#
|
1941
2340
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1942
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
|
+
#
|
1943
2357
|
def decrypt request, options = nil
|
1944
2358
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1945
2359
|
|
@@ -1957,9 +2371,11 @@ module Google
|
|
1957
2371
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
1958
2372
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1959
2373
|
|
1960
|
-
header_params = {
|
1961
|
-
|
1962
|
-
|
2374
|
+
header_params = {}
|
2375
|
+
if request.name
|
2376
|
+
header_params["name"] = request.name
|
2377
|
+
end
|
2378
|
+
|
1963
2379
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1964
2380
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1965
2381
|
|
@@ -1994,7 +2410,7 @@ module Google
|
|
1994
2410
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1995
2411
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1996
2412
|
#
|
1997
|
-
# @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)
|
1998
2414
|
# Pass arguments to `asymmetric_sign` via keyword arguments. Note that at
|
1999
2415
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2000
2416
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2002,7 +2418,7 @@ module Google
|
|
2002
2418
|
# @param name [::String]
|
2003
2419
|
# Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for signing.
|
2004
2420
|
# @param digest [::Google::Cloud::Kms::V1::Digest, ::Hash]
|
2005
|
-
#
|
2421
|
+
# Optional. The digest of the data to sign. The digest must be produced with
|
2006
2422
|
# the same digest algorithm as specified by the key version's
|
2007
2423
|
# {::Google::Cloud::Kms::V1::CryptoKeyVersion#algorithm algorithm}.
|
2008
2424
|
# @param digest_crc32c [::Google::Protobuf::Int64Value, ::Hash]
|
@@ -2019,6 +2435,24 @@ module Google
|
|
2019
2435
|
# different languages. However, it is a non-negative integer, which will
|
2020
2436
|
# never exceed 2^32-1, and can be safely downconverted to uint32 in languages
|
2021
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.
|
2022
2456
|
#
|
2023
2457
|
# @yield [response, operation] Access the result along with the RPC operation
|
2024
2458
|
# @yieldparam response [::Google::Cloud::Kms::V1::AsymmetricSignResponse]
|
@@ -2028,6 +2462,21 @@ module Google
|
|
2028
2462
|
#
|
2029
2463
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2030
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
|
+
#
|
2031
2480
|
def asymmetric_sign request, options = nil
|
2032
2481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2033
2482
|
|
@@ -2045,9 +2494,11 @@ module Google
|
|
2045
2494
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2046
2495
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2047
2496
|
|
2048
|
-
header_params = {
|
2049
|
-
|
2050
|
-
|
2497
|
+
header_params = {}
|
2498
|
+
if request.name
|
2499
|
+
header_params["name"] = request.name
|
2500
|
+
end
|
2501
|
+
|
2051
2502
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2052
2503
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2053
2504
|
|
@@ -2116,6 +2567,21 @@ module Google
|
|
2116
2567
|
#
|
2117
2568
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2118
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
|
+
#
|
2119
2585
|
def asymmetric_decrypt request, options = nil
|
2120
2586
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2121
2587
|
|
@@ -2133,9 +2599,11 @@ module Google
|
|
2133
2599
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2134
2600
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2135
2601
|
|
2136
|
-
header_params = {
|
2137
|
-
|
2138
|
-
|
2602
|
+
header_params = {}
|
2603
|
+
if request.name
|
2604
|
+
header_params["name"] = request.name
|
2605
|
+
end
|
2606
|
+
|
2139
2607
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2140
2608
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2141
2609
|
|
@@ -2203,6 +2671,21 @@ module Google
|
|
2203
2671
|
#
|
2204
2672
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2205
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
|
+
#
|
2206
2689
|
def mac_sign request, options = nil
|
2207
2690
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2208
2691
|
|
@@ -2220,9 +2703,11 @@ module Google
|
|
2220
2703
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2221
2704
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2222
2705
|
|
2223
|
-
header_params = {
|
2224
|
-
|
2225
|
-
|
2706
|
+
header_params = {}
|
2707
|
+
if request.name
|
2708
|
+
header_params["name"] = request.name
|
2709
|
+
end
|
2710
|
+
|
2226
2711
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2227
2712
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2228
2713
|
|
@@ -2306,6 +2791,21 @@ module Google
|
|
2306
2791
|
#
|
2307
2792
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2308
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
|
+
#
|
2309
2809
|
def mac_verify request, options = nil
|
2310
2810
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2311
2811
|
|
@@ -2323,9 +2823,11 @@ module Google
|
|
2323
2823
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2324
2824
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2325
2825
|
|
2326
|
-
header_params = {
|
2327
|
-
|
2328
|
-
|
2826
|
+
header_params = {}
|
2827
|
+
if request.name
|
2828
|
+
header_params["name"] = request.name
|
2829
|
+
end
|
2830
|
+
|
2329
2831
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2330
2832
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2331
2833
|
|
@@ -2382,6 +2884,21 @@ module Google
|
|
2382
2884
|
#
|
2383
2885
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2384
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
|
+
#
|
2385
2902
|
def generate_random_bytes request, options = nil
|
2386
2903
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2387
2904
|
|
@@ -2399,9 +2916,11 @@ module Google
|
|
2399
2916
|
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
2400
2917
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2401
2918
|
|
2402
|
-
header_params = {
|
2403
|
-
|
2404
|
-
|
2919
|
+
header_params = {}
|
2920
|
+
if request.location
|
2921
|
+
header_params["location"] = request.location
|
2922
|
+
end
|
2923
|
+
|
2405
2924
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2406
2925
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2407
2926
|
|