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

securitycenter: Some v2 code samples use the v1 API #12713

Open
hegemonic opened this issue Oct 20, 2024 · 1 comment
Open

securitycenter: Some v2 code samples use the v1 API #12713

hegemonic opened this issue Oct 20, 2024 · 1 comment
Assignees
Labels
api: securitycenter Issues related to the Security Command Center API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@hegemonic
Copy link
Contributor

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/98d8ab50/securitycenter/snippets_v2/snippets_findings_v2.py

Did you change the file? If so, how?

no

Describe the issue

This file is supposed to contain samples for the Security Command Center v2 API. That means each sample needs to import google.cloud.securitycenter_v2:

from google.cloud import securitycenter_v2

client = securitycenter_v2.SecurityCenterClient()

However, the securitycenter_update_source_v2 and securitycenter_list_sources_v2 samples use the v1 API:

from google.cloud import securitycenter

client = securitycenter.SecurityCenterClient()

CC: @owenhuyn

@hegemonic hegemonic added triage me I really want to be triaged. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 20, 2024
@product-auto-label product-auto-label bot added api: securitycenter Issues related to the Security Command Center API. samples Issues that are directly related to samples. labels Oct 20, 2024
@rsamborski rsamborski assigned vijaykanthm and unassigned rsamborski Oct 21, 2024
@rsamborski
Copy link
Member

@vijaykanthm PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: securitycenter Issues related to the Security Command Center API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants