Integrations/AzureCompute_v2/AzureCompute_v2.py
def start_vm_command():
    """
    Power-on a specified Virtual Machine

    demisto parameter: (string) resource_group
        Resource Group to which the virtual machine belongs

    demisto parameter: (string) virtual_machine_name
        Name of the virtual machine to power-on

    returns:
        Virtual Machine Object
    """
    args = demisto.args()
    vm_name = args.get('virtual_machine_name').lower()

    # Raise an exception if the VM isn't in the proper provisioning state
    validate_provisioning_state(args)

    start_vm(args)

    vm = {
        'Name': vm_name,
        'ResourceGroup': args.get('resource_group'),
        'PowerState': 'VM starting'
    }

    title = 'Power-on of Virtual Machine "{}" Successfully Initiated'.format(vm_name)
    human_readable = tableToMarkdown(title, vm, removeNull=True)
    entry_context = {'Azure.Compute(val.Name && val.Name === obj.Name)': vm}
    demisto.results({
        'Type': entryTypes['note'],
        'Contents': vm,
        'ContentsFormat': formats['json'],
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })

    Power-on a specified Virtual Machine

    demisto parameter: (string) resource_group
        Resource Group to which the virtual machine belongs

    demisto parameter: (string) virtual_machine_name
        Name of the virtual machine to power-on

    returns:
        Virtual Machine Object
    
Power-on a specified Virtual Machine
demisto parameter: (string) resource_group
Resource Group to which the virtual machine belongs

demisto parameter: (string) virtual_machine_name
Name of the virtual machine to power-on

Virtual Machine Object
Power - on a specified Virtual Machine demisto parameter : ( string ) resource_group Resource Group to which the virtual machine belongs demisto parameter : ( string ) virtual_machine_name Name of the virtual machine to power - on Virtual Machine Object
def start_vm_command():
    args = demisto.args()
    vm_name = args.get('virtual_machine_name').lower()
    validate_provisioning_state(args)
    start_vm(args)
    vm = {
        'Name': vm_name,
        'ResourceGroup': args.get('resource_group'),
        'PowerState': 'VM starting'
    }
    title = 'Power-on of Virtual Machine "{}" Successfully Initiated'.format(vm_name)
    human_readable = tableToMarkdown(title, vm, removeNull=True)
    entry_context = {'Azure.Compute(val.Name && val.Name === obj.Name)': vm}
    demisto.results({
        'Type': entryTypes['note'],
        'Contents': vm,
        'ContentsFormat': formats['json'],
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })
def start_vm_command ( ) : args = demisto . args ( ) vm_name = args . get ( 'virtual_machine_name' ) . lower ( ) validate_provisioning_state ( args ) start_vm ( args ) vm = { 'Name' : vm_name , 'ResourceGroup' : args . get ( 'resource_group' ) , 'PowerState' : 'VM starting' } title = 'Power-on of Virtual Machine "{}" Successfully Initiated' . format ( vm_name ) human_readable = tableToMarkdown ( title , vm , removeNull = True ) entry_context = { 'Azure.Compute(val.Name && val.Name === obj.Name)' : vm } demisto . results ( { 'Type' : entryTypes [ 'note' ] , 'Contents' : vm , 'ContentsFormat' : formats [ 'json' ] , 'ReadableContentsFormat' : formats [ 'markdown' ] , 'HumanReadable' : human_readable , 'EntryContext' : entry_context } )
Power-on a specified Virtual Machine
demisto parameter: (string) resource_group
Resource Group to which the virtual machine belongs
Power - on a specified Virtual Machine demisto parameter : ( string ) resource_group Resource Group to which the virtual machine belongs
"""
    Power-on a specified Virtual Machine

    demisto parameter: (string) resource_group
        Resource Group to which the virtual machine belongs

    demisto parameter: (string) virtual_machine_name
        Name of the virtual machine to power-on

    returns:
        Virtual Machine Object
    """ # Raise an exception if the VM isn't in the proper provisioning state