forecast

package
v0.20230807.1085124 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/forecast Documentation

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

Client Initialization

client := forecast.NewForecastClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ForecastClient.ExternalCloudProviderUsage

ctx := context.TODO()
id := forecast.NewExternalCloudProviderTypeID("externalBillingAccounts", "externalCloudProviderIdValue")

payload := forecast.ForecastDefinition{
	// ...
}


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

Example Usage: ForecastClient.Usage

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

payload := forecast.ForecastDefinition{
	// ...
}


read, err := client.Usage(ctx, id, payload, forecast.DefaultUsageOperationOptions())
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 PossibleValuesForExternalCloudProviderType

func PossibleValuesForExternalCloudProviderType() []string

func PossibleValuesForForecastOperatorType

func PossibleValuesForForecastOperatorType() []string

func PossibleValuesForForecastTimeframe

func PossibleValuesForForecastTimeframe() []string

func PossibleValuesForForecastType

func PossibleValuesForForecastType() []string

func PossibleValuesForFunctionName

func PossibleValuesForFunctionName() []string

func PossibleValuesForFunctionType

func PossibleValuesForFunctionType() []string

func PossibleValuesForGranularityType

func PossibleValuesForGranularityType() []string

func ValidateExternalCloudProviderTypeID

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

ValidateExternalCloudProviderTypeID checks that 'input' can be parsed as a External Cloud Provider Type ID

Types

type ExternalCloudProviderType

type ExternalCloudProviderType string
const (
	ExternalCloudProviderTypeExternalBillingAccounts ExternalCloudProviderType = "externalBillingAccounts"
	ExternalCloudProviderTypeExternalSubscriptions   ExternalCloudProviderType = "externalSubscriptions"
)

func (*ExternalCloudProviderType) UnmarshalJSON

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

type ExternalCloudProviderTypeId

type ExternalCloudProviderTypeId struct {
	ExternalCloudProviderType ExternalCloudProviderType
	ExternalCloudProviderId   string
}

ExternalCloudProviderTypeId is a struct representing the Resource ID for a External Cloud Provider Type

func NewExternalCloudProviderTypeID

func NewExternalCloudProviderTypeID(externalCloudProviderType ExternalCloudProviderType, externalCloudProviderId string) ExternalCloudProviderTypeId

NewExternalCloudProviderTypeID returns a new ExternalCloudProviderTypeId struct

func ParseExternalCloudProviderTypeID

func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeId, error)

ParseExternalCloudProviderTypeID parses 'input' into a ExternalCloudProviderTypeId

func ParseExternalCloudProviderTypeIDInsensitively

func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloudProviderTypeId, error)

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

func (ExternalCloudProviderTypeId) ID

ID returns the formatted External Cloud Provider Type ID

func (ExternalCloudProviderTypeId) Segments

Segments returns a slice of Resource ID Segments which comprise this External Cloud Provider Type ID

func (ExternalCloudProviderTypeId) String

func (id ExternalCloudProviderTypeId) String() string

String returns a human-readable description of this External Cloud Provider Type ID

type ExternalCloudProviderUsageOperationOptions

type ExternalCloudProviderUsageOperationOptions struct {
	Filter *string
}

func DefaultExternalCloudProviderUsageOperationOptions

func DefaultExternalCloudProviderUsageOperationOptions() ExternalCloudProviderUsageOperationOptions

func (ExternalCloudProviderUsageOperationOptions) ToHeaders

func (ExternalCloudProviderUsageOperationOptions) ToOData

func (ExternalCloudProviderUsageOperationOptions) ToQuery

type ExternalCloudProviderUsageOperationResponse

type ExternalCloudProviderUsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ForecastResult
}

type ForecastAggregation

type ForecastAggregation struct {
	Function FunctionType `json:"function"`
	Name     FunctionName `json:"name"`
}

type ForecastClient

type ForecastClient struct {
	Client *resourcemanager.Client
}

func NewForecastClientWithBaseURI

func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error)

func (ForecastClient) ExternalCloudProviderUsage

ExternalCloudProviderUsage ...

func (ForecastClient) Usage

Usage ...

type ForecastColumn

type ForecastColumn struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type ForecastComparisonExpression

type ForecastComparisonExpression struct {
	Name     string               `json:"name"`
	Operator ForecastOperatorType `json:"operator"`
	Values   []string             `json:"values"`
}

type ForecastDataset

type ForecastDataset struct {
	Aggregation   map[string]ForecastAggregation `json:"aggregation"`
	Configuration *ForecastDatasetConfiguration  `json:"configuration,omitempty"`
	Filter        *ForecastFilter                `json:"filter,omitempty"`
	Granularity   *GranularityType               `json:"granularity,omitempty"`
}

type ForecastDatasetConfiguration

type ForecastDatasetConfiguration struct {
	Columns *[]string `json:"columns,omitempty"`
}

type ForecastDefinition

type ForecastDefinition struct {
	Dataset                 ForecastDataset     `json:"dataset"`
	IncludeActualCost       *bool               `json:"includeActualCost,omitempty"`
	IncludeFreshPartialCost *bool               `json:"includeFreshPartialCost,omitempty"`
	TimePeriod              *ForecastTimePeriod `json:"timePeriod,omitempty"`
	Timeframe               ForecastTimeframe   `json:"timeframe"`
	Type                    ForecastType        `json:"type"`
}

type ForecastFilter

type ForecastFilter struct {
	And        *[]ForecastFilter             `json:"and,omitempty"`
	Dimensions *ForecastComparisonExpression `json:"dimensions,omitempty"`
	Or         *[]ForecastFilter             `json:"or,omitempty"`
	Tags       *ForecastComparisonExpression `json:"tags,omitempty"`
}

type ForecastOperatorType

type ForecastOperatorType string
const (
	ForecastOperatorTypeIn ForecastOperatorType = "In"
)

func (*ForecastOperatorType) UnmarshalJSON

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

type ForecastProperties

type ForecastProperties struct {
	Columns  *[]ForecastColumn `json:"columns,omitempty"`
	NextLink *string           `json:"nextLink,omitempty"`
	Rows     *[][]interface{}  `json:"rows,omitempty"`
}

type ForecastResult

type ForecastResult struct {
	ETag       *string             `json:"eTag,omitempty"`
	Id         *string             `json:"id,omitempty"`
	Location   *string             `json:"location,omitempty"`
	Name       *string             `json:"name,omitempty"`
	Properties *ForecastProperties `json:"properties,omitempty"`
	Sku        *string             `json:"sku,omitempty"`
	Tags       *map[string]string  `json:"tags,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type ForecastTimePeriod

type ForecastTimePeriod struct {
	From string `json:"from"`
	To   string `json:"to"`
}

func (*ForecastTimePeriod) GetFromAsTime

func (o *ForecastTimePeriod) GetFromAsTime() (*time.Time, error)

func (*ForecastTimePeriod) GetToAsTime

func (o *ForecastTimePeriod) GetToAsTime() (*time.Time, error)

func (*ForecastTimePeriod) SetFromAsTime

func (o *ForecastTimePeriod) SetFromAsTime(input time.Time)

func (*ForecastTimePeriod) SetToAsTime

func (o *ForecastTimePeriod) SetToAsTime(input time.Time)

type ForecastTimeframe

type ForecastTimeframe string
const (
	ForecastTimeframeCustom ForecastTimeframe = "Custom"
)

func (*ForecastTimeframe) UnmarshalJSON

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

type ForecastType

type ForecastType string
const (
	ForecastTypeActualCost    ForecastType = "ActualCost"
	ForecastTypeAmortizedCost ForecastType = "AmortizedCost"
	ForecastTypeUsage         ForecastType = "Usage"
)

func (*ForecastType) UnmarshalJSON

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

type FunctionName

type FunctionName string
const (
	FunctionNameCost          FunctionName = "Cost"
	FunctionNameCostUSD       FunctionName = "CostUSD"
	FunctionNamePreTaxCost    FunctionName = "PreTaxCost"
	FunctionNamePreTaxCostUSD FunctionName = "PreTaxCostUSD"
)

func (*FunctionName) UnmarshalJSON

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

type FunctionType

type FunctionType string
const (
	FunctionTypeSum FunctionType = "Sum"
)

func (*FunctionType) UnmarshalJSON

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

type GranularityType

type GranularityType string
const (
	GranularityTypeDaily GranularityType = "Daily"
)

func (*GranularityType) UnmarshalJSON

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

type UsageOperationOptions

type UsageOperationOptions struct {
	Filter *string
}

func DefaultUsageOperationOptions

func DefaultUsageOperationOptions() UsageOperationOptions

func (UsageOperationOptions) ToHeaders

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

func (UsageOperationOptions) ToOData

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

func (UsageOperationOptions) ToQuery

type UsageOperationResponse

type UsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ForecastResult
}

Jump to

Keyboard shortcuts

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