.. versionadded:: 2019.2.0

    Get details about a default security rule within a security group.

    :param name: The name of the security rule to query.

    :param security_group: The network security group containing the
        security rule.

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

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.default_security_rule_get DenyAllOutBound testnsg testgroup

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

    Get details about a default security rule within a security group.

    :param name: The name of the security rule to query.

    :param security_group: The network security group containing the
        security rule.

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

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.default_security_rule_get DenyAllOutBound testnsg testgroup

    '''
    result = {}

    default_rules = default_security_rules_list(
        security_group=security_group,
        resource_group=resource_group,
        **kwargs
    )

    if isinstance(default_rules, dict) and 'error' in default_rules:
        return default_rules

    try:
        for default_rule in default_rules:
            if default_rule['name'] == name:
                result = default_rule
        if not result:
            result = {
                'error': 'Unable to find {0} in {1}!'.format(name, security_group)
            }
    except KeyError as exc:
        log.error('Unable to find %s in %s!', name, security_group)
        result = {'error': str(exc)}

    return result