Windows Azure Pack Usage Service Overview

 

Applies To: Windows Azure Pack

The Windows Azure Pack for Windows Server Usage Service gives service providers the ability to build their own systems for customer billing and analytics processing.

Windows Azure Pack captures resource allocation and consumption information across the various services used by a customer or tenant. This data is stored for a limited time and is targeted for use by finance systems for billing and analysis of services provided. The information captured consists of actions with billing impact on the self-service tenant portal or at the Service Management REST API Layer.

The Windows Azure Pack Usage Service supplies two types of data:

  • Tenant resource utilization for every subscription.

  • Recent plan, add-on, subscription, and account information events.

The Usage Service REST API makes the stored usage data available to service providers who create their own billing systems to consume it. Windows Azure Pack supplies a Billing Approval API that billing systems subscribe to in order to approve tenant subscription and subscription add-on requests. Pricing information for services provided can be exposed by a Pricing REST API.

Windows Azure Pack does not provide its own implementation of a billing system. The Usage Service is provided to enable the implementation of billing services. Access to the Usage Service is enabled through the development of a Billing Adapter which acts as the interface between a billing service and the REST API used to access the Usage Service.

Administrator workflow that affects a billing system depends on whether the billing system frequently maps its view - through frequent consumption of the Usage Service REST API - to a Windows Azure Pack deployment. For more information, see Administrator Usage Operation Workflows.

Samples

The Windows Azure Pack Developer Kit provides samples for creating a billing adapter. For more information, see The Windows Azure Pack Billing Adapter Sample. The sample source code is available from https://www.microsoft.com/en-us/download/details.aspx?id=41146.

Usage Service Architecture

The Windows Azure Pack Usage Service comprises of three main systems; usage data processing, approval and pricing.

Usage Data Processing

Usage Data processing consists of three functions; usage data generation, usage data collection, and usage data consumption by a billing system.

Usage Data Generation

Usage data is generated by the resource providers registered as part of a Windows Azure Pack deployment. The usage data created is specific to a subscription and is exposed to the Usage Service data collector via a REST API. Creators of Resource Providers should implement the necessary REST API to support usage data collection. For more information, see Custom Resource Provider Endpoints.

Usage Data Collection

Windows Azure Pack usage data collection consists of a usage collector, a usage database and a Usage Service REST API. The usage collector is scheduled to trigger the collection of usage data from the registered resource providers in circular fashion.

On each cycle the usage collector determines the resource providers that exist in the system and then interacts with them to obtain usage data. By default the collected data is stored in the usage database for 40 days. This value can be configured in DataRetentionDurationDays in the table Usage.Configuration in the Microsoft.MgmtSvc.Usage database. For more information, see Usage Configuration Table.

Note

The usage collector is hosted on the UsageCollector IIS Service.

Usage Data Consumption

The Usage Service REST API makes the usage database information available for consumption by billing systems or analytics services. For more information, see Windows Azure Pack Usage Service Usage REST API Reference.

A billing adapter should regularly read data from the Usage Service REST API. This allows the billing system to keep its data synchronized with Windows Azure Pack. Billing systems should only use data from the Usage Service REST API to determine whether or not a usage related billing task should be performed.

Note

The Usage Service REST API is hosted on the Usage IIS Service.

Billing Approval

A billing system will want the opportunity to approve or deny a subscription/add-on creation or deletion. For example, if the tenant’s credit card is declined, a subscription creation request should—depending on the billing system’s business processes—be denied. Windows Azure Pack supplies a real-time billing approval system that billing systems subscribe to in order to approve tenant subscription and subscription add-on requests. For more information, see the Windows Azure Pack Usage Service Billing Approval REST API Reference.

Pricing System

Pricing information for services provided can optionally be made available to a Windows Azure Pack deployment via the Pricing REST API endpoint. Implemented as part of a billing adapter, the Pricing REST API allows plan and add-on price information to flow into the system. For more information, see Handling Pricing Information.

Billing Adapter

Key to the implementation of a billing system is the Billing Adapter which acts as the integration point between a billing system and the various types of data made available from the Windows Azure Pack Usage Service. The role of the Billing Adaptor is to translate the data received from the Usage Service REST API endpoint, Billing Approval REST API endpoint and the Pricing endpoint into that needed for an organization’s specific requirements. For information about creating a Billing Adapter, see Implementing a Billing Adapter.

Usage Service Endpoints

The following diagram illustrates the various REST endpoints.

Windows Azure Pack Usage Endpoints

Service Reporting

Service Reporting in System Center 2012 R2 enables administrators at IT hosting providers to view tenant consumption of virtual machines, resources such as computation, network, and storage, and operating system inventory in their infrastructure. For more information, see https://technet.microsoft.com/en-us/library/dn251058.aspx

See Also

Windows Azure Pack Usage Service