lots

package
v0.20240320.1144505 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 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-helpers/resourcemanager/commonids"
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 := commonids.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 {
	LatestHttpResponse *http.Response
	Items              []LotSummary
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LotSummary
}

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"
)

func (*LotSource) UnmarshalJSON

func (s *LotSource) UnmarshalJSON(bytes []byte) error

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 *resourcemanager.Client
}

func NewLotsClientWithBaseURI

func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error)

func (LotsClient) List

func (c LotsClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error)

List ...

func (LotsClient) ListComplete

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

ListComplete retrieves all the results into a single object

func (LotsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies 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