Class: AWSCDK::Batch::CfnSchedulingPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnSchedulingPolicyProps
- Defined in:
- batch/cfn_scheduling_policy_props.rb
Overview
Properties for defining a CfnSchedulingPolicy.
Instance Attribute Summary collapse
-
#fairshare_policy ⇒ AWSCDK::IResolvable, ...
readonly
The fair-share scheduling policy details.
-
#name ⇒ String?
readonly
The name of the fair-share scheduling policy.
-
#quota_share_policy ⇒ AWSCDK::IResolvable, ...
readonly
Quota Share Policy for the Job Queue.
-
#tags ⇒ Hash{String => String}?
readonly
The tags that you apply to the scheduling policy to help you categorize and organize your resources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fairshare_policy: nil, name: nil, quota_share_policy: nil, tags: nil) ⇒ CfnSchedulingPolicyProps
constructor
A new instance of CfnSchedulingPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(fairshare_policy: nil, name: nil, quota_share_policy: nil, tags: nil) ⇒ CfnSchedulingPolicyProps
Returns a new instance of CfnSchedulingPolicyProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'batch/cfn_scheduling_policy_props.rb', line 13 def initialize(fairshare_policy: nil, name: nil, quota_share_policy: nil, tags: nil) @fairshare_policy = fairshare_policy.is_a?(Hash) ? ::AWSCDK::Batch::CfnSchedulingPolicy::FairsharePolicyProperty.new(**fairshare_policy.transform_keys(&:to_sym)) : fairshare_policy Jsii::Type.check_type(@fairshare_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5TY2hlZHVsaW5nUG9saWN5LkZhaXJzaGFyZVBvbGljeVByb3BlcnR5In1dfX0=")), "fairsharePolicy") unless @fairshare_policy.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @quota_share_policy = quota_share_policy.is_a?(Hash) ? ::AWSCDK::Batch::CfnSchedulingPolicy::QuotaSharePolicyProperty.new(**quota_share_policy.transform_keys(&:to_sym)) : quota_share_policy Jsii::Type.check_type(@quota_share_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5TY2hlZHVsaW5nUG9saWN5LlF1b3RhU2hhcmVQb2xpY3lQcm9wZXJ0eSJ9XX19")), "quotaSharePolicy") unless @quota_share_policy.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#fairshare_policy ⇒ AWSCDK::IResolvable, ... (readonly)
The fair-share scheduling policy details.
28 29 30 |
# File 'batch/cfn_scheduling_policy_props.rb', line 28 def fairshare_policy @fairshare_policy end |
#name ⇒ String? (readonly)
The name of the fair-share scheduling policy.
It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
35 36 37 |
# File 'batch/cfn_scheduling_policy_props.rb', line 35 def name @name end |
#quota_share_policy ⇒ AWSCDK::IResolvable, ... (readonly)
Quota Share Policy for the Job Queue.
40 41 42 |
# File 'batch/cfn_scheduling_policy_props.rb', line 40 def quota_share_policy @quota_share_policy end |
#tags ⇒ Hash{String => String}? (readonly)
The tags that you apply to the scheduling policy to help you categorize and organize your resources.
Each tag consists of a key and an optional value. For more information, see Tagging AWS Resources in AWS General Reference .
These tags can be updated or removed using the TagResource and UntagResource API operations.
49 50 51 |
# File 'batch/cfn_scheduling_policy_props.rb', line 49 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'batch/cfn_scheduling_policy_props.rb', line 51 def self.jsii_properties { :fairshare_policy => "fairsharePolicy", :name => "name", :quota_share_policy => "quotaSharePolicy", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'batch/cfn_scheduling_policy_props.rb', line 60 def to_jsii result = {} result.merge!({ "fairsharePolicy" => @fairshare_policy, "name" => @name, "quotaSharePolicy" => @quota_share_policy, "tags" => @tags, }) result.compact end |