.. versionadded:: 2019.2.0

    List default security rules within a security group.

    :param security_group: The network security group to query.

    :param resource_group: The resource group name assigned to the
        network security group.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.default_security_rules_list testnsg testgroup

def default_security_rules_list(security_group, resource_group, **kwargs):
    '''
    .. versionadded:: 2019.2.0

    List default security rules within a security group.

    :param security_group: The network security group to query.

    :param resource_group: The resource group name assigned to the
        network security group.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.default_security_rules_list testnsg testgroup

    '''
    result = {}

    secgroup = network_security_group_get(
        security_group=security_group,
        resource_group=resource_group,
        **kwargs
    )

    if 'error' in secgroup:
        return secgroup

    try:
        result = secgroup['default_security_rules']
    except KeyError as exc:
        log.error('No default security rules found for %s!', security_group)
        result = {'error': str(exc)}

    return result