CfnServiceEnvironmentPropsMixin
- class aws_cdk.mixins_preview.aws_batch.mixins.CfnServiceEnvironmentPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a service environment for running service jobs.
Service environments define capacity limits for specific service types such as SageMaker Training jobs.
- See:
- CloudformationResource:
AWS::Batch::ServiceEnvironment
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_batch import mixins as batch_mixins cfn_service_environment_props_mixin = batch_mixins.CfnServiceEnvironmentPropsMixin(batch_mixins.CfnServiceEnvironmentMixinProps( capacity_limits=[batch_mixins.CfnServiceEnvironmentPropsMixin.CapacityLimitProperty( capacity_unit="capacityUnit", max_capacity=123 )], service_environment_name="serviceEnvironmentName", service_environment_type="serviceEnvironmentType", state="state", tags={ "tags_key": "tags" } ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Batch::ServiceEnvironment.- Parameters:
props (
Union[CfnServiceEnvironmentMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['capacityLimits', 'serviceEnvironmentName', 'serviceEnvironmentType', 'state', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CapacityLimitProperty
- class CfnServiceEnvironmentPropsMixin.CapacityLimitProperty(*, capacity_unit=None, max_capacity=None)
Bases:
objectDefines the capacity limit for a service environment.
This structure specifies the maximum amount of resources that can be used by service jobs in the environment.
- Parameters:
capacity_unit (
Optional[str]) – The unit of measure for the capacity limit. This defines how the maxCapacity value should be interpreted. ForSAGEMAKER_TRAININGjobs, useNUM_INSTANCES.max_capacity (
Union[int,float,None]) – The maximum capacity available for the service environment. This value represents the maximum amount resources that can be allocated to service jobs. For example,maxCapacity=50,capacityUnit=NUM_INSTANCES. This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.
- See:
- 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.mixins_preview.aws_batch import mixins as batch_mixins capacity_limit_property = batch_mixins.CfnServiceEnvironmentPropsMixin.CapacityLimitProperty( capacity_unit="capacityUnit", max_capacity=123 )
Attributes
- capacity_unit
The unit of measure for the capacity limit.
This defines how the maxCapacity value should be interpreted. For
SAGEMAKER_TRAININGjobs, useNUM_INSTANCES.
- max_capacity
The maximum capacity available for the service environment.
This value represents the maximum amount resources that can be allocated to service jobs.
For example,
maxCapacity=50,capacityUnit=NUM_INSTANCES. This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.