You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pre>Generate random bytes using the Cloud KMS randomness source in the provided location.
106
+
107
+
Args:
108
+
location: string, The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1". (required)
109
+
body: object, The request body.
110
+
The object takes the form of:
111
+
112
+
{ # Request message for KeyManagementService.GenerateRandomBytes.
113
+
"lengthBytes": 42, # The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.
114
+
"protectionLevel": "A String", # The ProtectionLevel to use when generating the random data. Defaults to SOFTWARE.
115
+
}
116
+
117
+
x__xgafv: string, V1 error format.
118
+
Allowed values
119
+
1 - v1 error format
120
+
2 - v2 error format
121
+
122
+
Returns:
123
+
An object of the form:
124
+
125
+
{ # Response message for KeyManagementService.GenerateRandomBytes.
126
+
"data": "A String", # The generated data.
127
+
"dataCrc32c": "A String", # Integrity verification field. A CRC32C checksum of the returned GenerateRandomBytesResponse.data. An integrity check of GenerateRandomBytesResponse.data can be performed by computing the CRC32C checksum of GenerateRandomBytesResponse.data and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
Copy file name to clipboardExpand all lines: docs/dyn/cloudkms_v1.projects.locations.keyRings.cryptoKeys.html
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,8 @@ <h3>Method Details</h3>
132
132
133
133
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
134
134
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
135
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
136
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
135
137
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
136
138
"a_key": "A String",
137
139
},
@@ -188,6 +190,8 @@ <h3>Method Details</h3>
188
190
189
191
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
190
192
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
193
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
194
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
191
195
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
192
196
"a_key": "A String",
193
197
},
@@ -315,6 +319,8 @@ <h3>Method Details</h3>
315
319
316
320
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
317
321
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
322
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
323
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
318
324
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
319
325
"a_key": "A String",
320
326
},
@@ -434,6 +440,8 @@ <h3>Method Details</h3>
434
440
"cryptoKeys": [ # The list of CryptoKeys.
435
441
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
436
442
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
443
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
444
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
437
445
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
438
446
"a_key": "A String",
439
447
},
@@ -508,6 +516,8 @@ <h3>Method Details</h3>
508
516
509
517
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
510
518
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
519
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
520
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
511
521
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
512
522
"a_key": "A String",
513
523
},
@@ -563,6 +573,8 @@ <h3>Method Details</h3>
563
573
564
574
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
565
575
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
576
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
577
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
566
578
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
567
579
"a_key": "A String",
568
580
},
@@ -746,6 +758,8 @@ <h3>Method Details</h3>
746
758
747
759
{ # A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
748
760
"createTime": "A String", # Output only. The time at which this CryptoKey was created.
761
+
"destroyScheduledDuration": "A String", # Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
762
+
"importOnly": True or False, # Immutable. Whether this key may contain imported versions only.
749
763
"labels": { # Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
"description": "Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.",
1573
+
"format": "google-duration",
1574
+
"type": "string"
1575
+
},
1576
+
"importOnly": {
1577
+
"description": "Immutable. Whether this key may contain imported versions only.",
1578
+
"type": "boolean"
1579
+
},
1542
1580
"labels": {
1543
1581
"additionalProperties": {
1544
1582
"type": "string"
@@ -2007,6 +2045,51 @@
2007
2045
},
2008
2046
"type": "object"
2009
2047
},
2048
+
"GenerateRandomBytesRequest": {
2049
+
"description": "Request message for KeyManagementService.GenerateRandomBytes.",
2050
+
"id": "GenerateRandomBytesRequest",
2051
+
"properties": {
2052
+
"lengthBytes": {
2053
+
"description": "The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.",
2054
+
"format": "int32",
2055
+
"type": "integer"
2056
+
},
2057
+
"protectionLevel": {
2058
+
"description": "The ProtectionLevel to use when generating the random data. Defaults to SOFTWARE.",
2059
+
"enum": [
2060
+
"PROTECTION_LEVEL_UNSPECIFIED",
2061
+
"SOFTWARE",
2062
+
"HSM",
2063
+
"EXTERNAL"
2064
+
],
2065
+
"enumDescriptions": [
2066
+
"Not specified.",
2067
+
"Crypto operations are performed in software.",
2068
+
"Crypto operations are performed in a Hardware Security Module.",
2069
+
"Crypto operations are performed by an external key manager."
2070
+
],
2071
+
"type": "string"
2072
+
}
2073
+
},
2074
+
"type": "object"
2075
+
},
2076
+
"GenerateRandomBytesResponse": {
2077
+
"description": "Response message for KeyManagementService.GenerateRandomBytes.",
2078
+
"id": "GenerateRandomBytesResponse",
2079
+
"properties": {
2080
+
"data": {
2081
+
"description": "The generated data.",
2082
+
"format": "byte",
2083
+
"type": "string"
2084
+
},
2085
+
"dataCrc32c": {
2086
+
"description": "Integrity verification field. A CRC32C checksum of the returned GenerateRandomBytesResponse.data. An integrity check of GenerateRandomBytesResponse.data can be performed by computing the CRC32C checksum of GenerateRandomBytesResponse.data and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.",
2087
+
"format": "int64",
2088
+
"type": "string"
2089
+
}
2090
+
},
2091
+
"type": "object"
2092
+
},
2010
2093
"ImportCryptoKeyVersionRequest": {
2011
2094
"description": "Request message for KeyManagementService.ImportCryptoKeyVersion.",
0 commit comments