pricesheets

package
v0.20240320.1105218 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: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/pricesheets Documentation

The pricesheets SDK allows for interaction with the Azure Resource Manager Service costmanagement (API Version 2023-11-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/costmanagement/2023-11-01/pricesheets"

Client Initialization

client := pricesheets.NewPriceSheetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PriceSheetsClient.PriceSheetDownloadByBillingAccount

ctx := context.TODO()
id := pricesheets.NewBillingPeriodID("billingAccountIdValue", "billingPeriodValue")

if err := client.PriceSheetDownloadByBillingAccountThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: PriceSheetsClient.PriceSheetDownloadByBillingProfile

ctx := context.TODO()
id := pricesheets.NewBillingProfileID("billingAccountIdValue", "billingProfileIdValue")

if err := client.PriceSheetDownloadByBillingProfileThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: PriceSheetsClient.PriceSheetDownloadByInvoice

ctx := context.TODO()
id := pricesheets.NewInvoiceID("billingAccountValue", "billingProfileValue", "invoiceValue")

if err := client.PriceSheetDownloadByInvoiceThenPoll(ctx, id); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOperationStatusType

func PossibleValuesForOperationStatusType() []string

func ValidateBillingPeriodID

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

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

func ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateInvoiceID

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

ValidateInvoiceID checks that 'input' can be parsed as a Invoice ID

Types

type BillingPeriodId

type BillingPeriodId struct {
	BillingAccountId  string
	BillingPeriodName string
}

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

func NewBillingPeriodID

func NewBillingPeriodID(billingAccountId 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) FromParseResult

func (id *BillingPeriodId) FromParseResult(input resourceids.ParseResult) error

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 BillingProfileId

type BillingProfileId struct {
	BillingAccountId string
	BillingProfileId string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountId string, billingProfileId string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (*BillingProfileId) FromParseResult

func (id *BillingProfileId) FromParseResult(input resourceids.ParseResult) error

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

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

func (BillingProfileId) String

func (id BillingProfileId) String() string

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

type DownloadUrl

type DownloadUrl struct {
	DownloadUrl *string `json:"downloadUrl,omitempty"`
	ExpiryTime  *string `json:"expiryTime,omitempty"`
	ValidTill   *string `json:"validTill,omitempty"`
}

func (*DownloadUrl) GetExpiryTimeAsTime

func (o *DownloadUrl) GetExpiryTimeAsTime() (*time.Time, error)

func (*DownloadUrl) GetValidTillAsTime

func (o *DownloadUrl) GetValidTillAsTime() (*time.Time, error)

func (*DownloadUrl) SetExpiryTimeAsTime

func (o *DownloadUrl) SetExpiryTimeAsTime(input time.Time)

func (*DownloadUrl) SetValidTillAsTime

func (o *DownloadUrl) SetValidTillAsTime(input time.Time)

type EAPriceSheetProperties

type EAPriceSheetProperties struct {
	BasePrice          *string  `json:"basePrice,omitempty"`
	CurrencyCode       *string  `json:"currencyCode,omitempty"`
	EffectiveEndDate   *string  `json:"effectiveEndDate,omitempty"`
	EffectiveStartDate *string  `json:"effectiveStartDate,omitempty"`
	EnrollmentNumber   *string  `json:"enrollmentNumber,omitempty"`
	IncludedQuantity   *string  `json:"includedQuantity,omitempty"`
	MarketPrice        *string  `json:"marketPrice,omitempty"`
	MeterCategory      *string  `json:"meterCategory,omitempty"`
	MeterId            *string  `json:"meterId,omitempty"`
	MeterName          *string  `json:"meterName,omitempty"`
	MeterRegion        *string  `json:"meterRegion,omitempty"`
	MeterSubCategory   *string  `json:"meterSubCategory,omitempty"`
	MeterType          *string  `json:"meterType,omitempty"`
	PartNumber         *string  `json:"partNumber,omitempty"`
	PriceType          *string  `json:"priceType,omitempty"`
	Product            *string  `json:"product,omitempty"`
	ProductId          *string  `json:"productId,omitempty"`
	ServiceFamily      *float64 `json:"serviceFamily,omitempty"`
	SkuId              *string  `json:"skuId,omitempty"`
	Term               *string  `json:"term,omitempty"`
	UnitOfMeasure      *string  `json:"unitOfMeasure,omitempty"`
	UnitPrice          *string  `json:"unitPrice,omitempty"`
}

func (*EAPriceSheetProperties) GetEffectiveEndDateAsTime

func (o *EAPriceSheetProperties) GetEffectiveEndDateAsTime() (*time.Time, error)

func (*EAPriceSheetProperties) GetEffectiveStartDateAsTime

func (o *EAPriceSheetProperties) GetEffectiveStartDateAsTime() (*time.Time, error)

func (*EAPriceSheetProperties) SetEffectiveEndDateAsTime

func (o *EAPriceSheetProperties) SetEffectiveEndDateAsTime(input time.Time)

func (*EAPriceSheetProperties) SetEffectiveStartDateAsTime

func (o *EAPriceSheetProperties) SetEffectiveStartDateAsTime(input time.Time)

type EAPricesheetDownloadProperties

type EAPricesheetDownloadProperties struct {
	DownloadFileProperties *EAPriceSheetProperties `json:"downloadFileProperties,omitempty"`
	DownloadUrl            *string                 `json:"downloadUrl,omitempty"`
	ValidTill              *string                 `json:"validTill,omitempty"`
}

func (*EAPricesheetDownloadProperties) GetValidTillAsTime

func (o *EAPricesheetDownloadProperties) GetValidTillAsTime() (*time.Time, error)

func (*EAPricesheetDownloadProperties) SetValidTillAsTime

func (o *EAPricesheetDownloadProperties) SetValidTillAsTime(input time.Time)

type InvoiceId

type InvoiceId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceName        string
}

InvoiceId is a struct representing the Resource ID for a Invoice

func NewInvoiceID

func NewInvoiceID(billingAccountName string, billingProfileName string, invoiceName string) InvoiceId

NewInvoiceID returns a new InvoiceId struct

func ParseInvoiceID

func ParseInvoiceID(input string) (*InvoiceId, error)

ParseInvoiceID parses 'input' into a InvoiceId

func ParseInvoiceIDInsensitively

func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error)

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

func (*InvoiceId) FromParseResult

func (id *InvoiceId) FromParseResult(input resourceids.ParseResult) error

func (InvoiceId) ID

func (id InvoiceId) ID() string

ID returns the formatted Invoice ID

func (InvoiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Invoice ID

func (InvoiceId) String

func (id InvoiceId) String() string

String returns a human-readable description of this Invoice ID

type MCAPriceSheetProperties

type MCAPriceSheetProperties struct {
	BasePrice          *string  `json:"basePrice,omitempty"`
	BillingAccountID   *string  `json:"billingAccountID,omitempty"`
	BillingAccountName *string  `json:"billingAccountName,omitempty"`
	BillingCurrency    *string  `json:"billingCurrency,omitempty"`
	BillingProfileId   *string  `json:"billingProfileId,omitempty"`
	BillingProfileName *string  `json:"billingProfileName,omitempty"`
	Currency           *string  `json:"currency,omitempty"`
	EffectiveEndDate   *string  `json:"effectiveEndDate,omitempty"`
	EffectiveStartDate *string  `json:"effectiveStartDate,omitempty"`
	MarketPrice        *string  `json:"marketPrice,omitempty"`
	MeterCategory      *string  `json:"meterCategory,omitempty"`
	MeterName          *string  `json:"meterName,omitempty"`
	MeterRegion        *string  `json:"meterRegion,omitempty"`
	MeterSubCategory   *string  `json:"meterSubCategory,omitempty"`
	MeterType          *string  `json:"meterType,omitempty"`
	PriceType          *string  `json:"priceType,omitempty"`
	Product            *string  `json:"product,omitempty"`
	ProductId          *string  `json:"productId,omitempty"`
	ServiceFamily      *float64 `json:"serviceFamily,omitempty"`
	SkuId              *string  `json:"skuId,omitempty"`
	Term               *string  `json:"term,omitempty"`
	TierMinimumUnits   *string  `json:"tierMinimumUnits,omitempty"`
	UnitOfMeasure      *string  `json:"unitOfMeasure,omitempty"`
	UnitPrice          *string  `json:"unitPrice,omitempty"`
}

func (*MCAPriceSheetProperties) GetEffectiveEndDateAsTime

func (o *MCAPriceSheetProperties) GetEffectiveEndDateAsTime() (*time.Time, error)

func (*MCAPriceSheetProperties) GetEffectiveStartDateAsTime

func (o *MCAPriceSheetProperties) GetEffectiveStartDateAsTime() (*time.Time, error)

func (*MCAPriceSheetProperties) SetEffectiveEndDateAsTime

func (o *MCAPriceSheetProperties) SetEffectiveEndDateAsTime(input time.Time)

func (*MCAPriceSheetProperties) SetEffectiveStartDateAsTime

func (o *MCAPriceSheetProperties) SetEffectiveStartDateAsTime(input time.Time)

type OperationStatus

type OperationStatus struct {
	Properties *EAPricesheetDownloadProperties `json:"properties,omitempty"`
	Status     *OperationStatusType            `json:"status,omitempty"`
}

type OperationStatusType

type OperationStatusType string
const (
	OperationStatusTypeCompleted OperationStatusType = "Completed"
	OperationStatusTypeFailed    OperationStatusType = "Failed"
	OperationStatusTypeRunning   OperationStatusType = "Running"
)

func (*OperationStatusType) UnmarshalJSON

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

type PriceSheetDownloadByBillingAccountOperationResponse

type PriceSheetDownloadByBillingAccountOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OperationStatus
}

type PriceSheetDownloadByBillingProfileOperationResponse

type PriceSheetDownloadByBillingProfileOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PricesheetDownloadProperties
}

type PriceSheetDownloadByInvoiceOperationResponse

type PriceSheetDownloadByInvoiceOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DownloadUrl
}

type PriceSheetsClient

type PriceSheetsClient struct {
	Client *resourcemanager.Client
}

func NewPriceSheetsClientWithBaseURI

func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error)

func (PriceSheetsClient) PriceSheetDownloadByBillingAccount

func (c PriceSheetsClient) PriceSheetDownloadByBillingAccount(ctx context.Context, id BillingPeriodId) (result PriceSheetDownloadByBillingAccountOperationResponse, err error)

PriceSheetDownloadByBillingAccount ...

func (PriceSheetsClient) PriceSheetDownloadByBillingAccountThenPoll

func (c PriceSheetsClient) PriceSheetDownloadByBillingAccountThenPoll(ctx context.Context, id BillingPeriodId) error

PriceSheetDownloadByBillingAccountThenPoll performs PriceSheetDownloadByBillingAccount then polls until it's completed

func (PriceSheetsClient) PriceSheetDownloadByBillingProfile

func (c PriceSheetsClient) PriceSheetDownloadByBillingProfile(ctx context.Context, id BillingProfileId) (result PriceSheetDownloadByBillingProfileOperationResponse, err error)

PriceSheetDownloadByBillingProfile ...

func (PriceSheetsClient) PriceSheetDownloadByBillingProfileThenPoll

func (c PriceSheetsClient) PriceSheetDownloadByBillingProfileThenPoll(ctx context.Context, id BillingProfileId) error

PriceSheetDownloadByBillingProfileThenPoll performs PriceSheetDownloadByBillingProfile then polls until it's completed

func (PriceSheetsClient) PriceSheetDownloadByInvoice

func (c PriceSheetsClient) PriceSheetDownloadByInvoice(ctx context.Context, id InvoiceId) (result PriceSheetDownloadByInvoiceOperationResponse, err error)

PriceSheetDownloadByInvoice ...

func (PriceSheetsClient) PriceSheetDownloadByInvoiceThenPoll

func (c PriceSheetsClient) PriceSheetDownloadByInvoiceThenPoll(ctx context.Context, id InvoiceId) error

PriceSheetDownloadByInvoiceThenPoll performs PriceSheetDownloadByInvoice then polls until it's completed

type PricesheetDownloadProperties

type PricesheetDownloadProperties struct {
	DownloadFileProperties *MCAPriceSheetProperties `json:"downloadFileProperties,omitempty"`
	DownloadUrl            *string                  `json:"downloadUrl,omitempty"`
	ExpiryTime             *string                  `json:"expiryTime,omitempty"`
}

func (*PricesheetDownloadProperties) GetExpiryTimeAsTime

func (o *PricesheetDownloadProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*PricesheetDownloadProperties) SetExpiryTimeAsTime

func (o *PricesheetDownloadProperties) SetExpiryTimeAsTime(input time.Time)

Jump to

Keyboard shortcuts

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