Constructor
new KeyManagementServiceClient(optionsopt)
Construct an instance of KeyManagementServiceClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. The options accepted by the constructor are described in detail in this document. The common options are: Properties
|
Members
apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
port
The port for this API service.
scopes
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
The DNS address for this API service.
Methods
asymmetricDecrypt(request, optionsopt) → {Promise}
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
asymmetricSign(request, optionsopt) → {Promise}
Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
close() → {Promise}
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns:
| Type | Description |
|---|---|
| Promise |
A promise that resolves when the client is closed. |
createCryptoKey(request, optionsopt) → {Promise}
Create a new CryptoKey within a KeyRing.
CryptoKey.purpose and CryptoKey.version_template.algorithm are required.
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
createCryptoKeyVersion(request, optionsopt) → {Promise}
Create a new CryptoKeyVersion in a CryptoKey.
The server will assign the next sequential id. If unset, state will be set to ENABLED.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
createImportJob(request, optionsopt) → {Promise}
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
createKeyRing(request, optionsopt) → {Promise}
Create a new KeyRing in a given Project and Location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
cryptoKeyPath(project, location, key_ring, crypto_key) → {string}
Return a fully-qualified cryptoKey resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
key_ring |
string | |
crypto_key |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
cryptoKeyVersionPath(project, location, key_ring, crypto_key, crypto_key_version) → {string}
Return a fully-qualified cryptoKeyVersion resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
key_ring |
string | |
crypto_key |
string | |
crypto_key_version |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
decrypt(request, optionsopt) → {Promise}
Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
destroyCryptoKeyVersion(request, optionsopt) → {Promise}
Schedule a CryptoKeyVersion for destruction.
Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and destroy_time will be set to a time 24 hours in the future, at which point the state will be changed to DESTROYED, and the key material will be irrevocably destroyed.
Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
encrypt(request, optionsopt) → {Promise}
Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
generateRandomBytes(request, optionsopt) → {Promise}
Generate random bytes using the Cloud KMS randomness source in the provided location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getCryptoKey(request, optionsopt) → {Promise}
Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getCryptoKeyVersion(request, optionsopt) → {Promise}
Returns metadata for a given CryptoKeyVersion.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getIamPolicy(request, optionsopt, callbackopt) → {Promise}
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Policy. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getImportJob(request, optionsopt) → {Promise}
Returns metadata for a given ImportJob.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getKeyRing(request, optionsopt) → {Promise}
Returns metadata for a given KeyRing.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
getProjectId() → {Promise}
Return the project ID used by this class.
Returns:
| Type | Description |
|---|---|
| Promise |
A promise that resolves to string containing the project ID. |
getPublicKey(request, optionsopt) → {Promise}
Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
importCryptoKeyVersion(request, optionsopt) → {Promise}
Imports a new CryptoKeyVersion into an existing CryptoKey using the wrapped key material provided in the request.
The version ID will be assigned the next sequential id within the CryptoKey.
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
importJobPath(project, location, key_ring, import_job) → {string}
Return a fully-qualified importJob resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
key_ring |
string | |
import_job |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
initialize() → {Promise}
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns:
| Type | Description |
|---|---|
| Promise |
A promise that resolves to an authenticated service stub. |
keyRingPath(project, location, key_ring) → {string}
Return a fully-qualified keyRing resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
key_ring |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
listCryptoKeys(request, optionsopt) → {Promise}
Lists CryptoKeys.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
listCryptoKeysAsync(request, optionsopt) → {Object}
Equivalent to listCryptoKeys, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CryptoKey. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
Example
const iterable = client.listCryptoKeysAsync(request);
for await (const response of iterable) {
// process response
}
listCryptoKeysStream(request, optionsopt) → {Stream}
Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Stream |
An object stream which emits an object representing CryptoKey on 'data' event.
The client library will perform auto-pagination by default: it will call the API as many
times as needed. Note that it can affect your quota.
We recommend using |
listCryptoKeyVersions(request, optionsopt) → {Promise}
Lists CryptoKeyVersions.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
listCryptoKeyVersionsAsync(request, optionsopt) → {Object}
Equivalent to listCryptoKeyVersions, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CryptoKeyVersion. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
Example
const iterable = client.listCryptoKeyVersionsAsync(request);
for await (const response of iterable) {
// process response
}
listCryptoKeyVersionsStream(request, optionsopt) → {Stream}
Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Stream |
An object stream which emits an object representing CryptoKeyVersion on 'data' event.
The client library will perform auto-pagination by default: it will call the API as many
times as needed. Note that it can affect your quota.
We recommend using |
listImportJobs(request, optionsopt) → {Promise}
Lists ImportJobs.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
listImportJobsAsync(request, optionsopt) → {Object}
Equivalent to listImportJobs, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ImportJob. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
Example
const iterable = client.listImportJobsAsync(request);
for await (const response of iterable) {
// process response
}
listImportJobsStream(request, optionsopt) → {Stream}
Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Stream |
An object stream which emits an object representing ImportJob on 'data' event.
The client library will perform auto-pagination by default: it will call the API as many
times as needed. Note that it can affect your quota.
We recommend using |
listKeyRings(request, optionsopt) → {Promise}
Lists KeyRings.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
listKeyRingsAsync(request, optionsopt) → {Object}
Equivalent to listKeyRings, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing KeyRing. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
Example
const iterable = client.listKeyRingsAsync(request);
for await (const response of iterable) {
// process response
}
listKeyRingsStream(request, optionsopt) → {Stream}
Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Stream |
An object stream which emits an object representing KeyRing on 'data' event.
The client library will perform auto-pagination by default: it will call the API as many
times as needed. Note that it can affect your quota.
We recommend using |
locationPath(project, location) → {string}
Return a fully-qualified location resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
macSign(request, optionsopt) → {Promise}
Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
macVerify(request, optionsopt) → {Promise}
Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
matchCryptoKeyFromCryptoKeyName(cryptoKeyName) → {string}
Parse the crypto_key from CryptoKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyName |
string |
A fully-qualified path representing CryptoKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the crypto_key. |
matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName) → {string}
Parse the crypto_key from CryptoKeyVersion resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyVersionName |
string |
A fully-qualified path representing CryptoKeyVersion resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the crypto_key. |
matchCryptoKeyFromPublicKeyName(publicKeyName) → {string}
Parse the crypto_key from PublicKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
publicKeyName |
string |
A fully-qualified path representing PublicKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the crypto_key. |
matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName) → {string}
Parse the crypto_key_version from CryptoKeyVersion resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyVersionName |
string |
A fully-qualified path representing CryptoKeyVersion resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the crypto_key_version. |
matchCryptoKeyVersionFromPublicKeyName(publicKeyName) → {string}
Parse the crypto_key_version from PublicKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
publicKeyName |
string |
A fully-qualified path representing PublicKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the crypto_key_version. |
matchImportJobFromImportJobName(importJobName) → {string}
Parse the import_job from ImportJob resource.
Parameters:
| Name | Type | Description |
|---|---|---|
importJobName |
string |
A fully-qualified path representing ImportJob resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the import_job. |
matchKeyRingFromCryptoKeyName(cryptoKeyName) → {string}
Parse the key_ring from CryptoKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyName |
string |
A fully-qualified path representing CryptoKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the key_ring. |
matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName) → {string}
Parse the key_ring from CryptoKeyVersion resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyVersionName |
string |
A fully-qualified path representing CryptoKeyVersion resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the key_ring. |
matchKeyRingFromImportJobName(importJobName) → {string}
Parse the key_ring from ImportJob resource.
Parameters:
| Name | Type | Description |
|---|---|---|
importJobName |
string |
A fully-qualified path representing ImportJob resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the key_ring. |
matchKeyRingFromKeyRingName(keyRingName) → {string}
Parse the key_ring from KeyRing resource.
Parameters:
| Name | Type | Description |
|---|---|---|
keyRingName |
string |
A fully-qualified path representing KeyRing resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the key_ring. |
matchKeyRingFromPublicKeyName(publicKeyName) → {string}
Parse the key_ring from PublicKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
publicKeyName |
string |
A fully-qualified path representing PublicKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the key_ring. |
matchLocationFromCryptoKeyName(cryptoKeyName) → {string}
Parse the location from CryptoKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyName |
string |
A fully-qualified path representing CryptoKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName) → {string}
Parse the location from CryptoKeyVersion resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyVersionName |
string |
A fully-qualified path representing CryptoKeyVersion resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchLocationFromImportJobName(importJobName) → {string}
Parse the location from ImportJob resource.
Parameters:
| Name | Type | Description |
|---|---|---|
importJobName |
string |
A fully-qualified path representing ImportJob resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchLocationFromKeyRingName(keyRingName) → {string}
Parse the location from KeyRing resource.
Parameters:
| Name | Type | Description |
|---|---|---|
keyRingName |
string |
A fully-qualified path representing KeyRing resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchLocationFromLocationName(locationName) → {string}
Parse the location from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchLocationFromPublicKeyName(publicKeyName) → {string}
Parse the location from PublicKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
publicKeyName |
string |
A fully-qualified path representing PublicKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the location. |
matchProjectFromCryptoKeyName(cryptoKeyName) → {string}
Parse the project from CryptoKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyName |
string |
A fully-qualified path representing CryptoKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName) → {string}
Parse the project from CryptoKeyVersion resource.
Parameters:
| Name | Type | Description |
|---|---|---|
cryptoKeyVersionName |
string |
A fully-qualified path representing CryptoKeyVersion resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
matchProjectFromImportJobName(importJobName) → {string}
Parse the project from ImportJob resource.
Parameters:
| Name | Type | Description |
|---|---|---|
importJobName |
string |
A fully-qualified path representing ImportJob resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
matchProjectFromKeyRingName(keyRingName) → {string}
Parse the project from KeyRing resource.
Parameters:
| Name | Type | Description |
|---|---|---|
keyRingName |
string |
A fully-qualified path representing KeyRing resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
matchProjectFromLocationName(locationName) → {string}
Parse the project from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
matchProjectFromPublicKeyName(publicKeyName) → {string}
Parse the project from PublicKey resource.
Parameters:
| Name | Type | Description |
|---|---|---|
publicKeyName |
string |
A fully-qualified path representing PublicKey resource. |
Returns:
| Type | Description |
|---|---|
| string |
A string representing the project. |
publicKeyPath(project, location, key_ring, crypto_key, crypto_key_version) → {string}
Return a fully-qualified publicKey resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
key_ring |
string | |
crypto_key |
string | |
crypto_key_version |
string |
Returns:
| Type | Description |
|---|---|
| string |
Resource name string. |
restoreCryptoKeyVersion(request, optionsopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
setIamPolicy(request, optionsopt, callbackopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TestIamPermissionsResponse. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
testIamPermissions(request, optionsopt, callbackopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TestIamPermissionsResponse. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
updateCryptoKey(request, optionsopt) → {Promise}
Update a CryptoKey.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
updateCryptoKeyPrimaryVersion(request, optionsopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
updateCryptoKeyVersion(request, optionsopt) → {Promise}
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.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|