Skip to content

Comments

feat(cloudkms): add delete CryptoKey, delete CryptoKeyVersions, get RetiredResource, and list RetiredResources code samples#3323

Open
yasharel wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
yasharel:delete-key-samples
Open

feat(cloudkms): add delete CryptoKey, delete CryptoKeyVersions, get RetiredResource, and list RetiredResources code samples#3323
yasharel wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
yasharel:delete-key-samples

Conversation

@yasharel
Copy link
Member

Adds samples for KMS delete CryptoKey, delete CryptoKeyVersions, get RetiredResource, and list RetiredResources in C#

@yasharel yasharel requested review from a team as code owners February 17, 2026 18:29
@snippet-bot
Copy link

snippet-bot bot commented Feb 17, 2026

Here is the summary of changes.

You are about to add 4 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 the samples Issues that are directly related to samples. label Feb 17, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @yasharel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the KMS C# samples by introducing new functionalities for managing cryptographic keys and their versions, as well as interacting with retired resources. The additions provide practical examples for deleting keys and key versions, and for fetching or listing retired resources within the Google Cloud Key Management Service. This update ensures developers have up-to-date and comprehensive code examples for common KMS operations.

Highlights

  • New KMS Samples: Added C# code samples for deleting a KMS CryptoKey.
  • New KMS Samples: Added C# code samples for deleting KMS CryptoKeyVersions.
  • New KMS Samples: Added C# code samples for retrieving a specific retired KMS resource.
  • New KMS Samples: Added C# code samples for listing all retired KMS resources.
  • Dependency Update: Updated the Google.Cloud.Kms.V1 NuGet package to version 3.22.0.
Changelog
  • kms/api/Kms.Samples/DeleteKey.cs
    • Added a new sample demonstrating how to delete a CryptoKey.
  • kms/api/Kms.Samples/DeleteKeyVersion.cs
    • Added a new sample demonstrating how to delete a CryptoKeyVersion.
  • kms/api/Kms.Samples/GetRetiredResource.cs
    • Added a new sample demonstrating how to retrieve a specific RetiredResource.
  • kms/api/Kms.Samples/Kms.Samples.csproj
    • Updated the Google.Cloud.Kms.V1 package version from 3.21.0 to 3.22.0.
  • kms/api/Kms.Samples/ListRetiredResources.cs
    • Added a new sample demonstrating how to list all RetiredResources for a given location.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces new C# code samples for Google Cloud KMS, covering operations such as deleting CryptoKeys, deleting CryptoKeyVersions, getting a RetiredResource, and listing RetiredResources. The new samples are well-structured, follow a consistent pattern, and correctly utilize the Google Cloud KMS client library. Additionally, the Google.Cloud.Kms.V1 package dependency has been updated to version 3.22.0, which is a good practice for keeping libraries current. The changes are clear and directly address the functionality described in the pull request title and description.

@yasharel yasharel changed the title feat: add KMS delete CryptoKey, delete CryptoKeyVersions, get RetiredResource, and list RetiredResources code samples feat(cloudkms): add delete CryptoKey, delete CryptoKeyVersions, get RetiredResource, and list RetiredResources code samples Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant