Class: AWSCDK::CfnResourceSignal

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_resource_signal.rb

Overview

When AWS CloudFormation creates the associated resource, configures the number of required success signals and the length of time that AWS CloudFormation waits for those signals.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count: nil, timeout: nil) ⇒ CfnResourceSignal

Returns a new instance of CfnResourceSignal.

Parameters:

  • count (Numeric, nil) (defaults to: nil)

    The number of success signals AWS CloudFormation must receive before it sets the resource status as CREATE_COMPLETE.

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

    The length of time that AWS CloudFormation waits for the number of signals that was specified in the Count property.



9
10
11
12
13
14
# File 'cfn_resource_signal.rb', line 9

def initialize(count: nil, timeout: nil)
  @count = count
  Jsii::Type.check_type(@count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "count") unless @count.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#countNumeric? (readonly)

The number of success signals AWS CloudFormation must receive before it sets the resource status as CREATE_COMPLETE.

If the resource receives a failure signal or doesn't receive the specified number of signals before the timeout period expires, the resource creation fails and AWS CloudFormation rolls the stack back.

Returns:

  • (Numeric, nil)


22
23
24
# File 'cfn_resource_signal.rb', line 22

def count
  @count
end

#timeoutString? (readonly)

The length of time that AWS CloudFormation waits for the number of signals that was specified in the Count property.

The timeout period starts after AWS CloudFormation starts creating the resource, and the timeout expires no sooner than the time you specify but can occur shortly thereafter. The maximum time that you can specify is 12 hours.

Returns:

  • (String, nil)


29
30
31
# File 'cfn_resource_signal.rb', line 29

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'cfn_resource_signal.rb', line 31

def self.jsii_properties
  {
    :count => "count",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'cfn_resource_signal.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "count" => @count,
    "timeout" => @timeout,
  })
  result.compact
end