commerce

package
v14.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package commerce implements the Azure ARM Commerce service API version 2015-06-01-preview.

Commerce Admin Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Commerce
	DefaultBaseURI = "https://management.local.azurestack.external"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

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

func Version

func Version() string

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

Types

type BaseClient

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

BaseClient is the base client for Commerce.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type Resource

type Resource struct {
	// ID - URI of the resource.
	ID *string `json:"id,omitempty"`
	// Name - Name of the resource.
	Name *string `json:"name,omitempty"`
	// Type - Type of resource.
	Type *string `json:"type,omitempty"`
	// Location - Location where resource is location.
	Location *string `json:"location,omitempty"`
	// Tags - List of key value pairs.
	Tags map[string]*string `json:"tags"`
}

Resource base Resource Object

func (Resource) MarshalJSON

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

MarshalJSON is the custom marshaler for Resource.

type SubscriberUsageAggregatesClient

type SubscriberUsageAggregatesClient struct {
	BaseClient
}

SubscriberUsageAggregatesClient is the commerce Admin Client

func NewSubscriberUsageAggregatesClient

func NewSubscriberUsageAggregatesClient(subscriptionID string) SubscriberUsageAggregatesClient

NewSubscriberUsageAggregatesClient creates an instance of the SubscriberUsageAggregatesClient client.

func NewSubscriberUsageAggregatesClientWithBaseURI

func NewSubscriberUsageAggregatesClientWithBaseURI(baseURI string, subscriptionID string) SubscriberUsageAggregatesClient

NewSubscriberUsageAggregatesClientWithBaseURI creates an instance of the SubscriberUsageAggregatesClient client.

func (SubscriberUsageAggregatesClient) List

func (client SubscriberUsageAggregatesClient) List(ctx context.Context, reportedStartTime date.Time, reportedEndTime date.Time, aggregationGranularity string, subscriberID string, continuationToken string) (result UsageAggregatePage, err error)

List gets a collection of SubscriberUsageAggregates, which are UsageAggregates from direct tenants.

reportedStartTime is the reported start time (inclusive). reportedEndTime is the reported end time (exclusive). aggregationGranularity is the aggregation granularity. subscriberID is the tenant subscription identifier. continuationToken is the continuation token.

func (SubscriberUsageAggregatesClient) ListPreparer

func (client SubscriberUsageAggregatesClient) ListPreparer(ctx context.Context, reportedStartTime date.Time, reportedEndTime date.Time, aggregationGranularity string, subscriberID string, continuationToken string) (*http.Request, error)

ListPreparer prepares the List request.

func (SubscriberUsageAggregatesClient) ListResponder

func (client SubscriberUsageAggregatesClient) ListResponder(resp *http.Response) (result UsageAggregatePage, err error)

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

func (SubscriberUsageAggregatesClient) ListSender

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

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

type UsageAggregate

type UsageAggregate struct {
	// UsageAggregateModel - Properties for aggregate usage.
	*UsageAggregateModel `json:"properties,omitempty"`
	// ID - URI of the resource.
	ID *string `json:"id,omitempty"`
	// Name - Name of the resource.
	Name *string `json:"name,omitempty"`
	// Type - Type of resource.
	Type *string `json:"type,omitempty"`
	// Location - Location where resource is location.
	Location *string `json:"location,omitempty"`
	// Tags - List of key value pairs.
	Tags map[string]*string `json:"tags"`
}

UsageAggregate aggregate usage values for resource.

func (UsageAggregate) MarshalJSON

func (ua UsageAggregate) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for UsageAggregate.

func (*UsageAggregate) UnmarshalJSON

func (ua *UsageAggregate) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for UsageAggregate struct.

type UsageAggregateModel

type UsageAggregateModel struct {
	// SubscriptionID - Subscription id of tenant using plan.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// UsageStartTime - UTC start time for the usage bucket to which this usage aggregate belongs.
	UsageStartTime *date.Time `json:"usageStartTime,omitempty"`
	// UsageEndTime - UTC end time for the usage bucket to which this usage aggregate belongs.
	UsageEndTime *date.Time `json:"usageEndTime,omitempty"`
	// InstanceData - Key-value pairs of instance details represented as a string.
	InstanceData *string `json:"instanceData,omitempty"`
	// Quantity - The amount of the resource consumption that occurred in this time frame.
	Quantity *string `json:"quantity,omitempty"`
	// MeterID - Unique ID for the resource that was consumed (aka ResourceID).
	MeterID *string `json:"meterId,omitempty"`
}

UsageAggregateModel properties for aggregate usage.

type UsageAggregatePage

type UsageAggregatePage struct {
	autorest.Response `json:"-"`
	// Value - Array of usage aggregates.
	Value *[]UsageAggregate `json:"value,omitempty"`
	// NextLink - Continuation token
	NextLink *string `json:"nextLink,omitempty"`
}

UsageAggregatePage holds an array of usage aggregates and the continuation token.

Jump to

Keyboard shortcuts

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