const ( // DefaultBaseURI is the default URI used for the service Costmanagement DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
AccumulatedType enumerates the values for accumulated type.
type AccumulatedType string
const ( // False ... False AccumulatedType = "false" // True ... True AccumulatedType = "true" )
func PossibleAccumulatedTypeValues() []AccumulatedType
PossibleAccumulatedTypeValues returns an array of possible values for the AccumulatedType const type.
Alert an individual 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"` }
func (a Alert) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Alert.
func (a *Alert) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Alert struct.
AlertCategory enumerates the values for alert category.
type AlertCategory string
const ( // Billing ... Billing AlertCategory = "Billing" // Cost ... Cost AlertCategory = "Cost" // System ... System AlertCategory = "System" // Usage ... Usage AlertCategory = "Usage" )
func PossibleAlertCategoryValues() []AlertCategory
PossibleAlertCategoryValues returns an array of possible values for the AlertCategory const type.
AlertCriteria enumerates the values for alert criteria.
type AlertCriteria string
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() []AlertCriteria
PossibleAlertCriteriaValues returns an array of possible values for the AlertCriteria const type.
AlertOperator enumerates the values for alert operator.
type AlertOperator string
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() []AlertOperator
PossibleAlertOperatorValues returns an array of possible values for the AlertOperator const 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"` }
AlertPropertiesDefinition defines the type of alert
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"` }
AlertPropertiesDetails alert details
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"` }
AlertSource enumerates the values for alert source.
type AlertSource string
const ( // Preset ... Preset AlertSource = "Preset" // User ... User AlertSource = "User" )
func PossibleAlertSourceValues() []AlertSource
PossibleAlertSourceValues returns an array of possible values for the AlertSource const type.
AlertStatus enumerates the values for alert status.
type AlertStatus string
const ( // AlertStatusActive ... AlertStatusActive AlertStatus = "Active" // AlertStatusDismissed ... AlertStatusDismissed AlertStatus = "Dismissed" // AlertStatusNone ... AlertStatusNone AlertStatus = "None" // AlertStatusOverridden ... AlertStatusOverridden AlertStatus = "Overridden" // AlertStatusResolved ... AlertStatusResolved AlertStatus = "Resolved" )
func PossibleAlertStatusValues() []AlertStatus
PossibleAlertStatusValues returns an array of possible values for the AlertStatus const type.
AlertTimeGrainType enumerates the values for alert time grain type.
type AlertTimeGrainType string
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() []AlertTimeGrainType
PossibleAlertTimeGrainTypeValues returns an array of possible values for the AlertTimeGrainType const type.
AlertType enumerates the values for alert type.
type AlertType string
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() []AlertType
PossibleAlertTypeValues returns an array of possible values for the AlertType const type.
AlertsClient is the client for the Alerts methods of the Costmanagement service.
type AlertsClient struct { BaseClient }
func NewAlertsClient(subscriptionID string) AlertsClient
NewAlertsClient creates an instance of the AlertsClient client.
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 (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 (client AlertsClient) DismissPreparer(ctx context.Context, scope string, alertID string, parameters DismissAlertPayload) (*http.Request, error)
DismissPreparer prepares the Dismiss request.
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 (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 (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 (client AlertsClient) GetPreparer(ctx context.Context, scope string, alertID string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (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 (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 (client AlertsClient) ListExternalPreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string) (*http.Request, error)
ListExternalPreparer prepares the ListExternal request.
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 (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 (client AlertsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
AlertsResult result of alerts.
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"` }
func (ar AlertsResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertsResult.
BaseClient is the base client for Costmanagement.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
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).
ChartType enumerates the values for chart type.
type ChartType string
const ( // Area ... Area ChartType = "Area" // GroupedColumn ... GroupedColumn ChartType = "GroupedColumn" // Line ... Line ChartType = "Line" // StackedColumn ... StackedColumn ChartType = "StackedColumn" // Table ... Table ChartType = "Table" )
func PossibleChartTypeValues() []ChartType
PossibleChartTypeValues returns an array of possible values for the ChartType const type.
CommonExportProperties the common properties of the export.
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"` }
func (cep CommonExportProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CommonExportProperties.
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"` }
func (d Dimension) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Dimension.
func (d *Dimension) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Dimension struct.
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"` }
func (dp DimensionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DimensionProperties.
DimensionsClient is the client for the Dimensions methods of the Costmanagement service.
type DimensionsClient struct { BaseClient }
func NewDimensionsClient(subscriptionID string) DimensionsClient
NewDimensionsClient creates an instance of the DimensionsClient client.
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 (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 (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 (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 (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 (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 (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 (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 (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.
DimensionsListResult result of listing dimensions. It contains a list of available dimensions.
type DimensionsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of dimensions. Value *[]Dimension `json:"value,omitempty"` }
func (dlr DimensionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DimensionsListResult.
Direction enumerates the values for direction.
type Direction string
const ( // Ascending ... Ascending Direction = "Ascending" // Descending ... Descending Direction = "Descending" )
func PossibleDirectionValues() []Direction
PossibleDirectionValues returns an array of possible values for the Direction const type.
DismissAlertPayload the request payload to update an alert
type DismissAlertPayload struct { *AlertProperties `json:"properties,omitempty"` }
func (dap DismissAlertPayload) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DismissAlertPayload.
func (dap *DismissAlertPayload) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for DismissAlertPayload struct.
ErrorDetails the details of the error.
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"` }
func (ed ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ErrorDetails.
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 ErrorResponse struct { // Error - The details of the error. Error *ErrorDetails `json:"error,omitempty"` }
ExecutionStatus enumerates the values for execution status.
type ExecutionStatus string
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() []ExecutionStatus
PossibleExecutionStatusValues returns an array of possible values for the ExecutionStatus const type.
ExecutionType enumerates the values for execution type.
type ExecutionType string
const ( // OnDemand ... OnDemand ExecutionType = "OnDemand" // Scheduled ... Scheduled ExecutionType = "Scheduled" )
func PossibleExecutionTypeValues() []ExecutionType
PossibleExecutionTypeValues returns an array of possible values for the ExecutionType const type.
Export an export resource.
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"` }
func (e Export) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Export.
func (e *Export) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Export struct.
ExportDataset the definition for data in the export.
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"` }
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 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"` }
ExportDefinition the definition of an export.
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"` }
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 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"` }
ExportDeliveryInfo the delivery information associated with a export.
type ExportDeliveryInfo struct { // Destination - Has destination for the export being delivered. Destination *ExportDeliveryDestination `json:"destination,omitempty"` }
ExportExecution an export execution.
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"` }
func (ee ExportExecution) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ExportExecution.
func (ee *ExportExecution) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ExportExecution struct.
ExportExecutionListResult result of listing the execution history of an export.
type ExportExecutionListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; A list of export executions. Value *[]ExportExecution `json:"value,omitempty"` }
func (eelr ExportExecutionListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ExportExecutionListResult.
ExportExecutionProperties the properties of the export execution.
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"` }
ExportListResult result of listing exports. It contains a list of available exports in the scope provided.
type ExportListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of exports. Value *[]Export `json:"value,omitempty"` }
func (elr ExportListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ExportListResult.
ExportProperties the properties of the export.
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"` }
func (ep ExportProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ExportProperties.
ExportRecurrencePeriod the start and end date for recurrence schedule.
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"` }
ExportSchedule the schedule associated with the export.
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"` }
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 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"` }
ExportType enumerates the values for export type.
type ExportType string
const ( // ExportTypeActualCost ... ExportTypeActualCost ExportType = "ActualCost" // ExportTypeAmortizedCost ... ExportTypeAmortizedCost ExportType = "AmortizedCost" // ExportTypeUsage ... ExportTypeUsage ExportType = "Usage" )
func PossibleExportTypeValues() []ExportType
PossibleExportTypeValues returns an array of possible values for the ExportType const type.
ExportsClient is the client for the Exports methods of the Costmanagement service.
type ExportsClient struct { BaseClient }
func NewExportsClient(subscriptionID string) ExportsClient
NewExportsClient creates an instance of the ExportsClient client.
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 (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 (client ExportsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, exportName string, parameters Export) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
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 (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 (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 (client ExportsClient) DeletePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
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 (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 (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 (client ExportsClient) ExecutePreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)
ExecutePreparer prepares the Execute request.
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 (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 (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 (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 (client ExportsClient) GetExecutionHistoryPreparer(ctx context.Context, scope string, exportName string) (*http.Request, error)
GetExecutionHistoryPreparer prepares the GetExecutionHistory request.
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 (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 (client ExportsClient) GetPreparer(ctx context.Context, scope string, exportName string, expand string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (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 (client ExportsClient) ListPreparer(ctx context.Context, scope string, expand string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
ExternalCloudProviderType enumerates the values for external cloud provider type.
type ExternalCloudProviderType string
const ( // ExternalBillingAccounts ... ExternalBillingAccounts ExternalCloudProviderType = "externalBillingAccounts" // ExternalSubscriptions ... ExternalSubscriptions ExternalCloudProviderType = "externalSubscriptions" )
func PossibleExternalCloudProviderTypeValues() []ExternalCloudProviderType
PossibleExternalCloudProviderTypeValues returns an array of possible values for the ExternalCloudProviderType const type.
ForecastClient is the client for the Forecast methods of the Costmanagement service.
type ForecastClient struct { BaseClient }
func NewForecastClient(subscriptionID string) ForecastClient
NewForecastClient creates an instance of the ForecastClient client.
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 (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 (client ForecastClient) ExternalCloudProviderUsagePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters ForecastDefinition, filter string) (*http.Request, error)
ExternalCloudProviderUsagePreparer prepares the ExternalCloudProviderUsage request.
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 (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 (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 (client ForecastClient) UsagePreparer(ctx context.Context, scope string, parameters ForecastDefinition, filter string) (*http.Request, error)
UsagePreparer prepares the Usage request.
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 (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.
ForecastDataset the definition of data present in the forecast.
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"` }
func (fd ForecastDataset) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ForecastDataset.
ForecastDefinition the definition of a forecast.
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"` }
ForecastTimeframeType enumerates the values for forecast timeframe type.
type ForecastTimeframeType string
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() []ForecastTimeframeType
PossibleForecastTimeframeTypeValues returns an array of possible values for the ForecastTimeframeType const type.
ForecastType enumerates the values for forecast type.
type ForecastType string
const ( // ForecastTypeActualCost ... ForecastTypeActualCost ForecastType = "ActualCost" // ForecastTypeAmortizedCost ... ForecastTypeAmortizedCost ForecastType = "AmortizedCost" // ForecastTypeUsage ... ForecastTypeUsage ForecastType = "Usage" )
func PossibleForecastTypeValues() []ForecastType
PossibleForecastTypeValues returns an array of possible values for the ForecastType const type.
FormatType enumerates the values for format type.
type FormatType string
const ( // Csv ... Csv FormatType = "Csv" )
func PossibleFormatTypeValues() []FormatType
PossibleFormatTypeValues returns an array of possible values for the FormatType const type.
GranularityType enumerates the values for granularity type.
type GranularityType string
const ( // Daily ... Daily GranularityType = "Daily" )
func PossibleGranularityTypeValues() []GranularityType
PossibleGranularityTypeValues returns an array of possible values for the GranularityType const type.
KpiProperties each KPI must contain a 'type' and 'enabled' key.
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"` }
KpiTypeType enumerates the values for kpi type type.
type KpiTypeType string
const ( // KpiTypeTypeBudget ... KpiTypeTypeBudget KpiTypeType = "Budget" // KpiTypeTypeForecast ... KpiTypeTypeForecast KpiTypeType = "Forecast" )
func PossibleKpiTypeTypeValues() []KpiTypeType
PossibleKpiTypeTypeValues returns an array of possible values for the KpiTypeType const type.
MetricType enumerates the values for metric type.
type MetricType string
const ( // ActualCost ... ActualCost MetricType = "ActualCost" // AHUB ... AHUB MetricType = "AHUB" // AmortizedCost ... AmortizedCost MetricType = "AmortizedCost" )
func PossibleMetricTypeValues() []MetricType
PossibleMetricTypeValues returns an array of possible values for the MetricType const type.
Operation a Cost management REST API 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"` }
func (o Operation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Operation.
OperationDisplay the object that represents the operation.
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"` }
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationDisplay.
OperationListResult result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.
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"` }
func (olr OperationListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationListResult.
OperationListResultIterator provides access to a complete listing of Operation values.
type OperationListResultIterator struct {
// contains filtered or unexported fields
}
func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator
Creates a new instance of the OperationListResultIterator type.
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 (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 (iter OperationListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) Response() OperationListResult
Response returns the raw server response from the last page request.
func (iter OperationListResultIterator) Value() Operation
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
// contains filtered or unexported fields
}
func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage
Creates a new instance of the OperationListResultPage type.
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 (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 (page OperationListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) Response() OperationListResult
Response returns the raw server response from the last page request.
func (page OperationListResultPage) Values() []Operation
Values returns the slice of values for the current page or nil if there are no values.
OperationsClient is the client for the Operations methods of the Costmanagement service.
type OperationsClient struct { BaseClient }
func NewOperationsClient(subscriptionID string) OperationsClient
NewOperationsClient creates an instance of the OperationsClient client.
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 (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)
List lists all of the available cost management REST API operations.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
OperatorType enumerates the values for operator type.
type OperatorType string
const ( // Contains ... Contains OperatorType = "Contains" // In ... In OperatorType = "In" )
func PossibleOperatorTypeValues() []OperatorType
PossibleOperatorTypeValues returns an array of possible values for the OperatorType const type.
PivotProperties each pivot must contain a 'type' and 'name'.
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"` }
PivotTypeType enumerates the values for pivot type type.
type PivotTypeType string
const ( // PivotTypeTypeDimension ... PivotTypeTypeDimension PivotTypeType = "Dimension" // PivotTypeTypeTagKey ... PivotTypeTypeTagKey PivotTypeType = "TagKey" )
func PossiblePivotTypeTypeValues() []PivotTypeType
PossiblePivotTypeTypeValues returns an array of possible values for the PivotTypeType const type.
ProxyResource the Resource model definition.
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"` }
func (pr ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProxyResource.
QueryAggregation the aggregation expression to be used in the query.
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"` }
QueryClient is the client for the Query methods of the Costmanagement service.
type QueryClient struct { BaseClient }
func NewQueryClient(subscriptionID string) QueryClient
NewQueryClient creates an instance of the QueryClient client.
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 (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 (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 (client QueryClient) UsageByExternalCloudProviderTypePreparer(ctx context.Context, externalCloudProviderType ExternalCloudProviderType, externalCloudProviderID string, parameters QueryDefinition) (*http.Request, error)
UsageByExternalCloudProviderTypePreparer prepares the UsageByExternalCloudProviderType request.
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 (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 (client QueryClient) UsagePreparer(ctx context.Context, scope string, parameters QueryDefinition) (*http.Request, error)
UsagePreparer prepares the Usage request.
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 (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.
QueryColumn ...
type QueryColumn struct { // Name - The name of column. Name *string `json:"name,omitempty"` // Type - The type of column. Type *string `json:"type,omitempty"` }
QueryColumnType enumerates the values for query column type.
type QueryColumnType string
const ( // QueryColumnTypeDimension ... QueryColumnTypeDimension QueryColumnType = "Dimension" // QueryColumnTypeTag ... QueryColumnTypeTag QueryColumnType = "Tag" )
func PossibleQueryColumnTypeValues() []QueryColumnType
PossibleQueryColumnTypeValues returns an array of possible values for the QueryColumnType const type.
QueryComparisonExpression the comparison expression to be used in the query.
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"` }
QueryDataset the definition of data present in the query.
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"` }
func (qd QueryDataset) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for QueryDataset.
QueryDatasetConfiguration the configuration of dataset in the query.
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"` }
QueryDefinition the definition of a query.
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"` }
QueryFilter the filter expression to be used in the export.
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"` }
QueryGrouping the group by expression to be used in the query.
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"` }
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"` }
QueryResult result of query. It contains all columns listed under groupings and aggregation.
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"` }
func (qr QueryResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for QueryResult.
func (qr *QueryResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for QueryResult struct.
QueryTimePeriod the start and end date for pulling data for the query.
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"` }
RecurrenceType enumerates the values for recurrence type.
type RecurrenceType string
const ( // RecurrenceTypeAnnually ... RecurrenceTypeAnnually RecurrenceType = "Annually" // RecurrenceTypeDaily ... RecurrenceTypeDaily RecurrenceType = "Daily" // RecurrenceTypeMonthly ... RecurrenceTypeMonthly RecurrenceType = "Monthly" // RecurrenceTypeWeekly ... RecurrenceTypeWeekly RecurrenceType = "Weekly" )
func PossibleRecurrenceTypeValues() []RecurrenceType
PossibleRecurrenceTypeValues returns an array of possible values for the RecurrenceType const type.
ReportConfigAggregation the aggregation expression to be used in the report.
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"` }
ReportConfigColumnType enumerates the values for report config column type.
type ReportConfigColumnType string
const ( // ReportConfigColumnTypeDimension ... ReportConfigColumnTypeDimension ReportConfigColumnType = "Dimension" // ReportConfigColumnTypeTag ... ReportConfigColumnTypeTag ReportConfigColumnType = "Tag" )
func PossibleReportConfigColumnTypeValues() []ReportConfigColumnType
PossibleReportConfigColumnTypeValues returns an array of possible values for the ReportConfigColumnType const type.
ReportConfigComparisonExpression the comparison expression to be used in the report.
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"` }
ReportConfigDataset the definition of data present in the report.
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"` }
func (rcd ReportConfigDataset) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReportConfigDataset.
ReportConfigDatasetConfiguration the configuration of dataset in the report.
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"` }
ReportConfigDefinition the definition of a report config.
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"` }
ReportConfigFilter the filter expression to be used in the report.
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"` }
ReportConfigGrouping the group by expression to be used in the report.
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"` }
ReportConfigSorting the order by expression to be used in the report.
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"` }
ReportConfigTimePeriod the start and end date for pulling data for the report.
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"` }
ReportGranularityType enumerates the values for report granularity type.
type ReportGranularityType string
const ( // ReportGranularityTypeDaily ... ReportGranularityTypeDaily ReportGranularityType = "Daily" // ReportGranularityTypeMonthly ... ReportGranularityTypeMonthly ReportGranularityType = "Monthly" )
func PossibleReportGranularityTypeValues() []ReportGranularityType
PossibleReportGranularityTypeValues returns an array of possible values for the ReportGranularityType const type.
ReportTimeframeType enumerates the values for report timeframe type.
type ReportTimeframeType string
const ( // ReportTimeframeTypeCustom ... ReportTimeframeTypeCustom ReportTimeframeType = "Custom" // ReportTimeframeTypeMonthToDate ... ReportTimeframeTypeMonthToDate ReportTimeframeType = "MonthToDate" // ReportTimeframeTypeWeekToDate ... ReportTimeframeTypeWeekToDate ReportTimeframeType = "WeekToDate" // ReportTimeframeTypeYearToDate ... ReportTimeframeTypeYearToDate ReportTimeframeType = "YearToDate" )
func PossibleReportTimeframeTypeValues() []ReportTimeframeType
PossibleReportTimeframeTypeValues returns an array of possible values for the ReportTimeframeType const type.
Resource the Resource model definition.
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"` }
func (r Resource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Resource.
StatusType enumerates the values for status type.
type StatusType string
const ( // Active ... Active StatusType = "Active" // Inactive ... Inactive StatusType = "Inactive" )
func PossibleStatusTypeValues() []StatusType
PossibleStatusTypeValues returns an array of possible values for the StatusType const type.
TimeframeType enumerates the values for timeframe type.
type TimeframeType string
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() []TimeframeType
PossibleTimeframeTypeValues returns an array of possible values for the TimeframeType const type.
View states and configurations of Cost Analysis.
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"` }
func (vVar View) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for View.
func (vVar *View) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for View struct.
ViewListResult result of listing views. It contains a list of available views.
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"` }
func (vlr ViewListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (vlr ViewListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ViewListResult.
ViewListResultIterator provides access to a complete listing of View values.
type ViewListResultIterator struct {
// contains filtered or unexported fields
}
func NewViewListResultIterator(page ViewListResultPage) ViewListResultIterator
Creates a new instance of the ViewListResultIterator type.
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 (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 (iter ViewListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ViewListResultIterator) Response() ViewListResult
Response returns the raw server response from the last page request.
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.
ViewListResultPage contains a page of View values.
type ViewListResultPage struct {
// contains filtered or unexported fields
}
func NewViewListResultPage(cur ViewListResult, getNextPage func(context.Context, ViewListResult) (ViewListResult, error)) ViewListResultPage
Creates a new instance of the ViewListResultPage type.
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 (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 (page ViewListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ViewListResultPage) Response() ViewListResult
Response returns the raw server response from the last page request.
func (page ViewListResultPage) Values() []View
Values returns the slice of values for the current page or nil if there are no values.
ViewProperties the properties of the view.
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"` }
func (vp ViewProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ViewProperties.
func (vp *ViewProperties) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ViewProperties struct.
ViewsClient is the client for the Views methods of the Costmanagement service.
type ViewsClient struct { BaseClient }
func NewViewsClient(subscriptionID string) ViewsClient
NewViewsClient creates an instance of the ViewsClient client.
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 (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 (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 (client ViewsClient) CreateOrUpdateByScopePreparer(ctx context.Context, scope string, viewName string, parameters View) (*http.Request, error)
CreateOrUpdateByScopePreparer prepares the CreateOrUpdateByScope request.
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 (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 (client ViewsClient) CreateOrUpdatePreparer(ctx context.Context, viewName string, parameters View) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
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 (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 (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 (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 (client ViewsClient) DeleteByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error)
DeleteByScopePreparer prepares the DeleteByScope request.
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 (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 (client ViewsClient) DeletePreparer(ctx context.Context, viewName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
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 (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 (client ViewsClient) Get(ctx context.Context, viewName string) (result View, err error)
Get gets the view by view name. Parameters: viewName - view name
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 (client ViewsClient) GetByScopePreparer(ctx context.Context, scope string, viewName string) (*http.Request, error)
GetByScopePreparer prepares the GetByScope request.
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 (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 (client ViewsClient) GetPreparer(ctx context.Context, viewName string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (client ViewsClient) List(ctx context.Context) (result ViewListResultPage, err error)
List lists all views by tenant and object.
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 (client ViewsClient) ListByScopeComplete(ctx context.Context, scope string) (result ViewListResultIterator, err error)
ListByScopeComplete enumerates all values, automatically crossing page boundaries as required.
func (client ViewsClient) ListByScopePreparer(ctx context.Context, scope string) (*http.Request, error)
ListByScopePreparer prepares the ListByScope request.
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 (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 (client ViewsClient) ListComplete(ctx context.Context) (result ViewListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ViewsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
Name | Synopsis |
---|---|
.. | |
costmanagementapi | Deprecated: Please note, this package has been deprecated. |