Skip to content
\n

using

\n
exec azure.resource_graph.resources.resources\n@data__query = \n'{\n  \"query\": \"Resources | project id, name, type, location, tags | limit 3\"\n}';\n
\n

But I am getting the error

\n
HTTP response error.  Status code 400.  Detail: { \"httpError\": { \"statusCode\": 400, \"body\": {\"error\":{\"code\":\"BadRequest\",\"details\":[{\"code\":\"RequestDeserializationFailure\",\"message\":\"An error occurred when deserializing the request body: Unexpected character encountered while parsing value: {. Path 'query', line 1, position 10..\"}],\"message\":\"Please provide below info when asking for support: timestamp = 2024-06-02T11:34:03.2700414Z, correlationId = 72de4bdd-bdfa-4113-9d8a-c658019f7c3e.\"}}  } }\n
\n

I tried multiple variations of the query, provided required parameters as mentioned here. Any help is appreciated.

","upvoteCount":1,"answerCount":11,"acceptedAnswer":{"@type":"Answer","text":"

try:

\n
stackql  >>SELECT * FROM\nstackql  >>azure.resource_graph.graph_resources\nstackql  >>WHERE data__query =\nstackql  >>\"spotresources\nstackql  >>| where type == 'microsoft.compute/skuspotevictionrate/location'\nstackql  >>| where location in ('westeurope','northeurope')\nstackql  >>| project skuName=tostring(sku.name), location, evictionRate=properties.evictionRate\nstackql  >>| order by skuName\"\nstackql  >>and data__subscriptions = '[\"0123456789\"]';
","upvoteCount":0,"url":"https://github.com/stackql/stackql/discussions/422#discussioncomment-9658171"}}}
Discussion options

You must be logged in to vote

try:

stackql  >>SELECT * FROM
stackql  >>azure.resource_graph.graph_resources
stackql  >>WHERE data__query =
stackql  >>"spotresources
stackql  >>| where type == 'microsoft.compute/skuspotevictionrate/location'
stackql  >>| where location in ('westeurope','northeurope')
stackql  >>| project skuName=tostring(sku.name), location, evictionRate=properties.evictionRate
stackql  >>| order by skuName"
stackql  >>and data__subscriptions = '["0123456789"]';

Replies: 11 comments 19 replies

Comment options

You must be logged in to vote
1 reply
@vwake7
Comment options

Comment options

You must be logged in to vote
2 replies
@vwake7
Comment options

@jeffreyaven
Comment options

Comment options

You must be logged in to vote
5 replies
@vwake7
Comment options

@jeffreyaven
Comment options

@vwake7
Comment options

@jeffreyaven
Comment options

Answer selected by vwake7
@vwake7
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@vwake7
Comment options

@jeffreyaven
Comment options

@vwake7
Comment options

Comment options

You must be logged in to vote
1 reply
@vwake7
Comment options

Comment options

You must be logged in to vote
1 reply
@vwake7
Comment options

Comment options

You must be logged in to vote
1 reply
@vwake7
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jeffreyaven
Comment options

@jeffreyaven
Comment options

@vwake7
Comment options

@vwake7
Comment options

@jeffreyaven
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants