Class: AWSCDK::SAM::CfnFunction::DeploymentPreferenceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sam/cfn_function.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alarms: nil, enabled: nil, hooks: nil, role: nil, type: nil) ⇒ DeploymentPreferenceProperty

Returns a new instance of DeploymentPreferenceProperty.

Parameters:



1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
# File 'sam/cfn_function.rb', line 1428

def initialize(alarms: nil, enabled: nil, hooks: nil, role: nil, type: nil)
  @alarms = alarms
  Jsii::Type.check_type(@alarms, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "alarms") unless @alarms.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @hooks = hooks.is_a?(Hash) ? ::AWSCDK::SAM::CfnFunction::HooksProperty.new(**hooks.transform_keys(&:to_sym)) : hooks
  Jsii::Type.check_type(@hooks, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuRnVuY3Rpb24uSG9va3NQcm9wZXJ0eSJ9XX19")), "hooks") unless @hooks.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role") unless @role.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#alarmsArray<String>? (readonly)



1443
1444
1445
# File 'sam/cfn_function.rb', line 1443

def alarms
  @alarms
end

#enabledBoolean, ... (readonly)



1446
1447
1448
# File 'sam/cfn_function.rb', line 1446

def enabled
  @enabled
end

#roleString? (readonly)



1452
1453
1454
# File 'sam/cfn_function.rb', line 1452

def role
  @role
end

#typeString? (readonly)



1455
1456
1457
# File 'sam/cfn_function.rb', line 1455

def type
  @type
end

Class Method Details

.jsii_propertiesObject



1457
1458
1459
1460
1461
1462
1463
1464
1465
# File 'sam/cfn_function.rb', line 1457

def self.jsii_properties
  {
    :alarms => "alarms",
    :enabled => "enabled",
    :hooks => "hooks",
    :role => "role",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
# File 'sam/cfn_function.rb', line 1467

def to_jsii
  result = {}
  result.merge!({
    "alarms" => @alarms,
    "enabled" => @enabled,
    "hooks" => @hooks,
    "role" => @role,
    "type" => @type,
  })
  result.compact
end