Azure Compute v2

Create and Manage Azure Virtual Machines.

IT Services · Azure Compute

Details

IDAzure Compute v2
ProviderMicrosoft
CategoryIT Services
From Version5.0.0
Docker Imagedemisto/crypto:1.0.0.5490413
Supported ModulesAgentix XSIAM EDR Cortex Cloud Cloud Runtime Security

README

You can use this integration to create and manage Azure Virtual Machines.
This integration was integrated and tested with Azure Compute API Version: 2017-12-01.

Authentication

For more details about the authentication used in this integration, see Microsoft Integrations - Authentication.

  • After authorizing the Demisto App or the Self-Deployed Application, you will get an ID, Token, and Key, which should be inserted in the integration instance configuration’s corresponding fields. After giving consent, the application has to have a role assigned so it can access the relevant resources per subscription.
  • In order to assign a role to the application after consent was given:
    • Go to the Azure Portal UI.
    • Go to Subscriptions, and then Access Control (IAM).
    • Click “Add role assignment”.
    • Create a new role or select a role that includes the following permissions:
      • Microsoft.Compute/virtualMachines/*
      • Microsoft.Network/networkInterfaces/read
      • Microsoft.Resources/subscriptions/resourceGroups/read
    • Select the Azure Compute application. By default, Azure AD applications aren’t displayed in the available options. To find your application, search for the name and select it.

Configure Azure Compute v2 in Cortex

Parameter Description Required
Host URL (e.g. https://management.azure.com)   True
ID (received from the admin consent - see Detailed Instructions (?)   True
Token (received from the admin consent - see Detailed Instructions (?) section)   True
Key (received from the admin consent - see Detailed Instructions (?)   False
Certificate Thumbprint Used for certificate authentication. As appears in the “Certificates & secrets” page of the app. False
ID (received from the admin consent - see Detailed Instructions (?)   False
Token (received from the admin consent - see Detailed Instructions (?) section)   False
Key (received from the admin consent - see Detailed Instructions (?)   True
Certificate Thumbprint Used for certificate authentication. As appears in the “Certificates & secrets” page of the app. False
Private Key Used for certificate authentication. The private key of the registered certificate. False
Default Subscription ID   False
Default Subscription ID   False
Default Resource Group Name This parameter can be overridden by the resource_group argument in any command. False
Use system proxy settings   False
Trust any certificate (not secure)   False
Use a self-deployed Azure Application Select this checkbox if you are using a self-deployed Azure application. False

Commands

You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

azure-vm-list-instances


Lists the virtual machine instances in the given resource group.

Base Command

azure-vm-list-instances

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group of the virtual machines.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional

Context Output

Path Type Description
Azure.Compute.Name string The name of the virtual machine.
Azure.Compute.Location string The location of the virtual machine.
Azure.Compute.ProvisioningState string The provisioning state of the virtual machine.
Azure.Compute.ResourceGroup string The resource group in which the virtual machine resides.
Azure.Compute.ID string The ID of the virtual machine.
Azure.Compute.Size number The size of the deployed virtual machine (in gigabytes).
Azure.Compute.OS string The OS running on the virtual machine.

Command example

!azure-vm-list-instances resource_group=Compute-Labs

Context Example

{
    "Azure": {
        "Compute": [
            {
                "ID": "d25e7ce9-258b-4d8d-a516-c2206eef08ef",
                "Location": "eastus",
                "Name": "test12",
                "OS": "Windows",
                "ProvisioningState": "Succeeded",
                "ResourceGroup": "Compute-Labs",
                "Size": 127
            },
            {
                "ID": "befbbbba-64a6-49e9-84f7-27f3cc27818d",
                "Location": "eastus",
                "Name": "test1234",
                "OS": "Windows",
                "ProvisioningState": "Succeeded",
                "ResourceGroup": "Compute-Labs",
                "Size": 127
            },
            {
                "ID": "xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx",
                "Location": "eastus",
                "Name": "webserver",
                "OS": "Windows",
                "ProvisioningState": "Succeeded",
                "ResourceGroup": "Compute-Labs",
                "Size": 127
            }
        ]
    }
}

Human Readable Output

Microsoft Azure - List of Virtual Machines in Resource Group “Compute-Labs”

Name ID Size OS Location ProvisioningState ResourceGroup
test12 d25e7ce9-258b-4d8d-a516-c2206eef08ef 127 Windows eastus Succeeded Compute-Labs
test1234 befbbbba-64a6-49e9-84f7-27f3cc27818d 127 Windows eastus Succeeded Compute-Labs
webserver xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx 127 Windows eastus Succeeded Compute-Labs

azure-vm-start-instance


Powers on a given virtual machine.

Base Command

azure-vm-start-instance

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group Resource Group to which the virtual machine belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
virtual_machine_name Name of the virtual machine to power on. To see all virtual machines and their associated names for a specific resource group, run the azure-vm-list-instances command. Required

Context Output

Path Type Description
Azure.Compute.Name string Name of the VM that was started.
Azure.Compute.ResourceGroup string Resource group the VM resides in.
Azure.Compute.PowerState string Whether the VM instance is powered on or off.

Command example

!azure-vm-start-instance resource_group="Compute-Labs" virtual_machine_name="webserver"

Context Example

{
    "Azure": {
        "Compute": {
            "Name": "webserver",
            "PowerState": "VM starting",
            "ResourceGroup": "Compute-Labs"
        }
    }
}

Human Readable Output

Power-on of Virtual Machine “webserver” Successfully Initiated

Name PowerState ResourceGroup
webserver VM starting Compute-Labs

azure-vm-poweroff-instance


Powers off a given virtual machine.

Base Command

azure-vm-poweroff-instance

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the virtual machine belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
virtual_machine_name The name of the virtual machine to power off. To see all virtual machines with their associated names for a specific resource group, run the azure-vm-list-instances command. Required
skip_shutdown Set to True to request non-graceful VM shutdown. Default value is False. Possible values are: True, False. Default is False. Optional

Context Output

Path Type Description
Azure.Compute.Name string The name of the virtual machine that was powered off.
Azure.Compute.ResourceGroup string The resource group in which the virtual machine resides.
Azure.Compute.PowerState string Whether the virtual machine instance is powered on or off.

Command example

!azure-vm-poweroff-instance resource_group=Compute-Labs virtual_machine_name=test12

Context Example

{
    "Azure": {
        "Compute": {
            "Name": "test12",
            "PowerState": "VM stopping",
            "ResourceGroup": "Compute-Labs"
        }
    }
}

Human Readable Output

Power-off of Virtual Machine “test12” Successfully Initiated

Name PowerState ResourceGroup
test12 VM stopping Compute-Labs

azure-vm-get-instance-details


Gets the properties of a given virtual machine.

Base Command

azure-vm-get-instance-details

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the virtual machine belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
virtual_machine_name The name of the virtual machine you want to view the details of. To see all the virtual machines with their associated names for a specific resource group, run the azure-vm-list-instances command. Required
expand The expand expression to apply on the operation. ‘instanceView’ retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. ‘userData’ retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. Default value is False. Possible values are: instanceView, userData. Default is instanceView. Optional

Context Output

Path Type Description
Azure.Compute.Name string The name of the virtual machine you want to get details of.
Azure.Compute.ID string The ID of the virtual machine.
Azure.Compute.Size number The size of the deployed virtual machine (in gigabytes).
Azure.Compute.OS string The OS running on the given virtual machine.
Azure.Compute.ProvisioningState string The provisioning state of the deployed virtual machine.
Azure.Compute.Location string The region in which the virtual machine is hosted.
Azure.Compute.PowerState string Whether the virtual machine instance is powered on or off.
Azure.Compute.ResourceGroup string The resource group to which the virtual machine belongs.
Azure.Compute.NetworkInterfaces Unknown The list of network interfaces attached to this machine.
Azure.Compute.UserData string UserData for the VM.
Azure.Compute.Tags string Tags associated with the VM.

Command example

!azure-vm-get-instance-details resource_group=Compute-Labs virtual_machine_name=webserver

Context Example

{
    "Azure": {
        "Compute": {
            "ID": "xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx",
            "Location": "eastus",
            "Name": "webserver",
            "NetworkInterfaces": [
                {
                    "id": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729",
                    "properties": {
                        "deleteOption": "Delete"
                    }
                }
            ],
            "OS": "Windows",
            "PowerState": "VM running",
            "ProvisioningState": "Succeeded",
            "ResourceGroup": "Compute-Labs",
            "Size": 127,
            "Tags": {
                "env": "dev",
                "owner" : "testuser"
            }
        }
    }
}

Human Readable Output

Properties of VM “webserver”

Name ID Size OS ProvisioningState Location PowerState
webserver xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx 127 Windows Succeeded eastus VM running

azure-vm-create-instance


Creates a virtual machine instance with the specified OS image.

Base Command

azure-vm-create-instance

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the new virtual machine will belong.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
virtual_machine_name The name of the virtual machine to create. Required
virtual_machine_location The location in which to create the virtual machine. Possible values are: westus2, westus, westindia, westeurope, westcentralus, uksouth, ukwest, southeastasia, northcentralus, northeurope, southcentralus, southindia, francesouth, francecentral, japaneast, japanwest, koreacentral, koreasouth, brazilsouth, canadacentral, canadaeast, centralindia, eastus2, eastasia, westus, centralus, eastus, australiacentral, australiacentral2, australiaeast, australiasoutheast. Required
nic_name The name of the Network Interface to link the virtual machine with. Note that the virtual machine’s location property must match that of the Network Interface you choose to link it to. To see a list of available Network Interfaces visit the Azure Web Portal, navigate to the search bar at the top of the page, type “network interfaces”, and in the dynamic drop-down menu that appears, click the ‘Network interfaces’ option that appears under the ‘Services’ category. If none are present, you will need to create a new Network Interface. Required
vm_size The name of a VirtualMachineSize, which determines the size of the deployed virtual machine. For more information, see the Azure documentation at https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/listavailablesizes#virtualmachinesize. Possible values are: Standard_D1_v2, Standard_D2_v2, Standard_D2s_v3, Standard_B1ms, Standard_B1s, Standard_B2s, Standard_B4ms, Standard_D4s_v3, Standard_DS1_v2, Standard_DS2_v2, Standard_DS3_v2, Promo_DS2_v2, Promo_DS3_v2. Required
os_image The base operating system image of the virtual machine. Possible values are: Ubuntu Server 14.04 LTS, Ubuntu Server 16.04 LTS, Ubuntu Server 18.04 LTS, Red Hat Enterprise Linux 7.6, CentOS-based 7.5, Windows Server 2012 R2 Datacenter, Windows Server 2016 Datacenter, Windows 10 Pro Version 1803, Windows 10 Pro Version 1809. Optional
sku SKU of the OS image to be used. To see a list of available SKUs, visit your Azure Web Portal, click the symbol that looks similar to a ‘>’ on the top bar of the page. This should open a cloud shell, make sure it is a bash shell. At the command prompt enter az vm image list-skus along with the appropriate arguments that it will prompt you with to display the list of VM image SKUs available in the Azure Marketplace. Default is 2016-Datacenter. Optional
publisher Name of the publisher of the OS image. To see a list of available publishers, visit your Azure Web Portal, click the symbol that looks similar to a ‘>’ on the top bar of the page which should open a cloud shell, make sure it is a bash shell. At the command prompt enter az vm image list-publishers along with the appropriate arguments that it will prompt you with to display the list of VM image publishers available in the Azure Marketplace. Default is MicrosoftWindowsServer. Optional
version Version of the image to use. The supported formats are Major.Minor.Build or ‘latest’. Major, Minor, and Build are decimal numbers. Specify ‘latest’ to use the latest version of an image available at deploy time. Default is latest. Optional
offer Specifies the offer of the platform image or marketplace image used to create the virtual machine. To see a list of available offers, visit your Azure Web Portal, click the symbol that looks similar to a ‘>’ on the top bar of the page which should open a cloud shell, make sure it is a bash shell. At the command prompt enter az vm image list-offers along with the appropriate arguments that it will prompt you with to display the list of VM image offers available in the Azure Marketplace. Default is WindowsServer. Optional
admin_username The admin username to use when creating the virtual machine. Default is DemistoUser. Optional
admin_password The admin password to use when creating the virtual machine. Default is Passw0rd@123. Optional

Context Output

Path Type Description
Azure.Compute.Name string The name of the created virtual machine instance.
Azure.Compute.ResourceGroup string The resource group in which the virtual machine resides.
Azure.Compute.ID string The ID of the virtual machine.
Azure.Compute.Size number The size of the deployed virtual machine (in gigabytes).
Azure.Compute.OS string The OS running on the specified virtual machine.
Azure.Compute.ProvisioningState string The provisioning state of the deployed virtual machine.
Azure.Compute.Location string The region in which the virtual machine is hosted.

Command example

!azure-vm-create-instance nic_name=test_nic3 resource_group=Compute-Labs virtual_machine_location=eastus virtual_machine_name=test567 vm_size=Standard_D1_v2

Context Example

{
    "Azure": {
        "Compute": {
          "ID": "xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx",
          "Location": "eastus",
          "Name": "test567",
          "OS": "Windows",
          "ProvisioningState": "Creating",
          "ResourceGroup": "Compute-Labs",
          "Size": "127"

        }
    }
}

Human Readable Output

List of Resource Groups

ID Location Name OS ProvisioningState ResourceGroup Size
xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx eastus test567 Windows Creating Compute-Labs 127

azure-list-resource-groups


Lists all resource groups that belong to your Azure subscription.

Base Command

azure-list-resource-groups

Input

Argument Name Description Required
subscription_id Subscription ID to use. Can be retrieved from the azure-sc-list-subscriptions command. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
tag A single tag in the form of ‘{“Tag Name”:”Tag Value”}’ to filter the list by. Optional
limit Limit on the number of resource-groups to return. Default value is 50. Default is 50. Optional

Context Output

Path Type Description
Azure.ResourceGroup.Name string The name of the resource group.
Azure.ResourceGroup.ID string The ID of the resource group.
Azure.ResourceGroup.Location string The location of the resource group.
Azure.ResourceGroup.ProvisioningState string The provisioning state of the resource group.

Command example


#### Context Example

```json
{
    "Azure": {
        "ResourceGroup": [
            {
                "ID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs",
                "Location": "ukwest",
                "Name": "Compute-Labs",
                "ProvisioningState": "Succeeded"
            },
            {
                "ID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/NetworkWatcherRG",
                "Location": "eastus",
                "Name": "NetworkWatcherRG",
                "ProvisioningState": "Succeeded"
            }
        ]
    }
}

Human Readable Output

List of Resource Groups

ID Location Name ProvisioningState
/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs ukwest Compute-Labs Succeeded
/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/NetworkWatcherRG eastus NetworkWatcherRG Succeeded

azure-vm-delete-instance


Deletes a specified virtual machine.

Base Command

azure-vm-delete-instance

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the virtual machine belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
virtual_machine_name The name of the virtual machine to delete. To see all the virtual machines with their associated names for a specific resource group, run the azure-vm-list-instances command. Optional

Context Output

There is no context output for this command.

Command example

!azure-vm-delete-instance resource_group=Compute-Labs virtual_machine_name=test1234

Human Readable Output

“test1234” VM Deletion Successfully Initiated

azure-list-subscriptions


Lists the subscriptions for this application.

Base Command

azure-list-subscriptions

Input

There are no input arguments for this command.

Context Output

Path Type Description
Azure.Subscription.ID String The ID of the subscription.
Azure.Subscription.Name String The name of the subscription.
Azure.Subscription.State String The state of the subscription.

Command example


#### Context Example

```json
{
    "Azure": {
        "Subscription": {
            "ID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx",
            "Name": "Azure subscription 1",
            "State": "Enabled"
        }
    }
}

Human Readable Output

List of Subscriptions

ID Name State
/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx Azure subscription 1 Enabled

azure-vm-get-nic-details


Gets the properties of a given network interface.

Base Command

azure-vm-get-nic-details

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the network interface belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
nic_name The name of the network interface you want to view the details of. Required

Context Output

Path Type Description
Azure.Network.Interfaces.AttachedVirtualMachine String The attached virtual machine to this interface.
Azure.Network.Interfaces.IsPrimaryInterface String True if this interface is a primary interface of the attached virtual machine.
Azure.Network.Interfaces.NICType String The interface type.
Azure.Network.Interfaces.IPConfigurations.ConfigID String The interface IP configuration ID.
Azure.Network.Interfaces.IPConfigurations.ConfigName String The interface IP configuration name.
Azure.Network.Interfaces.IPConfigurations.PrivateIPAddress String The interface private IP address.
Azure.Network.Interfaces.IPConfigurations.PublicIPAddressID Unknown The interface public IP address ID.
Azure.Network.Interfaces.MACAddress String The interface MAC address.
Azure.Network.Interfaces.Name String The interface name.
Azure.Network.Interfaces.ResourceGroup String The interface resource group.
Azure.Network.Interfaces.NetworkSecurityGroup.id String The interface network security group ID.
Azure.Network.Interfaces.Location String The interface location.
Azure.Network.Interfaces.ID String The interface ID.

Command example

!azure-vm-get-nic-details resource_group=Compute-Labs nic_name=webserver729

Context Example

{
    "Azure": {
        "Network":{
          "Interfaces": {
            "AttachedVirtualMachine": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Compute/virtualMachines/webserver",
            "DNSSuffix": "test.bx.internal.cloudapp.net",
            "ID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729",
            "IPConfigurations": [
              {
                "ConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729/ipConfigurations/ipconfig1",
                "ConfigName": "ipconfig1",
                "PrivateIPAddress": "10.0.0.4",
                "PublicIPAddressID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/publicIPAddresses/webserver-ip"
              }
            ],
            "IsPrimaryInterface": true,
            "Location": "eastus",
            "MACAddress": "00-22-48-1C-73-AF",
            "NICType": "NA",
            "Name": "webserver729",
            "NetworkSecurityGroup": {
              "id": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkSecurityGroups/webserver-nsg"
            },
            "ResourceGroup": "Compute-Labs"
          }
        }
    }
}

Human Readable Output

Properties of Network Interface “webserver729”

Name ID MACAddress NetworkSecurityGroup NICType PrivateIPAddresses AttachedVirtualMachine
webserver729 /subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729 00-22-48-1C-73-AF id: /subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkSecurityGroups/webserver-nsg NA 10.0.0.4 sample-webserver

azure-vm-get-public-ip-details


Gets the properties of a given public IP address.

Base Command

azure-vm-get-public-ip-details

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the IP address belongs.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
address_name The IP address name. Required

Context Output

Path Type Description
Azure.Network.IPConfigurations.PublicIPAddress String The public IP address.
Azure.Network.IPConfigurations.PublicIPAddressFQDN String The address fully-qualified domain name (FQDN).
Azure.Network.IPConfigurations.PublicIPAddressAllocationMethod String The address allocation method.
Azure.Network.IPConfigurations.PublicConfigID String The address configuration ID.
Azure.Network.IPConfigurations.ResourceGroup String The address resource group.
Azure.Network.IPConfigurations.PublicIPAddressDomainName String The address domain name.
Azure.Network.IPConfigurations.PublicIPAddressVersion String The address version.
Azure.Network.IPConfigurations.Location String The address location.
Azure.Network.IPConfigurations.PublicConfigName String The address configuration name.
Azure.Network.IPConfigurations.PublicIPAddressID String The address ID.

Command examples

!azure-vm-get-public-ip-details resource_group=Compute-Labs address_name=webserver-ip

!azure-vm-get-public-ip-details address_name=xx.xx.xx.xx

Context Example

{
    "Azure": {
        "Network": {
            "IPConfigurations": {
                "Location": "eastus",
                "PublicConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729/ipConfigurations/ipconfig1",
                "PublicConfigName": "webserver-ip",
                "PublicIPAddress": "xx.xx.xx.xx",
                "PublicIPAddressAllocationMethod": "Dynamic",
                "PublicIPAddressDomainName": "cortexmea-webserver",
                "PublicIPAddressFQDN": "test.eastus.cloudapp.azure.com",
                "PublicIPAddressID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/publicIPAddresses/webserver-ip",
                "PublicIPAddressVersion": "IPv4",
                "ResourceGroup": "Compute-Labs"
            }
        }
    }
}

azure-vm-get-all-public-ip-details


Gets the properties of all public ip address in a subscription.

Base Command

azure-vm-get-all-public-ip-details

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional

Context Output

Path Type Description
Azure.Network.IPConfigurations.PublicIPAddress String The public IP address.
Azure.Network.IPConfigurations.PublicIPAddressFQDN String The address fully-qualified domain name (FQDN).
Azure.Network.IPConfigurations.PublicIPAddressAllocationMethod String The address allocation method.
Azure.Network.IPConfigurations.PublicConfigID String The address configuration ID.
Azure.Network.IPConfigurations.ResourceGroup String The address resource group.
Azure.Network.IPConfigurations.PublicIPAddressDomainName String The address domain name.
Azure.Network.IPConfigurations.PublicIPAddressVersion String The address version.
Azure.Network.IPConfigurations.Location String The address location.
Azure.Network.IPConfigurations.PublicConfigName String The address configuration name.
Azure.Network.IPConfigurations.PublicIPAddressID String The address ID.

Command example


#### Context Example

```json
{
    "Azure": {
        "Network": [{
            "IPConfigurations": {
                "Location": "eastus",
                "PublicConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver729/ipConfigurations/ipconfig1",
                "PublicConfigName": "webserver-ip",
                "PublicIPAddress": "xx.xx.xx.xx",
                "PublicIPAddressAllocationMethod": "Dynamic",
                "PublicIPAddressDomainName": "cortexmea-webserver",
                "PublicIPAddressFQDN": "test.eastus.cloudapp.azure.com",
                "PublicIPAddressID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/publicIPAddresses/webserver-ip",
                "PublicIPAddressVersion": "IPv4",
                "ResourceGroup": "Compute-Labs"
            }
        }, {
            "IPConfigurations": {
                "Location": "eastus",
                "PublicConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/webserver145/ipConfigurations/ipconfig2",
                "PublicConfigName": "webserver-ip2",
                "PublicIPAddress": "xx.xx.xx.xx",
                "PublicIPAddressAllocationMethod": "Dynamic",
                "PublicIPAddressDomainName": "cortexmea-webserver",
                "PublicIPAddressFQDN": "test.eastus.cloudapp.azure.com",
                "PublicIPAddressID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/publicIPAddresses/webserver-ip2",
                "PublicIPAddressVersion": "IPv4",
                "ResourceGroup": "Compute-Labs"
            }
        }, {
            "IPConfigurations": {
                "Location": "eastus",
                "PublicConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Other-Labs/providers/Microsoft.Network/networkInterfaces/webserver832/ipConfigurations/ipconfig3",
                "PublicConfigName": "webserver-ip3",
                "PublicIPAddress": "xx.xx.xx.xx",
                "PublicIPAddressAllocationMethod": "Dynamic",
                "PublicIPAddressDomainName": "cortexmea-webserver",
                "PublicIPAddressFQDN": "test.eastus.cloudapp.azure.com",
                "PublicIPAddressID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Other-Labs/providers/Microsoft.Network/publicIPAddresses/webserver-ip3",
                "PublicIPAddressVersion": "IPv4",
                "ResourceGroup": "Compute-Labs"
            }
        }]
    }
}

Human Readable Output

Properties of Public Address “webserver-ip”

PublicConfigName PublicIPAddress Location PublicIPAddressVersion PublicIPAddressAllocationMethod
test-publicip1 xx.xx.xx.xx ukwest IPv4 Static

azure-vm-create-nic


Creates a virtual machine network interface.

Base Command

azure-vm-create-nic

Input

Argument Name Description Required
subscription_id The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID’. Optional
resource_group The resource group to which the new network interface will belong.
To see all the resource groups associated with your subscription, run the azure-list-resource-groups command. If none are present, navigate to the Azure Web Portal to create resource groups.
Note: This argument will override the instance parameter ‘Default Resource Group Name’.
.
Optional
nic_name The network interface name. Required
nic_location The location in which to create the network interface. Possible values are: westus2, westus, westindia, westeurope, westcentralus, uksouth, ukwest, southeastasia, northcentralus, northeurope, southcentralus, southindia, francesouth, francecentral, japaneast, japanwest, koreacentral, koreasouth, brazilsouth, canadacentral, canadaeast, centralindia, eastus2, eastasia, westus, centralus, eastus, australiacentral, australiacentral2, australiaeast, australiasoutheast. Required
vnet_name The virtual network name of the interface. Required
subnet_name The subnet name of the interface. Required
address_assignment_method The address assignment method. Possible values are: Static, Dynamic. Default is Dynamic. Optional
private_ip_address The private IP address of the interface if you chose the static assignment method. Optional
ip_config_name The IP address configuration name. Required
network_security_group The network security group of the interface. Optional

Context Output

Path Type Description
Azure.Network.Interfaces.IPConfigurations.ConfigID String The interface IP configuration ID.
Azure.Network.Interfaces.IPConfigurations.ConfigName String The interface IP configuration name.
Azure.Network.Interfaces.IPConfigurations.PrivateIPAddress String The interface private IP address.
Azure.Network.Interfaces.IPConfigurations.PublicIPAddressID Unknown The interface public IP address ID.
Azure.Network.Interfaces.Name String The interface name.
Azure.Network.Interfaces.ResourceGroup String The interface resource group.
Azure.Network.Interfaces.NetworkSecurityGroup.id String The interface network security group ID.
Azure.Network.Interfaces.Location String The interface location.
Azure.Network.Interfaces.ID String The interface ID.

Command example

!azure-vm-create-nic nic_location=eastus nic_name=test_nic2 resource_group=Compute-Labs subnet_name=default vnet_name=Compute-Labs-vnet ip_config_name=ipconfigtest

Context Example

{
    "Azure": {
        "Network":{
          "Interfaces": {
            "DNSSuffix": "test.bx.internal.cloudapp.net",
            "ID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/test_nic2",
            "IPConfigurations": [
              {
                "ConfigID": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/test_nic2/ipConfigurations/ipconfigtest",
                "ConfigName": "ipconfigtest",
                "PrivateIPAddress": "10.0.0.13",
                "PublicIPAddressID": "NA",
                "SubNet": "/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/virtualNetworks/Compute-Labs-vnet/subnets/default"
              }
            ],
            "Location": "eastus",
            "Name": "test_nic2",
            "NetworkSecurityGroup": "NA",
            "ProvisioningState": "Succeeded",
            "ResourceGroup": "Compute-Labs"
          }
        }
    }
}

Human Readable Output

Created Network Interface “test_nic2”

ID PrivateIPAddresses Location Name NetworkSecurityGroup
/subscriptions/xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxx/resourceGroups/Compute-Labs/providers/Microsoft.Network/networkInterfaces/test_nic2 10.0.0.13 eastus test_nic2 NA

azure-vm-auth-reset


Run this command if for some reason you need to rerun the authentication process.

Base Command

azure-vm-auth-reset

Input

There are no input arguments for this command.

Context Output

There is no context output for this command.

Configuration parameters

  • host — Host URL (e.g. https://management.azure.com) (required)
  • auth_id — ID (received from the admin consent - see Detailed Instructions (?)
  • tenant_id — Token (received from the admin consent - see Detailed Instructions (?) section)
  • enc_key — Key (received from the admin consent - see Detailed Instructions (?)
  • certificate_thumbprint — Certificate Thumbprint
  • cred_auth_id
  • cred_token
  • cred_enc_key
  • cred_certificate_thumbprint
  • private_key — Private Key
  • subscription_id — Default Subscription ID
  • cred_subscription_id
  • resource_group — Default Resource Group Name
  • proxy — Use system proxy settings
  • unsecure — Trust any certificate (not secure)
  • self_deployed — Use a self-deployed Azure Application

Commands (13)

  • azure-list-resource-groups

    Lists all resource groups that belong to your Azure subscription.

  • azure-list-subscriptions

    Lists the subscriptions for this application.

  • azure-vm-auth-reset

    Run this command if for some reason you need to rerun the authentication process.

  • azure-vm-create-instance

    Creates a virtual machine instance with the specified OS image.

  • azure-vm-create-nic

    Creates a virtual machine network interface.

  • azure-vm-delete-instance

    Deletes a specified virtual machine.

  • azure-vm-get-all-public-ip-details

    Gets the properties of all public ip address in a subscription.

  • azure-vm-get-instance-details

    Gets the properties of a given virtual machine.

  • azure-vm-get-nic-details

    Gets the properties of a given network interface.

  • azure-vm-get-public-ip-details

    Gets the properties of a given public IP address.

  • azure-vm-list-instances

    Lists the virtual machine instances in the given resource group.

  • azure-vm-poweroff-instance

    Powers off a given virtual machine.

  • azure-vm-start-instance

    Powers on a given virtual machine.

category: IT Services
provider: Microsoft
commonfields:
  id: Azure Compute v2
  version: -1
configuration:
- defaultvalue: https://management.azure.com
  display: Host URL (e.g. https://management.azure.com)
  name: host
  required: true
  type: 0
  section: Connect
- display: ID (received from the admin consent - see Detailed Instructions (?)
  name: auth_id
  type: 4
  hidden: true
  required: false
  section: Connect
- display: Token (received from the admin consent - see Detailed Instructions (?) section)
  name: tenant_id
  type: 4
  hidden: true
  required: false
  section: Connect
- display: Key (received from the admin consent - see Detailed Instructions (?)
  name: enc_key
  type: 4
  hidden: true
  required: false
  section: Connect
- additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
  display: Certificate Thumbprint
  name: certificate_thumbprint
  type: 4
  hidden: true
  required: false
  section: Connect
- name: cred_auth_id
  type: 9
  displaypassword: ID (received from the admin consent - see Detailed Instructions (?)
  hiddenusername: true
  required: false
  section: Connect
- name: cred_token
  type: 9
  displaypassword: Token (received from the admin consent - see Detailed Instructions (?) section)
  hiddenusername: true
  required: false
  section: Connect
- name: cred_enc_key
  type: 9
  displaypassword: Key (received from the admin consent - see Detailed Instructions (?)
  hiddenusername: true
  required: false
  section: Connect
- name: cred_certificate_thumbprint
  type: 9
  displaypassword: Certificate Thumbprint
  additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
  hiddenusername: true
  required: false
  section: Connect
- display: Private Key
  name: private_key
  type: 14
  additionalinfo: Used for certificate authentication. The private key of the registered certificate.
  required: false
  section: Connect
- display: Default Subscription ID
  name: subscription_id
  type: 4
  hidden: true
  required: false
  section: Connect
- displaypassword: Default Subscription ID
  name: cred_subscription_id
  hiddenusername: true
  type: 9
  required: false
  section: Connect
- display: Default Resource Group Name
  name: resource_group
  type: 0
  required: false
  additionalinfo: This parameter can be overridden by the resource_group argument in any command.
  section: Connect
- display: Use system proxy settings
  name: proxy
  type: 8
  required: false
  section: Connect
  advanced: true
- display: Trust any certificate (not secure)
  name: unsecure
  type: 8
  required: false
  section: Connect
  advanced: true
- additionalinfo: Select this checkbox if you are using a self-deployed Azure application.
  display: Use a self-deployed Azure Application
  name: self_deployed
  type: 8
  required: false
  section: Connect
  advanced: true
description: Create and Manage Azure Virtual Machines.
display: Azure Compute v2
name: Azure Compute v2
script:
  commands:
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: The maximum number of instances to return.
      name: limit
      defaultValue: '50'
    - description: |
        The resource group of the virtual machines.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    description: Lists the virtual machine instances in the given resource group.
    name: azure-vm-list-instances
    outputs:
    - contextPath: Azure.Compute.Name
      description: The name of the virtual machine.
      type: string
    - contextPath: Azure.Compute.Location
      description: The location of the virtual machine.
      type: string
    - contextPath: Azure.Compute.ProvisioningState
      description: The provisioning state of the virtual machine.
      type: string
    - contextPath: Azure.Compute.ResourceGroup
      description: The resource group in which the virtual machine resides.
      type: string
    - contextPath: Azure.Compute.ID
      description: The ID of the virtual machine.
      type: string
    - contextPath: Azure.Compute.Size
      description: The size of the deployed virtual machine (in gigabytes).
      type: number
    - contextPath: Azure.Compute.OS
      description: The OS running on the virtual machine.
      type: string
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        Resource Group to which the virtual machine belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: Name of the virtual machine to power on. To see all virtual machines and their associated names for a specific resource group, run the `azure-vm-list-instances` command.
      name: virtual_machine_name
      required: true
    description: Powers on a given virtual machine.
    execution: true
    name: azure-vm-start-instance
    outputs:
    - contextPath: Azure.Compute.Name
      description: Name of the VM that was started.
      type: string
    - contextPath: Azure.Compute.ResourceGroup
      description: Resource group the VM resides in.
      type: string
    - contextPath: Azure.Compute.PowerState
      description: Whether the VM instance is powered on or off.
      type: string
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the virtual machine belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The name of the virtual machine to power off. To see all virtual machines with their associated names for a specific resource group, run the `azure-vm-list-instances` command.
      name: virtual_machine_name
      required: true
    - auto: PREDEFINED
      defaultValue: 'false'
      description: Set to True to request non-graceful VM shutdown. Default value is False.
      name: skip_shutdown
      predefined:
      - 'true'
      - 'false'
    description: Powers off a given virtual machine.
    execution: true
    name: azure-vm-poweroff-instance
    outputs:
    - contextPath: Azure.Compute.Name
      description: The name of the virtual machine that was powered off.
      type: string
    - contextPath: Azure.Compute.ResourceGroup
      description: The resource group in which the virtual machine resides.
      type: string
    - contextPath: Azure.Compute.PowerState
      description: Whether the virtual machine instance is powered on or off.
      type: string
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the virtual machine belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The name of the virtual machine you want to view the details of. To see all the virtual machines with their associated names for a specific resource group, run the `azure-vm-list-instances` command.
      name: virtual_machine_name
      required: true
    - auto: PREDEFINED
      defaultValue: instanceView
      description: The expand expression to apply on the operation. 'instanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'userData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. Default value is False.
      name: expand
      predefined:
      - instanceView
      - 'userData'
    description: Gets the properties of a given virtual machine.
    name: azure-vm-get-instance-details
    outputs:
    - contextPath: Azure.Compute.Name
      description: The name of the virtual machine you want to get details of.
      type: string
    - contextPath: Azure.Compute.ID
      description: The ID of the virtual machine.
      type: string
    - contextPath: Azure.Compute.Size
      description: The size of the deployed virtual machine (in gigabytes).
      type: number
    - contextPath: Azure.Compute.OS
      description: The OS running on the given virtual machine.
      type: string
    - contextPath: Azure.Compute.ProvisioningState
      description: The provisioning state of the deployed virtual machine.
      type: string
    - contextPath: Azure.Compute.Location
      description: The region in which the virtual machine is hosted.
      type: string
    - contextPath: Azure.Compute.PowerState
      description: Whether the virtual machine instance is powered on or off.
      type: string
    - contextPath: Azure.Compute.ResourceGroup
      description: The resource group to which the virtual machine belongs.
      type: string
    - contextPath: Azure.Compute.NetworkInterfaces
      description: The list of network interfaces attached to this machine.
      type: string
    - contextPath: Azure.Compute.UserData
      description: UserData for the VM.
      type: string
    - contextPath: Azure.Compute.Tags
      description: Tags associated with the VM.
      type: string
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the new virtual machine will belong.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The name of the virtual machine to create.
      name: virtual_machine_name
      required: true
    - description: The location in which to create the virtual machine.
      name: virtual_machine_location
      required: true
      auto: PREDEFINED
      predefined:
      - westus2
      - westus
      - westindia
      - westeurope
      - westcentralus
      - uksouth
      - ukwest
      - southeastasia
      - northcentralus
      - northeurope
      - southcentralus
      - southindia
      - francesouth
      - francecentral
      - japaneast
      - japanwest
      - koreacentral
      - koreasouth
      - brazilsouth
      - canadacentral
      - canadaeast
      - centralindia
      - eastus2
      - eastasia
      - westus
      - centralus
      - eastus
      - australiacentral
      - australiacentral2
      - australiaeast
      - australiasoutheast
    - description: The name of the Network Interface to link the virtual machine with. Note that the virtual machine's location property must match that of the Network Interface you choose to link it to. To see a list of available Network Interfaces visit the Azure Web Portal, navigate to the search bar at the top of the page, type "network interfaces", and in the dynamic drop-down menu that appears, click the 'Network interfaces' option that appears under the 'Services' category. If none are present, you will need to create a new Network Interface.
      name: nic_name
      required: true
    - auto: PREDEFINED
      description: The name of a VirtualMachineSize, which determines the size of the deployed virtual machine. For more information, see the Azure documentation at https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/listavailablesizes#virtualmachinesize.
      name: vm_size
      predefined:
      - Standard_D1_v2
      - Standard_D2_v2
      - Standard_D2s_v3
      - Standard_B1ms
      - Standard_B1s
      - Standard_B2s
      - Standard_B4ms
      - Standard_D4s_v3
      - Standard_DS1_v2
      - Standard_DS2_v2
      - Standard_DS3_v2
      - Promo_DS2_v2
      - Promo_DS3_v2
      required: true
    - description: The base operating system image of the virtual machine.
      name: os_image
      auto: PREDEFINED
      predefined:
      - Ubuntu Server 14.04 LTS
      - Ubuntu Server 16.04 LTS
      - Ubuntu Server 18.04 LTS
      - Red Hat Enterprise Linux 7.6
      - CentOS-based 7.5
      - Windows Server 2012 R2 Datacenter
      - Windows Server 2016 Datacenter
      - Windows 10 Pro Version 1803
      - Windows 10 Pro Version 1809
    - defaultValue: 2016-Datacenter
      description: SKU of the OS image to be used. To see a list of available SKUs, visit your Azure Web Portal, click the symbol that looks similar to a '>' on the top bar of the page. This should open a cloud shell, make sure it is a bash shell. At the command prompt enter `az vm image list-skus` along with the appropriate arguments that it will prompt you with to display the list of VM image SKUs available in the Azure Marketplace.
      name: sku
    - defaultValue: MicrosoftWindowsServer
      description: Name of the publisher of the OS image. To see a list of available publishers, visit your Azure Web Portal, click the symbol that looks similar to a '>' on the top bar of the page which should open a cloud shell, make sure it is a bash shell. At the command prompt enter `az vm image list-publishers` along with the appropriate arguments that it will prompt you with to display the list of VM image publishers available in the Azure Marketplace.
      name: publisher
    - defaultValue: latest
      description: Version of the image to use. The supported formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time.
      name: version
    - defaultValue: WindowsServer
      description: Specifies the offer of the platform image or marketplace image used to create the virtual machine. To see a list of available offers, visit your Azure Web Portal, click the symbol that looks similar to a '>' on the top bar of the page which should open a cloud shell, make sure it is a bash shell. At the command prompt enter `az vm image list-offers` along with the appropriate arguments that it will prompt you with to display the list of VM image offers available in the Azure Marketplace.
      name: offer
    - defaultValue: DemistoUser
      description: The admin username to use when creating the virtual machine.
      name: admin_username
    - defaultValue: Passw0rd@123
      description: The admin password to use when creating the virtual machine.
      name: admin_password
    description: Creates a virtual machine instance with the specified OS image.
    execution: true
    name: azure-vm-create-instance
    outputs:
    - contextPath: Azure.Compute.Name
      description: The name of the created virtual machine instance.
      type: string
    - contextPath: Azure.Compute.ResourceGroup
      description: The resource group in which the virtual machine resides.
      type: string
    - contextPath: Azure.Compute.ID
      description: The ID of the virtual machine.
      type: string
    - contextPath: Azure.Compute.Size
      description: The size of the deployed virtual machine (in gigabytes).
      type: number
    - contextPath: Azure.Compute.OS
      description: The OS running on the specified virtual machine.
      type: string
    - contextPath: Azure.Compute.ProvisioningState
      description: The provisioning state of the deployed virtual machine.
      type: string
    - contextPath: Azure.Compute.Location
      description: The region in which the virtual machine is hosted.
      type: string
  - arguments:
    - description: "Subscription ID to use. Can be retrieved from the azure-sc-list-subscriptions command. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: A single tag in the form of '{"Tag Name":"Tag Value"}' to filter the list by.
      name: tag
    - defaultValue: '50'
      description: Limit on the number of resource-groups to return. Default value is 50.
      name: limit
    description: Lists all resource groups that belong to your Azure subscription.
    name: azure-list-resource-groups
    outputs:
    - contextPath: Azure.ResourceGroup.Name
      description: The name of the resource group.
      type: string
    - contextPath: Azure.ResourceGroup.ID
      description: The ID of the resource group.
      type: string
    - contextPath: Azure.ResourceGroup.Location
      description: The location of the resource group.
      type: string
    - contextPath: Azure.ResourceGroup.ProvisioningState
      description: The provisioning state of the resource group.
      type: string
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the virtual machine belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The name of the virtual machine to delete. To see all the virtual machines with their associated names for a specific resource group, run the `azure-vm-list-instances` command.
      name: virtual_machine_name
    description: Deletes a specified virtual machine.
    name: azure-vm-delete-instance
  - description: Lists the subscriptions for this application.
    name: azure-list-subscriptions
    outputs:
    - contextPath: Azure.Subscription.ID
      description: The ID of the subscription.
      type: String
    - contextPath: Azure.Subscription.Name
      description: The name of the subscription.
      type: String
    - contextPath: Azure.Subscription.State
      description: The state of the subscription.
      type: String
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the network interface belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The name of the network interface you want to view the details of.
      name: nic_name
      required: true
    description: Gets the properties of a given network interface.
    name: azure-vm-get-nic-details
    outputs:
    - contextPath: Azure.Network.Interfaces.AttachedVirtualMachine
      description: The attached virtual machine to this interface.
      type: String
    - contextPath: Azure.Network.Interfaces.IsPrimaryInterface
      description: True if this interface is a primary interface of the attached virtual machine.
      type: String
    - contextPath: Azure.Network.Interfaces.NICType
      description: The interface type.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.ConfigID
      description: The interface IP configuration ID.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.ConfigName
      description: The interface IP configuration name.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.PrivateIPAddress
      description: The interface private IP address.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.PublicIPAddressID
      description: The interface public IP address ID.
      type: Unknown
    - contextPath: Azure.Network.Interfaces.MACAddress
      description: The interface MAC address.
      type: String
    - contextPath: Azure.Network.Interfaces.Name
      description: The interface name.
      type: String
    - contextPath: Azure.Network.Interfaces.ResourceGroup
      description: The interface resource group.
      type: String
    - contextPath: Azure.Network.Interfaces.NetworkSecurityGroup.id
      description: The interface network security group ID.
      type: String
    - contextPath: Azure.Network.Interfaces.Location
      description: The interface location.
      type: String
    - contextPath: Azure.Network.Interfaces.ID
      description: The interface ID.
      type: String
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the IP address belongs.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The IP address name.
      name: address_name
      required: true
    description: Gets the properties of a given public IP address.
    name: azure-vm-get-public-ip-details
    outputs:
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddress
      description: The public IP address.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressFQDN
      description: The address fully-qualified domain name (FQDN).
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressAllocationMethod
      description: The address allocation method.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicConfigID
      description: The address configuration ID.
      type: String
    - contextPath: Azure.Network.IPConfigurations.ResourceGroup
      description: The address resource group.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressDomainName
      description: The address domain name.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressVersion
      description: The address version.
      type: String
    - contextPath: Azure.Network.IPConfigurations.Location
      description: The address location.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicConfigName
      description: The address configuration name.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressID
      description: The address ID.
      type: String
  - arguments:
    - description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
      name: subscription_id
    - description: |
        The resource group to which the new network interface will belong.
        To see all the resource groups associated with your subscription, run the `azure-list-resource-groups` command. If none are present, navigate to the Azure Web Portal to create resource groups.
        Note: This argument will override the instance parameter ‘Default Resource Group Name'.
      name: resource_group
    - description: The network interface name.
      name: nic_name
      required: true
    - description: The location in which to create the network interface.
      name: nic_location
      required: true
      auto: PREDEFINED
      predefined:
      - westus2
      - westus
      - westindia
      - westeurope
      - westcentralus
      - uksouth
      - ukwest
      - southeastasia
      - northcentralus
      - northeurope
      - southcentralus
      - southindia
      - francesouth
      - francecentral
      - japaneast
      - japanwest
      - koreacentral
      - koreasouth
      - brazilsouth
      - canadacentral
      - canadaeast
      - centralindia
      - eastus2
      - eastasia
      - westus
      - centralus
      - eastus
      - australiacentral
      - australiacentral2
      - australiaeast
      - australiasoutheast
    - description: The virtual network name of the interface.
      name: vnet_name
      required: true
    - description: The subnet name of the interface.
      name: subnet_name
      required: true
    - description: The address assignment method.
      name: address_assignment_method
      auto: PREDEFINED
      defaultValue: Dynamic
      predefined:
      - Static
      - Dynamic
    - description: The private IP address of the interface if you chose the static assignment method.
      name: private_ip_address
    - description: The IP address configuration name.
      name: ip_config_name
      required: true
    - description: The network security group of the interface.
      name: network_security_group
    description: Creates a virtual machine network interface.
    name: azure-vm-create-nic
    outputs:
    - contextPath: Azure.Network.Interfaces.IPConfigurations.ConfigID
      description: The interface IP configuration ID.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.ConfigName
      description: The interface IP configuration name.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.PrivateIPAddress
      description: The interface private IP address.
      type: String
    - contextPath: Azure.Network.Interfaces.IPConfigurations.PublicIPAddressID
      description: The interface public IP address ID.
      type: Unknown
    - contextPath: Azure.Network.Interfaces.Name
      description: The interface name.
      type: String
    - contextPath: Azure.Network.Interfaces.ResourceGroup
      description: The interface resource group.
      type: String
    - contextPath: Azure.Network.Interfaces.NetworkSecurityGroup.id
      description: The interface network security group ID.
      type: String
    - contextPath: Azure.Network.Interfaces.Location
      description: The interface location.
      type: String
    - contextPath: Azure.Network.Interfaces.ID
      description: The interface ID.
      type: String
  - arguments:
    - name: subscription_id
      description: "The subscription ID. Note: This argument will override the instance parameter ‘Default Subscription ID'."
    description: Gets the properties of all public ip address in a subscription.
    name: azure-vm-get-all-public-ip-details
    outputs:
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddress
      description: The public IP address.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressFQDN
      description: The address fully-qualified domain name (FQDN).
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressAllocationMethod
      description: The address allocation method.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicConfigID
      description: The address configuration ID.
      type: String
    - contextPath: Azure.Network.IPConfigurations.ResourceGroup
      description: The address resource group.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressDomainName
      description: The address domain name.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressVersion
      description: The address version.
      type: String
    - contextPath: Azure.Network.IPConfigurations.Location
      description: The address location.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicConfigName
      description: The address configuration name.
      type: String
    - contextPath: Azure.Network.IPConfigurations.PublicIPAddressID
      description: The address ID.
      type: String
  - deprecated: false
    description: Run this command if for some reason you need to rerun the authentication process.
    execution: false
    name: azure-vm-auth-reset
  dockerimage: demisto/crypto:1.0.0.5490413
  runonce: false
  script: '-'
  subtype: python3
  type: python
tests:
- Azure Compute - Test
fromversion: 5.0.0
sectionorder:
- Connect
- Collect