Created
March 3, 2017 20:13
-
-
Save codingoutloud/d369888e7426e86e9192ccd9d5666b52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from azure.servicemanagement import * | |
import platform | |
import os | |
plat = platform.system() | |
print("Platform == " + plat) | |
if plat != 'Windows': | |
certificate_path = './azquota.pem' # other than Windows | |
else: | |
certificate_path = 'CURRENT_USER\\my\\LabX' # Windows only | |
subscription_id = '1d29d4d6-b128-44bb-b644-a3204eb444be' | |
sms = ServiceManagementService(subscription_id, certificate_path) | |
sub_quota = sms.get_subscription(); | |
print('Subscription: %s' % subscription_id); | |
#print('Account %s:' % sub_quota.); | |
print('Using %s of %s cores' % (sub_quota.current_core_count, sub_quota.max_core_count)) | |
print('Using %s of %s hosted services' % (sub_quota.current_hosted_services, sub_quota.max_hosted_services)) | |
print('Using %s of %s storage accounts' % (sub_quota.current_storage_accounts, sub_quota.max_storage_accounts)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment