I am trying to get the vulnerability report for an instance as part of a Python script. For that I am following the documentation here:
My function looks something like this:
def getVulnerability()
project = "my-project"
location = "my-zone"
instance = "my-instance-id"
service.projects().locations().instances().vulnerabilityReports().get(
parent='projects/{}/locations/{}/instances/{}'.format(project, location, instance)
)
However, when I run that I get an error saying
TypeError: Got an unexpected keyword argument "parent"
What exactly can I do to resolve this or how should I change my query?
Based on the documentation, it seems like the parameter is no longer parent
. Can you please try it using the v1 version (rather than v1alpha) and passing the parameter name
instead?
def getVulnerability()
project = "my-project"
location = "my-zone"
instance = "my-instance-id"
service.projects().locations().instances().vulnerabilityReports().get(
name='projects/{}/locations/{}/instances/{}'.format(project, location, instance)
)