costmanagement

package
v60.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package costmanagement implements the Azure ARM Costmanagement service API version 2020-06-01.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Costmanagement
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AccumulatedType

type AccumulatedType string

AccumulatedType enumerates the values for accumulated type.

const (
	// False ...
	False AccumulatedType = "false"
	// True ...
	True AccumulatedType = "true"
)

func PossibleAccumulatedTypeValues

func PossibleAccumulatedTypeValues() []AccumulatedType

PossibleAccumulatedTypeValues returns an array of possible values for the AccumulatedType const type.

type Alert

type Alert struct {
	autorest.Response `json:"-"`
	*AlertProperties  `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Alert an individual alert.

func (Alert) MarshalJSON

func (a Alert) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Alert.

func (*Alert) UnmarshalJSON

func (a *Alert) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Alert struct.

type AlertCategory

type AlertCategory string

AlertCategory enumerates the values for alert category.

const (
	// Billing ...
	Billing AlertCategory = "Billing"
	// Cost ...
	Cost AlertCategory = "Cost"
	// System ...
	System AlertCategory = "System"
	// Usage ...
	Usage AlertCategory = "Usage"
)

func PossibleAlertCategoryValues

func PossibleAlertCategoryValues() []AlertCategory

PossibleAlertCategoryValues returns an array of possible values for the AlertCategory const type.

type AlertCriteria

type AlertCriteria string

AlertCriteria enumerates the values for alert criteria.

const (
	// CostThresholdExceeded ...
	CostThresholdExceeded AlertCriteria = "CostThresholdExceeded"
	// CreditThresholdApproaching ...
	CreditThresholdApproaching AlertCriteria = "CreditThresholdApproaching"
	// CreditThresholdReached ...
	CreditThresholdReached AlertCriteria = "CreditThresholdReached"
	// CrossCloudCollectionError ...
	CrossCloudCollectionError AlertCriteria = "CrossCloudCollectionError"
	// CrossCloudNewDataAvailable ...
	CrossCloudNewDataAvailable AlertCriteria = "CrossCloudNewDataAvailable"
	// ForecastCostThresholdExceeded ...
	ForecastCostThresholdExceeded AlertCriteria = "ForecastCostThresholdExceeded"
	// ForecastUsageThresholdExceeded ...
	ForecastUsageThresholdExceeded AlertCriteria = "ForecastUsageThresholdExceeded"
	// GeneralThresholdError ...
	GeneralThresholdError AlertCriteria = "GeneralThresholdError"
	// InvoiceDueDateApproaching ...
	InvoiceDueDateApproaching AlertCriteria = "InvoiceDueDateApproaching"
	// InvoiceDueDateReached ...
	InvoiceDueDateReached AlertCriteria = "InvoiceDueDateReached"
	// MultiCurrency ...
	MultiCurrency AlertCriteria = "MultiCurrency"
	// QuotaThresholdApproaching ...
	QuotaThresholdApproaching AlertCriteria = "QuotaThresholdApproaching"
	// QuotaThresholdReached ...
	QuotaThresholdReached AlertCriteria = "QuotaThresholdReached"
	// UsageThresholdExceeded ...
	UsageThresholdExceeded AlertCriteria = "UsageThresholdExceeded"
)

func PossibleAlertCriteriaValues

func PossibleAlertCriteriaValues() []AlertCriteria

PossibleAlertCriteriaValues returns an array of possible values for the AlertCriteria const type.

type AlertOperator

type AlertOperator string

AlertOperator enumerates the values for alert operator.

const (
	// EqualTo ...
	EqualTo AlertOperator = "EqualTo"
	// GreaterThan ...
	GreaterThan AlertOperator = "GreaterThan"
	// GreaterThanOrEqualTo ...
	GreaterThanOrEqualTo AlertOperator = "GreaterThanOrEqualTo"
	// LessThan ...
	LessThan AlertOperator = "LessThan"
	// LessThanOrEqualTo ...
	LessThanOrEqualTo AlertOperator = "LessThanOrEqualTo"
	// None ...
	None AlertOperator = "None"
)

func PossibleAlertOperatorValues

func PossibleAlertOperatorValues() []AlertOperator

PossibleAlertOperatorValues returns an array of possible values for the AlertOperator const type.

type AlertProperties

type AlertProperties struct {
	// Definition - defines the type of alert
	Definition *AlertPropertiesDefinition `json:"definition,omitempty"`
	// Description - Alert description
	Description *string `json:"description,omitempty"`
	// Source - Source of alert. Possible values include: 'Preset', 'User'
	Source AlertSource `json:"source,omitempty"`
	// Details - Alert details
	Details *AlertPropertiesDetails `json:"details,omitempty"`
	// CostEntityID - related budget
	CostEntityID *string `json:"costEntityId,omitempty"`
	// Status - alert status. Possible values include: 'AlertStatusNone', 'AlertStatusActive', 'AlertStatusOverridden', 'AlertStatusResolved', 'AlertStatusDismissed'
	Status AlertStatus `json:"status,omitempty"`
	// CreationTime - dateTime in which alert was created
	CreationTime *string `json:"creationTime,omitempty"`
	// CloseTime - dateTime in which alert was closed
	CloseTime *string `json:"closeTime,omitempty"`
	// ModificationTime - dateTime in which alert was last modified
	ModificationTime           *string `json:"modificationTime,omitempty"`
	StatusModificationUserName *string `json:"statusModificationUserName,omitempty"`
	// StatusModificationTime - dateTime in which the alert status was last modified
	StatusModificationTime *string `json:"statusModificationTime,omitempty"`
}

AlertProperties ...

type AlertPropertiesDefinition

type AlertPropertiesDefinition struct {
	// Type - type of alert. Possible values include: 'Budget', 'Invoice', 'Credit', 'Quota', 'General', 'XCloud', 'BudgetForecast'
	Type AlertType `json:"type,omitempty"`
	// Category - Alert category. Possible values include: 'Cost', 'Usage', 'Billing', 'System'
	Category AlertCategory `json:"category,omitempty"`
	// Criteria - Criteria that triggered alert. Possible values include: 'CostThresholdExceeded', 'UsageThresholdExceeded', 'CreditThresholdApproaching', 'CreditThresholdReached', 'QuotaThresholdApproaching', 'QuotaThresholdReached', 'MultiCurrency', 'ForecastCostThresholdExceeded', 'ForecastUsageThresholdExceeded', 'InvoiceDueDateApproaching', 'InvoiceDueDateReached', 'CrossCloudNewDataAvailable', 'CrossCloudCollectionError', 'GeneralThresholdError'
	Criteria AlertCriteria `json:"criteria,omitempty"`
}

AlertPropertiesDefinition defines the type of alert

type AlertPropertiesDetails

type AlertPropertiesDetails struct {
	// TimeGrainType - Type of timegrain cadence. Possible values include: 'AlertTimeGrainTypeNone', 'AlertTimeGrainTypeMonthly', 'AlertTimeGrainTypeQuarterly', 'AlertTimeGrainTypeAnnually', 'AlertTimeGrainTypeBillingMonth', 'AlertTimeGrainTypeBillingQuarter', 'AlertTimeGrainTypeBillingAnnual'
	TimeGrainType AlertTimeGrainType `json:"timeGrainType,omitempty"`
	// PeriodStartDate - datetime of periodStartDate
	PeriodStartDate *string `json:"periodStartDate,omitempty"`
	// TriggeredBy - notificationId that triggered this alert
	TriggeredBy *string `json:"triggeredBy,omitempty"`
	// ResourceGroupFilter - array of resourceGroups to filter by
	ResourceGroupFilter *[]interface{} `json:"resourceGroupFilter,omitempty"`
	// ResourceFilter - array of resources to filter by
	ResourceFilter *[]interface{} `json:"resourceFilter,omitempty"`
	// MeterFilter - array of meters to filter by
	MeterFilter *[]interface{} `json:"meterFilter,omitempty"`
	// TagFilter - tags to filter by
	TagFilter interface{} `json:"tagFilter,omitempty"`
	// Threshold - notification threshold percentage as a decimal which activated this alert
	Threshold *decimal.Decimal `json:"threshold,omitempty"`
	// Operator - operator used to compare currentSpend with amount. Possible values include: 'None', 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo', 'LessThan', 'LessThanOrEqualTo'
	Operator AlertOperator `json:"operator,omitempty"`
	// Amount - budget threshold amount
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// Unit - unit of currency being used
	Unit *string `json:"unit,omitempty"`
	// CurrentSpend - current spend
	CurrentSpend *decimal.Decimal `json:"currentSpend,omitempty"`
	// ContactEmails - list of emails to contact
	ContactEmails *[]string `json:"contactEmails,omitempty"`
	// ContactGroups - list of action groups to broadcast to
	ContactGroups *[]string `json:"contactGroups,omitempty"`
	// ContactRoles - list of contact roles
	ContactRoles *[]string `json:"contactRoles,omitempty"`
	// OverridingAlert - overriding alert
	OverridingAlert *string `json:"overridingAlert,omitempty"`
}

AlertPropertiesDetails alert details

type AlertSource

type AlertSource string

AlertSource enumerates the values for alert source.

const (
	// Preset ...
	Preset AlertSource = "Preset"
	// User ...
	User AlertSource = "User"
)

func PossibleAlertSourceValues

func PossibleAlertSourceValues() []AlertSource

PossibleAlertSourceValues returns an array of possible values for the AlertSource const type.

type AlertStatus

type AlertStatus string

AlertStatus enumerates the values for alert status.

const (
	// AlertStatusActive ...
	AlertStatusActive AlertStatus = "Active"
	// AlertStatusDismissed ...
	AlertStatusDismissed AlertStatus = "Dismissed"
	// AlertStatusNone ...
	AlertStatusNone AlertStatus = "None"
	// AlertStatusOverridden ...
	AlertStatusOverridden AlertStatus = "Overridden"
	// AlertStatusResolved ...
	AlertStatusResolved AlertStatus = "Resolved"
)

func PossibleAlertStatusValues

func PossibleAlertStatusValues() []AlertStatus

PossibleAlertStatusValues returns an array of possible values for the AlertStatus const type.

type AlertTimeGrainType

type AlertTimeGrainType string

AlertTimeGrainType enumerates the values for alert time grain type.

const (
	// AlertTimeGrainTypeAnnually ...
	AlertTimeGrainTypeAnnually AlertTimeGrainType = "Annually"
	// AlertTimeGrainTypeBillingAnnual ...
	AlertTimeGrainTypeBillingAnnual AlertTimeGrainType = "BillingAnnual"
	// AlertTimeGrainTypeBillingMonth ...
	AlertTimeGrainTypeBillingMonth AlertTimeGrainType = "BillingMonth"
	// AlertTimeGrainTypeBillingQuarter ...
	AlertTimeGrainTypeBillingQuarter AlertTimeGrainType = "BillingQuarter"
	// AlertTimeGrainTypeMonthly ...
	AlertTimeGrainTypeMonthly AlertTimeGrainType = "Monthly"
	// AlertTimeGrainTypeNone ...
	AlertTimeGrainTypeNone AlertTimeGrainType = "None"
	// AlertTimeGrainTypeQuarterly ...
	AlertTimeGrainTypeQuarterly AlertTimeGrainType = "Quarterly"
)

func PossibleAlertTimeGrainTypeValues

func PossibleAlertTimeGrainTypeValues() []AlertTimeGrainType

PossibleAlertTimeGrainTypeValues returns an array of possible values for the AlertTimeGrainType const type.

type AlertType

type AlertType string

AlertType enumerates the values for alert type.

const (
	// Budget ...
	Budget AlertType = "Budget"
	// BudgetForecast ...
	BudgetForecast AlertType = "BudgetForecast"
	// Credit ...
	Credit AlertType = "Credit"
	// General ...
	General AlertType = "General"
	// Invoice ...
	Invoice AlertType = "Invoice"
	// Quota ...
	Quota AlertType = "Quota"
	// XCloud ...
	XCloud AlertType = "xCloud"
)

func PossibleAlertTypeValues

func PossibleAlertTypeValues() []AlertType

PossibleAlertTypeValues returns an array of possible values for the AlertType const type.

type AlertsClient

type AlertsClient struct {
	BaseClient
}

AlertsClient is the client for the Alerts methods of the Costmanagement service.

func NewAlertsClient

func NewAlertsClient(subscriptionID string) AlertsClient

NewAlertsClient creates an instance of the AlertsClient client.

func NewAlertsClientWithBaseURI

func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient

NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AlertsClient) Dismiss

func (client AlertsClient) Dismiss(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload) (result Alert, err error)

Dismiss dismisses the specified alert Parameters: scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. alertID - alert ID parameters - parameters supplied to the Dismiss Alert operation.

func (AlertsClient) DismissPreparer

func (client AlertsClient) DismissPreparer(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload) (*http.Request, error)

DismissPreparer prepares the Dismiss request.

func (AlertsClient) DismissResponder

func (client AlertsClient) DismissResponder(resp *http.Response) (result Alert, err error)

DismissResponder handles the response to the Dismiss request. The method always closes the http.Response Body.

func (AlertsClient) DismissSender

func (client AlertsClient) DismissSender(req *http.Request) (*http.Response, error)

DismissSender sends the Dismiss request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) Get

func (client AlertsClient) Get(ctx context.Context, scope string, alertID string) (result Alert, err error)

Get gets the alert for the scope by alert ID. Parameters: scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. alertID - alert ID

func (AlertsClient) GetPreparer

func (client AlertsClient) GetPreparer(ctx context.Context, scope string, alertID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (AlertsClient) GetResponder

func (client AlertsClient) GetResponder(resp *http.Response) (result Alert, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (AlertsClient) GetSender

func (client AlertsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) List

func (client AlertsClient) List(ctx context.Context, scope string) (result AlertsResult, err error)

List lists the alerts for scope defined. Parameters: scope - the scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

func (AlertsClient) ListExternal

func (client AlertsClient) ListExternal(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string) (result AlertsResult, err error)

ListExternal lists the Alerts for external cloud provider type defined. Parameters: externalCloudProviderType - the external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.

func (AlertsClient) ListExternalPreparer

func (client AlertsClient) ListExternalPreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string) (*http.Request, error)

ListExternalPreparer prepares the ListExternal request.

func (AlertsClient) ListExternalResponder

func (client AlertsClient) ListExternalResponder(resp *http.Response) (result AlertsResult, err error)

ListExternalResponder handles the response to the ListExternal request. The method always closes the http.Response Body.

func (AlertsClient) ListExternalSender

func (client AlertsClient) ListExternalSender(req *http.Request) (*http.Response, error)

ListExternalSender sends the ListExternal request. The method will close the http.Response Body if it receives an error.

func (AlertsClient) ListPreparer

func (client AlertsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)

ListPreparer prepares the List request.

func (AlertsClient) ListResponder

func (client AlertsClient) ListResponder(resp *http.Response) (result AlertsResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (AlertsClient) ListSender

func (client AlertsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type AlertsResult

type AlertsResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; List of alerts.
	Value *[]Alert `json:"value,omitempty"`
	// NextLink - READ-ONLY; URL to get the next set of alerts results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

AlertsResult result of alerts.

func (AlertsResult) MarshalJSON

func (ar AlertsResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertsResult.

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Costmanagement.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type ChartType

type ChartType string

ChartType enumerates the values for chart type.

const (
	// Area ...
	Area ChartType = "Area"
	// GroupedColumn ...
	GroupedColumn ChartType = "GroupedColumn"
	// Line ...
	Line ChartType = "Line"
	// StackedColumn ...
	StackedColumn ChartType = "StackedColumn"
	// Table ...
	Table ChartType = "Table"
)

func PossibleChartTypeValues

func PossibleChartTypeValues() []ChartType

PossibleChartTypeValues returns an array of possible values for the ChartType const type.

type CommonExportProperties

type CommonExportProperties struct {
	// Format - The format of the export being delivered. Currently only 'Csv' is supported. Possible values include: 'Csv'
	Format FormatType `json:"format,omitempty"`
	// DeliveryInfo - Has delivery information for the export.
	DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"`
	// Definition - Has the definition for the export.
	Definition *ExportDefinition `json:"definition,omitempty"`
	// RunHistory - If requested, has the most recent execution history for the export.
	RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"`
	// NextRunTimeEstimate - READ-ONLY; If the export has an active schedule, provides an estimate of the next execution time.
	NextRunTimeEstimate *date.Time `json:"nextRunTimeEstimate,omitempty"`
}

CommonExportProperties the common properties of the export.

func (CommonExportProperties) MarshalJSON

func (cep CommonExportProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CommonExportProperties.

type Dimension

type Dimension struct {
	*DimensionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Dimension ...

func (Dimension) MarshalJSON

func (d Dimension) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Dimension.

func (*Dimension) UnmarshalJSON

func (d *Dimension) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Dimension struct.

type DimensionProperties

type DimensionProperties struct {
	// Description - READ-ONLY; Dimension description.
	Description *string `json:"description,omitempty"`
	// FilterEnabled - READ-ONLY; Filter enabled.
	FilterEnabled *bool `json:"filterEnabled,omitempty"`
	// GroupingEnabled - READ-ONLY; Grouping enabled.
	GroupingEnabled *bool     `json:"groupingEnabled,omitempty"`
	Data            *[]string `json:"data,omitempty"`
	// Total - READ-ONLY; Total number of data for the dimension.
	Total *int32 `json:"total,omitempty"`
	// Category - READ-ONLY; Dimension category.
	Category *string `json:"category,omitempty"`
	// UsageStart - READ-ONLY; Usage start.
	UsageStart *date.Time `json:"usageStart,omitempty"`
	// UsageEnd - READ-ONLY; Usage end.
	UsageEnd *date.Time `json:"usageEnd,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

DimensionProperties ...

func (DimensionProperties) MarshalJSON

func (dp DimensionProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DimensionProperties.

type DimensionsClient

type DimensionsClient struct {
	BaseClient
}

DimensionsClient is the client for the Dimensions methods of the Costmanagement service.

func NewDimensionsClient

func NewDimensionsClient(subscriptionID string) DimensionsClient

NewDimensionsClient creates an instance of the DimensionsClient client.

func NewDimensionsClientWithBaseURI

func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient

NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (DimensionsClient) ByExternalCloudProviderType

func (client DimensionsClient) ByExternalCloudProviderType(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, filter string, expand string, skiptoken string, top *int32) (result DimensionsListResult, err error)

ByExternalCloudProviderType lists the dimensions by the external cloud provider type. Parameters: externalCloudProviderType - the external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. filter - may be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. expand - may be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N dimension data.

func (DimensionsClient) ByExternalCloudProviderTypePreparer

func (client DimensionsClient) ByExternalCloudProviderTypePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, filter string, expand string, skiptoken string, top *int32) (*http.Request, error)

ByExternalCloudProviderTypePreparer prepares the ByExternalCloudProviderType request.

func (DimensionsClient) ByExternalCloudProviderTypeResponder

func (client DimensionsClient) ByExternalCloudProviderTypeResponder(resp *http.Response) (result DimensionsListResult, err error)

ByExternalCloudProviderTypeResponder handles the response to the ByExternalCloudProviderType request. The method always closes the http.Response Body.

func (DimensionsClient) ByExternalCloudProviderTypeSender

func (client DimensionsClient) ByExternalCloudProviderTypeSender(req *http.Request) (*http.Response, error)

ByExternalCloudProviderTypeSender sends the ByExternalCloudProviderType request. The method will close the http.Response Body if it receives an error.

func (DimensionsClient) List

func (client DimensionsClient) List(ctx context.Context, scope string, filter string, expand string, skiptoken string, top *int32) (result DimensionsListResult, err error)

List lists the dimensions by the defined scope. Parameters: scope - the scope associated with dimension operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. filter - may be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. expand - may be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N dimension data.

func (DimensionsClient) ListPreparer

func (client DimensionsClient) ListPreparer(ctx context.Context, scope string, filter string, expand string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (DimensionsClient) ListResponder

func (client DimensionsClient) ListResponder(resp *http.Response) (result DimensionsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (DimensionsClient) ListSender

func (client DimensionsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type DimensionsListResult

type DimensionsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of dimensions.
	Value *[]Dimension `json:"value,omitempty"`
}

DimensionsListResult result of listing dimensions. It contains a list of available dimensions.

func (DimensionsListResult) MarshalJSON

func (dlr DimensionsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DimensionsListResult.

type Direction

type Direction string

Direction enumerates the values for direction.

const (
	// Ascending ...
	Ascending Direction = "Ascending"
	// Descending ...
	Descending Direction = "Descending"
)

func PossibleDirectionValues

func PossibleDirectionValues() []Direction

PossibleDirectionValues returns an array of possible values for the Direction const type.

type DismissAlertPayload

type DismissAlertPayload struct {
	*AlertProperties `json:"properties,omitempty"`
}

DismissAlertPayload the request payload to update an alert

func (DismissAlertPayload) MarshalJSON

func (dap DismissAlertPayload) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DismissAlertPayload.

func (*DismissAlertPayload) UnmarshalJSON

func (dap *DismissAlertPayload) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for DismissAlertPayload struct.

type ErrorDetails

type ErrorDetails struct {
	// Code - READ-ONLY; Error code.
	Code *string `json:"code,omitempty"`
	// Message - READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorDetails the details of the error.

func (ErrorDetails) MarshalJSON

func (ed ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorDetails.

type ErrorResponse

type ErrorResponse struct {
	// Error - The details of the error.
	Error *ErrorDetails `json:"error,omitempty"`
}

ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

* 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

* 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

type ExecutionStatus

type ExecutionStatus string

ExecutionStatus enumerates the values for execution status.

const (
	// Completed ...
	Completed ExecutionStatus = "Completed"
	// DataNotAvailable ...
	DataNotAvailable ExecutionStatus = "DataNotAvailable"
	// Failed ...
	Failed ExecutionStatus = "Failed"
	// InProgress ...
	InProgress ExecutionStatus = "InProgress"
	// NewDataNotAvailable ...
	NewDataNotAvailable ExecutionStatus = "NewDataNotAvailable"
	// Queued ...
	Queued ExecutionStatus = "Queued"
	// Timeout ...
	Timeout ExecutionStatus = "Timeout"
)

func PossibleExecutionStatusValues

func PossibleExecutionStatusValues() []ExecutionStatus

PossibleExecutionStatusValues returns an array of possible values for the ExecutionStatus const type.

type ExecutionType

type ExecutionType string

ExecutionType enumerates the values for execution type.

const (
	// OnDemand ...
	OnDemand ExecutionType = "OnDemand"
	// Scheduled ...
	Scheduled ExecutionType = "Scheduled"
)

func PossibleExecutionTypeValues

func PossibleExecutionTypeValues() []ExecutionType

PossibleExecutionTypeValues returns an array of possible values for the ExecutionType const type.

type Export

type Export struct {
	autorest.Response `json:"-"`
	*ExportProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

Export an export resource.

func (Export) MarshalJSON

func (e Export) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Export.

func (*Export) UnmarshalJSON

func (e *Export) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Export struct.

type ExportDataset

type ExportDataset struct {
	// Granularity - The granularity of rows in the export. Currently only 'Daily' is supported. Possible values include: 'Daily'
	Granularity GranularityType `json:"granularity,omitempty"`
	// Configuration - The export dataset configuration.
	Configuration *ExportDatasetConfiguration `json:"configuration,omitempty"`
}

ExportDataset the definition for data in the export.

type ExportDatasetConfiguration

type ExportDatasetConfiguration struct {
	// Columns - Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).
	Columns *[]string `json:"columns,omitempty"`
}

ExportDatasetConfiguration the export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.

type ExportDefinition

type ExportDefinition struct {
	// Type - The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. Possible values include: 'ExportTypeUsage', 'ExportTypeActualCost', 'ExportTypeAmortizedCost'
	Type ExportType `json:"type,omitempty"`
	// Timeframe - The time frame for pulling data for the export. If custom, then a specific time period must be provided. Possible values include: 'TimeframeTypeMonthToDate', 'TimeframeTypeBillingMonthToDate', 'TimeframeTypeTheLastMonth', 'TimeframeTypeTheLastBillingMonth', 'TimeframeTypeWeekToDate', 'TimeframeTypeCustom'
	Timeframe TimeframeType `json:"timeframe,omitempty"`
	// TimePeriod - Has time period for pulling data for the export.
	TimePeriod *ExportTimePeriod `json:"timePeriod,omitempty"`
	// DataSet - The definition for data in the export.
	DataSet *ExportDataset `json:"dataSet,omitempty"`
}

ExportDefinition the definition of an export.

type ExportDeliveryDestination

type ExportDeliveryDestination struct {
	// ResourceID - The resource id of the storage account where exports will be delivered.
	ResourceID *string `json:"resourceId,omitempty"`
	// Container - The name of the container where exports will be uploaded.
	Container *string `json:"container,omitempty"`
	// RootFolderPath - The name of the directory where exports will be uploaded.
	RootFolderPath *string `json:"rootFolderPath,omitempty"`
}

ExportDeliveryDestination the destination information for the delivery of the export. To allow access to a storage account, you must register the account's subscription with the Microsoft.CostManagementExports resource provider. This is required once per subscription. When creating an export in the Azure portal, it is done automatically, however API users need to register the subscription. For more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services .

type ExportDeliveryInfo

type ExportDeliveryInfo struct {
	// Destination - Has destination for the export being delivered.
	Destination *ExportDeliveryDestination `json:"destination,omitempty"`
}

ExportDeliveryInfo the delivery information associated with a export.

type ExportExecution

type ExportExecution struct {
	*ExportExecutionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

ExportExecution an export execution.

func (ExportExecution) MarshalJSON

func (ee ExportExecution) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ExportExecution.

func (*ExportExecution) UnmarshalJSON

func (ee *ExportExecution) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ExportExecution struct.

type ExportExecutionListResult

type ExportExecutionListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; A list of export executions.
	Value *[]ExportExecution `json:"value,omitempty"`
}

ExportExecutionListResult result of listing the execution history of an export.

func (ExportExecutionListResult) MarshalJSON

func (eelr ExportExecutionListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ExportExecutionListResult.

type ExportExecutionProperties

type ExportExecutionProperties struct {
	// ExecutionType - The type of the export execution. Possible values include: 'OnDemand', 'Scheduled'
	ExecutionType ExecutionType `json:"executionType,omitempty"`
	// Status - The last known status of the export execution. Possible values include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', 'NewDataNotAvailable', 'DataNotAvailable'
	Status ExecutionStatus `json:"status,omitempty"`
	// SubmittedBy - The identifier for the entity that executed the export. For OnDemand executions it is the user email. For scheduled executions it is 'System'.
	SubmittedBy *string `json:"submittedBy,omitempty"`
	// SubmittedTime - The time when export was queued to be executed.
	SubmittedTime *date.Time `json:"submittedTime,omitempty"`
	// ProcessingStartTime - The time when export was picked up to be executed.
	ProcessingStartTime *date.Time `json:"processingStartTime,omitempty"`
	// ProcessingEndTime - The time when the export execution finished.
	ProcessingEndTime *date.Time `json:"processingEndTime,omitempty"`
	// FileName - The name of the exported file.
	FileName *string `json:"fileName,omitempty"`
	// RunSettings - The export settings that were in effect for this execution.
	RunSettings *CommonExportProperties `json:"runSettings,omitempty"`
	// Error - The details of any error.
	Error *ErrorDetails `json:"error,omitempty"`
}

ExportExecutionProperties the properties of the export execution.

type ExportListResult

type ExportListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of exports.
	Value *[]Export `json:"value,omitempty"`
}

ExportListResult result of listing exports. It contains a list of available exports in the scope provided.

func (ExportListResult) MarshalJSON

func (elr ExportListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ExportListResult.

type ExportProperties

type ExportProperties struct {
	// Schedule - Has schedule information for the export.
	Schedule *ExportSchedule `json:"schedule,omitempty"`
	// Format - The format of the export being delivered. Currently only 'Csv' is supported. Possible values include: 'Csv'
	Format FormatType `json:"format,omitempty"`
	// DeliveryInfo - Has delivery information for the export.
	DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"`
	// Definition - Has the definition for the export.
	Definition *ExportDefinition `json:"definition,omitempty"`
	// RunHistory - If requested, has the most recent execution history for the export.
	RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"`
	// NextRunTimeEstimate - READ-ONLY; If the export has an active schedule, provides an estimate of the next execution time.
	NextRunTimeEstimate *date.Time `json:"nextRunTimeEstimate,omitempty"`
}

ExportProperties the properties of the export.

func (ExportProperties) MarshalJSON

func (ep ExportProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ExportProperties.

type ExportRecurrencePeriod

type ExportRecurrencePeriod struct {
	// From - The start date of recurrence.
	From *date.Time `json:"from,omitempty"`
	// To - The end date of recurrence.
	To *date.Time `json:"to,omitempty"`
}

ExportRecurrencePeriod the start and end date for recurrence schedule.

type ExportSchedule

type ExportSchedule struct {
	// Status - The status of the export's schedule. If 'Inactive', the export's schedule is paused. Possible values include: 'Active', 'Inactive'
	Status StatusType `json:"status,omitempty"`
	// Recurrence - The schedule recurrence. Possible values include: 'RecurrenceTypeDaily', 'RecurrenceTypeWeekly', 'RecurrenceTypeMonthly', 'RecurrenceTypeAnnually'
	Recurrence RecurrenceType `json:"recurrence,omitempty"`
	// RecurrencePeriod - Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.
	RecurrencePeriod *ExportRecurrencePeriod `json:"recurrencePeriod,omitempty"`
}

ExportSchedule the schedule associated with the export.

type ExportTimePeriod

type ExportTimePeriod struct {
	// From - The start date for export data.
	From *date.Time `json:"from,omitempty"`
	// To - The end date for export data.
	To *date.Time `json:"to,omitempty"`
}

ExportTimePeriod the date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months.

type ExportType

type ExportType string

ExportType enumerates the values for export type.

const (
	// ExportTypeActualCost ...
	ExportTypeActualCost ExportType = "ActualCost"
	// ExportTypeAmortizedCost ...
	ExportTypeAmortizedCost ExportType = "AmortizedCost"
	// ExportTypeUsage ...
	ExportTypeUsage ExportType = "Usage"
)

func PossibleExportTypeValues

func PossibleExportTypeValues() []ExportType

PossibleExportTypeValues returns an array of possible values for the ExportType const type.

type ExportsClient

type ExportsClient struct {
	BaseClient
}

ExportsClient is the client for the Exports methods of the Costmanagement service.

func NewExportsClient

func NewExportsClient(subscriptionID string) ExportsClient

NewExportsClient creates an instance of the ExportsClient client.

func NewExportsClientWithBaseURI

func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsClient

NewExportsClientWithBaseURI creates an instance of the ExportsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ExportsClient) CreateOrUpdate

func (client ExportsClient) CreateOrUpdate(ctx context.Context, scope string, exportName string, parameters Export) (result Export, err error)

CreateOrUpdate the operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. exportName - export Name. parameters - parameters supplied to the CreateOrUpdate Export operation.

func (ExportsClient) CreateOrUpdatePreparer

func (client ExportsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, exportName string, parameters Export) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ExportsClient) CreateOrUpdateResponder

func (client ExportsClient) CreateOrUpdateResponder(resp *http.Response) (result Export, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (ExportsClient) CreateOrUpdateSender

func (client ExportsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (ExportsClient) Delete

func (client ExportsClient) Delete(ctx context.Context, scope string, exportName string) (result autorest.Response, err error)

Delete the operation to delete a export. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. exportName - export Name.

func (ExportsClient) DeletePreparer

func (client ExportsClient) DeletePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ExportsClient) DeleteResponder

func (client ExportsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ExportsClient) DeleteSender

func (client ExportsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ExportsClient) Execute

func (client ExportsClient) Execute(ctx context.Context, scope string, exportName string) (result autorest.Response, err error)

Execute the operation to execute an export. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. exportName - export Name.

func (ExportsClient) ExecutePreparer

func (client ExportsClient) ExecutePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)

ExecutePreparer prepares the Execute request.

func (ExportsClient) ExecuteResponder

func (client ExportsClient) ExecuteResponder(resp *http.Response) (result autorest.Response, err error)

ExecuteResponder handles the response to the Execute request. The method always closes the http.Response Body.

func (ExportsClient) ExecuteSender

func (client ExportsClient) ExecuteSender(req *http.Request) (*http.Response, error)

ExecuteSender sends the Execute request. The method will close the http.Response Body if it receives an error.

func (ExportsClient) Get

func (client ExportsClient) Get(ctx context.Context, scope string, exportName string, expand string) (result Export, err error)

Get the operation to get the export for the defined scope by export name. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. exportName - export Name. expand - may be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 executions of the export.

func (ExportsClient) GetExecutionHistory

func (client ExportsClient) GetExecutionHistory(ctx context.Context, scope string, exportName string) (result ExportExecutionListResult, err error)

GetExecutionHistory the operation to get the execution history of an export for the defined scope and export name. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. exportName - export Name.

func (ExportsClient) GetExecutionHistoryPreparer

func (client ExportsClient) GetExecutionHistoryPreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)

GetExecutionHistoryPreparer prepares the GetExecutionHistory request.

func (ExportsClient) GetExecutionHistoryResponder

func (client ExportsClient) GetExecutionHistoryResponder(resp *http.Response) (result ExportExecutionListResult, err error)

GetExecutionHistoryResponder handles the response to the GetExecutionHistory request. The method always closes the http.Response Body.

func (ExportsClient) GetExecutionHistorySender

func (client ExportsClient) GetExecutionHistorySender(req *http.Request) (*http.Response, error)

GetExecutionHistorySender sends the GetExecutionHistory request. The method will close the http.Response Body if it receives an error.

func (ExportsClient) GetPreparer

func (client ExportsClient) GetPreparer(ctx context.Context, scope string, exportName string, expand string) (*http.Request, error)

GetPreparer prepares the Get request.

func (ExportsClient) GetResponder

func (client ExportsClient) GetResponder(resp *http.Response) (result Export, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ExportsClient) GetSender

func (client ExportsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ExportsClient) List

func (client ExportsClient) List(ctx context.Context, scope string, expand string) (result ExportListResult, err error)

List the operation to list all exports at the given scope. Parameters: scope - the scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. expand - may be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last execution of each export.

func (ExportsClient) ListPreparer

func (client ExportsClient) ListPreparer(ctx context.Context, scope string, expand string) (*http.Request, error)

ListPreparer prepares the List request.

func (ExportsClient) ListResponder

func (client ExportsClient) ListResponder(resp *http.Response) (result ExportListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ExportsClient) ListSender

func (client ExportsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ExternalCloudProviderType

type ExternalCloudProviderType string

ExternalCloudProviderType enumerates the values for external cloud provider type.

const (
	// ExternalBillingAccounts ...
	ExternalBillingAccounts ExternalCloudProviderType = "externalBillingAccounts"
	// ExternalSubscriptions ...
	ExternalSubscriptions ExternalCloudProviderType = "externalSubscriptions"
)

func PossibleExternalCloudProviderTypeValues

func PossibleExternalCloudProviderTypeValues() []ExternalCloudProviderType

PossibleExternalCloudProviderTypeValues returns an array of possible values for the ExternalCloudProviderType const type.

type ForecastClient

type ForecastClient struct {
	BaseClient
}

ForecastClient is the client for the Forecast methods of the Costmanagement service.

func NewForecastClient

func NewForecastClient(subscriptionID string) ForecastClient

NewForecastClient creates an instance of the ForecastClient client.

func NewForecastClientWithBaseURI

func NewForecastClientWithBaseURI(baseURI string, subscriptionID string) ForecastClient

NewForecastClientWithBaseURI creates an instance of the ForecastClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ForecastClient) ExternalCloudProviderUsage

func (client ForecastClient) ExternalCloudProviderUsage(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, filter string) (result QueryResult, err error)

ExternalCloudProviderUsage lists the forecast charges for external cloud provider type defined. Parameters: externalCloudProviderType - the external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. parameters - parameters supplied to the CreateOrUpdate Forecast Config operation. filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.

func (ForecastClient) ExternalCloudProviderUsagePreparer

func (client ForecastClient) ExternalCloudProviderUsagePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, filter string) (*http.Request, error)

ExternalCloudProviderUsagePreparer prepares the ExternalCloudProviderUsage request.

func (ForecastClient) ExternalCloudProviderUsageResponder

func (client ForecastClient) ExternalCloudProviderUsageResponder(resp *http.Response) (result QueryResult, err error)

ExternalCloudProviderUsageResponder handles the response to the ExternalCloudProviderUsage request. The method always closes the http.Response Body.

func (ForecastClient) ExternalCloudProviderUsageSender

func (client ForecastClient) ExternalCloudProviderUsageSender(req *http.Request) (*http.Response, error)

ExternalCloudProviderUsageSender sends the ExternalCloudProviderUsage request. The method will close the http.Response Body if it receives an error.

func (ForecastClient) Usage

func (client ForecastClient) Usage(ctx context.Context, scope string, parameters ForecastDefinition, filter string) (result QueryResult, err error)

Usage lists the forecast charges for scope defined. Parameters: scope - the scope associated with forecast operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. parameters - parameters supplied to the CreateOrUpdate Forecast Config operation. filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.

func (ForecastClient) UsagePreparer

func (client ForecastClient) UsagePreparer(ctx context.Context, scope string, parameters ForecastDefinition, filter string) (*http.Request, error)

UsagePreparer prepares the Usage request.

func (ForecastClient) UsageResponder

func (client ForecastClient) UsageResponder(resp *http.Response) (result QueryResult, err error)

UsageResponder handles the response to the Usage request. The method always closes the http.Response Body.

func (ForecastClient) UsageSender

func (client ForecastClient) UsageSender(req *http.Request) (*http.Response, error)

UsageSender sends the Usage request. The method will close the http.Response Body if it receives an error.

type ForecastDataset

type ForecastDataset struct {
	// Granularity - The granularity of rows in the forecast. Possible values include: 'Daily'
	Granularity GranularityType `json:"granularity,omitempty"`
	// Configuration - Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.
	Configuration *QueryDatasetConfiguration `json:"configuration,omitempty"`
	// Aggregation - Dictionary of aggregation expression to use in the forecast. The key of each item in the dictionary is the alias for the aggregated column. forecast can have up to 2 aggregation clauses.
	Aggregation map[string]*QueryAggregation `json:"aggregation"`
	// Filter - Has filter expression to use in the forecast.
	Filter *QueryFilter `json:"filter,omitempty"`
}

ForecastDataset the definition of data present in the forecast.

func (ForecastDataset) MarshalJSON

func (fd ForecastDataset) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ForecastDataset.

type ForecastDefinition

type ForecastDefinition struct {
	// Type - The type of the forecast. Possible values include: 'ForecastTypeUsage', 'ForecastTypeActualCost', 'ForecastTypeAmortizedCost'
	Type ForecastType `json:"type,omitempty"`
	// Timeframe - The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Possible values include: 'MonthToDate', 'BillingMonthToDate', 'TheLastMonth', 'TheLastBillingMonth', 'WeekToDate', 'Custom'
	Timeframe ForecastTimeframeType `json:"timeframe,omitempty"`
	// TimePeriod - Has time period for pulling data for the forecast.
	TimePeriod *QueryTimePeriod `json:"timePeriod,omitempty"`
	// Dataset - Has definition for data in this forecast.
	Dataset *ForecastDataset `json:"dataset,omitempty"`
	// IncludeActualCost - a boolean determining if actualCost will be included
	IncludeActualCost *bool `json:"includeActualCost,omitempty"`
	// IncludeFreshPartialCost - a boolean determining if FreshPartialCost will be included
	IncludeFreshPartialCost *bool `json:"includeFreshPartialCost,omitempty"`
}

ForecastDefinition the definition of a forecast.

type ForecastTimeframeType

type ForecastTimeframeType string

ForecastTimeframeType enumerates the values for forecast timeframe type.

const (
	// BillingMonthToDate ...
	BillingMonthToDate ForecastTimeframeType = "BillingMonthToDate"
	// Custom ...
	Custom ForecastTimeframeType = "Custom"
	// MonthToDate ...
	MonthToDate ForecastTimeframeType = "MonthToDate"
	// TheLastBillingMonth ...
	TheLastBillingMonth ForecastTimeframeType = "TheLastBillingMonth"
	// TheLastMonth ...
	TheLastMonth ForecastTimeframeType = "TheLastMonth"
	// WeekToDate ...
	WeekToDate ForecastTimeframeType = "WeekToDate"
)

func PossibleForecastTimeframeTypeValues

func PossibleForecastTimeframeTypeValues() []ForecastTimeframeType

PossibleForecastTimeframeTypeValues returns an array of possible values for the ForecastTimeframeType const type.

type ForecastType

type ForecastType string

ForecastType enumerates the values for forecast type.

const (
	// ForecastTypeActualCost ...
	ForecastTypeActualCost ForecastType = "ActualCost"
	// ForecastTypeAmortizedCost ...
	ForecastTypeAmortizedCost ForecastType = "AmortizedCost"
	// ForecastTypeUsage ...
	ForecastTypeUsage ForecastType = "Usage"
)

func PossibleForecastTypeValues

func PossibleForecastTypeValues() []ForecastType

PossibleForecastTypeValues returns an array of possible values for the ForecastType const type.

type FormatType

type FormatType string

FormatType enumerates the values for format type.

const (
	// Csv ...
	Csv FormatType = "Csv"
)

func PossibleFormatTypeValues

func PossibleFormatTypeValues() []FormatType

PossibleFormatTypeValues returns an array of possible values for the FormatType const type.

type GranularityType

type GranularityType string

GranularityType enumerates the values for granularity type.

const (
	// Daily ...
	Daily GranularityType = "Daily"
)

func PossibleGranularityTypeValues

func PossibleGranularityTypeValues() []GranularityType

PossibleGranularityTypeValues returns an array of possible values for the GranularityType const type.

type KpiProperties

type KpiProperties struct {
	// Type - KPI type (Forecast, Budget). Possible values include: 'KpiTypeTypeForecast', 'KpiTypeTypeBudget'
	Type KpiTypeType `json:"type,omitempty"`
	// ID - ID of resource related to metric (budget).
	ID *string `json:"id,omitempty"`
	// Enabled - show the KPI in the UI?
	Enabled *bool `json:"enabled,omitempty"`
}

KpiProperties each KPI must contain a 'type' and 'enabled' key.

type KpiTypeType

type KpiTypeType string

KpiTypeType enumerates the values for kpi type type.

const (
	// KpiTypeTypeBudget ...
	KpiTypeTypeBudget KpiTypeType = "Budget"
	// KpiTypeTypeForecast ...
	KpiTypeTypeForecast KpiTypeType = "Forecast"
)

func PossibleKpiTypeTypeValues

func PossibleKpiTypeTypeValues() []KpiTypeType

PossibleKpiTypeTypeValues returns an array of possible values for the KpiTypeType const type.

type MetricType

type MetricType string

MetricType enumerates the values for metric type.

const (
	// ActualCost ...
	ActualCost MetricType = "ActualCost"
	// AHUB ...
	AHUB MetricType = "AHUB"
	// AmortizedCost ...
	AmortizedCost MetricType = "AmortizedCost"
)

func PossibleMetricTypeValues

func PossibleMetricTypeValues() []MetricType

PossibleMetricTypeValues returns an array of possible values for the MetricType const type.

type Operation

type Operation struct {
	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation a Cost management REST API operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Operation.

type OperationDisplay

type OperationDisplay struct {
	// Provider - READ-ONLY; Service provider: Microsoft.CostManagement.
	Provider *string `json:"provider,omitempty"`
	// Resource - READ-ONLY; Resource on which the operation is performed: Dimensions, Query.
	Resource *string `json:"resource,omitempty"`
	// Operation - READ-ONLY; Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
}

OperationDisplay the object that represents the operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationDisplay.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; List of cost management operations supported by the Microsoft.CostManagement resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (OperationListResult) MarshalJSON

func (olr OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationListResult.

type OperationListResultIterator

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

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

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

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the client for the Operations methods of the Costmanagement service.

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available cost management REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type OperatorType

type OperatorType string

OperatorType enumerates the values for operator type.

const (
	// Contains ...
	Contains OperatorType = "Contains"
	// In ...
	In OperatorType = "In"
)

func PossibleOperatorTypeValues

func PossibleOperatorTypeValues() []OperatorType

PossibleOperatorTypeValues returns an array of possible values for the OperatorType const type.

type PivotProperties

type PivotProperties struct {
	// Type - Data type to show in view. Possible values include: 'PivotTypeTypeDimension', 'PivotTypeTypeTagKey'
	Type PivotTypeType `json:"type,omitempty"`
	// Name - Data field to show in view.
	Name *string `json:"name,omitempty"`
}

PivotProperties each pivot must contain a 'type' and 'name'.

type PivotTypeType

type PivotTypeType string

PivotTypeType enumerates the values for pivot type type.

const (
	// PivotTypeTypeDimension ...
	PivotTypeTypeDimension PivotTypeType = "Dimension"
	// PivotTypeTypeTagKey ...
	PivotTypeTypeTagKey PivotTypeType = "TagKey"
)

func PossiblePivotTypeTypeValues

func PossiblePivotTypeTypeValues() []PivotTypeType

PossiblePivotTypeTypeValues returns an array of possible values for the PivotTypeType const type.

type ProxyResource

type ProxyResource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

ProxyResource the Resource model definition.

func (ProxyResource) MarshalJSON

func (pr ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ProxyResource.

type QueryAggregation

type QueryAggregation struct {
	// Name - The name of the column to aggregate.
	Name *string `json:"name,omitempty"`
	// Function - The name of the aggregation function to use.
	Function *string `json:"function,omitempty"`
}

QueryAggregation the aggregation expression to be used in the query.

type QueryClient

type QueryClient struct {
	BaseClient
}

QueryClient is the client for the Query methods of the Costmanagement service.

func NewQueryClient

func NewQueryClient(subscriptionID string) QueryClient

NewQueryClient creates an instance of the QueryClient client.

func NewQueryClientWithBaseURI

func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient

NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (QueryClient) Usage

func (client QueryClient) Usage(ctx context.Context, scope string, parameters QueryDefinition) (result QueryResult, err error)

Usage query the usage data for scope defined. Parameters: scope - the scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. parameters - parameters supplied to the CreateOrUpdate Query Config operation.

func (QueryClient) UsageByExternalCloudProviderType

func (client QueryClient) UsageByExternalCloudProviderType(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition) (result QueryResult, err error)

UsageByExternalCloudProviderType query the usage data for external cloud provider type defined. Parameters: externalCloudProviderType - the external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. externalCloudProviderID - this can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. parameters - parameters supplied to the CreateOrUpdate Query Config operation.

func (QueryClient) UsageByExternalCloudProviderTypePreparer

func (client QueryClient) UsageByExternalCloudProviderTypePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition) (*http.Request, error)

UsageByExternalCloudProviderTypePreparer prepares the UsageByExternalCloudProviderType request.

func (QueryClient) UsageByExternalCloudProviderTypeResponder

func (client QueryClient) UsageByExternalCloudProviderTypeResponder(resp *http.Response) (result QueryResult, err error)

UsageByExternalCloudProviderTypeResponder handles the response to the UsageByExternalCloudProviderType request. The method always closes the http.Response Body.

func (QueryClient) UsageByExternalCloudProviderTypeSender

func (client QueryClient) UsageByExternalCloudProviderTypeSender(req *http.Request) (*http.Response, error)

UsageByExternalCloudProviderTypeSender sends the UsageByExternalCloudProviderType request. The method will close the http.Response Body if it receives an error.

func (QueryClient) UsagePreparer

func (client QueryClient) UsagePreparer(ctx context.Context, scope string, parameters QueryDefinition) (*http.Request, error)

UsagePreparer prepares the Usage request.

func (QueryClient) UsageResponder

func (client QueryClient) UsageResponder(resp *http.Response) (result QueryResult, err error)

UsageResponder handles the response to the Usage request. The method always closes the http.Response Body.

func (QueryClient) UsageSender

func (client QueryClient) UsageSender(req *http.Request) (*http.Response, error)

UsageSender sends the Usage request. The method will close the http.Response Body if it receives an error.

type QueryColumn

type QueryColumn struct {
	// Name - The name of column.
	Name *string `json:"name,omitempty"`
	// Type - The type of column.
	Type *string `json:"type,omitempty"`
}

QueryColumn ...

type QueryColumnType

type QueryColumnType string

QueryColumnType enumerates the values for query column type.

const (
	// QueryColumnTypeDimension ...
	QueryColumnTypeDimension QueryColumnType = "Dimension"
	// QueryColumnTypeTag ...
	QueryColumnTypeTag QueryColumnType = "Tag"
)

func PossibleQueryColumnTypeValues

func PossibleQueryColumnTypeValues() []QueryColumnType

PossibleQueryColumnTypeValues returns an array of possible values for the QueryColumnType const type.

type QueryComparisonExpression

type QueryComparisonExpression struct {
	// Name - The name of the column to use in comparison.
	Name *string `json:"name,omitempty"`
	// Operator - The operator to use for comparison.
	Operator *string `json:"operator,omitempty"`
	// Values - Array of values to use for comparison
	Values *[]string `json:"values,omitempty"`
}

QueryComparisonExpression the comparison expression to be used in the query.

type QueryDataset

type QueryDataset struct {
	// Granularity - The granularity of rows in the query. Possible values include: 'Daily'
	Granularity GranularityType `json:"granularity,omitempty"`
	// Configuration - Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.
	Configuration *QueryDatasetConfiguration `json:"configuration,omitempty"`
	// Aggregation - Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.
	Aggregation map[string]*QueryAggregation `json:"aggregation"`
	// Grouping - Array of group by expression to use in the query. Query can have up to 2 group by clauses.
	Grouping *[]QueryGrouping `json:"grouping,omitempty"`
	// Filter - Has filter expression to use in the query.
	Filter *QueryFilter `json:"filter,omitempty"`
}

QueryDataset the definition of data present in the query.

func (QueryDataset) MarshalJSON

func (qd QueryDataset) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for QueryDataset.

type QueryDatasetConfiguration

type QueryDatasetConfiguration struct {
	// Columns - Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.
	Columns *[]string `json:"columns,omitempty"`
}

QueryDatasetConfiguration the configuration of dataset in the query.

type QueryDefinition

type QueryDefinition struct {
	// Type - The type of the query. Possible values include: 'ExportTypeUsage', 'ExportTypeActualCost', 'ExportTypeAmortizedCost'
	Type ExportType `json:"type,omitempty"`
	// Timeframe - The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: 'TimeframeTypeMonthToDate', 'TimeframeTypeBillingMonthToDate', 'TimeframeTypeTheLastMonth', 'TimeframeTypeTheLastBillingMonth', 'TimeframeTypeWeekToDate', 'TimeframeTypeCustom'
	Timeframe TimeframeType `json:"timeframe,omitempty"`
	// TimePeriod - Has time period for pulling data for the query.
	TimePeriod *QueryTimePeriod `json:"timePeriod,omitempty"`
	// Dataset - Has definition for data in this query.
	Dataset *QueryDataset `json:"dataset,omitempty"`
}

QueryDefinition the definition of a query.

type QueryFilter

type QueryFilter struct {
	// And - The logical "AND" expression. Must have at least 2 items.
	And *[]QueryFilter `json:"and,omitempty"`
	// Or - The logical "OR" expression. Must have at least 2 items.
	Or *[]QueryFilter `json:"or,omitempty"`
	// Not - The logical "NOT" expression.
	Not *QueryFilter `json:"not,omitempty"`
	// Dimension - Has comparison expression for a dimension
	Dimension *QueryComparisonExpression `json:"dimension,omitempty"`
	// Tag - Has comparison expression for a tag
	Tag *QueryComparisonExpression `json:"tag,omitempty"`
}

QueryFilter the filter expression to be used in the export.

type QueryGrouping

type QueryGrouping struct {
	// Type - Has type of the column to group. Possible values include: 'QueryColumnTypeTag', 'QueryColumnTypeDimension'
	Type QueryColumnType `json:"type,omitempty"`
	// Name - The name of the column to group.
	Name *string `json:"name,omitempty"`
}

QueryGrouping the group by expression to be used in the query.

type QueryProperties

type QueryProperties struct {
	// NextLink - The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
	// Columns - Array of columns
	Columns *[]QueryColumn `json:"columns,omitempty"`
	// Rows - Array of rows
	Rows *[][]interface{} `json:"rows,omitempty"`
}

QueryProperties ...

type QueryResult

type QueryResult struct {
	autorest.Response `json:"-"`
	*QueryProperties  `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

QueryResult result of query. It contains all columns listed under groupings and aggregation.

func (QueryResult) MarshalJSON

func (qr QueryResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for QueryResult.

func (*QueryResult) UnmarshalJSON

func (qr *QueryResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for QueryResult struct.

type QueryTimePeriod

type QueryTimePeriod struct {
	// From - The start date to pull data from.
	From *date.Time `json:"from,omitempty"`
	// To - The end date to pull data to.
	To *date.Time `json:"to,omitempty"`
}

QueryTimePeriod the start and end date for pulling data for the query.

type RecurrenceType

type RecurrenceType string

RecurrenceType enumerates the values for recurrence type.

const (
	// RecurrenceTypeAnnually ...
	RecurrenceTypeAnnually RecurrenceType = "Annually"
	// RecurrenceTypeDaily ...
	RecurrenceTypeDaily RecurrenceType = "Daily"
	// RecurrenceTypeMonthly ...
	RecurrenceTypeMonthly RecurrenceType = "Monthly"
	// RecurrenceTypeWeekly ...
	RecurrenceTypeWeekly RecurrenceType = "Weekly"
)

func PossibleRecurrenceTypeValues

func PossibleRecurrenceTypeValues() []RecurrenceType

PossibleRecurrenceTypeValues returns an array of possible values for the RecurrenceType const type.

type ReportConfigAggregation

type ReportConfigAggregation struct {
	// Name - The name of the column to aggregate.
	Name *string `json:"name,omitempty"`
	// Function - The name of the aggregation function to use.
	Function *string `json:"function,omitempty"`
}

ReportConfigAggregation the aggregation expression to be used in the report.

type ReportConfigColumnType

type ReportConfigColumnType string

ReportConfigColumnType enumerates the values for report config column type.

const (
	// ReportConfigColumnTypeDimension ...
	ReportConfigColumnTypeDimension ReportConfigColumnType = "Dimension"
	// ReportConfigColumnTypeTag ...
	ReportConfigColumnTypeTag ReportConfigColumnType = "Tag"
)

func PossibleReportConfigColumnTypeValues

func PossibleReportConfigColumnTypeValues() []ReportConfigColumnType

PossibleReportConfigColumnTypeValues returns an array of possible values for the ReportConfigColumnType const type.

type ReportConfigComparisonExpression

type ReportConfigComparisonExpression struct {
	// Name - The name of the column to use in comparison.
	Name *string `json:"name,omitempty"`
	// Operator - The operator to use for comparison. Possible values include: 'In', 'Contains'
	Operator OperatorType `json:"operator,omitempty"`
	// Values - Array of values to use for comparison
	Values *[]string `json:"values,omitempty"`
}

ReportConfigComparisonExpression the comparison expression to be used in the report.

type ReportConfigDataset

type ReportConfigDataset struct {
	// Granularity - The granularity of rows in the report. Possible values include: 'ReportGranularityTypeDaily', 'ReportGranularityTypeMonthly'
	Granularity ReportGranularityType `json:"granularity,omitempty"`
	// Configuration - Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.
	Configuration *ReportConfigDatasetConfiguration `json:"configuration,omitempty"`
	// Aggregation - Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
	Aggregation map[string]*ReportConfigAggregation `json:"aggregation"`
	// Grouping - Array of group by expression to use in the report. Report can have up to 2 group by clauses.
	Grouping *[]ReportConfigGrouping `json:"grouping,omitempty"`
	// Sorting - Array of order by expression to use in the report.
	Sorting *[]ReportConfigSorting `json:"sorting,omitempty"`
	// Filter - Has filter expression to use in the report.
	Filter *ReportConfigFilter `json:"filter,omitempty"`
}

ReportConfigDataset the definition of data present in the report.

func (ReportConfigDataset) MarshalJSON

func (rcd ReportConfigDataset) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReportConfigDataset.

type ReportConfigDatasetConfiguration

type ReportConfigDatasetConfiguration struct {
	// Columns - Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.
	Columns *[]string `json:"columns,omitempty"`
}

ReportConfigDatasetConfiguration the configuration of dataset in the report.

type ReportConfigDefinition

type ReportConfigDefinition struct {
	// Type - The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
	Type *string `json:"type,omitempty"`
	// Timeframe - The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: 'ReportTimeframeTypeWeekToDate', 'ReportTimeframeTypeMonthToDate', 'ReportTimeframeTypeYearToDate', 'ReportTimeframeTypeCustom'
	Timeframe ReportTimeframeType `json:"timeframe,omitempty"`
	// TimePeriod - Has time period for pulling data for the report.
	TimePeriod *ReportConfigTimePeriod `json:"timePeriod,omitempty"`
	// Dataset - Has definition for data in this report config.
	Dataset *ReportConfigDataset `json:"dataset,omitempty"`
}

ReportConfigDefinition the definition of a report config.

type ReportConfigFilter

type ReportConfigFilter struct {
	// And - The logical "AND" expression. Must have at least 2 items.
	And *[]ReportConfigFilter `json:"and,omitempty"`
	// Or - The logical "OR" expression. Must have at least 2 items.
	Or *[]ReportConfigFilter `json:"or,omitempty"`
	// Not - The logical "NOT" expression.
	Not *ReportConfigFilter `json:"not,omitempty"`
	// Dimension - Has comparison expression for a dimension
	Dimension *ReportConfigComparisonExpression `json:"dimension,omitempty"`
	// Tag - Has comparison expression for a tag
	Tag *ReportConfigComparisonExpression `json:"tag,omitempty"`
}

ReportConfigFilter the filter expression to be used in the report.

type ReportConfigGrouping

type ReportConfigGrouping struct {
	// Type - Has type of the column to group. Possible values include: 'ReportConfigColumnTypeTag', 'ReportConfigColumnTypeDimension'
	Type ReportConfigColumnType `json:"type,omitempty"`
	// Name - The name of the column to group. This version supports subscription lowest possible grain.
	Name *string `json:"name,omitempty"`
}

ReportConfigGrouping the group by expression to be used in the report.

type ReportConfigSorting

type ReportConfigSorting struct {
	// Direction - Direction of sort. Possible values include: 'Ascending', 'Descending'
	Direction Direction `json:"direction,omitempty"`
	// Name - The name of the column to sort.
	Name *string `json:"name,omitempty"`
}

ReportConfigSorting the order by expression to be used in the report.

type ReportConfigTimePeriod

type ReportConfigTimePeriod struct {
	// From - The start date to pull data from.
	From *date.Time `json:"from,omitempty"`
	// To - The end date to pull data to.
	To *date.Time `json:"to,omitempty"`
}

ReportConfigTimePeriod the start and end date for pulling data for the report.

type ReportGranularityType

type ReportGranularityType string

ReportGranularityType enumerates the values for report granularity type.

const (
	// ReportGranularityTypeDaily ...
	ReportGranularityTypeDaily ReportGranularityType = "Daily"
	// ReportGranularityTypeMonthly ...
	ReportGranularityTypeMonthly ReportGranularityType = "Monthly"
)

func PossibleReportGranularityTypeValues

func PossibleReportGranularityTypeValues() []ReportGranularityType

PossibleReportGranularityTypeValues returns an array of possible values for the ReportGranularityType const type.

type ReportTimeframeType

type ReportTimeframeType string

ReportTimeframeType enumerates the values for report timeframe type.

const (
	// ReportTimeframeTypeCustom ...
	ReportTimeframeTypeCustom ReportTimeframeType = "Custom"
	// ReportTimeframeTypeMonthToDate ...
	ReportTimeframeTypeMonthToDate ReportTimeframeType = "MonthToDate"
	// ReportTimeframeTypeWeekToDate ...
	ReportTimeframeTypeWeekToDate ReportTimeframeType = "WeekToDate"
	// ReportTimeframeTypeYearToDate ...
	ReportTimeframeTypeYearToDate ReportTimeframeType = "YearToDate"
)

func PossibleReportTimeframeTypeValues

func PossibleReportTimeframeTypeValues() []ReportTimeframeType

PossibleReportTimeframeTypeValues returns an array of possible values for the ReportTimeframeType const type.

type Resource

type Resource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Resource the Resource model definition.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type StatusType

type StatusType string

StatusType enumerates the values for status type.

const (
	// Active ...
	Active StatusType = "Active"
	// Inactive ...
	Inactive StatusType = "Inactive"
)

func PossibleStatusTypeValues

func PossibleStatusTypeValues() []StatusType

PossibleStatusTypeValues returns an array of possible values for the StatusType const type.

type TimeframeType

type TimeframeType string

TimeframeType enumerates the values for timeframe type.

const (
	// TimeframeTypeBillingMonthToDate ...
	TimeframeTypeBillingMonthToDate TimeframeType = "BillingMonthToDate"
	// TimeframeTypeCustom ...
	TimeframeTypeCustom TimeframeType = "Custom"
	// TimeframeTypeMonthToDate ...
	TimeframeTypeMonthToDate TimeframeType = "MonthToDate"
	// TimeframeTypeTheLastBillingMonth ...
	TimeframeTypeTheLastBillingMonth TimeframeType = "TheLastBillingMonth"
	// TimeframeTypeTheLastMonth ...
	TimeframeTypeTheLastMonth TimeframeType = "TheLastMonth"
	// TimeframeTypeWeekToDate ...
	TimeframeTypeWeekToDate TimeframeType = "WeekToDate"
)

func PossibleTimeframeTypeValues

func PossibleTimeframeTypeValues() []TimeframeType

PossibleTimeframeTypeValues returns an array of possible values for the TimeframeType const type.

type View

type View struct {
	autorest.Response `json:"-"`
	*ViewProperties   `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

View states and configurations of Cost Analysis.

func (View) MarshalJSON

func (vVar View) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for View.

func (*View) UnmarshalJSON

func (vVar *View) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for View struct.

type ViewListResult

type ViewListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of views.
	Value *[]View `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ViewListResult result of listing views. It contains a list of available views.

func (ViewListResult) IsEmpty

func (vlr ViewListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (ViewListResult) MarshalJSON

func (vlr ViewListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ViewListResult.

type ViewListResultIterator

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

ViewListResultIterator provides access to a complete listing of View values.

func NewViewListResultIterator

func NewViewListResultIterator(page ViewListResultPage) ViewListResultIterator

Creates a new instance of the ViewListResultIterator type.

func (*ViewListResultIterator) Next

func (iter *ViewListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ViewListResultIterator) NextWithContext

func (iter *ViewListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ViewListResultIterator) NotDone

func (iter ViewListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (ViewListResultIterator) Response

func (iter ViewListResultIterator) Response() ViewListResult

Response returns the raw server response from the last page request.

func (ViewListResultIterator) Value

func (iter ViewListResultIterator) Value() View

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ViewListResultPage

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

ViewListResultPage contains a page of View values.

func NewViewListResultPage

func NewViewListResultPage(cur ViewListResult, getNextPage func(context.Context, ViewListResult) (ViewListResult, error)) ViewListResultPage

Creates a new instance of the ViewListResultPage type.

func (*ViewListResultPage) Next

func (page *ViewListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ViewListResultPage) NextWithContext

func (page *ViewListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ViewListResultPage) NotDone

func (page ViewListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ViewListResultPage) Response

func (page ViewListResultPage) Response() ViewListResult

Response returns the raw server response from the last page request.

func (ViewListResultPage) Values

func (page ViewListResultPage) Values() []View

Values returns the slice of values for the current page or nil if there are no values.

type ViewProperties

type ViewProperties struct {
	// DisplayName - User input name of the view. Required.
	DisplayName *string `json:"displayName,omitempty"`
	// Scope - Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
	Scope *string `json:"scope,omitempty"`
	// CreatedOn - READ-ONLY; Date the user created this view.
	CreatedOn *date.Time `json:"createdOn,omitempty"`
	// ModifiedOn - READ-ONLY; Date when the user last modified this view.
	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
	// ReportConfigDefinition - Query body configuration. Required.
	*ReportConfigDefinition `json:"query,omitempty"`
	// Chart - Chart type of the main view in Cost Analysis. Required. Possible values include: 'Area', 'Line', 'StackedColumn', 'GroupedColumn', 'Table'
	Chart ChartType `json:"chart,omitempty"`
	// Accumulated - Show costs accumulated over time. Possible values include: 'True', 'False'
	Accumulated AccumulatedType `json:"accumulated,omitempty"`
	// Metric - Metric to use when displaying costs. Possible values include: 'ActualCost', 'AmortizedCost', 'AHUB'
	Metric MetricType `json:"metric,omitempty"`
	// Kpis - List of KPIs to show in Cost Analysis UI.
	Kpis *[]KpiProperties `json:"kpis,omitempty"`
	// Pivots - Configuration of 3 sub-views in the Cost Analysis UI.
	Pivots *[]PivotProperties `json:"pivots,omitempty"`
}

ViewProperties the properties of the view.

func (ViewProperties) MarshalJSON

func (vp ViewProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ViewProperties.

func (*ViewProperties) UnmarshalJSON

func (vp *ViewProperties) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ViewProperties struct.

type ViewsClient

type ViewsClient struct {
	BaseClient
}

ViewsClient is the client for the Views methods of the Costmanagement service.

func NewViewsClient

func NewViewsClient(subscriptionID string) ViewsClient

NewViewsClient creates an instance of the ViewsClient client.

func NewViewsClientWithBaseURI

func NewViewsClientWithBaseURI(baseURI string, subscriptionID string) ViewsClient

NewViewsClientWithBaseURI creates an instance of the ViewsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ViewsClient) CreateOrUpdate

func (client ViewsClient) CreateOrUpdate(ctx context.Context, viewName string, parameters View) (result View, err error)

CreateOrUpdate the operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: viewName - view name parameters - parameters supplied to the CreateOrUpdate View operation.

func (ViewsClient) CreateOrUpdateByScope

func (client ViewsClient) CreateOrUpdateByScope(ctx context.Context, scope string, viewName string, parameters View) (result View, err error)

CreateOrUpdateByScope the operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. viewName - view name parameters - parameters supplied to the CreateOrUpdate View operation.

func (ViewsClient) CreateOrUpdateByScopePreparer

func (client ViewsClient) CreateOrUpdateByScopePreparer(ctx context.Context, scope string, viewName string, parameters View) (*http.Request, error)

CreateOrUpdateByScopePreparer prepares the CreateOrUpdateByScope request.

func (ViewsClient) CreateOrUpdateByScopeResponder

func (client ViewsClient) CreateOrUpdateByScopeResponder(resp *http.Response) (result View, err error)

CreateOrUpdateByScopeResponder handles the response to the CreateOrUpdateByScope request. The method always closes the http.Response Body.

func (ViewsClient) CreateOrUpdateByScopeSender

func (client ViewsClient) CreateOrUpdateByScopeSender(req *http.Request) (*http.Response, error)

CreateOrUpdateByScopeSender sends the CreateOrUpdateByScope request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) CreateOrUpdatePreparer

func (client ViewsClient) CreateOrUpdatePreparer(ctx context.Context, viewName string, parameters View) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ViewsClient) CreateOrUpdateResponder

func (client ViewsClient) CreateOrUpdateResponder(resp *http.Response) (result View, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (ViewsClient) CreateOrUpdateSender

func (client ViewsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) Delete

func (client ViewsClient) Delete(ctx context.Context, viewName string) (result autorest.Response, err error)

Delete the operation to delete a view. Parameters: viewName - view name

func (ViewsClient) DeleteByScope

func (client ViewsClient) DeleteByScope(ctx context.Context, scope string, viewName string) (result autorest.Response, err error)

DeleteByScope the operation to delete a view. Parameters: scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. viewName - view name

func (ViewsClient) DeleteByScopePreparer

func (client ViewsClient) DeleteByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error)

DeleteByScopePreparer prepares the DeleteByScope request.

func (ViewsClient) DeleteByScopeResponder

func (client ViewsClient) DeleteByScopeResponder(resp *http.Response) (result autorest.Response, err error)

DeleteByScopeResponder handles the response to the DeleteByScope request. The method always closes the http.Response Body.

func (ViewsClient) DeleteByScopeSender

func (client ViewsClient) DeleteByScopeSender(req *http.Request) (*http.Response, error)

DeleteByScopeSender sends the DeleteByScope request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) DeletePreparer

func (client ViewsClient) DeletePreparer(ctx context.Context, viewName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ViewsClient) DeleteResponder

func (client ViewsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ViewsClient) DeleteSender

func (client ViewsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) Get

func (client ViewsClient) Get(ctx context.Context, viewName string) (result View, err error)

Get gets the view by view name. Parameters: viewName - view name

func (ViewsClient) GetByScope

func (client ViewsClient) GetByScope(ctx context.Context, scope string, viewName string) (result View, err error)

GetByScope gets the view for the defined scope by view name. Parameters: scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. viewName - view name

func (ViewsClient) GetByScopePreparer

func (client ViewsClient) GetByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error)

GetByScopePreparer prepares the GetByScope request.

func (ViewsClient) GetByScopeResponder

func (client ViewsClient) GetByScopeResponder(resp *http.Response) (result View, err error)

GetByScopeResponder handles the response to the GetByScope request. The method always closes the http.Response Body.

func (ViewsClient) GetByScopeSender

func (client ViewsClient) GetByScopeSender(req *http.Request) (*http.Response, error)

GetByScopeSender sends the GetByScope request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) GetPreparer

func (client ViewsClient) GetPreparer(ctx context.Context, viewName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (ViewsClient) GetResponder

func (client ViewsClient) GetResponder(resp *http.Response) (result View, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ViewsClient) GetSender

func (client ViewsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) List

func (client ViewsClient) List(ctx context.Context) (result ViewListResultPage, err error)

List lists all views by tenant and object.

func (ViewsClient) ListByScope

func (client ViewsClient) ListByScope(ctx context.Context, scope string) (result ViewListResultPage, err error)

ListByScope lists all views at the given scope. Parameters: scope - the scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.

func (ViewsClient) ListByScopeComplete

func (client ViewsClient) ListByScopeComplete(ctx context.Context, scope string) (result ViewListResultIterator, err error)

ListByScopeComplete enumerates all values, automatically crossing page boundaries as required.

func (ViewsClient) ListByScopePreparer

func (client ViewsClient) ListByScopePreparer(ctx context.Context, scope string) (*http.Request, error)

ListByScopePreparer prepares the ListByScope request.

func (ViewsClient) ListByScopeResponder

func (client ViewsClient) ListByScopeResponder(resp *http.Response) (result ViewListResult, err error)

ListByScopeResponder handles the response to the ListByScope request. The method always closes the http.Response Body.

func (ViewsClient) ListByScopeSender

func (client ViewsClient) ListByScopeSender(req *http.Request) (*http.Response, error)

ListByScopeSender sends the ListByScope request. The method will close the http.Response Body if it receives an error.

func (ViewsClient) ListComplete

func (client ViewsClient) ListComplete(ctx context.Context) (result ViewListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ViewsClient) ListPreparer

func (client ViewsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (ViewsClient) ListResponder

func (client ViewsClient) ListResponder(resp *http.Response) (result ViewListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ViewsClient) ListSender

func (client ViewsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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