CfnQuotaSharePropsMixin

class aws_cdk.cfn_property_mixins.aws_batch.CfnQuotaSharePropsMixin(props, *, strategy=None)

Bases: Mixin

Creates an AWS Batch quota share.

Each quota share operates as a virtual queue with a configured compute capacity, resource sharing strategy, and borrow limits.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-quotashare.html

CloudformationResource:

AWS::Batch::QuotaShare

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_batch as batch
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_quota_share_props_mixin = batch.CfnQuotaSharePropsMixin(batch.CfnQuotaShareMixinProps(
    capacity_limits=[batch.CfnQuotaSharePropsMixin.QuotaShareCapacityLimitProperty(
        capacity_unit="capacityUnit",
        max_capacity=123
    )],
    job_queue="jobQueue",
    preemption_configuration=batch.CfnQuotaSharePropsMixin.QuotaSharePreemptionConfigurationProperty(
        in_share_preemption="inSharePreemption"
    ),
    quota_share_name="quotaShareName",
    resource_sharing_configuration=batch.CfnQuotaSharePropsMixin.QuotaShareResourceSharingConfigurationProperty(
        borrow_limit=123,
        strategy="strategy"
    ),
    state="state",
    tags={
        "tags_key": "tags"
    }
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::Batch::QuotaShare.

Parameters:
  • props (Union[CfnQuotaShareMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['capacityLimits', 'jobQueue', 'preemptionConfiguration', 'quotaShareName', 'resourceSharingConfiguration', 'state', 'tags']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

QuotaShareCapacityLimitProperty

class CfnQuotaSharePropsMixin.QuotaShareCapacityLimitProperty(*, capacity_unit=None, max_capacity=None)

Bases: object

Parameters:
  • capacity_unit (Optional[str]) – The unit of compute capacity for the capacityLimit. For example, ml.m5.large.

  • max_capacity (Union[int, float, None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotasharecapacitylimit.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_batch as batch

quota_share_capacity_limit_property = batch.CfnQuotaSharePropsMixin.QuotaShareCapacityLimitProperty(
    capacity_unit="capacityUnit",
    max_capacity=123
)

Attributes

capacity_unit

The unit of compute capacity for the capacityLimit.

For example, ml.m5.large.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotasharecapacitylimit.html#cfn-batch-quotashare-quotasharecapacitylimit-capacityunit

max_capacity

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotasharecapacitylimit.html#cfn-batch-quotashare-quotasharecapacitylimit-maxcapacity

QuotaSharePreemptionConfigurationProperty

class CfnQuotaSharePropsMixin.QuotaSharePreemptionConfigurationProperty(*, in_share_preemption=None)

Bases: object

Parameters:

in_share_preemption (Optional[str]) – Specifies whether jobs within a quota share can be preempted by another, higher priority job in the same quota share.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotasharepreemptionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_batch as batch

quota_share_preemption_configuration_property = batch.CfnQuotaSharePropsMixin.QuotaSharePreemptionConfigurationProperty(
    in_share_preemption="inSharePreemption"
)

Attributes

in_share_preemption

Specifies whether jobs within a quota share can be preempted by another, higher priority job in the same quota share.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotasharepreemptionconfiguration.html#cfn-batch-quotashare-quotasharepreemptionconfiguration-insharepreemption

QuotaShareResourceSharingConfigurationProperty

class CfnQuotaSharePropsMixin.QuotaShareResourceSharingConfigurationProperty(*, borrow_limit=None, strategy=None)

Bases: object

Parameters:
  • borrow_limit (Union[int, float, None]) – The maximum percentage of additional capacity that the quota share can borrow from other shares. BorrowLimit can only be applied to quota shares with a strategy of LEND_AND_BORROW. This value is expressed as a percentage of the quota share’s configured CapacityLimits. The BorrowLimit is applied uniformly across all capacity units. For example, if the BorrowLimit is 200, the quota share can borrow up to 200% of its configured maxCapacity for each capacity unit. The default BorrowLimit is -1, which indicates unlimited borrowing.

  • strategy (Optional[str]) – The resource sharing strategy for the quota share. The RESERVE strategy allows a quota share to reserve idle capacity for itself. LEND configures the share to lend its idle capacity to another share in need of capacity. The LEND_AND_BORROW strategy configures the share to borrow idle capacity from an underutilized share, as well as lend to another share.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotashareresourcesharingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_batch as batch

quota_share_resource_sharing_configuration_property = batch.CfnQuotaSharePropsMixin.QuotaShareResourceSharingConfigurationProperty(
    borrow_limit=123,
    strategy="strategy"
)

Attributes

borrow_limit

The maximum percentage of additional capacity that the quota share can borrow from other shares.

BorrowLimit can only be applied to quota shares with a strategy of LEND_AND_BORROW. This value is expressed as a percentage of the quota share’s configured CapacityLimits. The BorrowLimit is applied uniformly across all capacity units. For example, if the BorrowLimit is 200, the quota share can borrow up to 200% of its configured maxCapacity for each capacity unit. The default BorrowLimit is -1, which indicates unlimited borrowing.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotashareresourcesharingconfiguration.html#cfn-batch-quotashare-quotashareresourcesharingconfiguration-borrowlimit

strategy

The resource sharing strategy for the quota share.

The RESERVE strategy allows a quota share to reserve idle capacity for itself. LEND configures the share to lend its idle capacity to another share in need of capacity. The LEND_AND_BORROW strategy configures the share to borrow idle capacity from an underutilized share, as well as lend to another share.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-quotashare-quotashareresourcesharingconfiguration.html#cfn-batch-quotashare-quotashareresourcesharingconfiguration-strategy