ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions
class ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions extends Resource (View source)
The "cryptoKeyVersions" collection of methods.
Typical usage is:
$cloudkmsService = new Google\Service\CloudKMS(...);
$cryptoKeyVersions = $cloudkmsService->projects_locations_keyRings_cryptoKeys_cryptoKeyVersions;
Methods
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT. (cryptoKeyVersions.asymmetricDecrypt)
Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey. (cryptoKeyVersions.asymmetricSign)
Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED.
Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time destroy_scheduled_duration in the future. At that time, the state will automatically change to DESTROYED, and the key material will be irrevocably destroyed. Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.
Returns metadata for a given CryptoKeyVersion. (cryptoKeyVersions.get)
Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
Import wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey. (cryptoKeyVersions.import)
Lists CryptoKeyVersions.
Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.
Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful. (cryptoKeyVersions.macVerify)
Update a CryptoKeyVersion's metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.
Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT.
Encrypts data using portable cryptographic primitives. Most users should choose Encrypt and Decrypt rather than their raw counterparts. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. (cryptoKeyVersions.rawEncrypt)
Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared. (cryptoKeyVersions.restore)
Details
AsymmetricDecryptResponse
asymmetricDecrypt(string $name, AsymmetricDecryptRequest $postBody, array $optParams = [])
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT. (cryptoKeyVersions.asymmetricDecrypt)
AsymmetricSignResponse
asymmetricSign(string $name, AsymmetricSignRequest $postBody, array $optParams = [])
Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey. (cryptoKeyVersions.asymmetricSign)
CryptoKeyVersion
create(string $parent, CryptoKeyVersion $postBody, array $optParams = [])
Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED.
(cryptoKeyVersions.create)
CryptoKeyVersion
destroy(string $name, DestroyCryptoKeyVersionRequest $postBody, array $optParams = [])
Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time destroy_scheduled_duration in the future. At that time, the state will automatically change to DESTROYED, and the key material will be irrevocably destroyed. Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.
(cryptoKeyVersions.destroy)
CryptoKeyVersion
get(string $name, array $optParams = [])
Returns metadata for a given CryptoKeyVersion. (cryptoKeyVersions.get)
PublicKey
getPublicKey(string $name, array $optParams = [])
Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
(cryptoKeyVersions.getPublicKey)
CryptoKeyVersion
import(string $parent, ImportCryptoKeyVersionRequest $postBody, array $optParams = [])
Import wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey. (cryptoKeyVersions.import)
ListCryptoKeyVersionsResponse
listProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions(string $parent, array $optParams = [])
Lists CryptoKeyVersions.
(cryptoKeyVersions.listProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions)
MacSignResponse
macSign(string $name, MacSignRequest $postBody, array $optParams = [])
Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.
(cryptoKeyVersions.macSign)
MacVerifyResponse
macVerify(string $name, MacVerifyRequest $postBody, array $optParams = [])
Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful. (cryptoKeyVersions.macVerify)
CryptoKeyVersion
patch(string $name, CryptoKeyVersion $postBody, array $optParams = [])
Update a CryptoKeyVersion's metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.
(cryptoKeyVersions.patch)
RawDecryptResponse
rawDecrypt(string $name, RawDecryptRequest $postBody, array $optParams = [])
Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT.
(cryptoKeyVersions.rawDecrypt)
RawEncryptResponse
rawEncrypt(string $name, RawEncryptRequest $postBody, array $optParams = [])
Encrypts data using portable cryptographic primitives. Most users should choose Encrypt and Decrypt rather than their raw counterparts. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. (cryptoKeyVersions.rawEncrypt)
CryptoKeyVersion
restore(string $name, RestoreCryptoKeyVersionRequest $postBody, array $optParams = [])
Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared. (cryptoKeyVersions.restore)