azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2019-01-01/costmanagement Index | Files | Directories

package costmanagement

import "github.com/Azure/azure-sdk-for-go/services/costmanagement/mgmt/2019-01-01/costmanagement"

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

Index

Package Files

client.go dimensions.go exports.go models.go operations.go query.go version.go

Constants

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

func UserAgent Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type BaseClient Uses

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

BaseClient is the base client for Costmanagement.

func New Uses

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type CommonExportProperties Uses

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

CommonExportProperties the common properties of the export.

type Dimension Uses

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

Dimension ...

func (Dimension) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Dimension.

func (*Dimension) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Dimension struct.

type DimensionProperties Uses

type DimensionProperties struct {
    Description     *string    `json:"description,omitempty"`
    FilterEnabled   *bool      `json:"filterEnabled,omitempty"`
    GroupingEnabled *bool      `json:"groupingEnabled,omitempty"`
    Data            *[]string  `json:"data,omitempty"`
    Total           *int32     `json:"total,omitempty"`
    Category        *string    `json:"category,omitempty"`
    UsageStart      *date.Time `json:"usageStart,omitempty"`
    UsageEnd        *date.Time `json:"usageEnd,omitempty"`
    NextLink        *string    `json:"nextLink,omitempty"`
}

DimensionProperties ...

type DimensionsClient Uses

type DimensionsClient struct {
    BaseClient
}

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

func NewDimensionsClient Uses

func NewDimensionsClient(subscriptionID string) DimensionsClient

NewDimensionsClient creates an instance of the DimensionsClient client.

func NewDimensionsClientWithBaseURI Uses

func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient

NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client.

func (DimensionsClient) ListBySubscription Uses

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

ListBySubscription 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 and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.. filter - may be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. expand - may be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N dimension data.

func (DimensionsClient) ListBySubscriptionPreparer Uses

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

ListBySubscriptionPreparer prepares the ListBySubscription request.

func (DimensionsClient) ListBySubscriptionResponder Uses

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

ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always closes the http.Response Body.

func (DimensionsClient) ListBySubscriptionSender Uses

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

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

type DimensionsListResult Uses

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

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

type ErrorDetails Uses

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

ErrorDetails the details of the error.

type ErrorResponse Uses

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

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

type ExecutionStatus Uses

type ExecutionStatus string

ExecutionStatus enumerates the values for execution status.

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

func PossibleExecutionStatusValues Uses

func PossibleExecutionStatusValues() []ExecutionStatus

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

type ExecutionType Uses

type ExecutionType string

ExecutionType enumerates the values for execution type.

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

func PossibleExecutionTypeValues Uses

func PossibleExecutionTypeValues() []ExecutionType

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

type Export Uses

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

Export a export resource.

func (Export) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Export.

func (*Export) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Export struct.

type ExportDeliveryDestination Uses

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

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

type ExportDeliveryInfo Uses

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

ExportDeliveryInfo the delivery information associated with a export.

type ExportExecution Uses

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

ExportExecution a export execution.

func (ExportExecution) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for ExportExecution.

func (*ExportExecution) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for ExportExecution struct.

type ExportExecutionListResult Uses

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

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

type ExportExecutionProperties Uses

type ExportExecutionProperties struct {
    // ExecutionType - The type of the export execution. Possible values include: 'OnDemand', 'Scheduled'
    ExecutionType ExecutionType `json:"executionType,omitempty"`
    // Status - The status of the export execution. Possible values include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', 'NewDataNotAvailable', 'DataNotAvailable'
    Status ExecutionStatus `json:"status,omitempty"`
    // SubmittedBy - The identifier for the entity that executed the export. For OnDemand executions, it is the email id. For Scheduled executions, it is the constant value - System.
    SubmittedBy *string `json:"submittedBy,omitempty"`
    // SubmittedTime - The time when export was queued to be executed.
    SubmittedTime *date.Time `json:"submittedTime,omitempty"`
    // ProcessingStartTime - The time when export was picked up to be executed.
    ProcessingStartTime *date.Time `json:"processingStartTime,omitempty"`
    // ProcessingEndTime - The time when export execution finished.
    ProcessingEndTime *date.Time `json:"processingEndTime,omitempty"`
    // FileName - The name of the file export got written to.
    FileName    *string                 `json:"fileName,omitempty"`
    RunSettings *CommonExportProperties `json:"runSettings,omitempty"`
}

ExportExecutionProperties the properties of the export execution.

type ExportListResult Uses

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

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

type ExportProperties Uses

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

ExportProperties the properties of the export.

type ExportRecurrencePeriod Uses

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

ExportRecurrencePeriod the start and end date for recurrence schedule.

type ExportSchedule Uses

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

ExportSchedule the schedule associated with a export.

type ExportsClient Uses

type ExportsClient struct {
    BaseClient
}

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

func NewExportsClient Uses

func NewExportsClient(subscriptionID string) ExportsClient

NewExportsClient creates an instance of the ExportsClient client.

func NewExportsClientWithBaseURI Uses

func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsClient

NewExportsClientWithBaseURI creates an instance of the ExportsClient client.

func (ExportsClient) CreateOrUpdate Uses

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. exportName - export Name. parameters - parameters supplied to the CreateOrUpdate Export operation.

func (ExportsClient) CreateOrUpdatePreparer Uses

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

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ExportsClient) CreateOrUpdateResponder Uses

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

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

func (ExportsClient) CreateOrUpdateSender Uses

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

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

func (ExportsClient) Delete Uses

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. exportName - export Name.

func (ExportsClient) DeletePreparer Uses

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

DeletePreparer prepares the Delete request.

func (ExportsClient) DeleteResponder Uses

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

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

func (ExportsClient) DeleteSender Uses

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

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

func (ExportsClient) Execute Uses

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

Execute the operation to execute a export. Parameters: scope - the scope associated with 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. exportName - export Name.

func (ExportsClient) ExecutePreparer Uses

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

ExecutePreparer prepares the Execute request.

func (ExportsClient) ExecuteResponder Uses

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

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

func (ExportsClient) ExecuteSender Uses

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

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

func (ExportsClient) Get Uses

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

Get gets 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. exportName - export Name.

func (ExportsClient) GetExecutionHistory Uses

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

GetExecutionHistory gets the execution history of a 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. exportName - export Name.

func (ExportsClient) GetExecutionHistoryPreparer Uses

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

GetExecutionHistoryPreparer prepares the GetExecutionHistory request.

func (ExportsClient) GetExecutionHistoryResponder Uses

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

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

func (ExportsClient) GetExecutionHistorySender Uses

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

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

func (ExportsClient) GetPreparer Uses

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

GetPreparer prepares the Get request.

func (ExportsClient) GetResponder Uses

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

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

func (ExportsClient) GetSender Uses

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

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

func (ExportsClient) List Uses

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

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

func (ExportsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (ExportsClient) ListResponder Uses

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

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

func (ExportsClient) ListSender Uses

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

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

type FormatType Uses

type FormatType string

FormatType enumerates the values for format type.

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

func PossibleFormatTypeValues Uses

func PossibleFormatTypeValues() []FormatType

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

type GranularityType Uses

type GranularityType string

GranularityType enumerates the values for granularity type.

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

func PossibleGranularityTypeValues Uses

func PossibleGranularityTypeValues() []GranularityType

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

type Operation Uses

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

Operation a Cost management REST API operation.

type OperationDisplay Uses

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

OperationDisplay the object that represents the operation.

type OperationListResult Uses

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

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

func (OperationListResult) IsEmpty Uses

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator Uses

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

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator Uses

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next Uses

func (iter *OperationListResultIterator) Next() error

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

func (*OperationListResultIterator) NextWithContext Uses

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

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

func (OperationListResultIterator) NotDone Uses

func (iter OperationListResultIterator) NotDone() bool

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

func (OperationListResultIterator) Response Uses

func (iter OperationListResultIterator) Response() OperationListResult

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

func (OperationListResultIterator) Value Uses

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.

type OperationListResultPage Uses

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

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage Uses

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

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next Uses

func (page *OperationListResultPage) Next() error

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

func (*OperationListResultPage) NextWithContext Uses

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

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

func (OperationListResultPage) NotDone Uses

func (page OperationListResultPage) NotDone() bool

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

func (OperationListResultPage) Response Uses

func (page OperationListResultPage) Response() OperationListResult

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

func (OperationListResultPage) Values Uses

func (page OperationListResultPage) Values() []Operation

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

type OperationsClient Uses

type OperationsClient struct {
    BaseClient
}

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

func NewOperationsClient Uses

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI Uses

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List Uses

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

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

func (OperationsClient) ListComplete Uses

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

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

func (OperationsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (OperationsClient) ListResponder Uses

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

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

func (OperationsClient) ListSender Uses

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

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

type Query Uses

type Query struct {
    *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"`
}

Query ...

func (Query) MarshalJSON Uses

func (q Query) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Query.

func (*Query) UnmarshalJSON Uses

func (q *Query) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Query struct.

type QueryAggregation Uses

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

QueryAggregation the aggregation expression to be used in the query.

type QueryClient Uses

type QueryClient struct {
    BaseClient
}

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

func NewQueryClient Uses

func NewQueryClient(subscriptionID string) QueryClient

NewQueryClient creates an instance of the QueryClient client.

func NewQueryClientWithBaseURI Uses

func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient

NewQueryClientWithBaseURI creates an instance of the QueryClient client.

func (QueryClient) UsageByScope Uses

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

UsageByScope query the usage data for scope defined. Parameters: scope - the scope associated with query 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 and '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope.. parameters - parameters supplied to the CreateOrUpdate Query Config operation.

func (QueryClient) UsageByScopePreparer Uses

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

UsageByScopePreparer prepares the UsageByScope request.

func (QueryClient) UsageByScopeResponder Uses

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

UsageByScopeResponder handles the response to the UsageByScope request. The method always closes the http.Response Body.

func (QueryClient) UsageByScopeSender Uses

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

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

type QueryColumn Uses

type QueryColumn struct {
    Name *string `json:"name,omitempty"`
    Type *string `json:"type,omitempty"`
}

QueryColumn ...

type QueryColumnType Uses

type QueryColumnType string

QueryColumnType enumerates the values for query column type.

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

func PossibleQueryColumnTypeValues Uses

func PossibleQueryColumnTypeValues() []QueryColumnType

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

type QueryComparisonExpression Uses

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

QueryComparisonExpression the comparison expression to be used in the query.

type QueryDataset Uses

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

QueryDataset the definition of data present in the query.

func (QueryDataset) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for QueryDataset.

type QueryDatasetConfiguration Uses

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

QueryDatasetConfiguration the configuration of dataset in the query.

type QueryDefinition Uses

type QueryDefinition struct {
    // Type - The type of the query.
    Type *string `json:"type,omitempty"`
    // Timeframe - The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', 'TheLastMonth', 'TheLastYear', 'Custom', 'BillingMonthToDate', 'TheLastBillingMonth'
    Timeframe TimeframeType `json:"timeframe,omitempty"`
    // TimePeriod - Has time period for pulling data for the query.
    TimePeriod *QueryTimePeriod `json:"timePeriod,omitempty"`
    // Dataset - Has definition for data in this query.
    Dataset *QueryDataset `json:"dataset,omitempty"`
}

QueryDefinition the definition of a query.

type QueryFilter Uses

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

QueryFilter the filter expression to be used in the export.

type QueryGrouping Uses

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

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

type QueryProperties Uses

type QueryProperties struct {
    NextLink *string `json:"nextLink,omitempty"`
    // Columns - Array of columns
    Columns *[]QueryColumn   `json:"columns,omitempty"`
    Rows    *[][]interface{} `json:"rows,omitempty"`
}

QueryProperties ...

type QueryResult Uses

type QueryResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; The list of usage data.
    Value *[]Query `json:"value,omitempty"`
}

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

type QuerySortingConfiguration Uses

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

QuerySortingConfiguration the configuration for sorting in the query.

type QueryTimePeriod Uses

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

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

type RecurrenceType Uses

type RecurrenceType string

RecurrenceType enumerates the values for recurrence type.

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

func PossibleRecurrenceTypeValues Uses

func PossibleRecurrenceTypeValues() []RecurrenceType

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

type Resource Uses

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

Resource the Resource model definition.

func (Resource) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Resource.

type SortDirection Uses

type SortDirection string

SortDirection enumerates the values for sort direction.

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

func PossibleSortDirectionValues Uses

func PossibleSortDirectionValues() []SortDirection

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

type StatusType Uses

type StatusType string

StatusType enumerates the values for status type.

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

func PossibleStatusTypeValues Uses

func PossibleStatusTypeValues() []StatusType

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

type TimeframeType Uses

type TimeframeType string

TimeframeType enumerates the values for timeframe type.

const (
    // BillingMonthToDate ...
    BillingMonthToDate TimeframeType = "BillingMonthToDate"
    // Custom ...
    Custom TimeframeType = "Custom"
    // MonthToDate ...
    MonthToDate TimeframeType = "MonthToDate"
    // TheLastBillingMonth ...
    TheLastBillingMonth TimeframeType = "TheLastBillingMonth"
    // TheLastMonth ...
    TheLastMonth TimeframeType = "TheLastMonth"
    // TheLastWeek ...
    TheLastWeek TimeframeType = "TheLastWeek"
    // TheLastYear ...
    TheLastYear TimeframeType = "TheLastYear"
    // WeekToDate ...
    WeekToDate TimeframeType = "WeekToDate"
    // YearToDate ...
    YearToDate TimeframeType = "YearToDate"
)

func PossibleTimeframeTypeValues Uses

func PossibleTimeframeTypeValues() []TimeframeType

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

Directories

PathSynopsis
costmanagementapi

Package costmanagement imports 10 packages (graph) and is imported by 4 packages. Updated 2019-07-31. Refresh now. Tools for package owners.