Class: AWSCDK::Batch::CfnConsumableResourceProps

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

Overview

Properties for defining a CfnConsumableResource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type:, total_quantity:, consumable_resource_name: nil, tags: nil) ⇒ CfnConsumableResourceProps

Returns a new instance of CfnConsumableResourceProps.

Parameters:

  • resource_type (String)

    Indicates whether the resource is available to be re-used after a job completes. Can be one of:.

  • total_quantity (Numeric)

    The total amount of the consumable resource that is available.

  • consumable_resource_name (String, nil) (defaults to: nil)

    The name of the consumable resource.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    The tags that you apply to the consumable resource to help you categorize and organize your resources.



13
14
15
16
17
18
19
20
21
22
# File 'batch/cfn_consumable_resource_props.rb', line 13

def initialize(resource_type:, total_quantity:, consumable_resource_name: nil, tags: nil)
  @resource_type = resource_type
  Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType")
  @total_quantity = total_quantity
  Jsii::Type.check_type(@total_quantity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "totalQuantity")
  @consumable_resource_name = consumable_resource_name
  Jsii::Type.check_type(@consumable_resource_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "consumableResourceName") unless @consumable_resource_name.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#consumable_resource_nameString? (readonly)

The name of the consumable resource.



41
42
43
# File 'batch/cfn_consumable_resource_props.rb', line 41

def consumable_resource_name
  @consumable_resource_name
end

#resource_typeString (readonly)

Indicates whether the resource is available to be re-used after a job completes. Can be one of:.

  • REPLENISHABLE
  • NON_REPLENISHABLE


31
32
33
# File 'batch/cfn_consumable_resource_props.rb', line 31

def resource_type
  @resource_type
end

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

The tags that you apply to the consumable resource to help you categorize and organize your resources.

Each tag consists of a key and an optional value. For more information, see Tagging your AWS Batch resources .



48
49
50
# File 'batch/cfn_consumable_resource_props.rb', line 48

def tags
  @tags
end

#total_quantityNumeric (readonly)

The total amount of the consumable resource that is available.



36
37
38
# File 'batch/cfn_consumable_resource_props.rb', line 36

def total_quantity
  @total_quantity
end

Class Method Details

.jsii_propertiesObject



50
51
52
53
54
55
56
57
# File 'batch/cfn_consumable_resource_props.rb', line 50

def self.jsii_properties
  {
    :resource_type => "resourceType",
    :total_quantity => "totalQuantity",
    :consumable_resource_name => "consumableResourceName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



59
60
61
62
63
64
65
66
67
68
# File 'batch/cfn_consumable_resource_props.rb', line 59

def to_jsii
  result = {}
  result.merge!({
    "resourceType" => @resource_type,
    "totalQuantity" => @total_quantity,
    "consumableResourceName" => @consumable_resource_name,
    "tags" => @tags,
  })
  result.compact
end