ProjectsLocationsKeyRingsCryptoKeys
class ProjectsLocationsKeyRingsCryptoKeys extends Resource (View source)
The "cryptoKeys" collection of methods.
Typical usage is:
$cloudkmsService = new Google\Service\CloudKMS(...);
$cryptoKeys = $cloudkmsService->projects_locations_keyRings_cryptoKeys;
Methods
Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.decrypt)
Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.encrypt)
Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion. (cryptoKeys.get)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (cryptoKeys.getIamPolicy)
Lists CryptoKeys. (cryptoKeys.listProjectsLocationsKeyRingsCryptoKeys)
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors. (cryptoKeys.setIamPolicy)
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
Update the version of a CryptoKey that will be used in Encrypt. Returns an error if called on a key whose purpose is not ENCRYPT_DECRYPT.
Details
CryptoKey
create(string $parent, CryptoKey $postBody, array $optParams = [])
Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required. (cryptoKeys.create)
DecryptResponse
decrypt(string $name, DecryptRequest $postBody, array $optParams = [])
Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.decrypt)
EncryptResponse
encrypt(string $name, EncryptRequest $postBody, array $optParams = [])
Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.encrypt)
CryptoKey
get(string $name, array $optParams = [])
Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion. (cryptoKeys.get)
Policy
getIamPolicy(string $resource, array $optParams = [])
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (cryptoKeys.getIamPolicy)
ListCryptoKeysResponse
listProjectsLocationsKeyRingsCryptoKeys(string $parent, array $optParams = [])
Lists CryptoKeys. (cryptoKeys.listProjectsLocationsKeyRingsCryptoKeys)
CryptoKey
patch(string $name, CryptoKey $postBody, array $optParams = [])
Update a CryptoKey. (cryptoKeys.patch)
Policy
setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors. (cryptoKeys.setIamPolicy)
TestIamPermissionsResponse
testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
This operation may "fail open" without warning. (cryptoKeys.testIamPermissions)
CryptoKey
updatePrimaryVersion(string $name, UpdateCryptoKeyPrimaryVersionRequest $postBody, array $optParams = [])
Update the version of a CryptoKey that will be used in Encrypt. Returns an error if called on a key whose purpose is not ENCRYPT_DECRYPT.
(cryptoKeys.updatePrimaryVersion)