How it works...
RESTful APIs provide uniform access to data, regardless of the underlying infrastructure. In PowerShell Core, Invoke-RestMethod is the single cmdlet you need to access them all. With Azure in particular, all resources inside your subscription can easily be accessed by providing the subscription ID and the resource API endpoint in the URL.
This recipe showed you how you can interact with Azure through the RESTful API. Explore other endpoints so that you can do things such as list all storage accounts in your subscription. You used the JSON body, as well as query parameters that are denoted by appending ?<ParameterName>=<ParameterValue>&<ParameterName2>=<Parameter2Value> to an existing URI. The ampersand character separates ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access