CfnJobQueuePropsMixin
- class aws_cdk.mixins_preview.aws_batch.mixins.CfnJobQueuePropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Batch::JobQueueresource specifies the parameters for an AWS Batch job queue definition.For more information, see Job Queues in the ** .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobqueue.html
- CloudformationResource:
AWS::Batch::JobQueue
- 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_job_queue_props_mixin = batch_mixins.CfnJobQueuePropsMixin(batch_mixins.CfnJobQueueMixinProps( compute_environment_order=[batch_mixins.CfnJobQueuePropsMixin.ComputeEnvironmentOrderProperty( compute_environment="computeEnvironment", order=123 )], job_queue_name="jobQueueName", job_queue_type="jobQueueType", job_state_time_limit_actions=[batch_mixins.CfnJobQueuePropsMixin.JobStateTimeLimitActionProperty( action="action", max_time_seconds=123, reason="reason", state="state" )], priority=123, scheduling_policy_arn="schedulingPolicyArn", service_environment_order=[batch_mixins.CfnJobQueuePropsMixin.ServiceEnvironmentOrderProperty( order=123, service_environment="serviceEnvironment" )], state="state", tags={ "tags_key": "tags" } ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Batch::JobQueue.- Parameters:
props (
Union[CfnJobQueueMixinProps,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 = ['computeEnvironmentOrder', 'jobQueueName', 'jobQueueType', 'jobStateTimeLimitActions', 'priority', 'schedulingPolicyArn', 'serviceEnvironmentOrder', '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
ComputeEnvironmentOrderProperty
- class CfnJobQueuePropsMixin.ComputeEnvironmentOrderProperty(*, compute_environment=None, order=None)
Bases:
objectThe order that compute environments are tried in for job placement within a queue.
Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first. Compute environments must be in the
VALIDstate before you can associate them with a job queue. All of the compute environments must be either EC2 (EC2orSPOT) or Fargate (FARGATEorFARGATE_SPOT); Amazon EC2 and Fargate compute environments can’t be mixed. .. epigraph:All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
- Parameters:
compute_environment (
Optional[str]) – The Amazon Resource Name (ARN) of the compute environment.order (
Union[int,float,None]) – The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lowerorderinteger value is tried for job placement first.
- 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 compute_environment_order_property = batch_mixins.CfnJobQueuePropsMixin.ComputeEnvironmentOrderProperty( compute_environment="computeEnvironment", order=123 )
Attributes
- compute_environment
The Amazon Resource Name (ARN) of the compute environment.
- order
The order of the compute environment.
Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower
orderinteger value is tried for job placement first.
JobStateTimeLimitActionProperty
- class CfnJobQueuePropsMixin.JobStateTimeLimitActionProperty(*, action=None, max_time_seconds=None, reason=None, state=None)
Bases:
objectSpecifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
- Parameters:
action (
Optional[str]) – The action to take when a job is at the head of the job queue in the specified state for the specified period of time. The only supported value isCANCEL, which will cancel the job.max_time_seconds (
Union[int,float,None]) – The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).reason (
Optional[str]) – The reason to log for the action being taken.state (
Optional[str]) – The state of the job needed to trigger the action. The only supported value isRUNNABLE.
- 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 job_state_time_limit_action_property = batch_mixins.CfnJobQueuePropsMixin.JobStateTimeLimitActionProperty( action="action", max_time_seconds=123, reason="reason", state="state" )
Attributes
- action
The action to take when a job is at the head of the job queue in the specified state for the specified period of time.
The only supported value is
CANCEL, which will cancel the job.
- max_time_seconds
The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).
- reason
The reason to log for the action being taken.
- state
The state of the job needed to trigger the action.
The only supported value is
RUNNABLE.
ServiceEnvironmentOrderProperty
- class CfnJobQueuePropsMixin.ServiceEnvironmentOrderProperty(*, order=None, service_environment=None)
Bases:
objectSpecifies the order of a service environment for a job queue.
This determines the priority order when multiple service environments are associated with the same job queue.
- Parameters:
order (
Union[int,float,None]) – The order of the service environment. Job queues with a higher priority are evaluated first when associated with the same service environment.service_environment (
Optional[str]) – The name or ARN of the service environment.
- 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 service_environment_order_property = batch_mixins.CfnJobQueuePropsMixin.ServiceEnvironmentOrderProperty( order=123, service_environment="serviceEnvironment" )
Attributes
- order
The order of the service environment.
Job queues with a higher priority are evaluated first when associated with the same service environment.
- service_environment
The name or ARN of the service environment.