docs: def create_nsg_rule(access_token, subscription_id, resource_group, nsg_name, nsg_rule_name,
                      description, protocol='Tcp', source_range='*', destination_range='*',
                      source_prefix='*', destination_prefix='*', access='Allow', priority=100,
                      direction='Inbound'):
      '''Create network security group rule.
  
      Args:
          access_token (str): A valid Azure authentication token.
          subscription_id (str): Azure subscription id.
          resource_group (str): Azure resource group name.
          nsg_name (str): Name of the Network Security Group.
          nsg_rule_name (str): Name of the new rule.
          description (str): Description.
          protocol (str): Optional protocol. Default Tcp.
          source_range (str): Optional source IP range. Default '*'.
          destination_range (str): Destination IP range. Default *'.
          source_prefix (str): Source DNS prefix. Default '*'.
          destination_prefix (str): Destination prefix. Default '*'.
          access (str): Allow or deny rule. Default Allow.
          priority: Relative priority. Default 100.
          direction: Inbound or Outbound. Default Inbound.
  
      Returns:
          HTTP response. NSG JSON rule body.
      '''
      endpoint = ''.join([get_rm_endpoint(),
                          '/subscriptions/', subscription_id,
                          '/resourceGroups/', resource_group,
                          '/providers/Microsoft.Network/networkSecurityGroups/', nsg_name,
                          '/securityRules/', nsg_rule_name,
                          '?api-version=', NETWORK_API])
      properties = {'description': description}
      properties['protocol'] = protocol
      properties['sourcePortRange'] = source_range
      properties['destinationPortRange'] = destination_range
      properties['sourceAddressPrefix'] = source_prefix
      properties['destinationAddressPrefix'] = destination_prefix
      properties['access'] = access
      properties['priority'] = priority
      properties['direction'] = direction
      ip_body = {'properties': properties}
      body = json.dumps(ip_body)
      return do_put(endpoint, body, access_token)