azurepricesheet

package
v1.103.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader[T any] struct {
	TenantID         string
	ClientID         string
	ClientSecret     string
	BillingAccount   string
	OfferID          string
	ConvertMeterInfo func(info commerce.MeterInfo) (map[string]*T, error)
}

func (*Downloader[T]) GetPricing

func (d *Downloader[T]) GetPricing(ctx context.Context) (map[string]*T, error)

type PriceSheetClient

type PriceSheetClient struct {
	// contains filtered or unexported fields
}

PriceSheetClient contains the methods for the PriceSheet group. Don't use this type directly, use NewPriceSheetClient() instead.

func NewClient

func NewClient(billingAccountID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PriceSheetClient, error)

NewClient creates a new instance of PriceSheetClient with the specified values. billingAccountId - Azure Billing Account ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PriceSheetClient) BeginDownloadByBillingPeriod

func (client *PriceSheetClient) BeginDownloadByBillingPeriod(ctx context.Context, billingPeriodName string) (*runtime.Poller[PriceSheetClientDownloadResponse], error)

BeginDownloadByBillingPeriod - requests a pricesheet for a specific billing period `yyyymm`. Returns a Poller that will provide the download URL when the pricesheet is ready. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-06-01 billingPeriodName - Billing Period Name `yyyymm`.

type PriceSheetClientDownloadProperties

type PriceSheetClientDownloadProperties struct {
	DownloadURL string `json:"downloadUrl"`
	ValidTill   string `json:"validTill"`
}

type PriceSheetClientDownloadResponse

type PriceSheetClientDownloadResponse struct {
	ID         string                             `json:"id"`
	Name       string                             `json:"name"`
	StartTime  time.Time                          `json:"startTime"`
	EndTime    time.Time                          `json:"endTime"`
	Status     string                             `json:"status"`
	Properties PriceSheetClientDownloadProperties `json:"properties"`
}

Jump to

Keyboard shortcuts

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