14 releases (8 stable)
1.2.0 | Jan 23, 2024 |
---|---|
1.1.3 | Nov 9, 2022 |
0.1.5 | Oct 17, 2022 |
#62 in #azure
Used in az-vminfo
67KB
1.5K
SLoC
lib-vminfo
About
A small library designed to make querying detailed VM information from Azure Resource Graph as simple and painless as possible
Installation
To install and use this library, simply add it to your [dependencies]
in your Cargo.toml
[dependencies]
lib_vminfo = { version = "1.2", path = "./lib_vminfo" }
Usage
// using a local client (local file cache)
let client: LocalClient = LocalClient::new(
APP_NAME,
tenant_id,
client_id,
Some(client_secret),
vec!["sub_id1", ... "sub_idN"],
)?.login_client_credentials()?;
// get the first 100 VMs that match the provided regexp
let resp: QueryResponse = client.query_vminfo(
vec!["ubuntu-vm[0-9]+"],
true,
false,
Some(0),
Some(100),
)?;
...
License
MIT License
Copyright (c) His Majesty the King in Right of Canada, as represented by the minister responsible for Statistics Canada, 2022.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Maintainer(s)
- Ben Sykes (ben.sykes@statcan.gc.ca)
Dependencies
~8–22MB
~343K SLoC