Configuring the Multi-Level Reselling

Important: This documentation is for the APS-based Azure integration solution. If you are using a Connect-based Azure integration solution, please refer to the Connect documentation.

This article explains how to use the API to enable the reselling of Azure resources at any level. To do this, you must have SSH access to the management node. Note that you might need to use the instructions in this article only if you want to configure a reselling chain with more than one reseller or sub-reseller.

Previously, Azure NCE integration package versions 1.0-1.4 supported only these levels of reselling Azure resources.

Azure NCE integration package version 1.5 and later support reselling at any level, as illustrated by the following schemes.

To enable reselling at the levels indicated by schemes 3, 4, and X (any depth level), you need to adjust the partner's resource settings: specify the supported currency codes and discount or margin multipliers for all the levels above that partner.

For example, in scheme 3, there is only one level higher. Therefore, you need to adjust the partner's resource as follows:

[
{"level": 1, "currency": "EUR", "multiplier": 0.95}
]

Where:

  • The level is a unique integer greater than O. The maximum value is equal to the number of levels.
  • The multiplier is a positive decimal number. It is the amount of a discount or a profit margin relative to the price at which the resource is sold to the customer. To put it simpler, if the multiplier is less than 1, it is a discount. If it is greater than 1, it is a profit margin.
  • The currency is the three-letter code of a currency supported by Microsoft.

In scheme 4, there are two levels. Here is the example of how you would adjust multipliers:

[
{"level": 1, "currency": "EUR", "multiplier": 0.97},
{"level": 2, "currency": "RUB", "multiplier": 0.94}
]

In scheme X, there are n levels:

[
{"level": 1, "currency": "EUR", "multiplier": 0.96},
{"level": 2, "currency": "RUB", "multiplier": 0.93}
...
{"level": n, "currency": "USD", "multiplier": 0.55}
]

Where:

  • Level 1 is the level directly above the partner.
  • Level n is the root level (the Provider).

To adjust the levels, currencies, and multipliers, do the following:

  1. Log in as root to the management node by using SSH.
  2. Determine the resource identifier that corresponds to the partner account whose settings you want to change. For example, for a partner account with ID = 1000001:

    			
    RES='?implementing(http://www.odin.com/app/azure-csp-modern/partner/3),eq(core_account.id,1000001),select(tenant_name)'
    curl -X GET -ksE /usr/local/pem/APS/certificates/poa.pem "https://localhost:6308/aps/2/resources/$RES" | python -m json.tool
    [
    {
    "aps": {
    "id": "94c51d3e-7437-4fc6-bd82-5803a6edafac",
    "modified": "2020-09-28T06:29:26Z",
    "revision": 10,
    "status": "aps:ready",
    "subscription": "3c0a500a-61bc-40c7-953b-f291d682bf58",
    "type": "http://www.odin.com/app/azure-csp-modern/partner/3.7"
    },
    "tenant_name": "odintip.onmicrosoft.com"
    }
    ]
    
  3. Copy the resource identifier to the clipboard. In our case, it is ID: 94c51d3e-7437-4fc6-bd82-5803a6edafac.
  4. Adjust the partner's resource by specifying levels, currencies, and multipliers for each level involved:

    RES=94c51d3e-7437-4fc6-bd82-5803a6edafac
    cat <<EOF | curl -X PUT -d @- -ksE /usr/local/pem/APS/certificates/poa.pem -H 'Content-Type: application/json;charset=UTF-8' "https://localhost:6308/aps/2/resources/$RES/set_owner_hierarchy"
    [
    {"level": 3, "currency": "USD", "multiplier": 1.01},
    {"level": 2, "currency": "EUR", "multiplier": 1.02},
    {"level": 1, "currency": "RUB", "multiplier": 1.03}
    ]
    EOF
    

You can verify the changes by using the following commands:

RES='?implementing(http://www.odin.com/app/azure-csp-modern/partner/3),eq(aps.id,94c51d3e-7437-4fc6-bd82-5803a6edafac),select(owner_hierarchy)'
curl -X GET -ksE /usr/local/pem/APS/certificates/poa.pem "https://localhost:6308/aps/2/resources/$RES" | python -m json.tool
[
{
"aps": {
"id": "94c51d3e-7437-4fc6-bd82-5803a6edafac",
"modified": "2020-09-28T12:50:37Z",
"revision": 11,
"status": "aps:ready",
"subscription": "3c0a500a-61bc-40c7-953b-f291d682bf58",
"type": "http://www.odin.com/app/azure-csp-modern/partner/3.7"
},
"owner_hierarchy": [
{
"currency": "USD",
"level": 3,
"multiplier": 1.01
},
{
"currency": "EUR",
"level": 2,
"multiplier": 1.02
},
{
 "currency": "RUB",
 "level": 1,
 "multiplier": 1.03
 }
 ]
 }
 ]