Skip to content

Conversation

jmdobry
Copy link
Member

@jmdobry jmdobry commented Jan 11, 2017

No description provided.

@jmdobry jmdobry self-assigned this Jan 11, 2017
@jmdobry jmdobry requested a review from theacodes January 11, 2017 18:16
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 11, 2017
# [START kms_quickstart]
# Imports the Google APIs client library
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed, googleapiclient can figure out application default credentials on its own.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

zone = 'global';

# Acquires credentials
credentials = GoogleCredentials.get_application_default().create_scoped(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


# Lists key rings
req = kms_client.projects().locations().keyRings().list(
parent='projects/{}/locations/{}'.format(project_id, zone))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make parent its own variable, please.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

kms_client = discovery.build('cloudkms', 'v1beta1', credentials=credentials)

# Lists key rings
req = kms_client.projects().locations().keyRings().list(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request and response, we don't get charged by the letter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@theacodes theacodes merged commit fa8bc81 into master Jan 11, 2017
@theacodes theacodes deleted the kms branch January 11, 2017 18:57
@theacodes
Copy link
Contributor

Thank you, @jmdobry!

Linchin pushed a commit that referenced this pull request Aug 18, 2025
…licies (#753)

* feat: Add include_recaptcha_script for as a new action in firewall policies

PiperOrigin-RevId: 612851792

Source-Link: googleapis/googleapis@49ea2c0

Source-Link: https://github.com/googleapis/googleapis-gen/commit/460fdcbbbe00f35b1c591b1f3ef0c77ebd3ce277
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDYwZmRjYmJiZTAwZjM1YjFjNTkxYjFmM2VmMGM3N2ViZDNjZTI3NyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants