costmanagement

package
v42.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package costmanagement implements the Azure ARM Costmanagement service API version 2019-10-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 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 CommonExportProperties

type CommonExportProperties struct {
	// Format - The format of the export being delivered. Possible values include: 'Csv'
	Format FormatType `json:"format,omitempty"`
	// DeliveryInfo - Has delivery information for the export.
	DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"`
	// Definition - Has definition for the export.
	Definition *QueryDefinition `json:"definition,omitempty"`
}

CommonExportProperties the common properties of the export.

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 ...

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) 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account 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.

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.

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.

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"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Export a 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 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.

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"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ExportExecution a 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; The list of export executions.
	Value *[]ExportExecution `json:"value,omitempty"`
}

ExportExecutionListResult result of listing exports execution history of a export by name

type ExportExecutionProperties

type ExportExecutionProperties struct {
	// ExecutionType - The type of the export execution. Possible values include: 'OnDemand', 'Scheduled'
	ExecutionType ExecutionType `json:"executionType,omitempty"`
	// Status - The 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 email id. For Scheduled executions, it is the constant value - 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 export execution finished.
	ProcessingEndTime *date.Time `json:"processingEndTime,omitempty"`
	// FileName - The name of the file export got written to.
	FileName    *string                 `json:"fileName,omitempty"`
	RunSettings *CommonExportProperties `json:"runSettings,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.

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. Possible values include: 'Csv'
	Format FormatType `json:"format,omitempty"`
	// DeliveryInfo - Has delivery information for the export.
	DeliveryInfo *ExportDeliveryInfo `json:"deliveryInfo,omitempty"`
	// Definition - Has definition for the export.
	Definition *QueryDefinition `json:"definition,omitempty"`
}

ExportProperties the properties of the export.

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 schedule. Whether active or not. If inactive, the export's scheduled execution 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 a export.

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 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account 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 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account 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 a export. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account 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) (result Export, err error)

Get the operation to get the export for the defined scope by export name. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account exportName - export Name.

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 by export name. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account 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) (*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) (result ExportListResult, err error)

List the operation to list all exports at the given scope. 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account

func (ExportsClient) ListPreparer

func (client ExportsClient) ListPreparer(ctx context.Context, scope 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 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"
	// Hourly ...
	Hourly GranularityType = "Hourly"
)

func PossibleGranularityTypeValues

func PossibleGranularityTypeValues() []GranularityType

PossibleGranularityTypeValues returns an array of possible values for the GranularityType 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.

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.

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.

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(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 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, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account parameters - parameters supplied to the CreateOrUpdate Query Config operation.

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', 'Hourly'
	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"`
	// Sorting - Array of sorting by columns in query.
	Sorting *[]QuerySortingConfiguration `json:"sorting,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.
	Type *string `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: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', 'TheLastMonth', 'TheLastYear', 'Custom'
	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 QuerySortingConfiguration

type QuerySortingConfiguration struct {
	// QuerySortingDirection - The sorting direction. Possible values include: 'Ascending', 'Descending'
	QuerySortingDirection SortDirection `json:"querySortingDirection,omitempty"`
	// Name - The name of the column to use in sorting.
	Name *string `json:"name,omitempty"`
}

QuerySortingConfiguration the configuration for sorting in the query.

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 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 SortDirection

type SortDirection string

SortDirection enumerates the values for sort direction.

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

func PossibleSortDirectionValues

func PossibleSortDirectionValues() []SortDirection

PossibleSortDirectionValues returns an array of possible values for the SortDirection const type.

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 (
	// Custom ...
	Custom TimeframeType = "Custom"
	// MonthToDate ...
	MonthToDate TimeframeType = "MonthToDate"
	// TheLastMonth ...
	TheLastMonth TimeframeType = "TheLastMonth"
	// TheLastWeek ...
	TheLastWeek TimeframeType = "TheLastWeek"
	// TheLastYear ...
	TheLastYear TimeframeType = "TheLastYear"
	// WeekToDate ...
	WeekToDate TimeframeType = "WeekToDate"
	// YearToDate ...
	YearToDate TimeframeType = "YearToDate"
)

func PossibleTimeframeTypeValues

func PossibleTimeframeTypeValues() []TimeframeType

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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