package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/lots
Documentation
The lots
SDK allows for interaction with the Azure Resource Manager Service consumption
(API Version 2022-09-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/lots"
Client Initialization
client := lots.NewLotsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: LotsClient.ListByBillingAccount
ctx := context.TODO()
id := lots.NewBillingAccountID("billingAccountIdValue")
// alternatively `client.ListByBillingAccount(ctx, id, lots.DefaultListByBillingAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingAccountComplete(ctx, id, lots.DefaultListByBillingAccountOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: LotsClient.ListByBillingProfile
ctx := context.TODO()
id := lots.NewBillingProfileID("billingAccountIdValue", "billingProfileIdValue")
// alternatively `client.ListByBillingProfile(ctx, id)` can be used to do batched pagination
items, err := client.ListByBillingProfileComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: LotsClient.ListByCustomer
ctx := context.TODO()
id := lots.NewCustomerID("billingAccountIdValue", "customerIdValue")
// alternatively `client.ListByCustomer(ctx, id, lots.DefaultListByCustomerOperationOptions())` can be used to do batched pagination
items, err := client.ListByCustomerComplete(ctx, id, lots.DefaultListByCustomerOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}