Class: AWSCDK::Batch::CfnQuotaShareProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_quota_share_props.rb

Overview

Properties for defining a CfnQuotaShare.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capacity_limits:, job_queue:, preemption_configuration:, quota_share_name:, resource_sharing_configuration:, state: nil, tags: nil) ⇒ CfnQuotaShareProps

Returns a new instance of CfnQuotaShareProps.

Parameters:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'batch/cfn_quota_share_props.rb', line 16

def initialize(capacity_limits:, job_queue:, preemption_configuration:, quota_share_name:, resource_sharing_configuration:, state: nil, tags: nil)
  @capacity_limits = capacity_limits
  Jsii::Type.check_type(@capacity_limits, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuUXVvdGFTaGFyZS5RdW90YVNoYXJlQ2FwYWNpdHlMaW1pdFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "capacityLimits")
  @job_queue = job_queue
  Jsii::Type.check_type(@job_queue, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobQueue")
  @preemption_configuration = preemption_configuration.is_a?(Hash) ? ::AWSCDK::Batch::CfnQuotaShare::QuotaSharePreemptionConfigurationProperty.new(**preemption_configuration.transform_keys(&:to_sym)) : preemption_configuration
  Jsii::Type.check_type(@preemption_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5RdW90YVNoYXJlLlF1b3RhU2hhcmVQcmVlbXB0aW9uQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "preemptionConfiguration")
  @quota_share_name = quota_share_name
  Jsii::Type.check_type(@quota_share_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "quotaShareName")
  @resource_sharing_configuration = resource_sharing_configuration.is_a?(Hash) ? ::AWSCDK::Batch::CfnQuotaShare::QuotaShareResourceSharingConfigurationProperty.new(**resource_sharing_configuration.transform_keys(&:to_sym)) : resource_sharing_configuration
  Jsii::Type.check_type(@resource_sharing_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5RdW90YVNoYXJlLlF1b3RhU2hhcmVSZXNvdXJjZVNoYXJpbmdDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "resourceSharingConfiguration")
  @state = state
  Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state") unless @state.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#capacity_limitsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Batch::CfnQuotaShare::QuotaShareCapacityLimitProperty> (readonly)

A list that specifies the quantity and type of compute capacity allocated to the quota share.



37
38
39
# File 'batch/cfn_quota_share_props.rb', line 37

def capacity_limits
  @capacity_limits
end

#job_queueString (readonly)

The AWS Batch job queue associated with the quota share.

This can be the job queue name or ARN. A job queue must be in the VALID state before you can associate it with a quota share.



44
45
46
# File 'batch/cfn_quota_share_props.rb', line 44

def job_queue
  @job_queue
end

#quota_share_nameString (readonly)

The name of the quota share.

It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).



54
55
56
# File 'batch/cfn_quota_share_props.rb', line 54

def quota_share_name
  @quota_share_name
end

#stateString? (readonly)

The state of the quota share.

If the quota share is ENABLED, it is able to accept jobs. If the quota share is DISABLED, new jobs won't be accepted but jobs already submitted can finish. The default state is ENABLED.



64
65
66
# File 'batch/cfn_quota_share_props.rb', line 64

def state
  @state
end

#tagsHash{String => String}? (readonly)

The tags that you apply to the quota share to help you categorize and organize your resources.

Each tag consists of a key and an optional value.



71
72
73
# File 'batch/cfn_quota_share_props.rb', line 71

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



73
74
75
76
77
78
79
80
81
82
83
# File 'batch/cfn_quota_share_props.rb', line 73

def self.jsii_properties
  {
    :capacity_limits => "capacityLimits",
    :job_queue => "jobQueue",
    :preemption_configuration => "preemptionConfiguration",
    :quota_share_name => "quotaShareName",
    :resource_sharing_configuration => "resourceSharingConfiguration",
    :state => "state",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'batch/cfn_quota_share_props.rb', line 85

def to_jsii
  result = {}
  result.merge!({
    "capacityLimits" => @capacity_limits,
    "jobQueue" => @job_queue,
    "preemptionConfiguration" => @preemption_configuration,
    "quotaShareName" => @quota_share_name,
    "resourceSharingConfiguration" => @resource_sharing_configuration,
    "state" => @state,
    "tags" => @tags,
  })
  result.compact
end