Class: AWSCDK::Batch::CfnJobQueueProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnJobQueueProps
- Defined in:
- batch/cfn_job_queue_props.rb
Overview
Properties for defining a CfnJobQueue.
Instance Attribute Summary collapse
-
#compute_environment_order ⇒ AWSCDK::IResolvable, ...
readonly
The set of compute environments mapped to a job queue and their order relative to each other.
-
#job_queue_name ⇒ String?
readonly
The name of the job queue.
-
#job_queue_type ⇒ String?
readonly
The type of job queue.
-
#job_state_time_limit_actions ⇒ AWSCDK::IResolvable, ...
readonly
The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times.
-
#priority ⇒ Numeric
readonly
The priority of the job queue.
-
#scheduling_policy_arn ⇒ String, ...
readonly
The Amazon Resource Name (ARN) of the scheduling policy.
-
#service_environment_order ⇒ AWSCDK::IResolvable, ...
readonly
The order of the service environment associated with the job queue.
-
#state ⇒ String?
readonly
The state of the job queue.
-
#tags ⇒ Hash{String => String}?
readonly
The tags that are applied to the job queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(priority:, compute_environment_order: nil, job_queue_name: nil, job_queue_type: nil, job_state_time_limit_actions: nil, scheduling_policy_arn: nil, service_environment_order: nil, state: nil, tags: nil) ⇒ CfnJobQueueProps
constructor
A new instance of CfnJobQueueProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(priority:, compute_environment_order: nil, job_queue_name: nil, job_queue_type: nil, job_state_time_limit_actions: nil, scheduling_policy_arn: nil, service_environment_order: nil, state: nil, tags: nil) ⇒ CfnJobQueueProps
Returns a new instance of CfnJobQueueProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'batch/cfn_job_queue_props.rb', line 18 def initialize(priority:, compute_environment_order: nil, job_queue_name: nil, job_queue_type: nil, job_state_time_limit_actions: nil, scheduling_policy_arn: nil, service_environment_order: nil, state: nil, tags: nil) @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") @compute_environment_order = compute_environment_order Jsii::Type.check_type(@compute_environment_order, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iUXVldWUuQ29tcHV0ZUVudmlyb25tZW50T3JkZXJQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "computeEnvironmentOrder") unless @compute_environment_order.nil? @job_queue_name = job_queue_name Jsii::Type.check_type(@job_queue_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobQueueName") unless @job_queue_name.nil? @job_queue_type = job_queue_type Jsii::Type.check_type(@job_queue_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobQueueType") unless @job_queue_type.nil? @job_state_time_limit_actions = job_state_time_limit_actions Jsii::Type.check_type(@job_state_time_limit_actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iUXVldWUuSm9iU3RhdGVUaW1lTGltaXRBY3Rpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "jobStateTimeLimitActions") unless @job_state_time_limit_actions.nil? @scheduling_policy_arn = scheduling_policy_arn Jsii::Type.check_type(@scheduling_policy_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19iYXRjaC5JU2NoZWR1bGluZ1BvbGljeVJlZiJ9XX19")), "schedulingPolicyArn") unless @scheduling_policy_arn.nil? @service_environment_order = service_environment_order Jsii::Type.check_type(@service_environment_order, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iUXVldWUuU2VydmljZUVudmlyb25tZW50T3JkZXJQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "serviceEnvironmentOrder") unless @service_environment_order.nil? @state = state Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state") unless @state.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#compute_environment_order ⇒ AWSCDK::IResolvable, ... (readonly)
The set of compute environments mapped to a job queue and their order relative to each other.
The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( EC2 or SPOT ) or Fargate ( FARGATE or FARGATE_SPOT ); EC2 and Fargate compute environments can't be mixed.
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.
54 55 56 |
# File 'batch/cfn_job_queue_props.rb', line 54 def compute_environment_order @compute_environment_order end |
#job_queue_name ⇒ String? (readonly)
The name of the job queue.
It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
61 62 63 |
# File 'batch/cfn_job_queue_props.rb', line 61 def job_queue_name @job_queue_name end |
#job_queue_type ⇒ String? (readonly)
The type of job queue.
For service jobs that run on SageMaker AI , this value is SAGEMAKER_TRAINING . For regular container jobs, this value is EKS , ECS , or ECS_FARGATE depending on the compute environment.
68 69 70 |
# File 'batch/cfn_job_queue_props.rb', line 68 def job_queue_type @job_queue_type end |
#job_state_time_limit_actions ⇒ AWSCDK::IResolvable, ... (readonly)
The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times.
AWS Batch will perform each action after max_time_seconds has passed.
75 76 77 |
# File 'batch/cfn_job_queue_props.rb', line 75 def job_state_time_limit_actions @job_state_time_limit_actions end |
#priority ⇒ Numeric (readonly)
The priority of the job queue.
Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over a job queue with a priority value of 1 . All of the compute environments must be either EC2 ( EC2 or SPOT ) or Fargate ( FARGATE or FARGATE_SPOT ); EC2 and Fargate compute environments can't be mixed.
45 46 47 |
# File 'batch/cfn_job_queue_props.rb', line 45 def priority @priority end |
#scheduling_policy_arn ⇒ String, ... (readonly)
The Amazon Resource Name (ARN) of the scheduling policy.
The format is aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name* . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy .
82 83 84 |
# File 'batch/cfn_job_queue_props.rb', line 82 def scheduling_policy_arn @scheduling_policy_arn end |
#service_environment_order ⇒ AWSCDK::IResolvable, ... (readonly)
The order of the service environment associated with the job queue.
Job queues with a higher priority are evaluated first when associated with the same service environment.
89 90 91 |
# File 'batch/cfn_job_queue_props.rb', line 89 def service_environment_order @service_environment_order end |
#state ⇒ String? (readonly)
The state of the job queue.
If the job queue state is ENABLED , it is able to accept jobs. If the job queue state is DISABLED , new jobs can't be added to the queue, but jobs already in the queue can finish.
96 97 98 |
# File 'batch/cfn_job_queue_props.rb', line 96 def state @state end |
#tags ⇒ Hash{String => String}? (readonly)
The tags that are applied to the job queue.
For more information, see Tagging your AWS Batch resources in AWS Batch User Guide .
103 104 105 |
# File 'batch/cfn_job_queue_props.rb', line 103 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'batch/cfn_job_queue_props.rb', line 105 def self.jsii_properties { :priority => "priority", :compute_environment_order => "computeEnvironmentOrder", :job_queue_name => "jobQueueName", :job_queue_type => "jobQueueType", :job_state_time_limit_actions => "jobStateTimeLimitActions", :scheduling_policy_arn => "schedulingPolicyArn", :service_environment_order => "serviceEnvironmentOrder", :state => "state", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'batch/cfn_job_queue_props.rb', line 119 def to_jsii result = {} result.merge!({ "priority" => @priority, "computeEnvironmentOrder" => @compute_environment_order, "jobQueueName" => @job_queue_name, "jobQueueType" => @job_queue_type, "jobStateTimeLimitActions" => @job_state_time_limit_actions, "schedulingPolicyArn" => @scheduling_policy_arn, "serviceEnvironmentOrder" => @service_environment_order, "state" => @state, "tags" => @tags, }) result.compact end |