create_limit
¶
create_limit(
farm_id: FarmId,
display_name: ResourceName,
amount_requirement_name: AmountRequirementName,
max_count: MaxCount,
*,
config_overrides: Optional[deadlineClientConfig] = None,
client_token: Optional[ClientToken] = None,
description: Optional[Description] = None,
) -> CreateLimitResponse
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.
Parameters:
-
farm_id(FarmId) –The farm ID of the farm that contains the limit.
-
client_token(Optional[ClientToken], default:None) –The unique token which the server uses to recognize retries of the same request.
-
display_name(ResourceName) –The display name of the limit.
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.
-
amount_requirement_name(AmountRequirementName) –The value that you specify as the
namein theamountsfield of thehostRequirementsin a step of a job template to declare the limit requirement. -
max_count(MaxCount) –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
maxCountmust not be 0. If the value is -1, there is no restriction on the number of resources that can be acquired for this limit. -
description(Optional[Description], default:None) –A description of the limit. A description helps you identify the purpose of the limit.
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.
Raises:
-
AccessDeniedException–You don't have permission to perform the action.
-
InternalServerErrorException–Deadline Cloud can't process your request right now. Try again later.
-
ResourceNotFoundException–The requested resource can't be found.
-
ServiceQuotaExceededException–You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.
-
ThrottlingException–Your request exceeded a request rate quota.
-
ValidationException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_deadline/_services/deadline.py
2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 | |