Skip to content

Commit 53fcce5

Browse files
authored
Updates KMS samples to use google/cloud-kms client library (GoogleCloudPlatform#800)
1 parent d440841 commit 53fcce5

27 files changed

+1313
-1533
lines changed

kms/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ These samples show how to use the [Google Cloud KMS API]
2323
4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md).
2424
Run `php composer.phar install` (if composer is installed locally) or `composer install`
2525
(if composer is installed globally).
26-
5. Run `php kms.php`. The following commands are available:
27-
26+
5. Run `php src/SNIPPET_NAME.php`. The usage will print for each if no arguments
27+
are provided:
2828
```sh
29-
encryption Manage encryption for KMS
30-
iam Manage IAM for KMS
31-
key Manage keys for KMS
32-
keyring Manage keyrings for KMS
33-
version Manage key versions for KMS
29+
$ php src/create_dataset.php
30+
Usage: php src/list_keyrings.php PROJECT_ID LOCATION
31+
32+
$ php src/list_keyrings.php your-project-id us-west1
33+
Name: projects/your-project-id/locations/us-west1/keyRings/your-test-keyring
34+
Create Time: 2018-12-28 06:27:56
3435
```
35-
6. Run `php kms.php COMMAND --help` to print information about the usage of each command.
3636
3737
## Contributing changes
3838

kms/composer.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{
22
"require": {
3-
"google/apiclient": "^2.1",
4-
"symfony/console": " ^3.0",
5-
"symfony/event-dispatcher": "^3.3"
6-
},
7-
"autoload": {
8-
"files": [
9-
"src/functions.php"
10-
]
3+
"google/cloud-kms": "^0.4.3"
114
},
125
"require-dev": {
136
"phpunit/phpunit": "^5",

kms/kms.php

Lines changed: 0 additions & 326 deletions
This file was deleted.

0 commit comments

Comments
 (0)