Comments (4)
I found a fix, put limit lenght in properties where strlen(properties) < 123000
$Resource = az graph query -q "resources | where subscriptionId == '$SUBID' | where strlen(properties) < 123000 | order by id asc" --skip $Limit --first 1000 --output json --only-show-errors | ConvertFrom-Json
or
az graph query -q "Resources | where strlen(properties.definition.actions) < 120000" -o json
the best way to fix it with project-away
https://docs.microsoft.com/en-us/azure/data-explorer/kql-quick-reference
But Microsoft should fix a bug erro.
az graph query -q "Resources | project-away properties.definition.actions" -o json
from ari.
Deep in looking!
I don't know the reason ,in line 302 get empty variable! When run outside the script, extracted json has null id values and got Erro when run ConvertFrom-Json
, in [].data has null values in id.
Line 302
$Resource = az graph query -q "resources | where subscriptionId == '$SUBID' | order by id asc" --skip $Limit --first 1000 --output json --only-show-errors | ConvertFrom-Json
PS Version
PS C:\Users\AZ_test> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.1023
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1023
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Sample to check
az graph query -q "Resources | where name matches regex '[A-Za-z 0-9]' " -o json | ConvertFrom-Json
ConvertFrom-Json : Cannot process argument because the value of argument "name" is not valid. Change the value of the "name" argument and run the operation again.
At line:1 char:84
- ... where name matches regex '[A-Za-z 0-9]' " -o json | ConvertFrom-Json
-
- CategoryInfo : InvalidArgument: (:) [ConvertFrom-Json], PSArgumentException
FullyQualifiedErrorId
: Argument,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
az graph query -q "Resources | project name, type | where name matches regex '[íãõóêéç]' " -o json | ConvertFrom-Json
@ClaudioMerola
I guess, you should include one kind filter and pick what fields will need, in project
parameters , the extraction will be cleaner.
from ari.
Hi,
Yea, very strange behavior.
Thanks for the fix, I included it in the version 1.4.11.
Thanks
from ari.
Thanks @ClaudioMerola !
it is not perfect because exclude resources witch big strings in properties.definition.actions, like big Logic Apps. In my company it was 3 from 400!
from ari.
Related Issues (20)
- Feature Request: Add Support for StateRAMP/FedRAMP Inventory format HOT 5
- Get-AzContext does not gather all the subscriptions HOT 3
- It does not export if I include the -ResourceGroup flag. HOT 2
- ARI generates report after almost 1.5hrs HOT 2
- IP addressess in wrong format HOT 4
- Cannot open XML file HOT 2
- Visio diagram not being generated HOT 14
- Overlapping diagrams HOT 5
- IP address strings are converted in numbers HOT 1
- Resrevations Request HOT 2
- "Jobs Still Running: 1" gets stuck HOT 8
- ThreadJob NotStarted HOT 8
- Az Cloud Shell OK, but Powershell (even with Azure Cli installed) stalls HOT 3
- ARI Script stalling out HOT 6
- Please remove the function that delete Excel files in the specified report directory HOT 5
- AVD / Windows 365 separated resources HOT 2
- Automation Account Problem HOT 3
- Add List Reserved Intances resources with their use ? HOT 1
- Trying to use Service Principal Authentication Method in a wrong way HOT 3
- Diagram HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ari.