Documentation ¶
Overview ¶
Package commerce implements the Azure ARM Commerce service API version 2015-06-01-preview.
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type AggregationGranularity
- type ErrorResponse
- type InfoField
- type ManagementClient
- type MeterInfo
- type MonetaryCommitment
- type MonetaryCredit
- type OfferTermInfo
- type RateCardClient
- func (client RateCardClient) Get(filter string) (result ResourceRateCardInfo, err error)
- func (client RateCardClient) GetPreparer(filter string) (*http.Request, error)
- func (client RateCardClient) GetResponder(resp *http.Response) (result ResourceRateCardInfo, err error)
- func (client RateCardClient) GetSender(req *http.Request) (*http.Response, error)
- type RateCardQueryParameters
- type RecurringCharge
- type ResourceRateCardInfo
- type UsageAggregatesClient
- func (client UsageAggregatesClient) List(reportedstartTime date.Time, reportedEndTime date.Time, showDetails *bool, ...) (result UsageAggregationListResult, err error)
- func (client UsageAggregatesClient) ListNextResults(lastResults UsageAggregationListResult) (result UsageAggregationListResult, err error)
- func (client UsageAggregatesClient) ListPreparer(reportedstartTime date.Time, reportedEndTime date.Time, showDetails *bool, ...) (*http.Request, error)
- func (client UsageAggregatesClient) ListResponder(resp *http.Response) (result UsageAggregationListResult, err error)
- func (client UsageAggregatesClient) ListSender(req *http.Request) (*http.Response, error)
- type UsageAggregation
- type UsageAggregationListResult
- type UsageSample
Constants ¶
const ( // APIVersion is the version of the Commerce APIVersion = "2015-06-01-preview" // DefaultBaseURI is the default URI used for the service Commerce DefaultBaseURI = "https://management.azure.com" )
Variables ¶
This section is empty.
Functions ¶
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type AggregationGranularity ¶
type AggregationGranularity string
AggregationGranularity enumerates the values for aggregation granularity.
const ( // Daily specifies the daily state for aggregation granularity. Daily AggregationGranularity = "Daily" // Hourly specifies the hourly state for aggregation granularity. Hourly AggregationGranularity = "Hourly" )
type ErrorResponse ¶
type ErrorResponse struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
ErrorResponse is describes ehe format of Error response.
type InfoField ¶
type InfoField struct {
Project *string `json:"project,omitempty"`
}
InfoField is key-value pairs of instance details in the legacy format.
type ManagementClient ¶
type ManagementClient struct { autorest.Client BaseURI string APIVersion string SubscriptionID string }
ManagementClient is the base client for Commerce.
func New ¶
func New(subscriptionID string) ManagementClient
New creates an instance of the ManagementClient client.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient
NewWithBaseURI creates an instance of the ManagementClient client.
type MeterInfo ¶
type MeterInfo struct { MeterID *uuid.UUID `json:"MeterId,omitempty"` MeterName *string `json:"MeterName,omitempty"` MeterCategory *string `json:"MeterCategory,omitempty"` MeterSubCategory *string `json:"MeterSubCategory,omitempty"` Unit *string `json:"Unit,omitempty"` MeterRates *map[string]*float64 `json:"MeterRates,omitempty"` EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` IncludedQuantity *float64 `json:"IncludedQuantity,omitempty"` }
MeterInfo is detailed information about the meter.
type MonetaryCommitment ¶
type MonetaryCommitment struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` TieredDiscount *map[string]*decimal.Decimal `json:"TieredDiscount,omitempty"` }
MonetaryCommitment is
type MonetaryCredit ¶
type MonetaryCredit struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` Credit *decimal.Decimal `json:"Credit,omitempty"` }
MonetaryCredit is
type OfferTermInfo ¶
type OfferTermInfo struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` }
OfferTermInfo is describes the offer term.
type RateCardClient ¶
type RateCardClient struct {
ManagementClient
}
RateCardClient is the client for the RateCard methods of the Commerce service.
func NewRateCardClient ¶
func NewRateCardClient(subscriptionID string) RateCardClient
NewRateCardClient creates an instance of the RateCardClient client.
func NewRateCardClientWithBaseURI ¶
func NewRateCardClientWithBaseURI(baseURI string, subscriptionID string) RateCardClient
NewRateCardClientWithBaseURI creates an instance of the RateCardClient client.
func (RateCardClient) Get ¶
func (client RateCardClient) Get(filter string) (result ResourceRateCardInfo, err error)
Get enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change.
filter is the filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical operators at this time. All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part of the $filter.
func (RateCardClient) GetPreparer ¶
func (client RateCardClient) GetPreparer(filter string) (*http.Request, error)
GetPreparer prepares the Get request.
func (RateCardClient) GetResponder ¶
func (client RateCardClient) GetResponder(resp *http.Response) (result ResourceRateCardInfo, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
type RateCardQueryParameters ¶
type RateCardQueryParameters struct { OfferDurableID *string `json:"OfferDurableId,omitempty"` Currency *string `json:"Currency,omitempty"` Locale *string `json:"Locale,omitempty"` RegionInfo *string `json:"RegionInfo,omitempty"` }
RateCardQueryParameters is parameters that are used in the odata $filter query parameter for providing RateCard information.
type RecurringCharge ¶
type RecurringCharge struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` RecurringChargeProperty *int32 `json:"RecurringCharge,omitempty"` }
RecurringCharge is
type ResourceRateCardInfo ¶
type ResourceRateCardInfo struct { autorest.Response `json:"-"` Currency *string `json:"Currency,omitempty"` Locale *string `json:"Locale,omitempty"` IsTaxIncluded *bool `json:"IsTaxIncluded,omitempty"` MeterRegion *string `json:"MeterRegion,omitempty"` Tags *[]string `json:"Tags,omitempty"` OfferTerms *[]OfferTermInfo `json:"OfferTerms,omitempty"` Meters *[]MeterInfo `json:"Meters,omitempty"` }
ResourceRateCardInfo is price and Metadata information for resources
type UsageAggregatesClient ¶
type UsageAggregatesClient struct {
ManagementClient
}
UsageAggregatesClient is the client for the UsageAggregates methods of the Commerce service.
func NewUsageAggregatesClient ¶
func NewUsageAggregatesClient(subscriptionID string) UsageAggregatesClient
NewUsageAggregatesClient creates an instance of the UsageAggregatesClient client.
func NewUsageAggregatesClientWithBaseURI ¶
func NewUsageAggregatesClientWithBaseURI(baseURI string, subscriptionID string) UsageAggregatesClient
NewUsageAggregatesClientWithBaseURI creates an instance of the UsageAggregatesClient client.
func (UsageAggregatesClient) List ¶
func (client UsageAggregatesClient) List(reportedstartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string) (result UsageAggregationListResult, err error)
List query aggregated Azure subscription consumption data for a date range.
reportedstartTime is the start of the time range to retrieve data for. reportedEndTime is the end of the time range to retrieve data for. showDetails is when set to true (default), the aggregates are broken down into the instance metadata which is more granular. aggregationGranularity is value is either daily (default) or hourly to tell the API how to return the results grouped by day or hour. Possible values include: 'Daily', 'Hourly' continuationToken is retrieved from previous calls, this is the bookmark used for progress when the responses are paged.
func (UsageAggregatesClient) ListNextResults ¶
func (client UsageAggregatesClient) ListNextResults(lastResults UsageAggregationListResult) (result UsageAggregationListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (UsageAggregatesClient) ListPreparer ¶
func (client UsageAggregatesClient) ListPreparer(reportedstartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string) (*http.Request, error)
ListPreparer prepares the List request.
func (UsageAggregatesClient) ListResponder ¶
func (client UsageAggregatesClient) ListResponder(resp *http.Response) (result UsageAggregationListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (UsageAggregatesClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type UsageAggregation ¶
type UsageAggregation struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` *UsageSample `json:"properties,omitempty"` }
UsageAggregation is describes the usageAggregation.
type UsageAggregationListResult ¶
type UsageAggregationListResult struct { autorest.Response `json:"-"` Value *[]UsageAggregation `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` }
UsageAggregationListResult is the Get UsageAggregates operation response.
func (UsageAggregationListResult) UsageAggregationListResultPreparer ¶
func (client UsageAggregationListResult) UsageAggregationListResultPreparer() (*http.Request, error)
UsageAggregationListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type UsageSample ¶
type UsageSample struct { SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` MeterID *string `json:"meterId,omitempty"` UsageStartTime *date.Time `json:"usageStartTime,omitempty"` UsageEndTime *date.Time `json:"usageEndTime,omitempty"` Quantity *map[string]interface{} `json:"quantity,omitempty"` Unit *string `json:"unit,omitempty"` MeterName *string `json:"meterName,omitempty"` MeterCategory *string `json:"meterCategory,omitempty"` MeterSubCategory *string `json:"meterSubCategory,omitempty"` MeterRegion *string `json:"meterRegion,omitempty"` InfoFields *InfoField `json:"infoFields,omitempty"` InstanceData *string `json:"instanceData,omitempty"` }
UsageSample is describes a sample of the usageAggregation.