pricesheet

package
v0.20230412.1005112 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The pricesheet 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/pricesheet"

Client Initialization

client := pricesheet.NewPriceSheetClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PriceSheetClient.Get

ctx := context.TODO()
id := pricesheet.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

read, err := client.Get(ctx, id, pricesheet.DefaultGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PriceSheetClient.GetByBillingPeriod

ctx := context.TODO()
id := pricesheet.NewBillingPeriodID("12345678-1234-9876-4563-123456789012", "billingPeriodValue")

read, err := client.GetByBillingPeriod(ctx, id, pricesheet.DefaultGetByBillingPeriodOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBillingPeriodID

func ValidateBillingPeriodID(input interface{}, key string) (warnings []string, errors []error)

ValidateBillingPeriodID checks that 'input' can be parsed as a Billing Period ID

Types

type BillingPeriodId

type BillingPeriodId struct {
	SubscriptionId    string
	BillingPeriodName string
}

BillingPeriodId is a struct representing the Resource ID for a Billing Period

func NewBillingPeriodID

func NewBillingPeriodID(subscriptionId string, billingPeriodName string) BillingPeriodId

NewBillingPeriodID returns a new BillingPeriodId struct

func ParseBillingPeriodID

func ParseBillingPeriodID(input string) (*BillingPeriodId, error)

ParseBillingPeriodID parses 'input' into a BillingPeriodId

func ParseBillingPeriodIDInsensitively

func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error)

ParseBillingPeriodIDInsensitively parses 'input' case-insensitively into a BillingPeriodId note: this method should only be used for API response data and not user input

func (BillingPeriodId) ID

func (id BillingPeriodId) ID() string

ID returns the formatted Billing Period ID

func (BillingPeriodId) Segments

func (id BillingPeriodId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Billing Period ID

func (BillingPeriodId) String

func (id BillingPeriodId) String() string

String returns a human-readable description of this Billing Period ID

type GetByBillingPeriodOperationOptions

type GetByBillingPeriodOperationOptions struct {
	Expand *string
	Top    *int64
}

func DefaultGetByBillingPeriodOperationOptions

func DefaultGetByBillingPeriodOperationOptions() GetByBillingPeriodOperationOptions

func (GetByBillingPeriodOperationOptions) ToHeaders added in v0.20230411.1183115

func (GetByBillingPeriodOperationOptions) ToOData added in v0.20230411.1183115

func (GetByBillingPeriodOperationOptions) ToQuery added in v0.20230411.1183115

type GetByBillingPeriodOperationResponse

type GetByBillingPeriodOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PriceSheetResult
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
	Top    *int64
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230411.1183115

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData added in v0.20230411.1183115

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery added in v0.20230411.1183115

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PriceSheetResult
}

type MeterDetails

type MeterDetails struct {
	MeterCategory         *string  `json:"meterCategory,omitempty"`
	MeterLocation         *string  `json:"meterLocation,omitempty"`
	MeterName             *string  `json:"meterName,omitempty"`
	MeterSubCategory      *string  `json:"meterSubCategory,omitempty"`
	PretaxStandardRate    *float64 `json:"pretaxStandardRate,omitempty"`
	ServiceName           *string  `json:"serviceName,omitempty"`
	ServiceTier           *string  `json:"serviceTier,omitempty"`
	TotalIncludedQuantity *float64 `json:"totalIncludedQuantity,omitempty"`
	Unit                  *string  `json:"unit,omitempty"`
}

type PriceSheetClient

type PriceSheetClient struct {
	Client *resourcemanager.Client
}

func NewPriceSheetClientWithBaseURI

func NewPriceSheetClientWithBaseURI(api environments.Api) (*PriceSheetClient, error)

func (PriceSheetClient) Get

Get ...

func (PriceSheetClient) GetByBillingPeriod

GetByBillingPeriod ...

type PriceSheetModel

type PriceSheetModel struct {
	Download    *MeterDetails           `json:"download,omitempty"`
	NextLink    *string                 `json:"nextLink,omitempty"`
	Pricesheets *[]PriceSheetProperties `json:"pricesheets,omitempty"`
}

type PriceSheetProperties

type PriceSheetProperties struct {
	BillingPeriodId  *string       `json:"billingPeriodId,omitempty"`
	CurrencyCode     *string       `json:"currencyCode,omitempty"`
	IncludedQuantity *float64      `json:"includedQuantity,omitempty"`
	MeterDetails     *MeterDetails `json:"meterDetails,omitempty"`
	MeterId          *string       `json:"meterId,omitempty"`
	OfferId          *string       `json:"offerId,omitempty"`
	PartNumber       *string       `json:"partNumber,omitempty"`
	UnitOfMeasure    *string       `json:"unitOfMeasure,omitempty"`
	UnitPrice        *float64      `json:"unitPrice,omitempty"`
}

type PriceSheetResult

type PriceSheetResult struct {
	Etag       *string            `json:"etag,omitempty"`
	Id         *string            `json:"id,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties *PriceSheetModel   `json:"properties,omitempty"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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