Integrations/AzureCompute_v2/AzureCompute_v2.py
def list_subscriptions_command():
    """
    List all subscriptions for this application

    returns:
        Subscription Objects
    """
    response = list_subscriptions()
    # Retrieve relevant properties to return to context
    value = response.get('value')
    subscriptions = []
    for subscription in value:
        subscription_context = {
            'Name': subscription.get('displayName'),
            'ID': subscription.get('id'),
            'State': subscription.get('state')
        }
        subscriptions.append(subscription_context)

    title = 'List of Subscriptions'
    human_readable = tableToMarkdown(title, subscriptions, removeNull=True)
    entry_context = {'Azure.Subscription(val.ID && val.ID === obj.ID)': subscriptions}
    demisto.results({
        'Type': entryTypes['note'],
        'Contents': response,
        'ContentsFormat': formats['text'],
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })

    List all subscriptions for this application

    returns:
        Subscription Objects
    
List all subscriptions for this application
returns:
Subscription Objects
List all subscriptions for this application returns : Subscription Objects
def list_subscriptions_command():
    response = list_subscriptions()
    value = response.get('value')
    subscriptions = []
    for subscription in value:
        subscription_context = {
            'Name': subscription.get('displayName'),
            'ID': subscription.get('id'),
            'State': subscription.get('state')
        }
        subscriptions.append(subscription_context)
    title = 'List of Subscriptions'
    human_readable = tableToMarkdown(title, subscriptions, removeNull=True)
    entry_context = {'Azure.Subscription(val.ID && val.ID === obj.ID)': subscriptions}
    demisto.results({
        'Type': entryTypes['note'],
        'Contents': response,
        'ContentsFormat': formats['text'],
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })
def list_subscriptions_command ( ) : response = list_subscriptions ( ) value = response . get ( 'value' ) subscriptions = [ ] for subscription in value : subscription_context = { 'Name' : subscription . get ( 'displayName' ) , 'ID' : subscription . get ( 'id' ) , 'State' : subscription . get ( 'state' ) } subscriptions . append ( subscription_context ) title = 'List of Subscriptions' human_readable = tableToMarkdown ( title , subscriptions , removeNull = True ) entry_context = { 'Azure.Subscription(val.ID && val.ID === obj.ID)' : subscriptions } demisto . results ( { 'Type' : entryTypes [ 'note' ] , 'Contents' : response , 'ContentsFormat' : formats [ 'text' ] , 'ReadableContentsFormat' : formats [ 'markdown' ] , 'HumanReadable' : human_readable , 'EntryContext' : entry_context } )
List all subscriptions for this application
returns:
Subscription Objects
List all subscriptions for this application returns : Subscription Objects
"""
    List all subscriptions for this application

    returns:
        Subscription Objects
    """ # Retrieve relevant properties to return to context