Skip to content
Kori Francis edited this page Jun 27, 2016 · 1 revision

Components

Allocating (Quantity-Based Components)

var allocationResult = client.CreateComponentAllocation(subscription.SubscriptionID, component.ComponentID, quantityToAllocate);

Specific Allocation Details

var allocation = new ComponentAllocation() {
    Quantity = 1,
    Memo = "64GB Memory Upgrade",
    UpgradeScheme = ComponentUpgradeProrationScheme.Prorate_Delay_Capture,
    DowngradeScheme = ComponentDowngradeProrationScheme.No_Prorate
};
var result = client.CreateComponentAllocation(subscription.SubscriptionID, component.ComponentID, allocation);

Get Allocation List

var currentAllocationResult = client.GetAllocationListForSubscriptionComponent(subscription.SubscriptionID, component.ComponentID);

Usage (Metered Components)

var usageResult = client.AddUsage(subscription.SubscriptionID, component.ID, usageQuantity, usageDescription);
var result = client.GetComponentInfoForSubscription(subscription.SubscriptionID, componentID)