DeadlineCloud / Client / create_limit

create_limit#

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

Request Syntax

response = client.create_limit(
    clientToken='string',
    displayName='string',
    amountRequirementName='string',
    maxCount=123,
    farmId='string',
    description='string'
)
Parameters:
  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • displayName (string) –

    [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.

  • amountRequirementName (string) –

    [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.

  • maxCount (integer) –

    [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.

  • farmId (string) –

    [REQUIRED]

    The farm ID of the farm that contains the limit.

  • description (string) –

    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.

Return type:

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