Question 22 of 32 from exam 300-735-SAUTO: Automating and Programming Cisco Security Solutions

Question 22 of 32 from exam 300-735-SAUTO: Automating and Programming Cisco Security Solutions

Question

DRAG DROP -

def query(config, secret, url, payload):
print (‘query url=' + url)
print(' request=' + payload)
handler = urllib. request .HTTPSHandler (context=config.get_ssl_context ())
opener = urllib.request .build_ opener (handler)
rest_request = urllib.request.Request (url=url, data=str.encode (payload) )
xrest_request.add_header('Content-Type', ‘application/json')
rest_request.add_header('Accept', 'application/json')
b64 = base64.b64encode((config.get_node_name() + ':' + secret) .encode()) «decode ()
rest_request.add_header('Authorization', 'Basic ' + bé4)
rest_response = opener.open(rest_request)
print(' response status=' + str (rest_response.getcode()))
print(' response content=" + rest_response.read() .decode())

Refer to the exhibit.

A Python function named "query" has been developed, and will be used to query the service "com.cisco.ise.session" via Cisco pxGrid 2.0 APIs.

Drag and drop the code to construct a Python call to the "query" function to identify the user groups that are associated with the user "fred"

Not all options are used.

Select and Place:

"getUserGroupByUserName", "fred" url

"{ "userName": "fred" }' secret

Explanations

"getUserGroupByUserName", "fred"

secret

url

"userName": "fred"

}e

J)

"getUserGroupByUserName", "fred"

url

"{ "userName": "fred" }

secret