Class: AWSCDK::CfnStackProps

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

Overview

Properties for defining a CfnStack.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notification_arns: nil, parameters: nil, tags: nil, template_url: nil, timeout_in_minutes: nil) ⇒ CfnStackProps

Returns a new instance of CfnStackProps.

Parameters:

  • notification_arns (Array<String>, nil) (defaults to: nil)

    The Amazon SNS topic ARNs to publish stack related events.

  • parameters (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.

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

    Key-value pairs to associate with this stack.

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

    The URL of a file that contains the template body.

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

    The length of time, in minutes, that CloudFormation waits for the nested stack to reach the CREATE_COMPLETE state.



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

def initialize(notification_arns: nil, parameters: nil, tags: nil, template_url: nil, timeout_in_minutes: nil)
  @notification_arns = notification_arns
  Jsii::Type.check_type(@notification_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notificationArns") unless @notification_arns.nil?
  @parameters = parameters
  Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "parameters") unless @parameters.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?
  @template_url = template_url
  Jsii::Type.check_type(@template_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateUrl") unless @template_url.nil?
  @timeout_in_minutes = timeout_in_minutes
  Jsii::Type.check_type(@timeout_in_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutInMinutes") unless @timeout_in_minutes.nil?
end

Instance Attribute Details

#notification_arnsArray<String>? (readonly)

The Amazon SNS topic ARNs to publish stack related events.

You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).



33
34
35
# File 'cfn_stack_props.rb', line 33

def notification_arns
  @notification_arns
end

#parametersAWSCDK::IResolvable, ... (readonly)

The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.

Each parameter has a name corresponding to a parameter defined in the embedded template and a value representing the value that you want to set for the parameter.

If you use the Ref function to pass a parameter value to a nested stack, comma-delimited list parameters must be of type String . In other words, you can't pass values that are of type CommaDelimitedList to nested stacks.

Required if the nested stack requires input parameters.

Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.



46
47
48
# File 'cfn_stack_props.rb', line 46

def parameters
  @parameters
end

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

Key-value pairs to associate with this stack.

CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.



53
54
55
# File 'cfn_stack_props.rb', line 53

def tags
  @tags
end

#template_urlString? (readonly)

The URL of a file that contains the template body.

The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket. The location for an Amazon S3 bucket must start with https:// .

Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.



62
63
64
# File 'cfn_stack_props.rb', line 62

def template_url
  @template_url
end

#timeout_in_minutesNumeric? (readonly)

The length of time, in minutes, that CloudFormation waits for the nested stack to reach the CREATE_COMPLETE state.

The default is no timeout. When CloudFormation detects that the nested stack has reached the CREATE_COMPLETE state, it marks the nested stack resource as CREATE_COMPLETE in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reaches CREATE_COMPLETE , CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.

Updates aren't supported.



71
72
73
# File 'cfn_stack_props.rb', line 71

def timeout_in_minutes
  @timeout_in_minutes
end

Class Method Details

.jsii_propertiesObject



73
74
75
76
77
78
79
80
81
# File 'cfn_stack_props.rb', line 73

def self.jsii_properties
  {
    :notification_arns => "notificationArns",
    :parameters => "parameters",
    :tags => "tags",
    :template_url => "templateUrl",
    :timeout_in_minutes => "timeoutInMinutes",
  }
end

Instance Method Details

#to_jsiiObject



83
84
85
86
87
88
89
90
91
92
93
# File 'cfn_stack_props.rb', line 83

def to_jsii
  result = {}
  result.merge!({
    "notificationArns" => @notification_arns,
    "parameters" => @parameters,
    "tags" => @tags,
    "templateUrl" => @template_url,
    "timeoutInMinutes" => @timeout_in_minutes,
  })
  result.compact
end