in datascan/bulk-creation-scripts/datascan.py [0:0]
def getDatascan(gcp_project_id, location_id, datascan_id):
"""
Method to get the list of datascans
"""
try:
# Create a client
client = dataplex_v1.DataScanServiceClient()
# Initialize request argument
request = dataplex_v1.GetDataScanRequest(
name=f"projects/{gcp_project_id}/locations/{location_id}/dataScans/{datascan_id}",
)
# Make the request
operation = client.get_data_scan(request=request)
return operation
except Exception as error:
return None