Get Started with Azure

CloudCheckr is a unified cost & security automation platform that helps you manage Azure costs, secure the Azure environment and gain visibility & control. To help you optimize and govern your cloud, CloudCheckr generates a complete picture of the Azure environment including billing details, multi-accounts, resources, virtual machines, configurations, permissions, changes, and more. With CloudCheckr, you turn insight into automation by proactively controlling costs, reducing the attack surface and driving accountability across your organization.


Preparing your Azure Deployment for CloudCheckr

For CloudCheckr to monitor your Azure deployment, you will add two accounts to CloudCheckr. One of the accounts will be your Enterprise Agreement or Cloud Solution Provider account. This will provide you with cost data. The second account will be your Subscription account. The subscription account is an individual account that collects resources if you have Azure Active Directory setup. This account will provide you with best practices, inventory, security, and utilization modules.

Configure your EA or CSP Account
Configure a Subscription Account

CloudCheckr also allows you to view just billing only data for a single subscription. This account will build the cost reports for the subscription, allowing you to grant access to specific Subscriptions without having to grant access to the complete Enterprise Agreement or Cloud Solution Provider invoice data.


Additional Steps

User Management

CloudCheckr allows you to have full control over provisioning and managing user access with your accounts. User access can be configured with specific permissions, rights, and visibility based on the needs and role of the user.

Subscription Families

See the following topics for details:

CloudCheckr Reports

Once your account is configured it will be populated with information and statistics about your Azure deployment. To find out more about these reports, see the documents below:


Self-Hosted Deployment

Commercial

For instructions on how to deploy in a commercial self-hosted environment, please review the  Azure Self-Hosted documentation.

Gov

For instructions on how to deploy in a gov self-hosted environment, please review the  Azure Gov Self-Hosted documentation

Below is the list of CloudCheckr API calls specific to Microsoft Azure.

CloudCheckr is revamping its API documentation to ensure that it reflects the best practices for REST and to improve overall consistency. We will restructure each call to include these sections:

Section Description
Input Parameters Options that you pass with the endpoint to influence a response.

Identifies if a parameter is required or optional, the data type, and the parameter description.

API Call URL Identifies the common path for the API (highlighted in yellow) and the end path of the endpoint (highlighted in light blue).

Request Example Includes a sample request that shows the endpoint and a few key parameters.

Formatted in curl since it’s language-agnostic.

Includes the header information and the method (GET or POST in most cases).

Response Example Shows a sample response for all of the parameters passed in the request example.

Includes examples in XML and JSON.

Add Azure CSP Account

The API method, “add_azure_csp_account”, is used to register an Azure Cloud Solution Provider (CSP) account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter “use_cc_account_id” when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.
  • Azure parameters typically contain special characters. To submit as a parameter on the URL, you must URL encode it. See http://www.w3schools.com/tags/ref_urlencode.asp for more details or to URL encode an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
account_name string optional; the name of the Azure account used to register with CloudCheckr
azure_ad_id string optional; Azure Active Directory ID
azure_ad_user_name string optional; Azure Active Directory username
azure_ad_user_password string optional; Azure Active Directory password
azure_app_id string optional; Azure Native App ID

OUTPUT PARAMETERS:

Parameter Type Description
account_status string indicates success or failure with creating the account
cc_account_id string unique account ID used in CloudCheckr
credential_status string status message indicating the result of validating the Azure credentials (if provided in the request)
role_account_id string role account ID

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_csp_account?access_key=your_admin_access_key

REQUEST EXAMPLE:

curl -X POST \
                -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_csp_account?access_key=your_admin_access_key\
                -- header 'cache-control: no-cache' \
                -- header 'content-type: application/[json|xml]' \
                -- data '{
          	       "account_name": "New Azure CSP Account",
          	       }

RESPONSE EXAMPLE:
XML:

<AddAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <account_status>Success</account_status>
             <cc_account_id>9999</cc_account_id>
             <credential_status>Azure credentials applied.</credential_status>
             <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureCSPAccountResponse>
          

JSON:

{
             "account_status":"Success",
             "cc_account_id":9999,
             "credential_status":"Azure credentials applied.",
             "role_account_id":"CC-99999999999999999999999999999999",
             "cc_external_id":null
          }

Add Azure EA Account

The API method, “add_azure_ea_account”, is used to  register an Azure Enterprise Agreement (EA) account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter, “use_cc_account_id”, when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key
  • The HTTP method for this call is POST
  • Azure parameters typically contain special characters. In order to submit as a parameter on the URL, you must URL encode it. See http://www.w3schools.com/tags/ref_urlencode.asp for more details or to URL encode an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_enrollment_number string required; Azure enrollment number associated with the CloudCheckr account
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_ea_account?access_key=your_admin_access_key&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_ea_account?access_key=your_admin_access_key\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "account_name": "New Azure EA Account",
          	                 }

RESPONSE EXAMPLE:
XML:

<AddAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <account_status>Success</account_status>
             <cc_account_id>9999</cc_account_id>
             <credential_status>Azure credentials applied.</credential_status>
             <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureCSPAccountResponse>
          

JSON:

{
          "account_status": "Success",
          "cc_account_id": 9999,
          "credential_status": "Azure credentials applied.",
          "role_account_id": "CC-99999999999999999999999999999999",
          "cc_external_id": null
          }

Add Azure Inventory Account

The API method, “add_azure_inventory_account”, is used to register an Azure Subscription account with CloudCheckr. This method will return a unique ID to enhance security for the newly created account that can be used for the parameter “use_cc_account_id” when making calls to the admin-level API.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.
  • Azure parameters typically contain special characters. In order to submit as a parameter on the URL, you must URL encode it. See http://www.w3schools.com/tags/ref_urlencode.asp for more details or to URL encode an input parameter.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
account_name string optional; the name of the Azure account used to register with CloudCheckr
azure_ad_id string optional; Azure Active Directory ID
azure_app_id string optional; Azure App ID
azure_api_access_key string optional; Azure API access key (token)
azure_subscription_id string optional; Azure Active Directory Subscription ID
azure_offer_id string optional; Azure Offer ID

OUTPUT PARAMETERS:

Parameter Type Description
account_status string indicates success or failure about creating the account
cc_account_id string unique account ID used in CloudCheckr
credential_status string status message indicating the result of validating the Azure credentials (if provided in the request)
role_account_id string role account ID

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_inventory_account?access_key=your_admin_access_key

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/add_azure_inventory_account?access_key=your_admin_access_key\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "account_name": "New Azure Inventory Account",
          	                 }

RESPONSE EXAMPLE:
XML:

<AddAzureInventoryAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <account_status>Success</account_status>
           <cc_account_id>9999</cc_account_id>
           <credential_status>Azure credentials applied.</credential_status>
           <role_account_id>CC-99999999999999999999999999999999</role_account_id>
          </AddAzureInventoryAccountResponse>
          

JSON:

{
          "account_status": "Success",
          "cc_account_id": 9999,
          "credential_status": "Azure credentials applied.",
          "role_account_id": "CC-99999999999999999999999999999999",
          "cc_external_id": null
          }

Edit Azure CSP Credential

The API method, “edit_azure_csp_account”, is used used to change the credentials on an Azure Cloud Solution Provider (CSP) account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_ad_user_name string required; Azure Active Directory username
azure_ad_user_password string required; Azure Active Directory password
azure_app_id string required; Azure Native App ID

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_csp_account?access_key=your_admin_access_key&use_cc_account_id=cc_account_id&azure_ad_user_name=azure_ad_user_name&azure_ad_user_password=azure_ad_user_password&azure_app_id=azure_app_id

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_csp_account?access_key=your_admin_access_key&use_cc_account_id=cc_account_id&azure_ad_user_name=azure_ad_user_name&azure_ad_user_password=azure_ad_user_password&azure_app_id=azure_app_id\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_ad_user_name": [email protected],
                                   "zure_ad_user_password": "Active Directory User Password",
                                   "azure_app_id": f11g4042-5286-5d68-6b18-3623cd8f6cg5
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureCSPAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureCSPAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Edit Azure EA Credential

The API method, “edit_azure_ea_account”, is used used to change the credentials on an Azure Enterprise Agreement (EA) account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_enrollment_number string required; Azure enrollment number to associate with the CloudCheckr account
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_ea_account?access_key=your_admin_access_key&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_ea_account?access_key=[access_key]&use_cc_account_id=1234&azure_enrollment_number=[azure_enrollment_number]&azure_api_access_key=[azure_api_access_key]\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_enrollment_number": "Azure Enrollment number",
                                   "azure_api_access_key": "Azure API access key"
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureEAAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureEAAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Edit Azure Inventory Credential

The API method, “edit_azure_inventory_credential”, is used used to change the credentials on an Azure Subscription account with CloudCheckr.

Note:

  • This call can only be made using an admin-level access key.
  • The HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
use_cc_account_id string required; the Account ID (Project ID) of the CloudCheckr account to update
azure_app_id string required; Azure Native App ID
azure_api_access_key string required; Azure API access key (token)

API CALL URL:

https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_inventory_credential?access_key=your_admin_access_key&use_cc_account_id=1234&azure_app_id=[azure_app_id]&azure_api_access_key=[azure_api_access_key]

REQUEST EXAMPLE:

curl -X POST \
                          -- https://api.cloudcheckr.com/api/account.[json|xml]/edit_azure_inventory_credential?access_key=your_admin_access_key&use_cc_account_id=1234&azure_app_id=[azure_app_id]&azure_api_access_key=[azure_api_access_key]\
                          -- header 'cache-control: no-cache' \
                          -- header 'content-type: application/[json|xml]' \
                          -- data '{
          	                 "use_cc_account_id": 111,
                                   "azure_app_id": "Azure App ID",
                                   "azure_api_access_key": "Azure API access key"
          	                 }

RESPONSE EXAMPLE:
XML:

<EditAzureInventoryAccountResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>Azure credentials updated.</message>
           </EditAzureInventoryAccountResponse>
          

JSON:

{
          "code": "200",
          "message": "Azure credentials updated."
          }

Get Best Practices V2

The API method “best_practice/get_best_practices_v2” is used to:

  • pull the list of best practice results from a CloudCheckr account
  • show ignored checks and the reasons for those ignored items
  • report back the CIS benchmark information associated with the BPC

INPUT PARAMETERS:

Parameter Type Description
access_key string required; account-level API key
include_compliance_checks boolean optional; will report back the CIS benchmark information associated with the BPC; accepts true or false
date DateTime optional; date to pull the list of Best Practice results; used to access historical data
category string optional; category of the Best Practice report to pull; accepts Security, Cost, Availability, and/or Usage
importance string optional; the importance level of the Best Practice checks to pull; accepts ShowAll, High, Medium, Low, Informational, InformationAndHigher, LowAndHigher, and MediumAndHigher
all_result boolean optional; allows you to pull all results from the Best Practice report even if there are no issues with the report; accepts true or false
azure_account_ids string optional/multi-account view (MAV) only; return statistics from these accounts
bpc_id string optional; allows you to pull results for a specific Best Practice ID number
include_advisor_bpcs string optional; when specified as yes , 1 , or true , the response will also include Azure Advisor BPCs

Note: To get a list of available ID numbers, pull a list of results without specifying an ID.

API CALL URL:

https://api.cloudcheckr.com/api/best_practice.[json|xml]/get_best_practices_v2?access_key=your_access_key

REQUEST EXAMPLE:

XML:

<GetBestPracticesResponseV2
            xmlns:xsd='http://www.w3.org/2001/XMLSchema'
            xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
            <BestPracticeChecks>
              <BestPracticeCheckV2>
                <CheckId>441</CheckId>
                <Name>Contact Details on AWS Accounts Are Not Up-To-Date</Name>
                <Category>Security</Category>
                <Importance>High</Importance>
                <CountOfResults>1</CountOfResults>
                <ScanResultId>423</ScanResultId>
                <Results>
                  <Result>Contact Details: Not Updated</Result>
                </Results>
                <Ignored>false</Ignored>
                <IgnoredReason></IgnoredReason>
                <ComplianceFrameworks>
                  <ComplianceFramework>
                    <Name>CIS Benchmark</Name>
                    <ComplianceChecks>
                      <ComplianceCheck>
                        <ControlNumber>1.19</ControlNumber>
                        <ControlName>Maintain current contact details</ControlName>
                      </ComplianceCheck>
                    </ComplianceChecks>
                  </ComplianceFramework>
                </ComplianceFrameworks>...
              </BestPracticeCheckV2>
            </BestPracticeChecks>
          </GetBestPracticesResponseV2>

JSON:

{
             "BestPracticeChecks": {
                "BestPracticeCheckV2": {
                   "CheckId": "441",
                   "Name": "Contact Details on AWS Accounts Are Not Up-To-Date",
                   "Category": "Security",
                   "Importance": "High",
                   "CountOfResults": "1",
                   "ScanResultId": "423",
                   "Results": {
                      "Result": "Contact Details: Not Updated"
                   },
                   "Ignored": "false",
                   "IgnoredReason": "",
                   "ComplianceFrameworks": {
                      "ComplianceFramework": {
                         "Name": "CIS Benchmark",
                         "ComplianceChecks": {
                            "ComplianceCheck": {
                               "ControlNumber": "1.19",
                               "ControlName": "Maintain current contact details"
                            }
                         }
                      }
                   },
                   "__text": "..."
                }
             }
          }
          

Add Tag Rule

The API method, “add_tag_rule”, is used to add a cost tag rule.

The preferred HTTP method for this call is POST.

To add a tag rule in the user interface, choose Cost > Tagging > Tagging Rules.

Once in the Tagging Rules report, click New Rule.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
name string required; name of the tag rule
tags string required; tag_key and tag_value
regions list<string> required; list of region(s) where the tag rule will be applied
azure_consumed_services list<string> required; the Azure resource(s)
azure_subscriptions list<string> required; the Azure subscription(s)

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_rule

REQUEST EXAMPLE:

curl -X POST \
               -- https://api.cloudcheckr.com/api/billing.[json|xml]/add_tag_rule?access_key=your_access_key
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
               -- data '{
                  "name": "Azure Tag Rule",
                  "tags": {
                    "TagKey": "TagValue",
                    "TagKey2": "*"
                  },
                    "region": "US East",
                    "azure_consumed_service": "*",
                    "azure_subscriptions": [
                         "4dc76947-2789-4149-bc29-3b7bd45ce4a8",
                         "b9e7ac32-fcba-4090-a249-d8a240d356ac"
              ]
          }

RESPONSE EXAMPLE:
XML:

<AddTagRuleResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <tag_rule>
                  <status>
                      <code>200</code>
                      <message>Successfully created Tag Rule.</message>
                      <tag_rule_id>94</tag_rule_id>
                  </status>
              </tag_rule>
          </AddTagRuleResponse>

JSON:

{
              "code": 200,
              "message": "Successfully created Tag Rule.",
              "tag_rule_id": "94"
          }

Add Custom Billing Charge - Fixed

The API method, “azure_add_custom_billing_charge_fixed”, is used to add a custom billing charge that applies a fixed charge or credit in an Azure account.

To add a fixed charge or credit, go to the left navigation pane, choose Cost > Azure Partner Tools > Configure > Custom Charges, click New Custom Charge, and select Add a fixed charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
startDate DateTime required; start date for the custom billing charge
endDate DateTime required/optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time
amount decimal required; sets the fixed charge (positive value) or credit (negative value) dollar amount
oneTime string *required/optional; applies the fixed charge or credit as a one-time occurence to the custom billing charge
monthlyRecurring string *required/optional; applies the fixed credit or charge as a monthly recurring amount to the custom billing charge
name string required; name of the custom billing charge
description string required; human-friendly description of the custom billing charge
subscriptions List<string> optional; comma-separated list of subscriptions that you can apply to the charges

Note: * = one of these parameters must be defined
Note: The end date is only required if you select the monthly recurring option.

API CALL URL:

https://api.cloudcheckr.com/api/billing/[json|xml]/azure_add_custom_billing_charge_fixed

RESPONSE EXAMPLE:

curl -X POST \
                          --'https://localhost/api/billing/[json|xml]/azure_add_custom_billing_charge_fixed?access_key=46YI9Z8T5JQR353JU63BM88AK99T0FIL67T93QSPX76303C2H17HXS3316CL2N50&use_cc_account_id=3' \
                         --header 'cache-control: no-cache' \
                         --header 'content-type: application/[json|xml]' \
                         --data '{
          	               "description": "example custom billing charge",
                                 "name": "example name",
                                 "charge_value": 111.5,
                                 "subscriptions": ["71c1d715-a1ce-48d9-b77c-03c00b4463a71","4dc76947-2789-4149-bc29-3b7bd45ce4a8", "07d18ff4-0bea-44e8-bd86-82a7df2e91bc", "8cbaba05-bfe1-426f-b4f7-7378ea754c1e"],
          	              "startdate":  "1970-01-01",
                                "end_date": "2063-04-05",
                  "is_recurring": true }
          	              }
          

RESPONSE EXAMPLE:
XML:

<AzureAddCustomBillingChargeFixedResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </AzureAddCustomBillingChargeFixedResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

Add Custom Billing Charge - Monthly Percent

The API method, “azure_add_custom_billing_charge_monthly_percent”, is used to add a custom billing charge that applies a monthly percent discount or premium.

To add a custom monthly precent discount or premium, go to the left navigation pane, choose Cost > Azure Partner Tools > Configure > Custom Charges, click New Custom Charge, and select Add a monthly percent charge or credit.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; admin-level API key
name string required; name of the custom billing charge
description string required; human-friendly description of the custom billing charge
percentageValue decimal required; sets the charge (positive value) or credit (negative value) percentage
minimumCharge decimal optional; applies a minimum charge/credit threshold to the custom billing charge
maximumCharge decimal optional; applies a maximum charge/credit threshold to the custom billing charge
applyPercentageTo CostBasline required; indicates the cost type  that the custom billing charge will apply to
subscription List<string> optional; comma-separated list of subscriptions where the custom billing charge can be applied; defaults to all subscriptions
region List<string> optional; comma-separated list of region(s) where the custom billing charge can be applied; defaults to all; accepts region id’s as valid values
consumedService List<string> optional; comma-separated list of consumed services where the custom billing charge can be applied; defaults to all
category List<string> optional; comma-separated list of categories where the custom billing charge can be applied; defaults to all
subCategory List<string> optional; comma-separated list of sub-categories where the custom billing charge can be applied; defaults to all
meterName List<string> optional; comma-separated list of meter names where the custom billing charge can be applied; defaults to all
tags List<string> optional; comma-separated list of tag key/value pairs where the custom billing charge can be applied; defaults to all
startDate DateTime required; start date for the custom billing charge
endDate DateTime optional; end date for the custom billing charge; custom billing charges with no end date will apply until the end of time

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_monthly_percent

REQUEST EXAMPLE:

curl -X POST \
                          -- 'https://api.cloudcheckr.com/api/billing.[json|xml]/add_custom_billing_charge_monthly_percent?access_key=your_admin_access_key&use_cc_account_id=1234' \
                          --header 'cache-control: no-cache' \
                          --header 'content-type: application/[json|xml]' \
                          --data '{
                                 "name": "example custom billing charge name",
          	               "description": "example custom billing charge description",
          	               "percentageValue": 10.5,
          	               "minimumCharge": 5000, "maximumCharge": 10000,
          	               "costBaseline": "Cost", "ListCost", "RetailCost"
          	               "subscriptions": "example subscription",
          	               "region": ["1","2"],
          	               "consumedService": ["VirtualNetwork","Compute"],
          	               "category": ["Networking"],
                                 "subCategory": ["PublicIPAddresses"],
                                 "meterName": ["StandardIOTableGB"],
          	               "tag": ["environment"],
          	               "startDate": "1970-01-01", "endDate": "2063-04-05"
          }

RESPONSE EXAMPLE:
XML:

<AzureAddCustomBillingChargeMonthlyPercentResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </AzureAddCustomBillingChargeMonthlyPercentResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

Delete Tag Rule

The API method, “delete_tag_rule”, is used to delete a cost tag rule.

The preferred HTTP method for this call is POST.

INPUT PARAMETERS:

Parameter Type Description
access_key string required, standard access key
tag_rule_id string required; tag ID

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/delete_tag_rule

REQUEST EXAMPLE:

curl -X POST \
               -- https://api.cloudcheckr.com/api/billing.[json|xml]/delete_tag_rule?access_key=your_standard_access_key&tag_rule_id=78
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
               -- data '{
                  "tag_rule_id": 78,
                  }
          

RESPONSE EXAMPLE:
XML:

<DeleteTagRuleResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <tag_rule>
                  <status>
                      <code>200</code>
                      <message>Successfully deleted Tag Rule.</message>
                      <tag_rule_id>78</tag_rule_id>
                  </status>
              </tag_rule>
          </DeleteTagRuleResponse>

JSON:

{
              "code": 200,
              "message": "Successfully deleted Tag Rule.",
              "tag_rule_id": "78"
          }

Get Detailed Billing Grouped PDF

The API method, get_billing_detailed_grouped_pdf, is used to provide a PDF version of an Advanced Grouping report.

To access the Advanced Grouping report, go to the left navigation pane and choose Cost > Azure Billing > Custom Reports > Advanced Grouping.
Note:

  • The HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required for all API calls
saved_filter_name string required; name of the saved filter
start DateTime required; date that you want to start to pull cost data
end DateTime required; date that you want to stop pulling cost data

API CALL URL:

https://api.cloudcheckr.com/api/ReportPdfDownload.[json|xml]/get_billing_detailed_grouped_pdf

REQUEST EXAMPLE:

curl --request GET \
                          --'https://api.cloudcheckr.com/api/ReportPdfDownload.[json|xml]/get_billing_detailed_grouped_pdf?access_key=[project_api_access_key]&saved_filter_name=[saved_filter_name]&start=11/22/2017&end=12/06/2017'\
                          --header 'cache-control: no-cache' \
                          --header 'content-type: application/[json|xml]'
            

RESPONSE EXAMPLE:
XML:

<GetBillingDetailedGroupedPdfResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
           <code>200</code>
           <message>OK</message>
          </GetBillingDetailedGroupedPdfResponse>
          

JSON:

{
          "code": "200",
          "message": "OK"
          }

Get Detailed Billing With Grouping By Currency

The API method, “get_detailed_billing_with_grouping_by_currency”, is used to pull results from a saved filter in the Advanced Grouping (w/tags) report. It is identical to the “/billing/get_detailed_billing_with_grouping_v2” call with an additional grouping on currency.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required for all API calls
saved_filter_name string required; the name of the saved filter from which to pull the results
use_account string *required; friendly name of the account in CloudCheckr; must be a payer account in CloudCheckr
use_cc_account_id string *required; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr
with_costs_by_group string optional; retrieves costs per group; accepts true/false; defaults to true if not specified
with_costs_by_time string optional; retrieves costs per time period; accepts true/false; defaults to true if not specified
start string optional; returns costs after the specified date
end string optional; returns costs before the specified date

Note: One of the * parameters must be defined.
Note: If the start and end are not defined, the application will return the last 14 days.

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_by_currency?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filter

REQUEST EXAMPLE:

curl -X GET \
                                   -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_by_currency?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filteraccess_key=your_admin_access_key&use_cc_account_id=1234'\
                                   -- header 'cache-control: no-cache' \
                                   -- header 'content-type: application/[json|xml]' \
                                

RESPONSE EXAMPLE:

XML:

<GetDetailedBillingWithGroupingByCurrencyResponse
          xmlns:xsd='http://www.w3.org/2001/XMLSchema"'
          xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
             <Currency>USD</Currency>
          	<Total>30.79834162</Total>
          	<Max>30.79834162</Max>
          	<Min>30.79834162</Min>
          	<Average>30.798698086413037</Average>
          	<CostsByGroup>
          		<GroupName>Service</GroupName>
          		<GroupValue>AmazonS3</GroupValue>
          		<FriendlyName>S3</FriendlyName>
          		<Cost>0.1099985400</Cost>
          		<NextLevel>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
          			<FriendlyName></FriendlyName>
          			<Cost>0.1083478400</Cost>
          		</NextLevel>
          	</CostsByGroup>
          	<CostsByGroup>
          		<GroupName>Service</GroupName>
          		<GroupValue>AmazonEC2</GroupValue>
          		<FriendlyName>EC2</FriendlyName>
          		<Cost>22.6078574000</Cost>
          		<NextLevel>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
          			<FriendlyName></FriendlyName>
          			<Cost>0.0750056100</Cost>
          		</NextLevel>
          	</CostsByGroup>
          	<CostsByTime>
          		<Groups>
          			<GroupName>Service</GroupName>
          			<GroupValue>AmazonEC2</GroupValue>
          			<FriendlyName>EC2</FriendlyName>
          		</Groups>
          		<Groups>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
          			<FriendlyName></FriendlyName>
          		</Groups>
          		<CostDates>
          			<Date>1/20/2017 12:00:00 AM</Date>
          			<Cost>0.0750056100</Cost>
          			<UsageQuantity>24.0000619600</UsageQuantity>
          		</CostDates>
          	</CostsByTime>
          	<CostsByTime>
          		<Groups>
          			<GroupName>Service</GroupName>
          			<GroupValue>AmazonS3</GroupValue>
          			<FriendlyName>S3</FriendlyName>
          		</Groups>
          		<Groups>
          			<GroupName>aws:createdBy</GroupName>
          			<GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
          			<FriendlyName></FriendlyName>
          		</Groups>
          		<CostDates>
          			<Date>1/20/2017 12:00:00 AM</Date>
          			<Cost>0.1083478400</Cost>
          			<UsageQuantity>418.5352970600</UsageQuantity>
          		</CostDates>
          	</CostsByTime>
          </GetDetailedBillingWithGroupingByCurrencyResponse>
          

JSON:

{
            {
            "Currency": "USD",
            "Total": 30.79834162,
            "Max": 30.79834162,
            "Min": 30.79834162,
            "Average": 30.798698086413037,
            "CostsByGroup": [
              {
                "GroupName": "Service",
                "GroupValue": "AmazonS3",
                "FriendlyName": "S3",
                "Cost": "0.1099985400",
                "NextLevel": [
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
                    "FriendlyName": "",
                    "Cost": "0.1083478400",
                    "NextLevel": []
                  }
                ]
              },
              {
                "GroupName": "Service",
                "GroupValue": "AmazonEC2",
                "FriendlyName": "EC2",
                "Cost": "22.6078574000",
                "NextLevel": [
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
                    "FriendlyName": "",
                    "Cost": "0.0750056100",
                    "NextLevel": []
                  }
                ]
              }
            ],
            "CostsByTime": [
              {
                "Groups": [
                  {
                    "GroupName": "Service",
                    "GroupValue": "AmazonEC2",
                    "FriendlyName": "EC2"
                  },
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
                    "FriendlyName": ""
                  }
                ],
                "CostDates": [
                  {
                    "Date": "1/20/2017 12:00:00 AM",
                    "Cost": "0.0750056100",
                    "UsageQuantity": "24.0000619600"
                  }
                ]
              },
              {
                "Groups": [
                  {
                    "GroupName": "Service",
                    "GroupValue": "AmazonS3",
                    "FriendlyName": "S3"
                  },
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
                    "FriendlyName": ""
                  }
                ],
                "CostDates": [
                  {
                    "Date": "1/20/2017 12:00:00 AM",
                    "Cost": "0.1083478400",
                    "UsageQuantity": "418.5352970600"
                  }
                ]
              }
            ]
          }
          

Get Detailed Billing With Grouping V2

The API method, “get_detailed_billing_with_grouping_v2”, is used to pull the results from a saved filter in the Advanced Grouping (w/tags) report. Version 2 of the call includes two additional parameters.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required for all API calls
saved_filter_name string required; the name of the saved filter from which to pull the results
use_account string *required; friendly name of the account in CloudCheckr; must be a payer account in CloudCheckr
use_cc_account_id string *required; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr
with_costs_by_group string optional; retrieves costs per group; accepts true/false; defaults to true if not specified
with_costs_by_time string optional; retrieves costs per time period; accepts true/false; defaults to true if not specified
start string optional; returns costs after the specified date
end string optional; returns costs before the specified date

Note: One of the * parameters must be defined.
Note: If the start and end are not defined, the application will return the last 14 days.

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_v2?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filter

REQUEST EXAMPLE:

curl -X GET \
                                   -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_detailed_billing_with_grouping_v2?access_key=your_access_key&start=2013-11-08&end=2013-11-15&saved_filter_name=group2filteraccess_key=your_admin_access_key&use_cc_account_id=1234'\
                                   -- header 'cache-control: no-cache' \
                                   -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:

XML:

<GetDetailedBillingWithGroupingResponseV2
          xmlns:xsd='http://www.w3.org/2001/XMLSchema'
          xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <Total>30.7983416200</Total>
              <Max>30.7983416200</Max>
              <Min>30.7983416200</Min>
              <Average>30.798698086413034906518967198</Average>
              <CostsByGroup>
                  <GroupingLevel>
                      <GroupName>Service</GroupName>
                      <GroupValue>AmazonS3</GroupValue>
                      <FriendlyName>S3</FriendlyName>
                      <Cost>0.1099985400</Cost>
                      <NextLevel>
                          <GroupingLevel>
                              <GroupName>aws:createdBy</GroupName>
                              <GroupValue>IAMUser:AIDAI5X7LBFKDHYABCDE:mikeb</GroupValue>
                              <FriendlyName />
                              <Cost>0.1083478400</Cost>
                              <NextLevel />
                          </GroupingLevel>
                      </NextLevel>
                  </GroupingLevel>
                  <GroupingLevel>
                      <GroupName>Service</GroupName>
                      <GroupValue>AmazonEC2</GroupValue>
                      <FriendlyName>EC2</FriendlyName>
                      <Cost>22.6078574000</Cost>
                      <NextLevel>
                          <GroupingLevel>
                              <GroupName>aws:createdBy</GroupName>
                              <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                              <FriendlyName />
                              <Cost>0.0750056100</Cost>
                              <NextLevel />
                          </GroupingLevel>
                      </NextLevel>
                  </GroupingLevel>
              </CostsByGroup>
              <CostsByTime>
                  <GroupingByTime>
                      <Groups>
                          <Grouping>
                              <GroupName>Service</GroupName>
                              <GroupValue>AmazonEC2</GroupValue>
                              <FriendlyName>EC2</FriendlyName>
                          </Grouping>
                          <Grouping>
                              <GroupName>aws:createdBy</GroupName>
                              <GroupValue>IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw</GroupValue>
                              <FriendlyName />
                          </Grouping>
                      </Groups>
                      <CostDates>
                          <GroupCostDate>
                              <Date>1/20/2017 12:00:00 AM</Date>
                              <Cost>0.0750056100</Cost>
                              <UsageQuantity>24.0000619600</UsageQuantity>
                          </GroupCostDate>
                      </CostDates>
                  </GroupingByTime>
                  <GroupingByTime>
                      <Groups>
                          <Grouping>
                              <GroupName>Service</GroupName>
                              <GroupValue>AmazonS3</GroupValue>
                              <FriendlyName>S3</FriendlyName>
                          </Grouping>
                          <Grouping>
                              <GroupName>aws:createdBy</GroupName>
                              <GroupValue>IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb</GroupValue>
                              <FriendlyName />
                          </Grouping>
                      </Groups>
                      <CostDates>
                          <GroupCostDate>
                              <Date>1/20/2017 12:00:00 AM</Date>
                              <Cost>0.1083478400</Cost>
                              <UsageQuantity>418.5352970600</UsageQuantity>
                          </GroupCostDate>
                      </CostDates>
                  </GroupingByTime>
              </CostsByTime>
          </GetDetailedBillingWithGroupingResponseV2>
          

JSON:

{
            "Total": 30.79834162,
            "Max": 30.79834162,
            "Min": 30.79834162,
            "Average": 30.798698086413037,
            "CostsByGroup": [
              {
                "GroupName": "Service",
                "GroupValue": "AmazonS3",
                "FriendlyName": "S3",
                "Cost": "0.1099985400",
                "NextLevel": [
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
                    "FriendlyName": "",
                    "Cost": "0.1083478400",
                    "NextLevel": []
                  }
                ]
              },
              {
                "GroupName": "Service",
                "GroupValue": "AmazonEC2",
                "FriendlyName": "EC2",
                "Cost": "22.6078574000",
                "NextLevel": [
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
                    "FriendlyName": "",
                    "Cost": "0.0750056100",
                    "NextLevel": []
                  }
                ]
              }
            ],
            "CostsByTime": [
              {
                "Groups": [
                  {
                    "GroupName": "Service",
                    "GroupValue": "AmazonEC2",
                    "FriendlyName": "EC2"
                  },
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI4NZVQK6IW45ABCDE:paul.vanw",
                    "FriendlyName": ""
                  }
                ],
                "CostDates": [
                  {
                    "Date": "1/20/2017 12:00:00 AM",
                    "Cost": "0.0750056100",
                    "UsageQuantity": "24.0000619600"
                  }
                ]
              },
              {
                "Groups": [
                  {
                    "GroupName": "Service",
                    "GroupValue": "AmazonS3",
                    "FriendlyName": "S3"
                  },
                  {
                    "GroupName": "aws:createdBy",
                    "GroupValue": "IAMUser:AIDAI5X7LBFKDHYFABCDE:mikeb",
                    "FriendlyName": ""
                  }
                ],
                "CostDates": [
                  {
                    "Date": "1/20/2017 12:00:00 AM",
                    "Cost": "0.1083478400",
                    "UsageQuantity": "418.5352970600"
                  }
                ]
              }
            ]
          }
          

Get Tag Rules

The API method, “get_tag_rules”, is used to retrieve a list of cost tag rules.

The preferred HTTP method for this call is GET.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/get_tag_rules

REQUEST EXAMPLE:

curl -X GET \
               -- https://api.cloudcheckr.com/api/billing.[json|xml]/get_tag_rules?access_key=your_admin_access_key
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
          

RESPONSE EXAMPLE:
XML:

<GetTagRuleResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <tag_rules>
                  <TagRuleDto>
                      <tag_rule_id>79</tag_rule_id>
                      <name>Cost Center</name>
                  </TagRuleDto>
                  <TagRuleDto>
                      <tag_rule_id>80</tag_rule_id>
                      <name>Services</name>
                  </TagRuleDto>
              </tag_rules>
          </GetTagRuleResponse>

JSON:

{
              "tag_rules": [
                  {
                      "tag_rule_id": 79,
                      "name": "Cost Center"
                  },
                  {
                      "tag_rule_id": 80,
                      "name": "Services"
                  }
              ]
          }

Update Tag Rule

The API method, “update_tag_rule”, is used to modify an existing cost tag rule.

The preferred HTTP method for this call is POST.

To update a tag rule in the user interface, choose Cost > Tagging > Tagging Rules.

Once in the Tagging Rules report, click the tag rule that you want to modify.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key
tag_rule_id string required; ID of the rule you want to modify
name string required; name of the tag rule
tags list<string> required; tag_key and tag_value
regions list<string> required; list of region(s) where the tag rule will be applied
azure_consumed_services list<string> required; the Azure resource(s)
azure_subscriptions list<string> required; the Azure subscription(s)

API CALL URL:

https://api.cloudcheckr.com/api/billing.[json|xml]/update_tag_rule

REQUEST EXAMPLE:

curl -X POST \
               -- https://api.cloudcheckr.com/api/billing.[json|xml]/update_tag_rule?access_key=your_access_key
               -- header 'cache-control: no-cache' \
               -- header 'content-type: application/[json|xml]' \
               -- data '{
                  "tag_rule_id": "94",
                  "name": "Azure Tag Rule",
                  "tags": {
                    "TagKey": "TagValue",
                    "TagKey2": "*"
                  },
                    "region": "US East",
                    "azure_consumed_service": "*",
                    "azure_subscriptions": [
                         "4dc76947-2789-4149-bc29-3b7bd45ce4a8",
                         "b9e7ac32-fcba-4090-a249-d8a240d356ac"
              ]
          }

RESPONSE EXAMPLE:
XML:

<UpdateTagRuleResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
              <tag_rule>
                  <status>
                      <code>200</code>
                      <message>Rule updated.</message>
                      <tag_rule_id>94</tag_rule_id>
                  </status>
              </tag_rule>
          </UpdateTagRuleResponse>

JSON:

{
              "code": 200,
              "message": "Rule updated.",
              "tag_rule_id": "94"
          }

Get Resources Virtual Machine Details

The API method, “get_resources_virtual_machine_details”, is used to to pull the data for the list of Virtual Machines report from CloudCheckr.

INPUT PARAMETERS:

Parameter Type Description
access_key string required; standard access key required
use_cc_account_id string required/optional; unique account ID used in CloudCheckr; must be a payer account in CloudCheckr

Note: Required if the access key represents an administrator account.

date string optional; return report from this date; if date is not defined, the most recent report will be returned; recommended date format is mm/dd/yyyy.

API CALL URL:

https://api.cloudcheckr.com/api/inventory.json/get_resources_virtual_machine_details?access_key=your_access_key&use_cc_account_id=1234

REQUEST EXAMPLE:

curl -X GET \
                 -- https://api.cloudcheckr.com/api/account.[json|xml]/add_account_v3?access_key=your_admin_access_key&use_cc_account_id=1234'\
                 -- header 'cache-control: no-cache' \
                 -- header 'content-type: application/[json|xml]' \

RESPONSE EXAMPLE:
XML:

<GetResourcesVirtualMachineDetailsResponse xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
          <DateOfResults>2017-09-26T15:36:43</DateOfResults>
          	<TotalCount>1</TotalCount>
          	<Count>1</Count>
          	<VirtualMachines>
          		<SubscriptionId>11111111-2222-3333-4444-555555555555</SubscriptionId>
          		<LocationName>East US</LocationName>
          		<Name>ManagedDisk</Name>
          		<State>Running</State>
          		<Url>/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/CLOUDCHECKR/providers/Microsoft.Compute/virtualMachines/ManagedDisk</Url>
          		<LicenseType />
          		<VmSize>Basic_A0</VmSize>
          		<Offer>WindowsServer</Offer>
          		<Sku />
          		<Version />
          		<OsType>Windows</OsType>
          		<DiskName>ManagedDisk_OsDisk_1_72e7bb21920e486aa9ddc5da4532980e</DiskName>
          		<DiskUri />
          		<DiskCaching>ReadWrite</DiskCaching>
          		<DiskCreateOption>FromImage</DiskCreateOption>
          		<ComputerName>ManagedDisk</ComputerName>
          		<PrivateDnsName />
          		<PrivateIpAddress />
          		<PublicDnsName />
          		<PublicIpAddress />
          		<SubnetId />
          		<AvgCpuForLast7Days>1.9828732800284399</AvgCpuForLast7Days>
          		<AvgCpuForLast30Days />
          		<AvgCpuForLast90Days />
          		<HighCpuPercent>90</HighCpuPercent>
          		<LowCpuPercent>5</LowCpuPercent>
          		<AvgNetworkInLast30Days />
          		<AvgNetworkOutLast30Days />
          		<HoursCpuUtilAbove80>0</HoursCpuUtilAbove80>
          		<HoursCpuUtilBelow80>0</HoursCpuUtilBelow80>
          		<HoursCpuUtilBelow60>0</HoursCpuUtilBelow60>
          		<HoursCpuUtilBelow40>0</HoursCpuUtilBelow40>
          		<HoursCpuUtilBelow20>0</HoursCpuUtilBelow20>
          		<HoursHighCpuLast7Days>0</HoursHighCpuLast7Days>
          		<HoursHighCpuLast30Days>0</HoursHighCpuLast30Days>
          		<HoursHighCpuLast90Days />
          		<HoursLowCpuLast7Days>0</HoursLowCpuLast7Days>
          		<HoursLowCpuLast30Days>0</HoursLowCpuLast30Days>
          		<HoursLowCpuLast90Days />
          		<HoursRunningLast7Days />
          		<HoursRunningLast30Days />
          		<HoursRunningLast90Days />
          		<MinimumCpuUtilization />
          		<MinimumCpuUtilizationDateTime />
          		<PeakCpuUtilization />
          		<PeakCpuUtilizationDateTime />
                          <ScaleSets>ScaleSetName</ScaleSets>
          		<Tags>
          			<TagName>Creator</TagName>
          			<TagValue>John Doe</TagValue>
          		</Tags>
          	</VirtualMachines>
          	<HasNext>false</HasNext>
          	<NextToken></NextToken>
          </GetResourcesVirtualMachineDetailsResponse>

JSON:

{
              "DateOfResults": "2017-09-26T15:36:43",
              "TotalCount": 1,
              "Count": 1,
              "VirtualMachines": [
                  {
          			"SubscriptionId": "11111111-2222-3333-4444-555555555555",
                      "LocationName": "East US",
                      "Name": "ManagedDisk",
                      "State": "Running",
                      "Url": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/CLOUDCHECKR/providers/Microsoft.Compute/virtualMachines/ManagedDisk",
                      "LicenseType": null,
                      "VmSize": "Basic_A0",
                      "Offer": "WindowsServer",
                      "Sku": null,
                      "Version": null,
                      "OsType": "Windows",
                      "DiskName": "ManagedDisk_OsDisk_1_72e7bb21920e486aa9ddc5da4532980e",
                      "DiskUri": null,
                      "DiskCaching": "ReadWrite",
                      "DiskCreateOption": "FromImage",
                      "ComputerName": "ManagedDisk",
                      "PrivateDnsName": null,
                      "PrivateIpAddress": null,
                      "PublicDnsName": null,
                      "PublicIpAddress": null,
                      "SubnetId": null,
                      "AvgCpuForLast7Days": 1.9828732800284399,
                      "AvgCpuForLast30Days": null,
                      "AvgCpuForLast90Days": null,
                      "HighCpuPercent": 90,
                      "LowCpuPercent": 5,
                      "AvgNetworkInLast30Days": null,
                      "AvgNetworkOutLast30Days": null,
                      "HoursCpuUtilAbove80": 0,
                      "HoursCpuUtilBelow80": 0,
                      "HoursCpuUtilBelow60": 0,
                      "HoursCpuUtilBelow40": 0,
                      "HoursCpuUtilBelow20": 0,
                      "HoursHighCpuLast7Days": 0,
                      "HoursHighCpuLast30Days": 0,
                      "HoursHighCpuLast90Days": null,
                      "HoursLowCpuLast7Days": 0,
                      "HoursLowCpuLast30Days": 0,
                      "HoursLowCpuLast90Days": null,
                      "HoursRunningLast7Days": null,
                      "HoursRunningLast30Days": null,
                      "HoursRunningLast90Days": null,
                      "MinimumCpuUtilization": null,
                      "MinimumCpuUtilizationDateTime": null,
                      "PeakCpuUtilization": null,
                      "PeakCpuUtilizationDateTime": null,
                      "ScaleSets": ScaleSetName,
                      "Tags": [
                          {
                              "TagName": "Creator",
                              "TagValue": "John Doe"
                          }
                      ]
                  }
              ],
              "HasNext": false,
              "NextToken": ""
          }
          

Follow this procedure to configure the Azure portion of the Active Directory Single Sign-On instructions.

For instructions on how to configure the CloudCheckr portion for Azure Active Directory, review the Microsoft Azure Configuration – Active Directory/O365 Accounts topic.

Azure Single Sign-On will not work with the credentials of an existing CloudCheckr user.

As part of the initial SSO sign-in procedure, Azure Active Directory needs to create a user in CloudCheckr. If you use an existing user from a CloudCheckr account that was not created in SSO, you will get an error message.

Follow these steps before you attempt to sign in:

  1. Delete the existing user in CloudCheckr. Make note of the user's configuration and permissions for later use. (Admin user must perform this step.)

  2. Access CloudCheckr via SSO using the CloudCheckr application on https://myapps.microsoft.com to recreate the CloudCheckr user account.
  3. Return to CloudCheckr to configure or modify the user's access in more detail. (Admin user must perform this step.)

When these steps are complete, you will no longer be able to access CloudCheckr directly from the CloudCheckr login page and must access CloudCheckr via Azure Active Directory SSO.


Procedure

  1. Login to the Azure portal.

    The Microsoft Azure Dashboard opens.

  2. On the left navbar, click Azure Active Directory.

    The Azure Active Directory blade opens.

  3. In the Manage Section, click Enterprise applications.

    The Enterprise applications blade opens.

  4. Click New application.

    The Add an application blade opens.

  5. Select Non-gallery application.

    The  Add your own application blade opens.

  6. In the Name text field, type CloudCheckr
  7. From the bottom of the page, click Add.

    The CloudCheckr - Quick start screen opens.

  8. Select Assign a user for testing (required).

    The Users and Groups blade opens.

  9. Click Add user.

    The Add Assignment blade opens.

  10. Select Users.

    A list of users displays.

  11. Select a user from the list and click Select.

  12. In the Add Assignment blade, click Assign.
  13. Close any open blades and return to the CloudCheckr - Quick start screen.
  14. Select Create your test user in CloudCheckr (required).

    The Provisioning blade opens.

  15. Verify that the provisioning mode is set to Manual.

  16. Click Save and close the blade to return to the CloudCheckr - Quick start screen.

  17. Click Configure single sign-on (required).

  18. Perform the following actions:

    1. From the Single Sign-on Mode drop-down menu, select SAML-based Sign-on.
    2. In the Identifier text field:
      • For iDP-initiated SSO, type https://app.cloudcheckr.com/AzureAD/AzureSSO_SignIn
      • For SP-initiated SSO, type https://mycompanyscloud.mycompany.com/AzureAD/AzureSSO_SignIn
    3. In the Reply URL text field:
      • For iDP-initiated SSO, type https://app.cloudcheckr.com/LogOn/LogOnAzureSSO
      • For SP-initiated SSO, type https://mycompanyscloud.mycompany.com/LogOn/LogOnAzureSSO
    4. Select the Show advanced URL settings check box.
    5. In the Sign-on URL text field:
      • For iDP-initiated SSO, type https://app.cloudcheckr.com/AzureAD/AzureSSO_SignIn
      • For SP-initiated SSO, type https://mycompanyscloud.mycompany.com/AzureAD/AzureSSO_SignIn
    6. Click Save.

  19. Once the Enterprise application setup is complete, you can log into  https://myapps.microsoft.com and select CloudCheckr from the list of applications.

Creating Azure subscriptions is a two-step process:

  • configure your Azure subscription in Azure
  • set up your Azure subscription in CloudCheckr
This topic identifies each procedure in detail.

Configure Your Azure Subscription in the Azure Portal

After you create the Directory ID, Application ID, Subscription ID, and secret key, please copy these values to a desired file type, such as CSV, and save the file to a safe location. You will need them to configure your subscription in CloudCheckr.
  1. Log into the Azure management portal.
    The portal link you choose depends on your subscription type:

  2. From the selected Azure portal, select the directory that contains the subscription you want to scan.

  3. Open the Azure Active Directory management panel.
  4. Select Properties.
  5. Find the Directory ID and save it.

  6. Select App Registrations and click Add to create a new app registration.

  7. Type a name for the application. (For example: CloudCheckr Service).
  8. From the Application Type drop-down menu, select Web app /API .
  9. In the Sign-on URL text field, type https://localhost.

  10. Click Create. When you are back on the App Registration screen, find the Application ID and save it.
  11. Select the new registration and from the menu, select Keys.
  12. Type a name, select a duration, and click Save.

    Azure creates a new key and displays the key value in the third text field.
  13. Save the new key value immediately since you will not be able to view it again. You will now have three values: Directory ID, Application ID, and the secret key.
  14. Open the Subscription management panel.
  15. Select the subscription that CloudCheckr will monitor. Find the subscription ID and save it.
  16. With the subscription selected from the subscription management panel, select Access Control (IAM).

  17. Click Add to add the new service account.
  18. Select the Reader role and then add the new service account as the user. You may need to search for the account if it is not listed.
  19. Save the change.

    The CloudCheckr service account should now be on the list with reader access.

Configure Your Subscription Account in CloudCheckr

To import your Azure data into CloudCheckr, you need to create Azure accounts in CloudCheckr.

  1. From the top right of the Partners page, click the NEW ACCOUNT button.

    The New Account screen displays.

  2. Type a name for your account. If needed, you can change the name later.
  3. From the Cloud Provider drop-down menu, select Microsoft Azure.
  4. Click Create.

    The Configure Account page opens.
  5. Click the drop-down arrow and select Collect resource information from my Azure subscription from the drop-down menu.

    The Configuration page displays the subscription instructions.
  6. Provide the required information from the Azure portal.
    • Directory ID
    • Application ID
    • Subscription ID
    • Secret Key
  7. From the Azure Account Type drop-down menu, select Commercial or Government.
  8. Click Update.

How did we do?