:doc:`DeadlineCloud <../../deadline>` / Client / create_limit

************
create_limit
************



.. py:method:: DeadlineCloud.Client.create_limit(**kwargs)

  

  Creates a limit that manages the distribution of shared resources, such as floating licenses. A limit can throttle work assignments, help manage workloads, and track current usage. Before you use a limit, you must associate the limit with one or more queues.

   

  You must add the ``amountRequirementName`` to a step in a job template to declare the limit requirement.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/CreateLimit>`_  


  **Request Syntax**
  ::

    response = client.create_limit(
        clientToken='string',
        displayName='string',
        amountRequirementName='string',
        maxCount=123,
        farmId='string',
        description='string'
    )
    
  :type clientToken: string
  :param clientToken: 

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

  
  :type displayName: string
  :param displayName: **[REQUIRED]** 

    The display name of the limit.

     

    .. warning::

       

      This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

      

    

  
  :type amountRequirementName: string
  :param amountRequirementName: **[REQUIRED]** 

    The value that you specify as the ``name`` in the ``amounts`` field of the ``hostRequirements`` in a step of a job template to declare the limit requirement.

    

  
  :type maxCount: integer
  :param maxCount: **[REQUIRED]** 

    The maximum number of resources constrained by this limit. When all of the resources are in use, steps that require the limit won't be scheduled until the resource is available.

     

    The ``maxCount`` must not be 0. If the value is -1, there is no restriction on the number of resources that can be acquired for this limit.

    

  
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID of the farm that contains the limit.

    

  
  :type description: string
  :param description: 

    A description of the limit. A description helps you identify the purpose of the limit.

     

    .. warning::

       

      This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

      

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'limitId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **limitId** *(string) --* 

        A unique identifier for the limit. Use this identifier in other operations, such as ``CreateQueueLimitAssociation`` and ``DeleteLimit``.

        
  
  **Exceptions**
  
  *   :py:class:`DeadlineCloud.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ThrottlingException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ValidationException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ServiceQuotaExceededException`

  