Batch / Client / create_quota_share
create_quota_share¶
- Batch.Client.create_quota_share(**kwargs)¶
Creates an Batch quota share. Each quota share operates as a virtual queue with a configured compute capacity, resource sharing strategy, and borrow limits.
See also: AWS API Documentation
Request Syntax
response = client.create_quota_share( quotaShareName='string', jobQueue='string', capacityLimits=[ { 'maxCapacity': 123, 'capacityUnit': 'string' }, ], resourceSharingConfiguration={ 'strategy': 'RESERVE'|'LEND'|'LEND_AND_BORROW', 'borrowLimit': 123 }, preemptionConfiguration={ 'inSharePreemption': 'ENABLED'|'DISABLED' }, state='ENABLED'|'DISABLED', tags={ 'string': 'string' } )
- Parameters:
quotaShareName (string) –
[REQUIRED]
The name of the quota share. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
jobQueue (string) –
[REQUIRED]
The Batch job queue associated with the quota share. This can be the job queue name or ARN. A job queue must be in the
VALIDstate before you can associate it with a quota share.capacityLimits (list) –
[REQUIRED]
A list that specifies the quantity and type of compute capacity allocated to the quota share.
(dict) –
Defines the capacity limit for a quota share, or the type and maximum quantity of a particular resource that can be allocated to jobs in the quota share without borrowing.
maxCapacity (integer) – [REQUIRED]
The maximum capacity available for the quota share. This value represents the maximum quantity of a resource that can be allocated to jobs in the quota share without borrowing.
capacityUnit (string) – [REQUIRED]
The unit of compute capacity for the capacityLimit. For example,
ml.m5.large.
resourceSharingConfiguration (dict) –
[REQUIRED]
Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity.
strategy (string) – [REQUIRED]
The resource sharing strategy for the quota share. The
RESERVEstrategy allows a quota share to reserve idle capacity for itself.LENDconfigures the share to lend its idle capacity to another share in need of capacity. TheLEND_AND_BORROWstrategy configures the share to borrow idle capacity from an underutilized share, as well as lend to another share.borrowLimit (integer) –
The maximum percentage of additional capacity that the quota share can borrow from other shares.
borrowLimitcan only be applied to quota shares with a strategy ofLEND_AND_BORROW. This value is expressed as a percentage of the quota share’s configured CapacityLimits.The
borrowLimitis applied uniformly across all capacity units. For example, if theborrowLimitis 200, the quota share can borrow up to 200% of its configuredmaxCapacityfor each capacity unit. The defaultborrowLimitis -1, which indicates unlimited borrowing.
preemptionConfiguration (dict) –
[REQUIRED]
Specifies the preemption behavior for jobs in a quota share.
inSharePreemption (string) – [REQUIRED]
Specifies whether jobs within a quota share can be preempted by another, higher priority job in the same quota share.
state (string) – The state of the quota share. If the quota share is
ENABLED, it is able to accept jobs. If the quota share isDISABLED, new jobs won’t be accepted but jobs already submitted can finish. The default state isENABLED.tags (dict) –
The tags that you apply to the quota share to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources in Batch User Guide.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'quotaShareName': 'string', 'quotaShareArn': 'string' }
Response Structure
(dict) –
quotaShareName (string) –
The name of the quota share.
quotaShareArn (string) –
The Amazon Resource Name (ARN) of the quota share.
Exceptions
Batch.Client.exceptions.ClientExceptionBatch.Client.exceptions.ServerException