lots

package
v0.20221207.1121859 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/lots Documentation

The lots SDK allows for interaction with the Azure Resource Manager Service consumption (API Version 2019-10-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/2019-10-01/lots"

Client Initialization

client := lots.NewLotsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LotsClient.List

ctx := context.TODO()
id := lots.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLotSource

func PossibleValuesForLotSource() []string

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,omitempty"`
}

type AmountWithExchangeRate

type AmountWithExchangeRate struct {
	Currency          *string  `json:"currency,omitempty"`
	ExchangeRate      *float64 `json:"exchangeRate,omitempty"`
	ExchangeRateMonth *float64 `json:"exchangeRateMonth,omitempty"`
	Value             *float64 `json:"value,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []LotSummary
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]LotSummary
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type LotProperties

type LotProperties struct {
	BillingCurrency                 *string                 `json:"billingCurrency,omitempty"`
	ClosedBalance                   *Amount                 `json:"closedBalance,omitempty"`
	ClosedBalanceInBillingCurrency  *AmountWithExchangeRate `json:"closedBalanceInBillingCurrency,omitempty"`
	CreditCurrency                  *string                 `json:"creditCurrency,omitempty"`
	ExpirationDate                  *string                 `json:"expirationDate,omitempty"`
	OriginalAmount                  *Amount                 `json:"originalAmount,omitempty"`
	OriginalAmountInBillingCurrency *AmountWithExchangeRate `json:"originalAmountInBillingCurrency,omitempty"`
	PoNumber                        *string                 `json:"poNumber,omitempty"`
	Reseller                        *Reseller               `json:"reseller,omitempty"`
	Source                          *LotSource              `json:"source,omitempty"`
	StartDate                       *string                 `json:"startDate,omitempty"`
}

func (*LotProperties) GetExpirationDateAsTime

func (o *LotProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*LotProperties) GetStartDateAsTime

func (o *LotProperties) GetStartDateAsTime() (*time.Time, error)

func (*LotProperties) SetExpirationDateAsTime

func (o *LotProperties) SetExpirationDateAsTime(input time.Time)

func (*LotProperties) SetStartDateAsTime

func (o *LotProperties) SetStartDateAsTime(input time.Time)

type LotSource

type LotSource string
const (
	LotSourcePromotionalCredit LotSource = "PromotionalCredit"
	LotSourcePurchasedCredit   LotSource = "PurchasedCredit"
)

type LotSummary

type LotSummary struct {
	ETag       *string        `json:"eTag,omitempty"`
	Id         *string        `json:"id,omitempty"`
	Name       *string        `json:"name,omitempty"`
	Properties *LotProperties `json:"properties,omitempty"`
	Type       *string        `json:"type,omitempty"`
}

type LotSummaryOperationPredicate

type LotSummaryOperationPredicate struct {
	ETag *string
	Id   *string
	Name *string
	Type *string
}

func (LotSummaryOperationPredicate) Matches

func (p LotSummaryOperationPredicate) Matches(input LotSummary) bool

type LotsClient

type LotsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewLotsClientWithBaseURI

func NewLotsClientWithBaseURI(endpoint string) LotsClient

func (LotsClient) List

List ...

func (LotsClient) ListComplete

func (c LotsClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error)

ListComplete retrieves all of the results into a single object

func (LotsClient) ListCompleteMatchingPredicate

func (c LotsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate LotSummaryOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type Reseller

type Reseller struct {
	ResellerDescription *string `json:"resellerDescription,omitempty"`
	ResellerId          *string `json:"resellerId,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL