anchor.diff:    <th><strong>Example Value</strong></th>
   </tr>
   <tr>
  -  <td>name</td><td>The name you use to identify the plan</td><td>A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique.</td><td>silver_quota</td>
  -</tr>
  -<tr>
  -  <td>memory_limit</td><td>Maximum memory usage allowed</td><td>An integer and a unit of measurement like M, MB, G, or GB</td><td>2048&nbsp;M</td>
  -</tr>
  -<tr>
  -  <td>app_instance_limit</td><td>Maximum app instances allowed. <br><br>Stopped apps do not count toward this instance limit. Crashed apps count toward the limit because their desired state is <code>starting</code>.</td><td>An integer
  -  </td><td>25</td>
  -</tr>
  -<tr>
  -  <td>non_basic_services_allowed</td><td>Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.</td><td><code>true</code> or <code>false</code></td><td>true</td>
  -</tr>
  -<tr>
  -  <td>total_routes</td><td>Maximum routes allowed</td><td>An integer</td><td>500</td>
  -</tr>
  -<tr>
  -  <td>total_reserved_route_ports</td><td>Maximum routes with reserved ports</td><td>An integer not greater than total_routes</td><td>60</td>
  -</tr>
  -<tr>
  -  <td>total_services</td><td>Maximum services allowed</td><td>An integer</td><td>25</td>
  -</tr>
  -<tr>
  -  <td>trial_db_allowed</td><td>Legacy Field. Value can be ignored.</td><td><code>true</code> or <code>false</code></td><td>true</td>
  -</tr>
  -<tr>
  -  <td>log_rate_limit</td><td>Maximum bytes of logs allowed per second.</td><td>An integer and a unit of measurement like K, KB, M, MB, G, or GB</td><td>2048&nbsp;M</td>
  +  <td><code>name</code></td>
  +  <td>The name used identify the plan</td>
  +  <td>A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique.</td>
  +  <td>silver_quota</td>
  +</tr>
  +<tr>
  +  <td><code>memory_limit</code></td>
  +  <td>Maximum amount of memory usage allowed</td>
  +  <td>An integer and a unit of measurement like M, MB, G, or GB</td>
  +  <td>2048&nbsp;M</td>
  +</tr>
  +<tr>
  +  <td><code>app_instance_limit</code></td>
  +  <td>Maximum number of app instances allowed. Stopped apps do not count toward this instance limit. Crashed apps count toward the limit, because their
  +    desired state is <code>starting</code>.</td>
  +  <td>An integer</td>
  +  <td>25</td>
  +</tr>
  +<tr>
  +  <td><code>non_basic_services_allowed</code></td>
  +  <td>Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When set to <code>false</code>, non-free
  +    service plans may be visible in the marketplace but instances cannot be provisioned.</td>
  +  <td><code>true</code> or <code>false</code></td>
  +  <td>true</td>
  +</tr>
  +<tr>
  +  <td><code>total_routes</code></td>
  +  <td>Maximum routes allowed</td>
  +  <td>An integer</td>
  +  <td>500</td>
  +</tr>
  +<tr>
  +  <td><code>total_reserved_route_ports</code></td>
  +  <td>Maximum number of routes with reserved ports.</td>
  +  <td>An integer not greater than <code>total_routes</code></td>
  +  <td>60</td>
  +</tr>
  +<tr>
  +  <td><code>total_services</code></td>
  +  <td>Maximum number of services allowed.</td>
  +  <td>An integer</td>
  +  <td>25</td>
  +</tr>
  +<tr>
  +  <td><code>trial_db_allowed</code></td>
  +  <td>Legacy field. Value can be ignored.</td>
  +  <td><code>true</code> or <code>false</code></td>
  +  <td>true</td>
  +</tr>
  +<tr>
  +  <td>log_rate_limit</td>
  +  <td>Maximum number in bytes of logs allowed per second.</td><
  +  td>An integer and a unit of measurement like K, KB, M, MB, G, or GB</td>
  +  <td>2048&nbsp;M</td>
   </tr>
   </table>
   
  
positive.code: </div>
  <% end %>
  
  Quota plans are named sets of memory, service, log-rate and instance usage quotas. For example, one quota plan might allow up to 10 services, 10 routes, 2&nbsp;GB of RAM, and generate 2&nbsp;KB of logs, while another might offer 100 services, 100 routes, 10&nbsp;GB of RAM, and generate 16&nbsp;KB of logs. Quota plans have user-friendly names, but are referenced in <%= vars.app_runtime_first %> internal systems by unique GUIDs.
  
  Quota plans are not directly associated with user accounts. Instead, every org has a list of available quota plans, and the account admin assigns a specific quota plan from the list to the org. Everyone in the org shares the quotas described by the plan. There is no limit to the number of defined quota plans an account can have, but only one plan can be assigned at a time.
  
  You must set a quota plan for an org, but you can choose whether to set a space quota. For more information, see the [Orgs](../concepts/roles.html#orgs) and [Spaces](../concepts/roles.html#spaces) sections of the _Orgs, Spaces, Roles, and Permissions_ topic.
  
  For information about managing network policy quotas, see [Manage Network Policy Quotas](../devguide/deploy-apps/cf-networking.html#policy-quotas) in _Configuring Container-to-Container Networking_.
  
  ## <a name='attributes'></a> Org Quota Plan Attributes
  
  
negative.code: <% if vars.platform_code == 'CF' %>
  ## <a name='new'></a> Create a New Quota Plan for an Org
  
  <p class='note'><strong>Note:</strong> The org manager sets and manages quotas. For more information, see <a href="../concepts/roles.html">Orgs, Spaces,
    Roles, and Permissions</a>.</p>
  
  You must set an org quota. You can create a new quota plan for an org in one of two ways:
  
  * Directly modify the <%= vars.app_runtime_abbr %> deployment manifest before deploying. For more information, see [Modify the <%= vars.app_runtime_abbr %>
  Deployment Manifest](#manifest) below.
  
  * Use `cf create-quota` after deploying. For more information, see [Use cf create-quota](#create-quota) below.
  
  ### <a name='manifest'></a> Modify the <%= vars.app_runtime_abbr %> Deployment Manifest
  
  The <%= vars.app_runtime_abbr %> deployment manifest specifies the default quota plans applied to orgs. You can modify the default quota plans by locating and
  editing the manifest.
  
  To modify the <%= vars.app_runtime_abbr %> deployment manifest:
  
  1. In a text editor, open the deployment manifest YAML file.
  
  1. Search for `quota_definitions`.
  
  1. Add a new quota definition with values that you specify. Use the default quota definition as a formatting template. The following example shows the
  `quota_definitions` portion of the `cf.yml` manifest after adding the `silver_quota` plan:
  
      ```
      quota_definitions:
             default:
                memory_limit: 1024M
                log_rate_limit: 8K
                non_basic_services_allowed: true
                total_routes: 1000
                total_services: 100
                trial_db_allowed: true
              silver_quota:
                memory_limit: 2048M
                log_rate_limit: 16K
                non_basic_services_allowed: true
                total_routes: 500
                total_services: 25
                trial_db_allowed: true
      ```
  
  1. Save and close the deployment manifest.
  
  1. Apply the deployment manifest by running:
  
      ```
      bosh -e ENV -d DEPLOYMENT deploy MANIFEST.yml
      ```
      Where:
      * `ENV` is your BOSH Director alias.
      * `DEPLOYMENT` is the name of your deployment.
      * `MANIFEST` is the filename of the deployment manifest.
  
  <p class='note'><strong>Note:</strong> Any subsequent updates to the quota in the manifest are not applied to your environment after the initial deploy, even
    though BOSH updates the controller instance with new settings.</p>
  <% else %>
  
  ## <a name='new'></a> Create a New Quota Plan for an Org
  
  <p class='note'><strong>Note:</strong> The org manager sets and manages quotas. For more information, see <a href="../concepts/roles.html">Orgs, Spaces,
    Roles, and Permissions</a>.</p>
  
  You must set an org quota. You can create a new quota plan for org with [`cf create-quota`](#create-quota).
  <% end %>
  
  ### <a name='create-quota'></a> Use cf create-org-quota
  
  To create a new quota plan for an org through the cf CLI:
  
  1. In a terminal window, run:
  
      ```
      cf create-org-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -l LOG-RATE-LIMIT -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
      ```
      Where:
      * `QUOTA-NAME` is the name you want to give the quota plan.
      * `TOTAL-MEMORY` is the total amount of memory you want to allocate to all app instances in the org.
      * `INSTANCE-MEMORY` is the maximum amount of memory an app instance can use. Specify `-1` to allow app instances to use an unlimited amount of memory.
      * `LOG-RATE-LIMIT` is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.
      * `NUMBER-OF-ROUTES` is the total number of routes you want to allow all app instances in the org.
      * `NUMBER-OF-SERVICE-INSTANCES` is the total number of service instances you want to allow all app instances in the org.
      * (Optional) Include the `--allow-paid-service-plans` flag to allow the quota plan to provision instances of paid service plans.
      <br>
      For example:
  
      ```
      cf create-org-quota small -m 2048M -i 1024M -l 2K -r 10 -s 10 --allow-paid-service-plans
      ```
  
  
  ## <a name='modify'></a> Modify an Existing Quota Plan for an Org
  
  <% if vars.platform_code == 'CF' %>
  
  You can modify an existing quota plan for an org in one of two ways:
  
  * Directly modify the <%= vars.app_runtime_abbr %> deployment manifest before deploying. For more information, see [Modify the
  Manifest](#modify-manifest) below.
  
  * Use `cf update-org-quota` after deploying. For more information, see [Use cf update-org-quota](#update-quota) below.
  
  ### <a name='modify-manifest'></a> Modify the Manifest
  
  To modify the <%= vars.app_runtime_abbr %> deployment manifest:
  
  1. In a text editor, open the deployment manifest YAML file.
  
  1. Search for `quota_definitions`.
  
  1. Modify the value of the attribute.
  
  1. Save and close the deployment manifest.
  
  <% end %>
  
  ### <a name='update-quota'></a> Use cf update-org-quota
  
  To modify an existing quota plan for an org through the cf CLI:
  
  1. In a terminal window, view all existing quota plans for your org by running:
  
      ```
      cf org-quotas
      ```
      The above command returns output similar to the following example:
      <pre class='terminal'>
      Getting org quotas as admin...
  
      name      total memory   instance memory   routes   service instances   paid service plans   app instances   route ports   log volume per second
      default   100G           unlimited         1000     unlimited           allowed              unlimited       100           unlimited
      free      0              unlimited         1000     0                   disallowed           unlimited       0             4K
      paid      10M            unlimited         1000     unlimited           allowed              unlimited       0             unlimited
      small     1G             1G                10       10                  allowed              unlimited       0             2K
      trial     2G             1G                1000     0                   disallowed           unlimited       0             1K
      </pre>
  
  1. Record the name of the quota plan you want to modify.
  
  1. Run:
  
      ```
      cf update-org-quota QUOTA-NAME -n NEW-QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
      ```
      Where:
      * `QUOTA-NAME` is the name of the quota plan you want to modify.
      * (Optional) `NEW-QUOTA-NAME` is the new name you want to give the quota plan.
      * (Optional) `TOTAL-MEMORY` is the total amount of memory you want to allocate to all app instances in the org.
      * (Optional) `INSTANCE-MEMORY` is the maximum amount of memory an app instance can use. Specify `-1` to allow app instances to use an unlimited amount of
      memory.
      * (Optional) `LOG-RATE-LIMIT` is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.
      * (Optional) `NUMBER-OF-ROUTES` is the total number of routes you want to allow all app instances in the org.
      * (Optional) `NUMBER-OF-SERVICE-INSTANCES` is the total number of service instances you want to allow all app instances in the org.
      * (Optional) To allow the quota plan to provision instances of paid service plans, include the `--allow-paid-service-plans` flag. To prevent the quota
      plan from provisioning instances of paid service plans, include the `--disallow-paid-service-plans` flag.
      <br>
      For example:
  
      ```
      cf update-org-quota small -n medium -m 4096M -i 2048M -l 8K -r 20 -s 20 --allow-paid-service-plans
      ```
  
  ### <a name='set-org-quota'></a> Assign a Quota Plan to an Org
  
  To assign a quota plan to an org:
  
  1. In a terminal window, run:
  
      ```
      cf set-org-quota ORG QUOTA-NAME
      ```
      Where:
      * `ORG` is the name of the org to which you want to assign the quota plan.
      * `QUOTA-NAME` is the name of the quota plan you want to assign to the org.
  
  
  ## <a name='space'></a> Create and Modify Quota Plans for a Space
  
  For each org, Org Managers create and modify quota plans for spaces in the org. If an Org Manager allocates a space quota, <%= vars.app_runtime_abbr %>
  verifies that resources do not exceed the allocated space limit. For example, when a Space Developer deploys an app, <%= vars.app_runtime_abbr %> first checks
  the memory allocation at the space level, then at the org level.
  
  To create a quota plan for an individual space within an org, see [Create a Quota Plan for a Space](#new-space) below.
  
  To modify a quota plan for an individual space within an org, see [Modify a Quota Plan for a Space](#modify-space) below.
  
  ### <a name='new-space'></a> Create a Quota Plan for a Space
  
  To create a quota plan for an individual space within an org:
  
  1. In a terminal window, run:
  
      ```
      cf create-space-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -l LOG-RATE-LIMIT -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
      ```
      Where:
      * `TOTAL-MEMORY` is the total amount of memory you want to allocate to all app instances in the space.
      * `INSTANCE-MEMORY` is the maximum amount of memory an app instance can use. Specify `-1` to allow app instances to use an unlimited amount of memory.
      * `LOG-RATE-LIMIT` is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.
      * `NUMBER-OF-ROUTES` is the total number of routes you want to allow all app instances in the space.
      * `NUMBER-OF-SERVICE-INSTANCES` is the total number of service instances you want to allow all app instances in the space.
      * (Optional) Include the `--allow-paid-service-plans` flag to allow the quota plan to provision instances of paid service plans.
      <br>
      For example:
  
      ```
      cf create-space-quota big -m 4096M -i 1024M -l 16K -r 20 -s 20 --allow-paid-service-plans
      ```
  
  ### <a name='modify-space'></a> Modify a Quota Plan for a Space
  
  To modify a quota plan for an individual space within an org:
  
  1. View all existing quota plans for all of the spaces in your org by running:
  
      ```
      cf space-quotas
      ```
      The above command returns output similar to the following example:
      <pre class='terminal'>
      Getting space quotas for org example-org as admin...
  
      name    total memory   instance memory   routes   service instances   paid service plans   app instances   route ports   log volume per second
      big     4G             1G                20       20                  allowed              unlimited       0             16K
      trial   2G             1G                20       20                  allowed              unlimited       0             2K
      </pre>
  
  1. Record the name of the quota plan you want to modify.
  
  1. Run:
  
      ```
      cf update-space-quota QUOTA-NAME -n NEW-QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
      ```
      Where:
      * `QUOTA-NAME` is the name of the quota plan you want to modify.
      * (Optional) `NEW-QUOTA-NAME` is the new name you want to give the quota plan.
      * (Optional) `TOTAL-MEMORY` is the total amount of memory you want to allocate to all app instances in the space.
      * (Optional) `INSTANCE-MEMORY` is the maximum amount of memory an app instance can use. Specify `-1` to allow app instances to use an unlimited amount of
      memory.
      * (Optional) `LOG-RATE-LIMIT` is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.
      * (Optional) `NUMBER-OF-ROUTES` is the total number of routes you want to allow all app instances in the space.
      * (Optional) `NUMBER-OF-SERVICE-INSTANCES` is the total number of service instances you want to allow all app instances in the space.
      * (Optional) To allow the quota plan to provision instances of paid service plans, include the `--allow-paid-service-plans` flag. To prevent the quota
      plan from provisioning instances of paid service plans, include the `--disallow-paid-service-plans` flag.
      <br>
      For example:
  
      ```
      cf update-space-quota big -n bigger -m 4096M -i 20 -l 32K -r 20 -s 20 --allow-paid-service-plans
      ```
  
  ### <a name='set-space-quota'></a> Assign a Quota Plan to a Space
  
  To assign a quota to a space, run the following command. Replace the placeholder attributes with the values for this quota plan:
  
  To assign a quota plan to a space:
  
  1. In a terminal window, run:
  
      ```
      cf set-space-quota ORG QUOTA-NAME
      ```
      Where:
      * `ORG` is the name of the space to which you want to assign the quota plan.
      * `QUOTA-NAME` is the name of the quota plan you want to assign to the space.
  
  <p class='note'><strong>Note:</strong> If you attempt to assign a quota plan with a log rate limit to a space containing apps that are already configured to
    send an unlimited number of logs to Loggregator, the command returns an error. To remedy this issue, see <a href="#update-log-rate-limit">Configure Apps
    with Unlimited Log Rate Limits</a> below.</p>
  
  #### <a id='update-log-rate-limit'></a> Configure Apps with Unlimited Log Rate Limits
  
  If you assign a quota plan with a log rate limit to a space containing apps that are already configured to send an unlimited number of logs to Loggregator,
  you see an error similar to the following example:
  
  <pre class='terminal'>
  Setting space quota big to space example-space as admin...
  Current usage exceeds new quota values. The space(s) being assigned this quota contain apps running with an unlimited log rate limit.
  FAILED
  </pre>
  
  Before you can assign a quota plan to the space, you must configure each app in the space with a log rate limit that is lower than the log rate limit
  specified in the quota plan.
  
  To update the log rate limit for an app in the space to which you want to assign a quota plan:
  
  1. In a terminal window, run:
  
      ```
      cf scale -l LOG-RATE-LIMIT APP-NAME
      ```
      Where:
      * `LOG-RATE-LIMIT` is the log rate limit in bytes per second that you want to configure for the app.
      * `APP-NAME` is the name of the app for which you want to configure a log rate limit.
  
  After you have configured a log rate limit for each app in the space, follow the procedure in [Assign a Quota Plan to a Space](#set-space-quota) above.
  
  
  ## <a name='cf-help'></a> Run cf help
  
  To view a list and brief description of all cf CLI commands related to space and org quotas:
  1. Run:
  
      ```
      cf help -a
      ```
  
  1. In the terminal output, find the following commands:
      <pre class='terminal'>
      ...
      ORG ADMIN:
         org-quotas                             List available organization quotas
         org-quota                              Show organization quota
         set-org-quota                          Assign a quota to an organization
  
         create-org-quota                       Define a new quota for an organization
         delete-org-quota                       Delete an organization quota
         update-org-quota                       Update an existing organization quota
  
         share-private-domain                   Share a private domain with a specific org
         unshare-private-domain                 Unshare a private domain with a specific org
  
      SPACE ADMIN:
         space-quotas                           List available space quotas
         space-quota                            Show space quota info
  
         create-space-quota                     Define a new quota for a space
         update-space-quota                     Update an existing space quota
         delete-space-quota                     Delete a space quota
  
         set-space-quota                        Assign a quota to a space
         unset-space-quota                      Unassign a quota from a space
      </pre>
  