google-cloud-kms-v1 0.22.1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/kms/v1/ekm_service/client.rb +43 -9
- data/lib/google/cloud/kms/v1/ekm_service/rest/client.rb +151 -7
- data/lib/google/cloud/kms/v1/ekm_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +43 -9
- data/lib/google/cloud/kms/v1/key_management_service/rest/client.rb +499 -7
- data/lib/google/cloud/kms/v1/key_management_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- metadata +9 -9
@@ -45,6 +45,9 @@ module Google
|
|
45
45
|
# [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
|
46
46
|
#
|
47
47
|
class Client
|
48
|
+
# @private
|
49
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudkms.$UNIVERSE_DOMAIN$"
|
50
|
+
|
48
51
|
include Paths
|
49
52
|
|
50
53
|
# @private
|
@@ -229,6 +232,15 @@ module Google
|
|
229
232
|
@config
|
230
233
|
end
|
231
234
|
|
235
|
+
##
|
236
|
+
# The effective universe domain
|
237
|
+
#
|
238
|
+
# @return [String]
|
239
|
+
#
|
240
|
+
def universe_domain
|
241
|
+
@key_management_service_stub.universe_domain
|
242
|
+
end
|
243
|
+
|
232
244
|
##
|
233
245
|
# Create a new KeyManagementService REST client object.
|
234
246
|
#
|
@@ -256,8 +268,9 @@ module Google
|
|
256
268
|
credentials = @config.credentials
|
257
269
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
258
270
|
# but only if the default endpoint does not have a region prefix.
|
259
|
-
enable_self_signed_jwt = @config.endpoint
|
260
|
-
|
271
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
272
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
273
|
+
!@config.endpoint.split(".").first.include?("-"))
|
261
274
|
credentials ||= Credentials.default scope: @config.scope,
|
262
275
|
enable_self_signed_jwt: enable_self_signed_jwt
|
263
276
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -271,6 +284,7 @@ module Google
|
|
271
284
|
config.credentials = credentials
|
272
285
|
config.quota_project = @quota_project_id
|
273
286
|
config.endpoint = @config.endpoint
|
287
|
+
config.universe_domain = @config.universe_domain
|
274
288
|
config.bindings_override = @config.bindings_override
|
275
289
|
end
|
276
290
|
|
@@ -278,10 +292,16 @@ module Google
|
|
278
292
|
config.credentials = credentials
|
279
293
|
config.quota_project = @quota_project_id
|
280
294
|
config.endpoint = @config.endpoint
|
295
|
+
config.universe_domain = @config.universe_domain
|
281
296
|
config.bindings_override = @config.bindings_override
|
282
297
|
end
|
283
298
|
|
284
|
-
@key_management_service_stub = ::Google::Cloud::Kms::V1::KeyManagementService::Rest::ServiceStub.new
|
299
|
+
@key_management_service_stub = ::Google::Cloud::Kms::V1::KeyManagementService::Rest::ServiceStub.new(
|
300
|
+
endpoint: @config.endpoint,
|
301
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
302
|
+
universe_domain: @config.universe_domain,
|
303
|
+
credentials: credentials
|
304
|
+
)
|
285
305
|
end
|
286
306
|
|
287
307
|
##
|
@@ -350,6 +370,26 @@ module Google
|
|
350
370
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::KeyRing>]
|
351
371
|
#
|
352
372
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
373
|
+
#
|
374
|
+
# @example Basic example
|
375
|
+
# require "google/cloud/kms/v1"
|
376
|
+
#
|
377
|
+
# # Create a client object. The client can be reused for multiple calls.
|
378
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
379
|
+
#
|
380
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
381
|
+
# request = Google::Cloud::Kms::V1::ListKeyRingsRequest.new
|
382
|
+
#
|
383
|
+
# # Call the list_key_rings method.
|
384
|
+
# result = client.list_key_rings request
|
385
|
+
#
|
386
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
387
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
388
|
+
# result.each do |item|
|
389
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::KeyRing.
|
390
|
+
# p item
|
391
|
+
# end
|
392
|
+
#
|
353
393
|
def list_key_rings request, options = nil
|
354
394
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
355
395
|
|
@@ -437,6 +477,26 @@ module Google
|
|
437
477
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKey>]
|
438
478
|
#
|
439
479
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
480
|
+
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/cloud/kms/v1"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Cloud::Kms::V1::ListCryptoKeysRequest.new
|
489
|
+
#
|
490
|
+
# # Call the list_crypto_keys method.
|
491
|
+
# result = client.list_crypto_keys request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
494
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
495
|
+
# result.each do |item|
|
496
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::CryptoKey.
|
497
|
+
# p item
|
498
|
+
# end
|
499
|
+
#
|
440
500
|
def list_crypto_keys request, options = nil
|
441
501
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
442
502
|
|
@@ -525,6 +585,26 @@ module Google
|
|
525
585
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKeyVersion>]
|
526
586
|
#
|
527
587
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
588
|
+
#
|
589
|
+
# @example Basic example
|
590
|
+
# require "google/cloud/kms/v1"
|
591
|
+
#
|
592
|
+
# # Create a client object. The client can be reused for multiple calls.
|
593
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
594
|
+
#
|
595
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
596
|
+
# request = Google::Cloud::Kms::V1::ListCryptoKeyVersionsRequest.new
|
597
|
+
#
|
598
|
+
# # Call the list_crypto_key_versions method.
|
599
|
+
# result = client.list_crypto_key_versions request
|
600
|
+
#
|
601
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
602
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
603
|
+
# result.each do |item|
|
604
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::CryptoKeyVersion.
|
605
|
+
# p item
|
606
|
+
# end
|
607
|
+
#
|
528
608
|
def list_crypto_key_versions request, options = nil
|
529
609
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
530
610
|
|
@@ -610,6 +690,26 @@ module Google
|
|
610
690
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::ImportJob>]
|
611
691
|
#
|
612
692
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
693
|
+
#
|
694
|
+
# @example Basic example
|
695
|
+
# require "google/cloud/kms/v1"
|
696
|
+
#
|
697
|
+
# # Create a client object. The client can be reused for multiple calls.
|
698
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
699
|
+
#
|
700
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
701
|
+
# request = Google::Cloud::Kms::V1::ListImportJobsRequest.new
|
702
|
+
#
|
703
|
+
# # Call the list_import_jobs method.
|
704
|
+
# result = client.list_import_jobs request
|
705
|
+
#
|
706
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
707
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
708
|
+
# result.each do |item|
|
709
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::ImportJob.
|
710
|
+
# p item
|
711
|
+
# end
|
712
|
+
#
|
613
713
|
def list_import_jobs request, options = nil
|
614
714
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
615
715
|
|
@@ -674,6 +774,22 @@ module Google
|
|
674
774
|
# @return [::Google::Cloud::Kms::V1::KeyRing]
|
675
775
|
#
|
676
776
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
777
|
+
#
|
778
|
+
# @example Basic example
|
779
|
+
# require "google/cloud/kms/v1"
|
780
|
+
#
|
781
|
+
# # Create a client object. The client can be reused for multiple calls.
|
782
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
783
|
+
#
|
784
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
785
|
+
# request = Google::Cloud::Kms::V1::GetKeyRingRequest.new
|
786
|
+
#
|
787
|
+
# # Call the get_key_ring method.
|
788
|
+
# result = client.get_key_ring request
|
789
|
+
#
|
790
|
+
# # The returned object is of type Google::Cloud::Kms::V1::KeyRing.
|
791
|
+
# p result
|
792
|
+
#
|
677
793
|
def get_key_ring request, options = nil
|
678
794
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
679
795
|
|
@@ -739,6 +855,22 @@ module Google
|
|
739
855
|
# @return [::Google::Cloud::Kms::V1::CryptoKey]
|
740
856
|
#
|
741
857
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
858
|
+
#
|
859
|
+
# @example Basic example
|
860
|
+
# require "google/cloud/kms/v1"
|
861
|
+
#
|
862
|
+
# # Create a client object. The client can be reused for multiple calls.
|
863
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
864
|
+
#
|
865
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
866
|
+
# request = Google::Cloud::Kms::V1::GetCryptoKeyRequest.new
|
867
|
+
#
|
868
|
+
# # Call the get_crypto_key method.
|
869
|
+
# result = client.get_crypto_key request
|
870
|
+
#
|
871
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
872
|
+
# p result
|
873
|
+
#
|
742
874
|
def get_crypto_key request, options = nil
|
743
875
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
744
876
|
|
@@ -803,6 +935,22 @@ module Google
|
|
803
935
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
804
936
|
#
|
805
937
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
938
|
+
#
|
939
|
+
# @example Basic example
|
940
|
+
# require "google/cloud/kms/v1"
|
941
|
+
#
|
942
|
+
# # Create a client object. The client can be reused for multiple calls.
|
943
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
944
|
+
#
|
945
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
946
|
+
# request = Google::Cloud::Kms::V1::GetCryptoKeyVersionRequest.new
|
947
|
+
#
|
948
|
+
# # Call the get_crypto_key_version method.
|
949
|
+
# result = client.get_crypto_key_version request
|
950
|
+
#
|
951
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
952
|
+
# p result
|
953
|
+
#
|
806
954
|
def get_crypto_key_version request, options = nil
|
807
955
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
808
956
|
|
@@ -871,6 +1019,22 @@ module Google
|
|
871
1019
|
# @return [::Google::Cloud::Kms::V1::PublicKey]
|
872
1020
|
#
|
873
1021
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1022
|
+
#
|
1023
|
+
# @example Basic example
|
1024
|
+
# require "google/cloud/kms/v1"
|
1025
|
+
#
|
1026
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1027
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1028
|
+
#
|
1029
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1030
|
+
# request = Google::Cloud::Kms::V1::GetPublicKeyRequest.new
|
1031
|
+
#
|
1032
|
+
# # Call the get_public_key method.
|
1033
|
+
# result = client.get_public_key request
|
1034
|
+
#
|
1035
|
+
# # The returned object is of type Google::Cloud::Kms::V1::PublicKey.
|
1036
|
+
# p result
|
1037
|
+
#
|
874
1038
|
def get_public_key request, options = nil
|
875
1039
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
876
1040
|
|
@@ -934,6 +1098,22 @@ module Google
|
|
934
1098
|
# @return [::Google::Cloud::Kms::V1::ImportJob]
|
935
1099
|
#
|
936
1100
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1101
|
+
#
|
1102
|
+
# @example Basic example
|
1103
|
+
# require "google/cloud/kms/v1"
|
1104
|
+
#
|
1105
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1106
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1107
|
+
#
|
1108
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1109
|
+
# request = Google::Cloud::Kms::V1::GetImportJobRequest.new
|
1110
|
+
#
|
1111
|
+
# # Call the get_import_job method.
|
1112
|
+
# result = client.get_import_job request
|
1113
|
+
#
|
1114
|
+
# # The returned object is of type Google::Cloud::Kms::V1::ImportJob.
|
1115
|
+
# p result
|
1116
|
+
#
|
937
1117
|
def get_import_job request, options = nil
|
938
1118
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
939
1119
|
|
@@ -1005,6 +1185,22 @@ module Google
|
|
1005
1185
|
# @return [::Google::Cloud::Kms::V1::KeyRing]
|
1006
1186
|
#
|
1007
1187
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1188
|
+
#
|
1189
|
+
# @example Basic example
|
1190
|
+
# require "google/cloud/kms/v1"
|
1191
|
+
#
|
1192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1193
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1194
|
+
#
|
1195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1196
|
+
# request = Google::Cloud::Kms::V1::CreateKeyRingRequest.new
|
1197
|
+
#
|
1198
|
+
# # Call the create_key_ring method.
|
1199
|
+
# result = client.create_key_ring request
|
1200
|
+
#
|
1201
|
+
# # The returned object is of type Google::Cloud::Kms::V1::KeyRing.
|
1202
|
+
# p result
|
1203
|
+
#
|
1008
1204
|
def create_key_ring request, options = nil
|
1009
1205
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1010
1206
|
|
@@ -1088,6 +1284,22 @@ module Google
|
|
1088
1284
|
# @return [::Google::Cloud::Kms::V1::CryptoKey]
|
1089
1285
|
#
|
1090
1286
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1287
|
+
#
|
1288
|
+
# @example Basic example
|
1289
|
+
# require "google/cloud/kms/v1"
|
1290
|
+
#
|
1291
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1292
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1293
|
+
#
|
1294
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1295
|
+
# request = Google::Cloud::Kms::V1::CreateCryptoKeyRequest.new
|
1296
|
+
#
|
1297
|
+
# # Call the create_crypto_key method.
|
1298
|
+
# result = client.create_crypto_key request
|
1299
|
+
#
|
1300
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1301
|
+
# p result
|
1302
|
+
#
|
1091
1303
|
def create_crypto_key request, options = nil
|
1092
1304
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1093
1305
|
|
@@ -1160,6 +1372,22 @@ module Google
|
|
1160
1372
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
1161
1373
|
#
|
1162
1374
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1375
|
+
#
|
1376
|
+
# @example Basic example
|
1377
|
+
# require "google/cloud/kms/v1"
|
1378
|
+
#
|
1379
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1380
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1381
|
+
#
|
1382
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1383
|
+
# request = Google::Cloud::Kms::V1::CreateCryptoKeyVersionRequest.new
|
1384
|
+
#
|
1385
|
+
# # Call the create_crypto_key_version method.
|
1386
|
+
# result = client.create_crypto_key_version request
|
1387
|
+
#
|
1388
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
1389
|
+
# p result
|
1390
|
+
#
|
1163
1391
|
def create_crypto_key_version request, options = nil
|
1164
1392
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1165
1393
|
|
@@ -1309,6 +1537,22 @@ module Google
|
|
1309
1537
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
1310
1538
|
#
|
1311
1539
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1540
|
+
#
|
1541
|
+
# @example Basic example
|
1542
|
+
# require "google/cloud/kms/v1"
|
1543
|
+
#
|
1544
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1545
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1546
|
+
#
|
1547
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1548
|
+
# request = Google::Cloud::Kms::V1::ImportCryptoKeyVersionRequest.new
|
1549
|
+
#
|
1550
|
+
# # Call the import_crypto_key_version method.
|
1551
|
+
# result = client.import_crypto_key_version request
|
1552
|
+
#
|
1553
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
1554
|
+
# p result
|
1555
|
+
#
|
1312
1556
|
def import_crypto_key_version request, options = nil
|
1313
1557
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1314
1558
|
|
@@ -1383,6 +1627,22 @@ module Google
|
|
1383
1627
|
# @return [::Google::Cloud::Kms::V1::ImportJob]
|
1384
1628
|
#
|
1385
1629
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1630
|
+
#
|
1631
|
+
# @example Basic example
|
1632
|
+
# require "google/cloud/kms/v1"
|
1633
|
+
#
|
1634
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1635
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1636
|
+
#
|
1637
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1638
|
+
# request = Google::Cloud::Kms::V1::CreateImportJobRequest.new
|
1639
|
+
#
|
1640
|
+
# # Call the create_import_job method.
|
1641
|
+
# result = client.create_import_job request
|
1642
|
+
#
|
1643
|
+
# # The returned object is of type Google::Cloud::Kms::V1::ImportJob.
|
1644
|
+
# p result
|
1645
|
+
#
|
1386
1646
|
def create_import_job request, options = nil
|
1387
1647
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1388
1648
|
|
@@ -1447,6 +1707,22 @@ module Google
|
|
1447
1707
|
# @return [::Google::Cloud::Kms::V1::CryptoKey]
|
1448
1708
|
#
|
1449
1709
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1710
|
+
#
|
1711
|
+
# @example Basic example
|
1712
|
+
# require "google/cloud/kms/v1"
|
1713
|
+
#
|
1714
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1715
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1716
|
+
#
|
1717
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1718
|
+
# request = Google::Cloud::Kms::V1::UpdateCryptoKeyRequest.new
|
1719
|
+
#
|
1720
|
+
# # Call the update_crypto_key method.
|
1721
|
+
# result = client.update_crypto_key request
|
1722
|
+
#
|
1723
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1724
|
+
# p result
|
1725
|
+
#
|
1450
1726
|
def update_crypto_key request, options = nil
|
1451
1727
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1452
1728
|
|
@@ -1523,6 +1799,22 @@ module Google
|
|
1523
1799
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
1524
1800
|
#
|
1525
1801
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
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::Rest::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
|
+
#
|
1526
1818
|
def update_crypto_key_version request, options = nil
|
1527
1819
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1528
1820
|
|
@@ -1594,6 +1886,22 @@ module Google
|
|
1594
1886
|
# @return [::Google::Cloud::Kms::V1::CryptoKey]
|
1595
1887
|
#
|
1596
1888
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1889
|
+
#
|
1890
|
+
# @example Basic example
|
1891
|
+
# require "google/cloud/kms/v1"
|
1892
|
+
#
|
1893
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1894
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1895
|
+
#
|
1896
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1897
|
+
# request = Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest.new
|
1898
|
+
#
|
1899
|
+
# # Call the update_crypto_key_primary_version method.
|
1900
|
+
# result = client.update_crypto_key_primary_version request
|
1901
|
+
#
|
1902
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKey.
|
1903
|
+
# p result
|
1904
|
+
#
|
1597
1905
|
def update_crypto_key_primary_version request, options = nil
|
1598
1906
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1599
1907
|
|
@@ -1677,6 +1985,22 @@ module Google
|
|
1677
1985
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
1678
1986
|
#
|
1679
1987
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1988
|
+
#
|
1989
|
+
# @example Basic example
|
1990
|
+
# require "google/cloud/kms/v1"
|
1991
|
+
#
|
1992
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1993
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
1994
|
+
#
|
1995
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1996
|
+
# request = Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest.new
|
1997
|
+
#
|
1998
|
+
# # Call the destroy_crypto_key_version method.
|
1999
|
+
# result = client.destroy_crypto_key_version request
|
2000
|
+
#
|
2001
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
2002
|
+
# p result
|
2003
|
+
#
|
1680
2004
|
def destroy_crypto_key_version request, options = nil
|
1681
2005
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1682
2006
|
|
@@ -1748,6 +2072,22 @@ module Google
|
|
1748
2072
|
# @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
|
1749
2073
|
#
|
1750
2074
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2075
|
+
#
|
2076
|
+
# @example Basic example
|
2077
|
+
# require "google/cloud/kms/v1"
|
2078
|
+
#
|
2079
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2080
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2081
|
+
#
|
2082
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2083
|
+
# request = Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest.new
|
2084
|
+
#
|
2085
|
+
# # Call the restore_crypto_key_version method.
|
2086
|
+
# result = client.restore_crypto_key_version request
|
2087
|
+
#
|
2088
|
+
# # The returned object is of type Google::Cloud::Kms::V1::CryptoKeyVersion.
|
2089
|
+
# p result
|
2090
|
+
#
|
1751
2091
|
def restore_crypto_key_version request, options = nil
|
1752
2092
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1753
2093
|
|
@@ -1885,6 +2225,22 @@ module Google
|
|
1885
2225
|
# @return [::Google::Cloud::Kms::V1::EncryptResponse]
|
1886
2226
|
#
|
1887
2227
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2228
|
+
#
|
2229
|
+
# @example Basic example
|
2230
|
+
# require "google/cloud/kms/v1"
|
2231
|
+
#
|
2232
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2233
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2234
|
+
#
|
2235
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2236
|
+
# request = Google::Cloud::Kms::V1::EncryptRequest.new
|
2237
|
+
#
|
2238
|
+
# # Call the encrypt method.
|
2239
|
+
# result = client.encrypt request
|
2240
|
+
#
|
2241
|
+
# # The returned object is of type Google::Cloud::Kms::V1::EncryptResponse.
|
2242
|
+
# p result
|
2243
|
+
#
|
1888
2244
|
def encrypt request, options = nil
|
1889
2245
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1890
2246
|
|
@@ -1998,6 +2354,22 @@ module Google
|
|
1998
2354
|
# @return [::Google::Cloud::Kms::V1::DecryptResponse]
|
1999
2355
|
#
|
2000
2356
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2357
|
+
#
|
2358
|
+
# @example Basic example
|
2359
|
+
# require "google/cloud/kms/v1"
|
2360
|
+
#
|
2361
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2362
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2363
|
+
#
|
2364
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2365
|
+
# request = Google::Cloud::Kms::V1::DecryptRequest.new
|
2366
|
+
#
|
2367
|
+
# # Call the decrypt method.
|
2368
|
+
# result = client.decrypt request
|
2369
|
+
#
|
2370
|
+
# # The returned object is of type Google::Cloud::Kms::V1::DecryptResponse.
|
2371
|
+
# p result
|
2372
|
+
#
|
2001
2373
|
def decrypt request, options = nil
|
2002
2374
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2003
2375
|
|
@@ -2148,6 +2520,22 @@ module Google
|
|
2148
2520
|
# @return [::Google::Cloud::Kms::V1::RawEncryptResponse]
|
2149
2521
|
#
|
2150
2522
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2523
|
+
#
|
2524
|
+
# @example Basic example
|
2525
|
+
# require "google/cloud/kms/v1"
|
2526
|
+
#
|
2527
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2528
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2529
|
+
#
|
2530
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2531
|
+
# request = Google::Cloud::Kms::V1::RawEncryptRequest.new
|
2532
|
+
#
|
2533
|
+
# # Call the raw_encrypt method.
|
2534
|
+
# result = client.raw_encrypt request
|
2535
|
+
#
|
2536
|
+
# # The returned object is of type Google::Cloud::Kms::V1::RawEncryptResponse.
|
2537
|
+
# p result
|
2538
|
+
#
|
2151
2539
|
def raw_encrypt request, options = nil
|
2152
2540
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2153
2541
|
|
@@ -2278,6 +2666,22 @@ module Google
|
|
2278
2666
|
# @return [::Google::Cloud::Kms::V1::RawDecryptResponse]
|
2279
2667
|
#
|
2280
2668
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2669
|
+
#
|
2670
|
+
# @example Basic example
|
2671
|
+
# require "google/cloud/kms/v1"
|
2672
|
+
#
|
2673
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2674
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2675
|
+
#
|
2676
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2677
|
+
# request = Google::Cloud::Kms::V1::RawDecryptRequest.new
|
2678
|
+
#
|
2679
|
+
# # Call the raw_decrypt method.
|
2680
|
+
# result = client.raw_decrypt request
|
2681
|
+
#
|
2682
|
+
# # The returned object is of type Google::Cloud::Kms::V1::RawDecryptResponse.
|
2683
|
+
# p result
|
2684
|
+
#
|
2281
2685
|
def raw_decrypt request, options = nil
|
2282
2686
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2283
2687
|
|
@@ -2399,6 +2803,22 @@ module Google
|
|
2399
2803
|
# @return [::Google::Cloud::Kms::V1::AsymmetricSignResponse]
|
2400
2804
|
#
|
2401
2805
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2806
|
+
#
|
2807
|
+
# @example Basic example
|
2808
|
+
# require "google/cloud/kms/v1"
|
2809
|
+
#
|
2810
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2811
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2812
|
+
#
|
2813
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2814
|
+
# request = Google::Cloud::Kms::V1::AsymmetricSignRequest.new
|
2815
|
+
#
|
2816
|
+
# # Call the asymmetric_sign method.
|
2817
|
+
# result = client.asymmetric_sign request
|
2818
|
+
#
|
2819
|
+
# # The returned object is of type Google::Cloud::Kms::V1::AsymmetricSignResponse.
|
2820
|
+
# p result
|
2821
|
+
#
|
2402
2822
|
def asymmetric_sign request, options = nil
|
2403
2823
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2404
2824
|
|
@@ -2491,6 +2911,22 @@ module Google
|
|
2491
2911
|
# @return [::Google::Cloud::Kms::V1::AsymmetricDecryptResponse]
|
2492
2912
|
#
|
2493
2913
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2914
|
+
#
|
2915
|
+
# @example Basic example
|
2916
|
+
# require "google/cloud/kms/v1"
|
2917
|
+
#
|
2918
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2919
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
2920
|
+
#
|
2921
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2922
|
+
# request = Google::Cloud::Kms::V1::AsymmetricDecryptRequest.new
|
2923
|
+
#
|
2924
|
+
# # Call the asymmetric_decrypt method.
|
2925
|
+
# result = client.asymmetric_decrypt request
|
2926
|
+
#
|
2927
|
+
# # The returned object is of type Google::Cloud::Kms::V1::AsymmetricDecryptResponse.
|
2928
|
+
# p result
|
2929
|
+
#
|
2494
2930
|
def asymmetric_decrypt request, options = nil
|
2495
2931
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2496
2932
|
|
@@ -2578,6 +3014,22 @@ module Google
|
|
2578
3014
|
# @return [::Google::Cloud::Kms::V1::MacSignResponse]
|
2579
3015
|
#
|
2580
3016
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3017
|
+
#
|
3018
|
+
# @example Basic example
|
3019
|
+
# require "google/cloud/kms/v1"
|
3020
|
+
#
|
3021
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3022
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
3023
|
+
#
|
3024
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3025
|
+
# request = Google::Cloud::Kms::V1::MacSignRequest.new
|
3026
|
+
#
|
3027
|
+
# # Call the mac_sign method.
|
3028
|
+
# result = client.mac_sign request
|
3029
|
+
#
|
3030
|
+
# # The returned object is of type Google::Cloud::Kms::V1::MacSignResponse.
|
3031
|
+
# p result
|
3032
|
+
#
|
2581
3033
|
def mac_sign request, options = nil
|
2582
3034
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2583
3035
|
|
@@ -2687,6 +3139,22 @@ module Google
|
|
2687
3139
|
# @return [::Google::Cloud::Kms::V1::MacVerifyResponse]
|
2688
3140
|
#
|
2689
3141
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3142
|
+
#
|
3143
|
+
# @example Basic example
|
3144
|
+
# require "google/cloud/kms/v1"
|
3145
|
+
#
|
3146
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3147
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
3148
|
+
#
|
3149
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3150
|
+
# request = Google::Cloud::Kms::V1::MacVerifyRequest.new
|
3151
|
+
#
|
3152
|
+
# # Call the mac_verify method.
|
3153
|
+
# result = client.mac_verify request
|
3154
|
+
#
|
3155
|
+
# # The returned object is of type Google::Cloud::Kms::V1::MacVerifyResponse.
|
3156
|
+
# p result
|
3157
|
+
#
|
2690
3158
|
def mac_verify request, options = nil
|
2691
3159
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2692
3160
|
|
@@ -2759,6 +3227,22 @@ module Google
|
|
2759
3227
|
# @return [::Google::Cloud::Kms::V1::GenerateRandomBytesResponse]
|
2760
3228
|
#
|
2761
3229
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3230
|
+
#
|
3231
|
+
# @example Basic example
|
3232
|
+
# require "google/cloud/kms/v1"
|
3233
|
+
#
|
3234
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3235
|
+
# client = Google::Cloud::Kms::V1::KeyManagementService::Rest::Client.new
|
3236
|
+
#
|
3237
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3238
|
+
# request = Google::Cloud::Kms::V1::GenerateRandomBytesRequest.new
|
3239
|
+
#
|
3240
|
+
# # Call the generate_random_bytes method.
|
3241
|
+
# result = client.generate_random_bytes request
|
3242
|
+
#
|
3243
|
+
# # The returned object is of type Google::Cloud::Kms::V1::GenerateRandomBytesResponse.
|
3244
|
+
# p result
|
3245
|
+
#
|
2762
3246
|
def generate_random_bytes request, options = nil
|
2763
3247
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2764
3248
|
|
@@ -2824,9 +3308,9 @@ module Google
|
|
2824
3308
|
# end
|
2825
3309
|
#
|
2826
3310
|
# @!attribute [rw] endpoint
|
2827
|
-
#
|
2828
|
-
#
|
2829
|
-
# @return [::String]
|
3311
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
3312
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
3313
|
+
# @return [::String,nil]
|
2830
3314
|
# @!attribute [rw] credentials
|
2831
3315
|
# Credentials to send with calls. You may provide any of the following types:
|
2832
3316
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -2863,13 +3347,20 @@ module Google
|
|
2863
3347
|
# @!attribute [rw] quota_project
|
2864
3348
|
# A separate project against which to charge quota.
|
2865
3349
|
# @return [::String]
|
3350
|
+
# @!attribute [rw] universe_domain
|
3351
|
+
# The universe domain within which to make requests. This determines the
|
3352
|
+
# default endpoint URL. The default value of nil uses the environment
|
3353
|
+
# universe (usually the default "googleapis.com" universe).
|
3354
|
+
# @return [::String,nil]
|
2866
3355
|
#
|
2867
3356
|
class Configuration
|
2868
3357
|
extend ::Gapic::Config
|
2869
3358
|
|
3359
|
+
# @private
|
3360
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2870
3361
|
DEFAULT_ENDPOINT = "cloudkms.googleapis.com"
|
2871
3362
|
|
2872
|
-
config_attr :endpoint,
|
3363
|
+
config_attr :endpoint, nil, ::String, nil
|
2873
3364
|
config_attr :credentials, nil do |value|
|
2874
3365
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2875
3366
|
allowed.any? { |klass| klass === value }
|
@@ -2881,6 +3372,7 @@ module Google
|
|
2881
3372
|
config_attr :metadata, nil, ::Hash, nil
|
2882
3373
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2883
3374
|
config_attr :quota_project, nil, ::String, nil
|
3375
|
+
config_attr :universe_domain, nil, ::String, nil
|
2884
3376
|
|
2885
3377
|
# @private
|
2886
3378
|
# Overrides for http bindings for the RPCs of this service
|