Microsoft Azure is a cloud computing platform and infrastructure created by Microsoft for building, deploying, and managing applications and services through a global network of Microsoft-managed data centers.

With this document, we will be able to use and work with the Microsoft Azure Connector.

Design Aspects

Perform all standard application operations like Create, Start and Stop operations available through the Microsoft Azure Connector. Some of them are listed below:

  • List virtual machine
  • Create virtual machine
  • Start virtual machine
  • Stop virtual machine
  • Reboot virtual machine
  • Details virtual machine
  • Delete virtual machine
  • List regions
  • Ratecard
  • Usage aggregates
  • Create resource group
  • Delete resource group

Connector Configuration

Configuration parameters
ParameterDescriptionRequired
keyMicrosoft Azure keyfalse: config/request
client-idMicrosoft Azure unique client id false: config/request
tenant-idMicrosoft Azure unique tenant id false: config/request
subscription-idMicrosoft Azure unique subscription idfalse: config/request
rate-card-api-versionRate card api version for fetching ratecard data from azure portalfalse: config/request
group-nameName of the groupfalse:config/request
Example
{
"key":"5Wi6KdsksmlIjHQ96ZmknJqhxghjfjgh86782645784",
"client-id":"fcaaddda-7a23ghjf-443f-6454ghjfgj87777732452sfef",
"tenant-id": "99cf556e-0321-4ghjgde2-8226-9908098hhi",
"subscription-id": "3c089816-8074-0808ghiuh-bdbf-3aghjfgj567e94946f",
"rate-card-api-version":"2016-08-31-preview",
"group-name":"test"
}

Actions

list-instance
 

List Instance of Azure from given details.

Request parameters
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:list-instancetrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters
ParameterDescription
vm-listList of Microsoft Azure created instance info set with details of instance
Example
 
response = @call.connector("azure")
                          .set('action',"list-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
                          .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

#Microsoft Azure Connector Response Parameters
instance_set = response.get("vm-list")

list-region

List regions of Azure from given details.

Request parameters 
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:list-regiontrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters 
ParameterDescription
regionsList of Microsoft Azure regions available for user

 

Example 

 

response = @call.connector("azure")
                          .set('action',"list-region")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
                          .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

#Microsoft Azure Connector Response Parameters
regions_set = response.get("regions")


create-instance

create instance on Microsoft azure cloud with given details.

Request parameters
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:create-instancetrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
instance-nameName of the instance which you want to createtrue
regionName of region in which you want to create virtual machinetrue
resource-groupName of resource group in which you want to create the virtual machinetrue
network-nameName of network which virtual machine going to usetrue
subnet-idName of the sub-net which virtual machine going to usetrue
usernameUser-name for the virtual machine which you are going to createtrue
passwordPassword for the virtual machine which you are going to createtrue
os-typeType of operating system which you want to install on virtual machinetrue
sizesize of virtual machine which you want create which include hard-disk, CPU cores and RAM(as per azure standard)true
imageImage name which you want to install on the virtual machinetrue
Response parameters
ParameterDescription
exit-code and detailsReturn success (0) with details of instance if created successfully else return failed(-1) with error message
Example  
response = @call.connector("azure")
                          .set('action',"create-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
						  .set('instance-name',"test")
                          .set('region',"southcentralus")
                          .set('resource-group',"grouptest")
                          .set('subnet-id',"test_subnet")
                          .set('username',"test")
                          .set('password',"Test@123")
                          .set('os-type',"linux")
                          .set('size',"Standard_A0")
                          .set('image',"UBUNTU_SERVER_16_04_LTS")
                          .set('network-name',"test_network")
                          .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

delete-instance 

delete instance from Microsoft azure cloud using  given details. 

Request parameters 
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:delete-instancetrue
instance-nameName of the instance which you want to deletetrue
group-nameName of group in which the given instance or virtual machine presenttrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters 
ParameterDescription
exit-code and messagereturn success (0)if deleted from azure portal else return failed(-1) with error message
Example  
response = @call.connector("azure")
                          .set('action',"delete-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
						  .set('instance-name',"test")
						  .set('group-name',"grouptest")   
						  .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

start-instance

start instance which is present on  Microsoft azure cloud using  given details.

Request parameters
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:start-instancetrue
instance-nameName of the instance which you want to starttrue
group-nameName of group in which the given instance or virtual machine presenttrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters 
ParameterDescription
exit-code and messagereturn success (0)if started else return failed(-1) with error message
Example   
response = @call.connector("azure")
                          .set('action',"start-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
 						  .set('instance-name',"test")
						  .set('group-name',"grouptest")
 					   	  .sync
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

stop-instance 

stop instance which is present on  Microsoft azure cloud using  given details. 

Request parameters 
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:stop-instancetrue
instance-nameName of the instance which you want to stoptrue
group-nameName of group in which the given instance or virtual machine presenttrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters  
ParameterDescription
exit-code and messagereturn success (0)if stopped else return failed(-1) with error message
Example    
 response = @call.connector("azure")
                          .set('action',"stop-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
 						  .set('instance-name',"test")
						  .set('group-name',"grouptest")
 					   	  .sync


#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

reboot-instance

reboot instance which is present on  Microsoft azure cloud using  given details.

Request parameters
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:reboot-instancetrue
instance-nameName of the instance which you want to reboottrue
group-nameName of group in which the given instance or virtual machine presenttrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters 
ParameterDescription
exit-code and messagereturn success (0)if rebooted else return failed(-1) with error message

Example  
 response = @call.connector("azure")
                          .set('action',"reboot-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
 						  .set('instance-name',"test")
						  .set('group-name',"grouptest")
 					   	  .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

describe-instance 

describe instance which is present on  Microsoft azure cloud using  given details.

 Request parameters
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:describe-instance

true

instance-nameName of the instance which you want to describetrue
group-nameName of group in which the given instance or virtual machine presenttrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters
ParameterDescription
exit-code and messagereturn success (0)if described successfully else return failed(-1) with error message
Example  
 response = @call.connector("azure")
                          .set('action',"describe-instance")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
 						  .set('instance-name',"test")
						  .set('group-name',"grouptest")
 					   	  .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

 

create-resource-group

create resource group on  Microsoft azure cloud using  given details.

Request parameters 
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:create-resource-grouptrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
group-nameName of group which you want to createtrue
regionName of region in which you want to create the resource grouptrue


Response parameters 
ParameterDescription
exit-code and detailsReturn success(0) if resource group successfully created with message else return failed (-1) with error message
Example  
response = @call.connector("azure")
                          .set('action',"create-resource-group")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
					      .set('region',"testregion")
						  .set('group-name',"grouptest")
 					   	  .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

 

delete-resource-group 

delete resource which is present on  Microsoft azure cloud using  given details.

Request parameters 
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:delete-resource-grouptrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
resource-group-nameName of resource group which you want to deletetrue
Response parameters 
ParameterDescription
exit-codereturn success(0) if successfully deleted else return failed(-1) with error message
 Example  
response = @call.connector("azure")
                          .set('action',"delete-resource-group")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdfjiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
						  .set('resource-group-name',"grouptest")
 					   	  .sync
 
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages



 

rate-card 

Fetch rate-card data from azure portal using given details for your account.

Request parameters  
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:rate-cardtrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
offer-durable-idOffer durable id to fetch details of rate cardtrue
currencyCurrency for rate card data valuetrue
locallocal info for your accounttrue
region-infoName of the regiontrue
Response parameters 
ParameterDescription
rate-card datareturn success(0) with rate-card data if successfully executed else return failed(-1) with error message
Example  
response = @call.connector("azure")
                          .set('action',"rate-card")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
						  .set('offer-durable-id',"MS-AZR-0003p")
                          .set('currency',"USD")
                          .set('local',"en-US")
                          .set('region-info',"US")
 						  .sync
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages


usage-aggregates 

Fetch the usage data for your account using given details.

Request parameters   
ParameterDescriptionRequired
connector_nameName of the Microsoft Azure Connector to be configured.true
actionContains the name of the operation:usage-aggregatestrue
keyMicrosoft Azure keyfalse
client-idMicrosoft Azure unique client idfalse
tenant-idMicrosoft Azure unique tenant idfalse
subscription-idMicrosoft Azure unique subscription idfalse
Response parameters   
ParameterDescription
usage datareturn success(0) with usage data if successfully executed else return failed(-1) with error message
Example  
response = @call.connector("azure")
                          .set('action',"usage-aggregates")
                          .set('tenant-id',"fasdfahlihfd5345hnkjfhladfg")
                          .set('subscription-id', "dfgdhsklj34535hjkljshaflfhs")
                          .set('key', "sfjklsjdf;jiyldfgsdgildd3453fgsg")
                          .set('client-id',"gsdgjldgdjgoui0455=fdklgjdjgsdj=")
 						  .sync
#Microsoft Azure Connector Response Meta Parameters
response_exitcode = response.exitcode	# Exit status code
response_message = response.message	# Execution status messages

 

On this page: