Documentation
¶
Overview ¶
Package rg provides a simple interface to run Azure Resource Graph queries and unmarshall results into custom types. It is based on the modified official Azure SDK for Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec executes Azure Resource Graph query and returns rows from the result unmarshalled as an array of T.
This function uses shared cached Azure Token Credential obtained by calling official Azure SDK for Go function azidentity.NewDefaultAzureCredential.
Example:
type record struct { Name string Type string } items, err := rg.Exec(context.Background, "resources | project name, type | order by name, type", nil) if err != nil { panic(err) } for _, item := range items { fmt.printf("%s, %s\n", item.Name, item.Type) }
Types ¶
type ExecOptions ¶
type ExecOptions struct { }
ExecOptions is reserved for future expandability, e.g. providing subscription list.
Click to show internal directories.
Click to hide internal directories.