.. _template_limit_policy:

template limit-policy
=====================

Create a Limit Policy


limit-policy Specification
--------------------------

	===================================== ==============================================================================
	 **Parameter**                         **Value** 

	===================================== ==============================================================================
	 **Type**                              *Collection*

	 **Object Key(s)**                     *policy-number*

	 **Collection Name**                   :ref:`3491_limit-policy_list`

	 **Collection URI**                    /axapi/v3/template/limit-policy

	                                       

	 **Element Name**                      limit-policy

	 **Element URI**                       /axapi/v3/template/limit-policy/{policy-number}

	 **Element Attributes**                limit-policy_attributes

	 **Partition Visibility**              shared

	 **Schema**                             :download:`limit-policy schema <template-limit-policy/template-limit-policy.txt>`
	===================================== ==============================================================================





	**Operations Allowed:**




.. raw:: html

   <script type="text/javascript">
 function showExample(a,b) { document.getElementById(a+'_div').style.display = 'block'; document.getElementById(a+'_cl').style.display = 'block'; document.getElementById(a+'_eg').style.display = 'none';}
   function closeExample(a,b) { document.getElementById(a+'_div').style.display = 'none'; document.getElementById(a+'_cl').style.display = 'none'; document.getElementById(a+'_eg').style.display = 'block';}
 </script>
   <table width='90%' style='margin-left:5%'>



.. raw:: html

   <tr style='border-bottom: thin solid; border-top: thin solid'><th width=15%>Operation</th><th width=10%>Method</th><th>URI</th><th width=15%>Payload</th><th width=10%></th></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Create Object



.. raw:: html

   </td><td valign = 'top'>


POST



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td><button id='post_eg' onClick="showExample('post')">example</button> <button id='post_cl' onClick="closeExample('post')" style='display:none'>close</button></td></tr>




.. raw:: html

   <tr><td colspan=5 style='padding: 0         % 0    %;' valign = 'top'><div id='post_div' style='display:none'>


.. include:: ../artifacts/template_limit_policy_POST.txt
   :literal:




.. raw:: html

   </div></td></tr>


.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Create List



.. raw:: html

   </td><td valign = 'top'>


POST



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Get Object



.. raw:: html

   </td><td valign = 'top'>


GET



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy/{policy-number}



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td><button id='get_eg' onClick="showExample('get')">example</button> <button id='get_cl' onClick="closeExample('get')" style='display:none'>close</button></td></tr>




.. raw:: html

   <tr><td colspan=5 style='padding: 0         % 0    %;' valign = 'top'><div id='get_div' style='display:none'>


.. include:: ../artifacts/template_limit_policy_GET.txt
   :literal:




.. raw:: html

   </div></td></tr>


.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Get List



.. raw:: html

   </td><td valign = 'top'>


GET



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_list`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Modify Object



.. raw:: html

   </td><td valign = 'top'>


POST



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy/{policy-number}



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Replace Object



.. raw:: html

   </td><td valign = 'top'>


PUT



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy/{policy-number}



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Replace List



.. raw:: html

   </td><td valign = 'top'>


PUT



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_list`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   <tr  style='border-bottom: thin solid;'><td valign = 'top'>


Delete Object



.. raw:: html

   </td><td valign = 'top'>


DELETE



.. raw:: html

   </td><td valign = 'top'>


/axapi/v3/template/limit-policy/{policy-number}



.. raw:: html

   </td><td valign = 'top'>


:ref:`3491_limit-policy_attributes`



.. raw:: html

   </td><td></td></tr>




.. raw:: html

   </table>

.. _3491_limit-policy_list:

limit-policy-list
-----------------


    limit-policy-list is **JSON List** of :ref:`3491_limit-policy_attributes` 

        limit-policy-list : [

             { :ref:`3491_limit-policy_attributes` },

             { :ref:`3491_limit-policy_attributes` },

             ...

         ]

.. _3491_limit-policy_attributes:

limit-policy attributes
-----------------------

    **limit-concurrent-sessions**

        **Description** Enable Concurrent Session Limit (Number of Concurrent Sessions)

        **Type:** number

        **Range:** 1-2147483647

    **limit-cps**

        **Description:** limit-cps is a **JSON Block**.  Please see below for :ref:`3491_limit-cps` 

        **Type:** Object

        **Reference Object:** :doc:`/axapi/v3/template/limit-policy/{policy-number}/limit-cps <template_limit_policy>`

    **limit-pps**

        **Description:** limit-pps is a **JSON Block**.  Please see below for :ref:`3491_limit-pps` 

        **Type:** Object

        **Reference Object:** :doc:`/axapi/v3/template/limit-policy/{policy-number}/limit-pps <template_limit_policy>`

    **limit-scope**

        **Description** 'aggregate': Rule Level; 'subscriber-ip': Subscriber IP Level; 'subscriber-prefix': Subscriber Prefix Level; 

        **Type:** string

        **Supported Values:** aggregate, subscriber-ip, subscriber-prefix

        **Default:** subscriber-ip

    **limit-throughput**

        **Description:** limit-throughput is a **JSON Block**.  Please see below for :ref:`3491_limit-throughput` 

        **Type:** Object

        **Reference Object:** :doc:`/axapi/v3/template/limit-policy/{policy-number}/limit-throughput <template_limit_policy>`

    **log**

        **Description** Log when Session Limit is exceeded

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **max-min-fair**

        **Description** Enable max-min-fairness

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **parent**

        **Description** Specify the parent of limit-policy

        **Type:** number

        **Range:** 1-1023

    **policy-number**

        **Description** Limit Policy Number

        **Type:** number

        **Range:** 1-1023

    **prefix-length**

        **Description** Prefix length

        **Type:** number

        **Range:** 1-128

    **user-tag**

        **Description** Customized tag

        **Type:** string

        **Format:** string-rlx

        **Maximum Length:** 127 characters

        **Maximum Length:** 1 characters

    **uuid**

        **Description** uuid of the object

        **Type:** string

        **Maximum Length:** 64 characters

        **Maximum Length:** 1 characters

.. _3491_limit-throughput:

limit-throughput
^^^^^^^^^^^^^^^^
	=============================== ===================================================
	**Specification**                 **Value**
	=============================== ===================================================
	 **Type**                        *object*

	=============================== ===================================================

    **downlink**

        **Description** Downlink Throughput limit (Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **downlink-burstsize**

        **Description** Token Bucket Size (Must Exceed Configured Rate) (In Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **downlink-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **total**

        **Description** Total Throughput limit (Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **total-burstsize**

        **Description** Token Bucket Size (Must Exceed Configured Rate) (In Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **total-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **uplink**

        **Description** Uplink Throughput limit (Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **uplink-burstsize**

        **Description** Token Bucket Size (Must Exceed Configured Rate) (In Mega Bits per second)

        **Type:** number

        **Range:** 1-100000

    **uplink-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **uuid**

        **Description** uuid of the object

        **Type:** string

        **Maximum Length:** 64 characters

        **Maximum Length:** 1 characters

.. _3491_limit-cps:

limit-cps
^^^^^^^^^
	=============================== ===================================================
	**Specification**                 **Value**
	=============================== ===================================================
	 **Type**                        *object*

	=============================== ===================================================

    **burstsize**

        **Description** CPS Token Bucket Size (Must Exceed Configured Rate) (In Connections per second)

        **Type:** number

        **Range:** 1-2147483647

    **relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **uuid**

        **Description** uuid of the object

        **Type:** string

        **Maximum Length:** 64 characters

        **Maximum Length:** 1 characters

    **value**

        **Description** Connections Per Second Rate Limit (Number of Connections per second)

        **Type:** number

        **Range:** 1-2147483647

.. _3491_limit-pps:

limit-pps
^^^^^^^^^
	=============================== ===================================================
	**Specification**                 **Value**
	=============================== ===================================================
	 **Type**                        *object*

	=============================== ===================================================

    **ddos-protection-factor**

        **Description** Enable DDoS Protection (Multiplier of the downlink PPS)

        **Type:** number

        **Range:** 1-50

    **downlink**

        **Description** Downlink PPS limit (Number of Packets per second)

        **Type:** number

        **Range:** 1-2147483647

    **downlink-burstsize**

        **Description** PPS Token Bucket Size (Must Exceed Configured Rate) (In Packets)

        **Type:** number

        **Range:** 1-2147483647

    **downlink-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **total**

        **Description** Total PPS limit (Number of Packets per second)

        **Type:** number

        **Range:** 1-2147483647

    **total-burstsize**

        **Description** PPS Token Bucket Size (Must Exceed Configured Rate) (In Packets)

        **Type:** number

        **Range:** 1-2147483647

    **total-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **uplink**

        **Description** Uplink PPS limit (Number of Packets per second)

        **Type:** number

        **Range:** 1-2147483647

    **uplink-burstsize**

        **Description** PPS Token Bucket Size (Must Exceed Configured Rate) (In Packets)

        **Type:** number

        **Range:** 1-2147483647

    **uplink-relaxed**

        **Description** Relax the limitation when the policy has more tokens from the parent of policy

        **Type:** boolean

        **Supported Values:** true, false, 1, 0

        **Default:** 0

    **uuid**

        **Description** uuid of the object

        **Type:** string

        **Maximum Length:** 64 characters

        **Maximum Length:** 1 characters