fbpx
POSThttps://api.spotinst.io/azure/setup/credentials?accountId={ACCOUNT_ID}

Link a Spotinst account to an Azure Cloud account.

 

prerequisites:

  • An activated Azure subscription.
  • A registered Spotinst account.
  • Perform following steps prior to set credentials:
      • Create an Active Directory application (service principal) :
        Log in to your Azure console and go to Azure’s Active Directory service.
        Click New Application Registration, give the application a name and add https://spotinst.com as the sign-on url.

        Once your application is ready, copy the Application ID and set it aside.

      • Create a key for the application:
        Under Settings select Keys. Add a new Key with any name and an expiration of never expires. Click Save and make sure to copy the Key Secret and set it aside, it won’t appear again once you leave the Key settings.spotinst-azure-create-key
      • Retrieve your directory ID:
        Under your Active Directory’s main menu go to Properties, copy the Directory ID (a.k.a Tenant ID) and set it aside
      • Provide permissions to the Active Directory application:
        Now that you’ve created an Active Directory Application you’ll provide it with Contributor permissions.
        Under All Services select Subscriptions. Choose the subscription you’d like to provide Spotinst with a role in. In the Subscription menu select Access Control (IAM).
        Click Add and under Role choose Contributor and under Select enter the name of the Active Directory Application you created in Step 1 and click Save
        Note: If your application doesn’t appear in the Select autocomplete list enter the application name there anyway.
        In the Subscription menu head back to the Overview. Copy your Subscription ID and set it aside.

 

ParameterTypeDescription
ACCOUNT_ID * String

The Account id you want to set

Default: act-12345
Request

Headers
Content-Type: application/json
Authorization: Bearer ${token}
Body
Copied!
Downloaded!
{
	"clientId":"111111111",
	"clientSecret":"32431r2431434132",
	"tenantId":"1321e1e3123er23",
	"subscriptionId":"234r3141131"
}
AttributeTypeDescription
clientId * String

Set the application ID

clientSecret * String

Set the key secret

tenantId * String

Set the directory ID

subscriptionId * String

Set the subscription ID

Response

Headers
Content-Type: application/json
Body
Copied!
Downloaded!
{
    "request": {
        "id": "8a8a3f88-7620-4783-bf00-953e0b8892fe",
        "url": "/azure/setup/credentials?accountId=act-123456",
        "method": "POST",
        "timestamp": "2019-10-17T10:43:54.421Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        }
    }
}