Skip to content
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

feat(kms): add import sample #3574

Merged
merged 7 commits into from
Nov 17, 2023
Merged

feat(kms): add import sample #3574

merged 7 commits into from
Nov 17, 2023

Conversation

bdhess
Copy link
Contributor

@bdhess bdhess commented Nov 14, 2023

Replaces #3542

@bdhess bdhess requested review from a team as code owners November 14, 2023 15:40
Copy link

snippet-bot bot commented Nov 14, 2023

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: cloudkms Issues related to the Cloud Key Management Service API. labels Nov 14, 2023
@bdhess bdhess requested a review from a team as a code owner November 14, 2023 19:49
@bdhess bdhess mentioned this pull request Nov 14, 2023
@bdhess bdhess changed the title Add KMS import sample. feat(kms): add import sample Nov 14, 2023
Copy link
Contributor

@Sita04 Sita04 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. LGTM, a couple nits only from my end.
I'll reassign this to a language reviewer.

kms/checkStateImportJob.js Outdated Show resolved Hide resolved
// const locationId = 'us-east1';
// const keyRingId = 'my-key-ring';
// const cryptoKeyId = 'my-imported-key';
// const cryptoKeyVersionId = '1';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a docs link on where to get more information on the params?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These samples are meant to be embedded within https://cloud.google.com/kms/docs/importing-a-key - there is already fairly detailed textual description for all of these parameters that is not language-specific. (Or are you just asking for more context /outside/ the samples?

importJobId: id,
importJob: {
protectionLevel: 'HSM',
importMethod: 'RSA_OAEP_3072_SHA256',
Copy link
Contributor

Choose a reason for hiding this comment

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

A context doc link would be helpful!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This shouldn't be inline in the sample, since it's already included in the sample context.
See https://cloud.google.com/kms/docs/importing-a-key#create_importjob

@Sita04 Sita04 assigned pattishin and unassigned Sita04 Nov 15, 2023
@pattishin pattishin merged commit 5701105 into main Nov 17, 2023
12 checks passed
@pattishin pattishin deleted the bdhess-import branch November 17, 2023 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudkms Issues related to the Cloud Key Management Service API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants