Reference documentation and code samples for the Cloud KMS V1 Client class KeyManagementServiceClient.
Service Description: Google Cloud Key Management Service
This class is currently experimental and may be subject to changes.
Namespace
Google \ Cloud \ Kms \ V1 \ ClientMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
asymmetricDecrypt
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::asymmetricDecryptAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\AsymmetricDecryptRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\AsymmetricDecryptResponse |
|
asymmetricSign
Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::asymmetricSignAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\AsymmetricSignRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\AsymmetricSignResponse |
|
createCryptoKey
Create a new CryptoKey within a KeyRing.
CryptoKey.purpose and CryptoKey.version_template.algorithm are required.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::createCryptoKeyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateCryptoKeyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKey |
|
createCryptoKeyVersion
Create a new CryptoKeyVersion in a CryptoKey.
The server will assign the next sequential id. If unset, state will be set to ENABLED.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::createCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
createImportJob
Create a new ImportJob within a KeyRing.
ImportJob.import_method is required.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::createImportJobAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateImportJobRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\ImportJob |
|
createKeyRing
Create a new KeyRing in a given Project and Location.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::createKeyRingAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateKeyRingRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\KeyRing |
|
decrypt
Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::decryptAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\DecryptRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\DecryptResponse |
|
destroyCryptoKeyVersion
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::destroyCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
encrypt
Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::encryptAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\EncryptRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\EncryptResponse |
|
generateRandomBytes
Generate random bytes using the Cloud KMS randomness source in the provided location.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::generateRandomBytesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GenerateRandomBytesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\GenerateRandomBytesResponse |
|
getCryptoKey
Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getCryptoKeyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetCryptoKeyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKey |
|
getCryptoKeyVersion
Returns metadata for a given CryptoKeyVersion.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
getImportJob
Returns metadata for a given ImportJob.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getImportJobAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetImportJobRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\ImportJob |
|
getKeyRing
Returns metadata for a given KeyRing.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getKeyRingAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetKeyRingRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\KeyRing |
|
getPublicKey
Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getPublicKeyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetPublicKeyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\PublicKey |
|
importCryptoKeyVersion
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::importCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
listCryptoKeyVersions
Lists CryptoKeyVersions.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::listCryptoKeyVersionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
listCryptoKeys
Lists CryptoKeys.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::listCryptoKeysAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListCryptoKeysRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
listImportJobs
Lists ImportJobs.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::listImportJobsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListImportJobsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
listKeyRings
Lists KeyRings.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::listKeyRingsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListKeyRingsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
macSign
Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::macSignAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\MacSignRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\MacSignResponse |
|
macVerify
Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::macVerifyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\MacVerifyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\MacVerifyResponse |
|
rawDecrypt
Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::rawDecryptAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RawDecryptRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\RawDecryptResponse |
|
rawEncrypt
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::rawEncryptAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RawEncryptRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\RawEncryptResponse |
|
restoreCryptoKeyVersion
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::restoreCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
updateCryptoKey
Update a CryptoKey.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::updateCryptoKeyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKey |
|
updateCryptoKeyPrimaryVersion
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::updateCryptoKeyPrimaryVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKey |
|
updateCryptoKeyVersion
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::updateCryptoKeyVersionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Kms\V1\CryptoKeyVersion |
|
getLocation
Gets information about a location.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getLocationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Location\Location |
|
listLocations
Lists information about the supported locations for this service.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::listLocationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::getIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\Policy |
|
setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::setIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\Policy |
|
testIamPermissions
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.
The async variant is Google\Cloud\Kms\V1\Client\BaseClient\self::testIamPermissionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\TestIamPermissionsResponse |
|
asymmetricDecryptAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\AsymmetricDecryptRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
asymmetricSignAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\AsymmetricSignRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
createCryptoKeyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateCryptoKeyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
createCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
createImportJobAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateImportJobRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
createKeyRingAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\CreateKeyRingRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
decryptAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\DecryptRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
destroyCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
encryptAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\EncryptRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
generateRandomBytesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GenerateRandomBytesRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getCryptoKeyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetCryptoKeyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getImportJobAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetImportJobRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getKeyRingAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetKeyRingRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getPublicKeyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\GetPublicKeyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
importCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
listCryptoKeyVersionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
listCryptoKeysAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListCryptoKeysRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
listImportJobsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListImportJobsRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
listKeyRingsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\ListKeyRingsRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
macSignAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\MacSignRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
macVerifyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\MacVerifyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
rawDecryptAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RawDecryptRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
rawEncryptAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RawEncryptRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
restoreCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
updateCryptoKeyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
updateCryptoKeyPrimaryVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
updateCryptoKeyVersionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getLocationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
listLocationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
getIamPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
setIamPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
testIamPermissionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
|
optionalArgs = [] |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface |
|
static::cryptoKeyName
Formats a string containing the fully-qualified path to represent a crypto_key resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted crypto_key resource. |
static::cryptoKeyVersionName
Formats a string containing the fully-qualified path to represent a crypto_key_version resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
cryptoKeyVersion |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted crypto_key_version resource. |
static::importJobName
Formats a string containing the fully-qualified path to represent a import_job resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
importJob |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted import_job resource. |
static::keyRingName
Formats a string containing the fully-qualified path to represent a key_ring resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted key_ring resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted location resource. |
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
- importJob: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}
- keyRing: projects/{project}/locations/{location}/keyRings/{key_ring}
- location: projects/{project}/locations/{location}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
| Parameters | |
|---|---|
| Name | Description |
formattedName |
string
The formatted name string |
template |
string
Optional name of template to match |
| Returns | |
|---|---|
| Type | Description |
array |
An associative array from name component IDs to component values. |