I am looking to use the uri module and have been sucessfull with simpler calls, but i am unsure how to get something like the following to work correctly. I have been provided what the json should look like but i am unsure how to build that out via the uri module in the body syntax.
I have also struggled to find how ansible handles nested levels in the body. from examples it looks like its just the indents. But i am not sure, if someone can help shed some light for me it would be much appreciated.
Here is what the json should look like when sent as the payload:
{
“data”: {
“id”: “someid”,
“type”: “plugininstance”,
“attributes”: {
“configurationAttributes”: [
{
“name”: “accesskey”,
“singlevalue”: “key1”
},
{
“name”: “secretkey”,
“singlevalue”: “skey2”
},
{
“name”: “regions”,
“multivalue”: [
“us-east-1”,
“us-east-2”,
“us-west-1”,
“us-west-2”
]
}
]
}
}
}
`