diff --git a/packages/google-cloud-kms/.cloud-repo-tools.json b/packages/google-cloud-kms/.cloud-repo-tools.json
deleted file mode 100644
index f5b571affa8..00000000000
--- a/packages/google-cloud-kms/.cloud-repo-tools.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "requiresKeyFile": true,
- "requiresProjectId": true,
- "product": "kms",
- "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/kms/latest/",
- "release_quality": "beta",
- "samples": [
- {
- "id": "kms",
- "name": "KMS",
- "file": "quickstart.js",
- "docs_link": "https://cloud.google.com/kms/docs"
- }
- ]
-}
diff --git a/packages/google-cloud-kms/.gitignore b/packages/google-cloud-kms/.gitignore
index 531c77e628b..ee083ec7909 100644
--- a/packages/google-cloud-kms/.gitignore
+++ b/packages/google-cloud-kms/.gitignore
@@ -7,8 +7,7 @@ out/
build/
system-test/secrets.js
system-test/*key.json
-*.lock
+**/*.lock
+**/package-lock.json
.DS_Store
-google-cloud-logging-winston-*.tgz
-google-cloud-logging-bunyan-*.tgz
-package-lock.json
+__pycache__
diff --git a/packages/google-cloud-kms/.repo-metadata.json b/packages/google-cloud-kms/.repo-metadata.json
new file mode 100644
index 00000000000..681e6c6cb74
--- /dev/null
+++ b/packages/google-cloud-kms/.repo-metadata.json
@@ -0,0 +1,13 @@
+{
+ "name": "kms",
+ "name_pretty": "Google Cloud Key Management Service",
+ "product_documentation": "https://cloud.google.com/kms",
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/kms/latest/",
+ "issue_tracker": "https://issuetracker.google.com/savedsearches/5264932",
+ "release_level": "beta",
+ "language": "nodejs",
+ "repo": "googleapis/nodejs-kms",
+ "distribution_name": "@google-cloud/kms",
+ "api_id": "kms.googleapis.com",
+ "requires_billing": true
+}
diff --git a/packages/google-cloud-kms/README.md b/packages/google-cloud-kms/README.md
index 3e69cb35a2f..5bc23049675 100644
--- a/packages/google-cloud-kms/README.md
+++ b/packages/google-cloud-kms/README.md
@@ -1,38 +1,58 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
-[//]: # "To regenerate it, use `npm run generate-scaffolding`."
+[//]: # "To regenerate it, use `python -m synthtool`."
-# [Cloud Key Management Service: Node.js Client](https://github.com/googleapis/nodejs-kms)
+# [Google Cloud Key Management Service: Node.js Client](https://github.com/googleapis/nodejs-kms)
-[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
+[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/kms.svg)](https://www.npmjs.org/package/@google-cloud/kms)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-kms/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-kms)
-[Cloud KMS](https://cloud.google.com/kms/docs/) allows you to keep encryption keys in one central cloud service, for direct use by other cloud resources and applications. With Cloud KMS you are the ultimate custodian of your data, you can manage encryption in the cloud the same way you do on-premises, and you have a provable and monitorable root of trust over your data.
-* [Using the client library](#using-the-client-library)
+
+Google Cloud Key Management Service (KMS) API client for Node.js
+
+
+* [Google Cloud Key Management Service Node.js Client API Reference][client-docs]
+* [Google Cloud Key Management Service Documentation][product-docs]
+* [github.com/googleapis/nodejs-kms](https://github.com/googleapis/nodejs-kms)
+
+Read more about the client libraries for Cloud APIs, including the older
+Google APIs Client Libraries, in [Client Libraries Explained][explained].
+
+[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
+
+**Table of contents:**
+
+
+* [Quickstart](#quickstart)
+ * [Before you begin](#before-you-begin)
+ * [Installing the client library](#installing-the-client-library)
+ * [Using the client library](#using-the-client-library)
* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
-## Using the client library
+## Quickstart
-1. [Select or create a Cloud Platform project][projects].
+### Before you begin
+1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
-
-1. [Enable the Cloud Key Management Service API][enable_api].
-
+1. [Enable the Google Cloud Key Management Service API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.
-1. Install the client library:
+### Installing the client library
+
+```bash
+npm install @google-cloud/kms
+```
- npm install --save @google-cloud/kms
-1. Try an example:
+### Using the client library
```javascript
async function quickstart(
@@ -59,8 +79,11 @@ async function quickstart(
console.log(`No key rings found.`);
}
}
+
```
+
+
## Samples
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-kms/tree/master/samples) directory. The samples' `README.md`
@@ -68,20 +91,48 @@ has instructions for running the samples.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
-| KMS | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
-
-The [Cloud KMS Node.js Client API Reference][client-docs] documentation
+| Add Member To Crypto Key Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToCryptoKeyPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToCryptoKeyPolicy.js,samples/README.md) |
+| Add Member To Key Ring Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToKeyRingPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToKeyRingPolicy.js,samples/README.md) |
+| Create Crypto Key | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKey.js,samples/README.md) |
+| Create Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKeyVersion.js,samples/README.md) |
+| Create Keyring | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createKeyring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createKeyring.js,samples/README.md) |
+| Decrypt | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/decrypt.js,samples/README.md) |
+| Destroy Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/destroyCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/destroyCryptoKeyVersion.js,samples/README.md) |
+| Disable Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/disableCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/disableCryptoKeyVersion.js,samples/README.md) |
+| Enable Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/enableCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/enableCryptoKeyVersion.js,samples/README.md) |
+| Encrypt | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/encrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/encrypt.js,samples/README.md) |
+| Get Crypto Key | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKey.js,samples/README.md) |
+| Get Crypto Key Iam Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKeyIamPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKeyIamPolicy.js,samples/README.md) |
+| Get Keyring | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyring.js,samples/README.md) |
+| Get Keyring Iam Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyringIamPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyringIamPolicy.js,samples/README.md) |
+| List Crypto Key Versions | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeyVersions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeyVersions.js,samples/README.md) |
+| List Crypto Keys | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeys.js,samples/README.md) |
+| List Keyrings | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listKeyrings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listKeyrings.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
+| Remove Member Crypto Key Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberCryptoKeyPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberCryptoKeyPolicy.js,samples/README.md) |
+| Remove Member From Key Ring Policy | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberFromKeyRingPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberFromKeyRingPolicy.js,samples/README.md) |
+| Restore Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/restoreCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/restoreCryptoKeyVersion.js,samples/README.md) |
+| Set Primary Crypto Key Version | [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/setPrimaryCryptoKeyVersion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/setPrimaryCryptoKeyVersion.js,samples/README.md) |
+
+
+
+The [Google Cloud Key Management Service Node.js Client API Reference][client-docs] documentation
also contains samples.
## Versioning
This library follows [Semantic Versioning](http://semver.org/).
+
+
This library is considered to be in **beta**. This means it is expected to be
mostly stable while we work toward a general availability release; however,
complete stability is not guaranteed. We will address issues and requests
against beta libraries with a high priority.
+
+
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -96,21 +147,10 @@ Apache Version 2.0
See [LICENSE](https://github.com/googleapis/nodejs-kms/blob/master/LICENSE)
-## What's Next
-
-* [Cloud KMS Documentation][product-docs]
-* [Cloud KMS Node.js Client API Reference][client-docs]
-* [github.com/googleapis/nodejs-kms](https://github.com/googleapis/nodejs-kms)
-
-Read more about the client libraries for Cloud APIs, including the older
-Google APIs Client Libraries, in [Client Libraries Explained][explained].
-
-[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/kms/latest/
-[product-docs]: https://cloud.google.com/kms/docs/
+[product-docs]: https://cloud.google.com/kms
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
-[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudkms.googleapis.com
-[auth]: https://cloud.google.com/docs/authentication/getting-started
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=kms.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json
index 710c4d54903..0d923ad0d8d 100644
--- a/packages/google-cloud-kms/package.json
+++ b/packages/google-cloud-kms/package.json
@@ -29,12 +29,8 @@
"Google Cloud Key Management Service (KMS) API"
],
"scripts": {
- "test": "npm run cover",
- "generate-scaffolding": "repo-tools generate all",
- "generate-scaffolding-samples": "repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
- "cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
- "test-no-cover": "mocha test/ --timeout 600000",
+ "test": "nyc mocha",
"lint": "eslint '**/*.js'",
"docs": "jsdoc -c .jsdoc.js",
"system-test": "mocha system-test/ smoke-test/ --timeout 600000",
@@ -47,19 +43,17 @@
"lodash.merge": "^4.6.0"
},
"devDependencies": {
- "@google-cloud/nodejs-repo-tools": "^3.0.0",
"codecov": "^3.0.4",
"eslint": "^5.1.0",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "^9.0.0",
"eslint-plugin-prettier": "^3.0.0",
+ "jsdoc": "^3.6.2",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
- "intelli-espower-loader": "^1.0.1",
- "jsdoc": "^3.5.5",
+ "linkinator": "^1.1.2",
"mocha": "^6.0.0",
"nyc": "^14.0.0",
"power-assert": "^1.6.0",
- "prettier": "^1.13.7",
- "linkinator": "^1.1.2"
+ "prettier": "^1.13.7"
}
}
diff --git a/packages/google-cloud-kms/samples/README.md b/packages/google-cloud-kms/samples/README.md
index a4c51edd42b..11d65fb885f 100644
--- a/packages/google-cloud-kms/samples/README.md
+++ b/packages/google-cloud-kms/samples/README.md
@@ -1,33 +1,422 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
-[//]: # "To regenerate it, use `npm run generate-scaffolding`."
+[//]: # "To regenerate it, use `python -m synthtool`."
-# Cloud Key Management Service: Node.js Samples
+# [Google Cloud Key Management Service: Node.js Samples](https://github.com/googleapis/nodejs-kms)
[![Open in Cloud Shell][shell_img]][shell_link]
-[Cloud KMS](https://cloud.google.com/kms/docs/) allows you to keep encryption keys in one central cloud service, for direct use by other cloud resources and applications. With Cloud KMS you are the ultimate custodian of your data, you can manage encryption in the cloud the same way you do on-premises, and you have a provable and monitorable root of trust over your data.
+
## Table of Contents
* [Before you begin](#before-you-begin)
* [Samples](#samples)
- * [KMS](#kms)
+ * [Add Member To Crypto Key Policy](#add-member-to-crypto-key-policy)
+ * [Add Member To Key Ring Policy](#add-member-to-key-ring-policy)
+ * [Create Crypto Key](#create-crypto-key)
+ * [Create Crypto Key Version](#create-crypto-key-version)
+ * [Create Keyring](#create-keyring)
+ * [Decrypt](#decrypt)
+ * [Destroy Crypto Key Version](#destroy-crypto-key-version)
+ * [Disable Crypto Key Version](#disable-crypto-key-version)
+ * [Enable Crypto Key Version](#enable-crypto-key-version)
+ * [Encrypt](#encrypt)
+ * [Get Crypto Key](#get-crypto-key)
+ * [Get Crypto Key Iam Policy](#get-crypto-key-iam-policy)
+ * [Get Keyring](#get-keyring)
+ * [Get Keyring Iam Policy](#get-keyring-iam-policy)
+ * [List Crypto Key Versions](#list-crypto-key-versions)
+ * [List Crypto Keys](#list-crypto-keys)
+ * [List Keyrings](#list-keyrings)
+ * [Quickstart](#quickstart)
+ * [Remove Member Crypto Key Policy](#remove-member-crypto-key-policy)
+ * [Remove Member From Key Ring Policy](#remove-member-from-key-ring-policy)
+ * [Restore Crypto Key Version](#restore-crypto-key-version)
+ * [Set Primary Crypto Key Version](#set-primary-crypto-key-version)
## Before you begin
-Before running the samples, make sure you've followed the steps in the
-[Before you begin section](../README.md#before-you-begin) of the client
-library's README.
+Before running the samples, make sure you've followed the steps outlined in
+[Using the client library](https://github.com/googleapis/nodejs-kms#using-the-client-library).
## Samples
-### KMS
-View the [source code][kms_0_code].
-[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)[kms_0_docs]: https://cloud.google.com/kms/docs
-[kms_0_code]: quickstart.js
+### Add Member To Crypto Key Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToCryptoKeyPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToCryptoKeyPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node addMemberToCryptoKeyPolicy.js`
+
+
+-----
+
+
+
+
+### Add Member To Key Ring Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/addMemberToKeyRingPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/addMemberToKeyRingPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node addMemberToKeyRingPolicy.js`
+
+
+-----
+
+
+
+
+### Create Crypto Key
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKey.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKey.js,samples/README.md)
+
+__Usage:__
+
+
+`node createCryptoKey.js`
+
+
+-----
+
+
+
+
+### Create Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node createCryptoKeyVersion.js`
+
+
+-----
+
+
+
+
+### Create Keyring
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/createKeyring.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/createKeyring.js,samples/README.md)
+
+__Usage:__
+
+
+`node createKeyring.js`
+
+
+-----
+
+
+
+
+### Decrypt
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/decrypt.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/decrypt.js,samples/README.md)
+
+__Usage:__
+
+
+`node decrypt.js`
+
+
+-----
+
+
+
+
+### Destroy Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/destroyCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/destroyCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node destroyCryptoKeyVersion.js`
+
+
+-----
+
+
+
+
+### Disable Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/disableCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/disableCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node disableCryptoKeyVersion.js`
+
+
+-----
+
+
+
+
+### Enable Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/enableCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/enableCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node enableCryptoKeyVersion.js`
+
+
+-----
+
+
+
+
+### Encrypt
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/encrypt.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/encrypt.js,samples/README.md)
+
+__Usage:__
+
+
+`node encrypt.js`
+
+
+-----
+
+
+
+
+### Get Crypto Key
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKey.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKey.js,samples/README.md)
+
+__Usage:__
+
+
+`node getCryptoKey.js`
+
+
+-----
+
+
+
+
+### Get Crypto Key Iam Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getCryptoKeyIamPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getCryptoKeyIamPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node getCryptoKeyIamPolicy.js`
+
+
+-----
+
+
+
+
+### Get Keyring
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyring.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyring.js,samples/README.md)
+
+__Usage:__
+
+
+`node getKeyring.js`
+
+
+-----
+
+
+
+
+### Get Keyring Iam Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/getKeyringIamPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/getKeyringIamPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node getKeyringIamPolicy.js`
+
+
+-----
+
+
+
+
+### List Crypto Key Versions
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeyVersions.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeyVersions.js,samples/README.md)
+
+__Usage:__
+
+
+`node listCryptoKeyVersions.js`
+
+
+-----
+
+
+
+
+### List Crypto Keys
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listCryptoKeys.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listCryptoKeys.js,samples/README.md)
+
+__Usage:__
+
+
+`node listCryptoKeys.js`
+
+
+-----
+
+
+
+
+### List Keyrings
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/listKeyrings.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/listKeyrings.js,samples/README.md)
+
+__Usage:__
+
+
+`node listKeyrings.js`
+
+
+-----
+
+
+
+
+### Quickstart
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/quickstart.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)
+
+__Usage:__
+
+
+`node quickstart.js`
+
+
+-----
+
+
+
+
+### Remove Member Crypto Key Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberCryptoKeyPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberCryptoKeyPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node removeMemberCryptoKeyPolicy.js`
+
+
+-----
+
+
+
+
+### Remove Member From Key Ring Policy
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/removeMemberFromKeyRingPolicy.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/removeMemberFromKeyRingPolicy.js,samples/README.md)
+
+__Usage:__
+
+
+`node removeMemberFromKeyRingPolicy.js`
+
+
+-----
+
+
+
+
+### Restore Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/restoreCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/restoreCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node restoreCryptoKeyVersion.js`
+
+
+-----
+
+
+
+
+### Set Primary Crypto Key Version
+
+View the [source code](https://github.com/googleapis/nodejs-kms/blob/master/samples/setPrimaryCryptoKeyVersion.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/setPrimaryCryptoKeyVersion.js,samples/README.md)
+
+__Usage:__
+
+
+`node setPrimaryCryptoKeyVersion.js`
+
+
+
+
+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-kms&page=editor&open_in_editor=samples/README.md
+[product-docs]: https://cloud.google.com/kms
\ No newline at end of file
diff --git a/packages/google-cloud-kms/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-kms/src/v1/doc/google/protobuf/doc_timestamp.js
index 98c19dbf0d3..b643b2d6c1e 100644
--- a/packages/google-cloud-kms/src/v1/doc/google/protobuf/doc_timestamp.js
+++ b/packages/google-cloud-kms/src/v1/doc/google/protobuf/doc_timestamp.js
@@ -93,7 +93,9 @@
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
* with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
- * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format.
+ * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+ * ) to obtain a formatter capable of generating timestamps in this format.
*
* @property {number} seconds
* Represents seconds of UTC time since Unix epoch
diff --git a/packages/google-cloud-kms/synth.metadata b/packages/google-cloud-kms/synth.metadata
index b3650a05e95..da1f079674b 100644
--- a/packages/google-cloud-kms/synth.metadata
+++ b/packages/google-cloud-kms/synth.metadata
@@ -1,5 +1,5 @@
{
- "updateTime": "2019-05-10T12:05:47.321623Z",
+ "updateTime": "2019-05-14T17:20:30.629154Z",
"sources": [
{
"generator": {
@@ -12,8 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a",
- "internalRef": "247530843"
+ "sha": "ffa256646fb15c4a6c720f0ed8f984a0ea513416",
+ "internalRef": "248066377"
}
},
{
diff --git a/packages/google-cloud-kms/synth.py b/packages/google-cloud-kms/synth.py
index 2beb360d019..03bf4501bad 100644
--- a/packages/google-cloud-kms/synth.py
+++ b/packages/google-cloud-kms/synth.py
@@ -37,17 +37,6 @@
templates = common_templates.node_library()
s.copy(templates)
-# [START fix-dead-link]
-s.replace('**/doc/google/protobuf/doc_timestamp.js',
- 'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)',
- r"https://\1)")
-
-s.replace('**/doc/google/protobuf/doc_timestamp.js',
- 'toISOString\]',
- 'toISOString)')
-# [END fix-dead-link]
-
-
# Node.js specific cleanup
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'fix'])
diff --git a/packages/google-cloud-kms/system-test/.eslintrc.yml b/packages/google-cloud-kms/system-test/.eslintrc.yml
index 3bbc66b8785..2e6882e46d2 100644
--- a/packages/google-cloud-kms/system-test/.eslintrc.yml
+++ b/packages/google-cloud-kms/system-test/.eslintrc.yml
@@ -2,5 +2,5 @@
env:
mocha: true
rules:
+ node/no-unpublished-require: off
no-console: off
- node/no-unsupported-features/es-syntax: off
diff --git a/packages/google-cloud-kms/test/.eslintrc.yml b/packages/google-cloud-kms/test/.eslintrc.yml
index 6db2a46c535..73f7bbc946f 100644
--- a/packages/google-cloud-kms/test/.eslintrc.yml
+++ b/packages/google-cloud-kms/test/.eslintrc.yml
@@ -1,3 +1,5 @@
---
env:
mocha: true
+rules:
+ node/no-unpublished-require: off
diff --git a/packages/google-cloud-kms/test/mocha.opts b/packages/google-cloud-kms/test/mocha.opts
index 8751e7bae37..ce007a554aa 100644
--- a/packages/google-cloud-kms/test/mocha.opts
+++ b/packages/google-cloud-kms/test/mocha.opts
@@ -1,3 +1,2 @@
---require intelli-espower-loader
--timeout 10000
--throw-deprecation