google-apis-cloudkms_v1 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/cloudkms_v1/classes.rb +108 -8
- data/lib/google/apis/cloudkms_v1/gem_version.rb +2 -2
- data/lib/google/apis/cloudkms_v1/representations.rb +32 -0
- data/lib/google/apis/cloudkms_v1/service.rb +47 -9
- data/lib/google/apis/cloudkms_v1.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e33d975c7d2ff654a7cf4f8086ed742ebd11ac2bfc2e407a3d13d0642c06a6
|
4
|
+
data.tar.gz: 2c66ff71bc9f2131c1ae7cf1e713c898e1647b491c7dc62212cf5bac6e876442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da773c7442c88181ecfc374331909f685979a8166161fc51e5c420de02f8df201f56aabe69475ef8df1d3352e6eee33cd9800b46898ad49eb6eeefcdb38b4e03
|
7
|
+
data.tar.gz: d7d1e1f4dd0699ead1005a7651348f0f0e59ea2b631df7e8f5e8dde092448e53105b89dede38fe05451b30f4d5f9b4c8538d646b67367f20f7a8a02746a1ae8c
|
data/CHANGELOG.md
CHANGED
@@ -397,6 +397,19 @@ module Google
|
|
397
397
|
# @return [String]
|
398
398
|
attr_accessor :create_time
|
399
399
|
|
400
|
+
# Immutable. The period of time that versions of this key spend in the
|
401
|
+
# DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at
|
402
|
+
# creation time, the default duration is 24 hours.
|
403
|
+
# Corresponds to the JSON property `destroyScheduledDuration`
|
404
|
+
# @return [String]
|
405
|
+
attr_accessor :destroy_scheduled_duration
|
406
|
+
|
407
|
+
# Immutable. Whether this key may contain imported versions only.
|
408
|
+
# Corresponds to the JSON property `importOnly`
|
409
|
+
# @return [Boolean]
|
410
|
+
attr_accessor :import_only
|
411
|
+
alias_method :import_only?, :import_only
|
412
|
+
|
400
413
|
# Labels with user-defined metadata. For more information, see [Labeling Keys](
|
401
414
|
# https://cloud.google.com/kms/docs/labeling-keys).
|
402
415
|
# Corresponds to the JSON property `labels`
|
@@ -457,6 +470,8 @@ module Google
|
|
457
470
|
# Update properties of this object
|
458
471
|
def update!(**args)
|
459
472
|
@create_time = args[:create_time] if args.key?(:create_time)
|
473
|
+
@destroy_scheduled_duration = args[:destroy_scheduled_duration] if args.key?(:destroy_scheduled_duration)
|
474
|
+
@import_only = args[:import_only] if args.key?(:import_only)
|
460
475
|
@labels = args[:labels] if args.key?(:labels)
|
461
476
|
@name = args[:name] if args.key?(:name)
|
462
477
|
@next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time)
|
@@ -517,20 +532,20 @@ module Google
|
|
517
532
|
# @return [String]
|
518
533
|
attr_accessor :generate_time
|
519
534
|
|
520
|
-
# Output only. The root cause of
|
521
|
-
# IMPORT_FAILED.
|
535
|
+
# Output only. The root cause of the most recent import failure. Only present if
|
536
|
+
# state is IMPORT_FAILED.
|
522
537
|
# Corresponds to the JSON property `importFailureReason`
|
523
538
|
# @return [String]
|
524
539
|
attr_accessor :import_failure_reason
|
525
540
|
|
526
|
-
# Output only. The name of the ImportJob used
|
527
|
-
# Only present if the underlying key material was imported.
|
541
|
+
# Output only. The name of the ImportJob used in the most recent import of this
|
542
|
+
# CryptoKeyVersion. Only present if the underlying key material was imported.
|
528
543
|
# Corresponds to the JSON property `importJob`
|
529
544
|
# @return [String]
|
530
545
|
attr_accessor :import_job
|
531
546
|
|
532
|
-
# Output only. The time at which this CryptoKeyVersion's key material was
|
533
|
-
# imported.
|
547
|
+
# Output only. The time at which this CryptoKeyVersion's key material was most
|
548
|
+
# recently imported.
|
534
549
|
# Corresponds to the JSON property `importTime`
|
535
550
|
# @return [String]
|
536
551
|
attr_accessor :import_time
|
@@ -547,6 +562,14 @@ module Google
|
|
547
562
|
# @return [String]
|
548
563
|
attr_accessor :protection_level
|
549
564
|
|
565
|
+
# Output only. Whether or not this key version is eligible for reimport, by
|
566
|
+
# being specified as a target in ImportCryptoKeyVersionRequest.
|
567
|
+
# crypto_key_version.
|
568
|
+
# Corresponds to the JSON property `reimportEligible`
|
569
|
+
# @return [Boolean]
|
570
|
+
attr_accessor :reimport_eligible
|
571
|
+
alias_method :reimport_eligible?, :reimport_eligible
|
572
|
+
|
550
573
|
# The current state of the CryptoKeyVersion.
|
551
574
|
# Corresponds to the JSON property `state`
|
552
575
|
# @return [String]
|
@@ -570,6 +593,7 @@ module Google
|
|
570
593
|
@import_time = args[:import_time] if args.key?(:import_time)
|
571
594
|
@name = args[:name] if args.key?(:name)
|
572
595
|
@protection_level = args[:protection_level] if args.key?(:protection_level)
|
596
|
+
@reimport_eligible = args[:reimport_eligible] if args.key?(:reimport_eligible)
|
573
597
|
@state = args[:state] if args.key?(:state)
|
574
598
|
end
|
575
599
|
end
|
@@ -979,6 +1003,68 @@ module Google
|
|
979
1003
|
end
|
980
1004
|
end
|
981
1005
|
|
1006
|
+
# Request message for KeyManagementService.GenerateRandomBytes.
|
1007
|
+
class GenerateRandomBytesRequest
|
1008
|
+
include Google::Apis::Core::Hashable
|
1009
|
+
|
1010
|
+
# The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes,
|
1011
|
+
# maximum 1024 bytes.
|
1012
|
+
# Corresponds to the JSON property `lengthBytes`
|
1013
|
+
# @return [Fixnum]
|
1014
|
+
attr_accessor :length_bytes
|
1015
|
+
|
1016
|
+
# The ProtectionLevel to use when generating the random data. Defaults to
|
1017
|
+
# SOFTWARE.
|
1018
|
+
# Corresponds to the JSON property `protectionLevel`
|
1019
|
+
# @return [String]
|
1020
|
+
attr_accessor :protection_level
|
1021
|
+
|
1022
|
+
def initialize(**args)
|
1023
|
+
update!(**args)
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# Update properties of this object
|
1027
|
+
def update!(**args)
|
1028
|
+
@length_bytes = args[:length_bytes] if args.key?(:length_bytes)
|
1029
|
+
@protection_level = args[:protection_level] if args.key?(:protection_level)
|
1030
|
+
end
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
# Response message for KeyManagementService.GenerateRandomBytes.
|
1034
|
+
class GenerateRandomBytesResponse
|
1035
|
+
include Google::Apis::Core::Hashable
|
1036
|
+
|
1037
|
+
# The generated data.
|
1038
|
+
# Corresponds to the JSON property `data`
|
1039
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1040
|
+
# @return [String]
|
1041
|
+
attr_accessor :data
|
1042
|
+
|
1043
|
+
# Integrity verification field. A CRC32C checksum of the returned
|
1044
|
+
# GenerateRandomBytesResponse.data. An integrity check of
|
1045
|
+
# GenerateRandomBytesResponse.data can be performed by computing the CRC32C
|
1046
|
+
# checksum of GenerateRandomBytesResponse.data and comparing your results to
|
1047
|
+
# this field. Discard the response in case of non-matching checksum values, and
|
1048
|
+
# perform a limited number of retries. A persistent mismatch may indicate an
|
1049
|
+
# issue in your computation of the CRC32C checksum. Note: This field is defined
|
1050
|
+
# as int64 for reasons of compatibility across different languages. However, it
|
1051
|
+
# is a non-negative integer, which will never exceed 2^32-1, and can be safely
|
1052
|
+
# downconverted to uint32 in languages that support this type.
|
1053
|
+
# Corresponds to the JSON property `dataCrc32c`
|
1054
|
+
# @return [Fixnum]
|
1055
|
+
attr_accessor :data_crc32c
|
1056
|
+
|
1057
|
+
def initialize(**args)
|
1058
|
+
update!(**args)
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
# Update properties of this object
|
1062
|
+
def update!(**args)
|
1063
|
+
@data = args[:data] if args.key?(:data)
|
1064
|
+
@data_crc32c = args[:data_crc32c] if args.key?(:data_crc32c)
|
1065
|
+
end
|
1066
|
+
end
|
1067
|
+
|
982
1068
|
# Request message for KeyManagementService.ImportCryptoKeyVersion.
|
983
1069
|
class ImportCryptoKeyVersionRequest
|
984
1070
|
include Google::Apis::Core::Hashable
|
@@ -989,6 +1075,19 @@ module Google
|
|
989
1075
|
# @return [String]
|
990
1076
|
attr_accessor :algorithm
|
991
1077
|
|
1078
|
+
# Optional. The optional name of an existing CryptoKeyVersion to target for an
|
1079
|
+
# import operation. If this field is not present, a new CryptoKeyVersion
|
1080
|
+
# containing the supplied key material is created. If this field is present, the
|
1081
|
+
# supplied key material is imported into the existing CryptoKeyVersion. To
|
1082
|
+
# import into an existing CryptoKeyVersion, the CryptoKeyVersion must be a child
|
1083
|
+
# of ImportCryptoKeyVersionRequest.parent, have been previously created via
|
1084
|
+
# ImportCryptoKeyVersion, and be in DESTROYED or IMPORT_FAILED state. The key
|
1085
|
+
# material and algorithm must match the previous CryptoKeyVersion exactly if the
|
1086
|
+
# CryptoKeyVersion has ever contained key material.
|
1087
|
+
# Corresponds to the JSON property `cryptoKeyVersion`
|
1088
|
+
# @return [String]
|
1089
|
+
attr_accessor :crypto_key_version
|
1090
|
+
|
992
1091
|
# Required. The name of the ImportJob that was used to wrap this key material.
|
993
1092
|
# Corresponds to the JSON property `importJob`
|
994
1093
|
# @return [String]
|
@@ -1016,6 +1115,7 @@ module Google
|
|
1016
1115
|
# Update properties of this object
|
1017
1116
|
def update!(**args)
|
1018
1117
|
@algorithm = args[:algorithm] if args.key?(:algorithm)
|
1118
|
+
@crypto_key_version = args[:crypto_key_version] if args.key?(:crypto_key_version)
|
1019
1119
|
@import_job = args[:import_job] if args.key?(:import_job)
|
1020
1120
|
@rsa_aes_wrapped_key = args[:rsa_aes_wrapped_key] if args.key?(:rsa_aes_wrapped_key)
|
1021
1121
|
end
|
@@ -1659,7 +1759,7 @@ module Google
|
|
1659
1759
|
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
1660
1760
|
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
1661
1761
|
# description: Does not grant access after Sep 2020 expression: request.time <
|
1662
|
-
# timestamp('2020-10-01T00:00:00.000Z')
|
1762
|
+
# timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a
|
1663
1763
|
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
1664
1764
|
# google.com/iam/docs/).
|
1665
1765
|
class Policy
|
@@ -1822,7 +1922,7 @@ module Google
|
|
1822
1922
|
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
1823
1923
|
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
1824
1924
|
# description: Does not grant access after Sep 2020 expression: request.time <
|
1825
|
-
# timestamp('2020-10-01T00:00:00.000Z')
|
1925
|
+
# timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a
|
1826
1926
|
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
1827
1927
|
# google.com/iam/docs/).
|
1828
1928
|
# Corresponds to the JSON property `policy`
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module CloudkmsV1
|
18
18
|
# Version of the google-apis-cloudkms_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.12.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210820"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -136,6 +136,18 @@ module Google
|
|
136
136
|
include Google::Apis::Core::JsonObjectSupport
|
137
137
|
end
|
138
138
|
|
139
|
+
class GenerateRandomBytesRequest
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
|
+
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
143
|
+
end
|
144
|
+
|
145
|
+
class GenerateRandomBytesResponse
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
147
|
+
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
149
|
+
end
|
150
|
+
|
139
151
|
class ImportCryptoKeyVersionRequest
|
140
152
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
153
|
|
@@ -352,6 +364,8 @@ module Google
|
|
352
364
|
# @private
|
353
365
|
class Representation < Google::Apis::Core::JsonRepresentation
|
354
366
|
property :create_time, as: 'createTime'
|
367
|
+
property :destroy_scheduled_duration, as: 'destroyScheduledDuration'
|
368
|
+
property :import_only, as: 'importOnly'
|
355
369
|
hash :labels, as: 'labels'
|
356
370
|
property :name, as: 'name'
|
357
371
|
property :next_rotation_time, as: 'nextRotationTime'
|
@@ -381,6 +395,7 @@ module Google
|
|
381
395
|
property :import_time, as: 'importTime'
|
382
396
|
property :name, as: 'name'
|
383
397
|
property :protection_level, as: 'protectionLevel'
|
398
|
+
property :reimport_eligible, as: 'reimportEligible'
|
384
399
|
property :state, as: 'state'
|
385
400
|
end
|
386
401
|
end
|
@@ -467,10 +482,27 @@ module Google
|
|
467
482
|
end
|
468
483
|
end
|
469
484
|
|
485
|
+
class GenerateRandomBytesRequest
|
486
|
+
# @private
|
487
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
488
|
+
property :length_bytes, as: 'lengthBytes'
|
489
|
+
property :protection_level, as: 'protectionLevel'
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
class GenerateRandomBytesResponse
|
494
|
+
# @private
|
495
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
496
|
+
property :data, :base64 => true, as: 'data'
|
497
|
+
property :data_crc32c, :numeric_string => true, as: 'dataCrc32c'
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
470
501
|
class ImportCryptoKeyVersionRequest
|
471
502
|
# @private
|
472
503
|
class Representation < Google::Apis::Core::JsonRepresentation
|
473
504
|
property :algorithm, as: 'algorithm'
|
505
|
+
property :crypto_key_version, as: 'cryptoKeyVersion'
|
474
506
|
property :import_job, as: 'importJob'
|
475
507
|
property :rsa_aes_wrapped_key, :base64 => true, as: 'rsaAesWrappedKey'
|
476
508
|
end
|
@@ -50,6 +50,41 @@ module Google
|
|
50
50
|
@batch_path = 'batch'
|
51
51
|
end
|
52
52
|
|
53
|
+
# Generate random bytes using the Cloud KMS randomness source in the provided
|
54
|
+
# location.
|
55
|
+
# @param [String] location
|
56
|
+
# The project-specific location in which to generate random bytes. For example, "
|
57
|
+
# projects/my-project/locations/us-central1".
|
58
|
+
# @param [Google::Apis::CloudkmsV1::GenerateRandomBytesRequest] generate_random_bytes_request_object
|
59
|
+
# @param [String] fields
|
60
|
+
# Selector specifying which fields to include in a partial response.
|
61
|
+
# @param [String] quota_user
|
62
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
63
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
64
|
+
# @param [Google::Apis::RequestOptions] options
|
65
|
+
# Request-specific options
|
66
|
+
#
|
67
|
+
# @yield [result, err] Result & error if block supplied
|
68
|
+
# @yieldparam result [Google::Apis::CloudkmsV1::GenerateRandomBytesResponse] parsed result object
|
69
|
+
# @yieldparam err [StandardError] error object if request failed
|
70
|
+
#
|
71
|
+
# @return [Google::Apis::CloudkmsV1::GenerateRandomBytesResponse]
|
72
|
+
#
|
73
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
74
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
75
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
76
|
+
def generate_location_random_bytes(location, generate_random_bytes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
77
|
+
command = make_simple_command(:post, 'v1/{+location}:generateRandomBytes', options)
|
78
|
+
command.request_representation = Google::Apis::CloudkmsV1::GenerateRandomBytesRequest::Representation
|
79
|
+
command.request_object = generate_random_bytes_request_object
|
80
|
+
command.response_representation = Google::Apis::CloudkmsV1::GenerateRandomBytesResponse::Representation
|
81
|
+
command.response_class = Google::Apis::CloudkmsV1::GenerateRandomBytesResponse
|
82
|
+
command.params['location'] = location unless location.nil?
|
83
|
+
command.query['fields'] = fields unless fields.nil?
|
84
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
85
|
+
execute_or_queue_command(command, &block)
|
86
|
+
end
|
87
|
+
|
53
88
|
# Gets information about a location.
|
54
89
|
# @param [String] name
|
55
90
|
# Resource name for the location.
|
@@ -848,11 +883,11 @@ module Google
|
|
848
883
|
end
|
849
884
|
|
850
885
|
# Schedule a CryptoKeyVersion for destruction. Upon calling this method,
|
851
|
-
# CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and destroy_time will
|
852
|
-
# be set to
|
853
|
-
#
|
854
|
-
# Before the destroy_time is reached,
|
855
|
-
# reverse the process.
|
886
|
+
# CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will
|
887
|
+
# be set to the time destroy_scheduled_duration in the future. At that time, the
|
888
|
+
# state will automatically change to DESTROYED, and the key material will be
|
889
|
+
# irrevocably destroyed. Before the destroy_time is reached,
|
890
|
+
# RestoreCryptoKeyVersion may be called to reverse the process.
|
856
891
|
# @param [String] name
|
857
892
|
# Required. The resource name of the CryptoKeyVersion to destroy.
|
858
893
|
# @param [Google::Apis::CloudkmsV1::DestroyCryptoKeyVersionRequest] destroy_crypto_key_version_request_object
|
@@ -946,11 +981,14 @@ module Google
|
|
946
981
|
execute_or_queue_command(command, &block)
|
947
982
|
end
|
948
983
|
|
949
|
-
#
|
950
|
-
#
|
951
|
-
#
|
984
|
+
# Import wrapped key material into a CryptoKeyVersion. All requests must specify
|
985
|
+
# a CryptoKey. If a CryptoKeyVersion is additionally specified in the request,
|
986
|
+
# key material will be reimported into that version. Otherwise, a new version
|
987
|
+
# will be created, and will be assigned the next sequential id within the
|
988
|
+
# CryptoKey.
|
952
989
|
# @param [String] parent
|
953
|
-
# Required. The name of the CryptoKey to be imported into.
|
990
|
+
# Required. The name of the CryptoKey to be imported into. The create permission
|
991
|
+
# is only required on this key when creating a new CryptoKeyVersion.
|
954
992
|
# @param [Google::Apis::CloudkmsV1::ImportCryptoKeyVersionRequest] import_crypto_key_version_request_object
|
955
993
|
# @param [String] fields
|
956
994
|
# Selector specifying which fields to include in a partial response.
|
@@ -30,7 +30,7 @@ module Google
|
|
30
30
|
# This is NOT the gem version.
|
31
31
|
VERSION = 'V1'
|
32
32
|
|
33
|
-
# See, edit, configure, and delete your Google Cloud
|
33
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
34
34
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
35
|
|
36
36
|
# View and manage your keys and secrets stored in Cloud Key Management Service
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-cloudkms_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -58,7 +58,7 @@ licenses:
|
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudkms_v1/CHANGELOG.md
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudkms_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudkms_v1/v0.12.0
|
62
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudkms_v1
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|