-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds KMS quickstart #296
adds KMS quickstart #296
Conversation
@@ -0,0 +1,31 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
Copyright 2016 Google Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit: it's 2017
// Set the required scopes to access the Key Management Service API | ||
$client->setScopes(array( | ||
'https://www.googleapis.com/auth/cloudkms', | ||
'https://www.googleapis.com/auth/cloud-platform' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, remove https://www.googleapis.com/auth/cloudkms
$projectId = 'YOUR_PROJECT_ID'; | ||
|
||
# The "global" zone will list all keys, can be a specific zone if desired | ||
$zone = 'global'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change variable name throughout from $zone
to $location
, per GoogleCloudPlatform/python-docs-samples#754
# Your Google Cloud Platform project ID | ||
$projectId = 'YOUR_PROJECT_ID'; | ||
|
||
# The "global" zone will list all keys, can be a specific zone if desired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change comment to Lists keys in the "global" location.
, per GoogleCloudPlatform/python-docs-samples#754
$kms = new Google_Service_CloudKMS($client); | ||
|
||
// list all key rings for your project | ||
$keyRings = $kms->projects_locations_keyRings->listProjectsLocationsKeyRings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last question, does this work? The published discovery doc required that I change the Node.js and Python samples to pass in a full, manually constructed path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to add the $parent
parameter - should work now
No description provided.