Skip to content

Commit 0c227d3

Browse files
authored
Update the incorrect import to securitycenter v2 (#12726)
1 parent d8152e9 commit 0c227d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

securitycenter/snippets_v2/snippets_findings_v2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ def update_source(source_name) -> Dict:
403403
Returns:
404404
Dict: returns the details of updated source.
405405
"""
406-
from google.cloud import securitycenter
406+
from google.cloud import securitycenter_v2
407407
from google.protobuf import field_mask_pb2
408408

409-
client = securitycenter.SecurityCenterClient()
409+
client = securitycenter_v2.SecurityCenterClient()
410410

411411
# Field mask to only update the display name.
412412
field_mask = field_mask_pb2.FieldMask(paths=["display_name"])
@@ -440,10 +440,10 @@ def list_source(organization_id) -> int:
440440
Dict: returns the count of the findings source
441441
"""
442442
count = -1
443-
from google.cloud import securitycenter
443+
from google.cloud import securitycenter_v2
444444

445445
# Create a new client.
446-
client = securitycenter.SecurityCenterClient()
446+
client = securitycenter_v2.SecurityCenterClient()
447447
# 'parent' must be in one of the following formats:
448448
# "organizations/{organization_id}"
449449
# "projects/{project_id}"

0 commit comments

Comments
 (0)