Class: AWSCDK::Deadline::CfnFarmProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
deadline/cfn_farm_props.rb

Overview

Properties for defining a CfnFarm.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(display_name:, cost_scale_factor: nil, description: nil, kms_key_arn: nil, tags: nil) ⇒ CfnFarmProps

Returns a new instance of CfnFarmProps.

Parameters:

  • display_name (String)

    The display name of the farm.

  • cost_scale_factor (Numeric, nil) (defaults to: nil)
  • description (String, nil) (defaults to: nil)

    A description of the farm that helps identify what the farm is used for.

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

    The ARN for the KMS key.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to add to your farm.



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

def initialize(display_name:, cost_scale_factor: nil, description: nil, kms_key_arn: nil, tags: nil)
  @display_name = display_name
  Jsii::Type.check_type(@display_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "displayName")
  @cost_scale_factor = cost_scale_factor
  Jsii::Type.check_type(@cost_scale_factor, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "costScaleFactor") unless @cost_scale_factor.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#cost_scale_factorNumeric? (readonly)

Note:

Default: - 1



37
38
39
# File 'deadline/cfn_farm_props.rb', line 37

def cost_scale_factor
  @cost_scale_factor
end

#descriptionString? (readonly)

Note:

Default: - ""

A description of the farm that helps identify what the farm is used for.

This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.



45
46
47
# File 'deadline/cfn_farm_props.rb', line 45

def description
  @description
end

#display_nameString (readonly)

The display name of the farm.

This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.



33
34
35
# File 'deadline/cfn_farm_props.rb', line 33

def display_name
  @display_name
end

#kms_key_arnString? (readonly)

The ARN for the KMS key.



50
51
52
# File 'deadline/cfn_farm_props.rb', line 50

def kms_key_arn
  @kms_key_arn
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags to add to your farm.

Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.



57
58
59
# File 'deadline/cfn_farm_props.rb', line 57

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'deadline/cfn_farm_props.rb', line 59

def self.jsii_properties
  {
    :display_name => "displayName",
    :cost_scale_factor => "costScaleFactor",
    :description => "description",
    :kms_key_arn => "kmsKeyArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
# File 'deadline/cfn_farm_props.rb', line 69

def to_jsii
  result = {}
  result.merge!({
    "displayName" => @display_name,
    "costScaleFactor" => @cost_scale_factor,
    "description" => @description,
    "kmsKeyArn" => @kms_key_arn,
    "tags" => @tags,
  })
  result.compact
end