create_limit
async
¶
create_limit(
farm_id: FarmId,
display_name: ResourceName,
amount_requirement_name: AmountRequirementName,
max_count: MaxCount,
*,
config_overrides: Optional[AsyncdeadlineClientConfig] = 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/async_deadline.py
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 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 | |