Class: AWSCDK::Batch::CfnServiceEnvironmentProps

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

Overview

Properties for defining a CfnServiceEnvironment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capacity_limits:, service_environment_type:, service_environment_name: nil, state: nil, tags: nil) ⇒ CfnServiceEnvironmentProps

Returns a new instance of CfnServiceEnvironmentProps.

Parameters:

  • capacity_limits (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Batch::CfnServiceEnvironment::CapacityLimitProperty>)

    The capacity limits for the service environment.

  • service_environment_type (String)

    The type of service environment.

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

    The name of the service environment.

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

    The state of the service environment.

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

    The tags associated with the service environment.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'batch/cfn_service_environment_props.rb', line 14

def initialize(capacity_limits:, service_environment_type:, service_environment_name: nil, state: nil, tags: nil)
  @capacity_limits = capacity_limits
  Jsii::Type.check_type(@capacity_limits, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuU2VydmljZUVudmlyb25tZW50LkNhcGFjaXR5TGltaXRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "capacityLimits")
  @service_environment_type = service_environment_type
  Jsii::Type.check_type(@service_environment_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceEnvironmentType")
  @service_environment_name = service_environment_name
  Jsii::Type.check_type(@service_environment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceEnvironmentName") unless @service_environment_name.nil?
  @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::CfnServiceEnvironment::CapacityLimitProperty> (readonly)

The capacity limits for the service environment.

This defines the maximum resources that can be used by service jobs in this environment.



33
34
35
# File 'batch/cfn_service_environment_props.rb', line 33

def capacity_limits
  @capacity_limits
end

#service_environment_nameString? (readonly)

The name of the service environment.



45
46
47
# File 'batch/cfn_service_environment_props.rb', line 45

def service_environment_name
  @service_environment_name
end

#service_environment_typeString (readonly)

The type of service environment.

For SageMaker Training jobs, this value is SAGEMAKER_TRAINING .



40
41
42
# File 'batch/cfn_service_environment_props.rb', line 40

def service_environment_type
  @service_environment_type
end

#stateString? (readonly)

The state of the service environment.

Valid values are ENABLED and DISABLED .



52
53
54
# File 'batch/cfn_service_environment_props.rb', line 52

def state
  @state
end

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

The tags associated with the service environment.

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



59
60
61
# File 'batch/cfn_service_environment_props.rb', line 59

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
69
# File 'batch/cfn_service_environment_props.rb', line 61

def self.jsii_properties
  {
    :capacity_limits => "capacityLimits",
    :service_environment_type => "serviceEnvironmentType",
    :service_environment_name => "serviceEnvironmentName",
    :state => "state",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
# File 'batch/cfn_service_environment_props.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "capacityLimits" => @capacity_limits,
    "serviceEnvironmentType" => @service_environment_type,
    "serviceEnvironmentName" => @service_environment_name,
    "state" => @state,
    "tags" => @tags,
  })
  result.compact
end