Class: AWSCDK::NestedStackProps

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

Overview

Initialization props for the NestedStack construct.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, notification_arns: nil, parameters: nil, removal_policy: nil, suppress_template_indentation: nil, timeout: nil) ⇒ NestedStackProps

Returns a new instance of NestedStackProps.

Parameters:

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

    A description of the stack.

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

    The Simple Notification Service (SNS) topics to publish stack related events.

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

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

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    Policy to apply when the nested stack is removed.

  • suppress_template_indentation (Boolean, nil) (defaults to: nil)

    Enable this flag to suppress indentation in generated CloudFormation templates.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

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



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

def initialize(description: nil, notification_arns: nil, parameters: nil, removal_policy: nil, suppress_template_indentation: nil, timeout: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.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("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "parameters") unless @parameters.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @suppress_template_indentation = suppress_template_indentation
  Jsii::Type.check_type(@suppress_template_indentation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "suppressTemplateIndentation") unless @suppress_template_indentation.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

Note:

Default: - No description.

A description of the stack.

Returns:

  • (String, nil)


32
33
34
# File 'nested_stack_props.rb', line 32

def description
  @description
end

#notification_arnsArray<String>? (readonly)

Note:

Default: - notifications are not sent for this stack.

The Simple Notification Service (SNS) topics to publish stack related events.

Returns:

  • (Array<String>, nil)


37
38
39
# File 'nested_stack_props.rb', line 37

def notification_arns
  @notification_arns
end

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

Note:

Default: - no user-defined parameters are passed to the nested stack

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.

The nested stack construct will automatically synthesize parameters in order to bind references from the parent stack(s) into the nested stack.

Returns:

  • (Hash{String => String}, nil)


49
50
51
# File 'nested_stack_props.rb', line 49

def parameters
  @parameters
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

Policy to apply when the nested stack is removed.

The default is Destroy, because all Removal Policies of resources inside the Nested Stack should already have been set correctly. You normally should not need to set this value.

Returns:



58
59
60
# File 'nested_stack_props.rb', line 58

def removal_policy
  @removal_policy
end

#suppress_template_indentationBoolean? (readonly)

Note:

Default: - the value of @aws-cdk/core:suppressTemplateIndentation, or false if that is not set.

Enable this flag to suppress indentation in generated CloudFormation templates.

If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation context key will be used. If that is not specified, then the default value false will be used.

Returns:

  • (Boolean, nil)


67
68
69
# File 'nested_stack_props.rb', line 67

def suppress_template_indentation
  @suppress_template_indentation
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: - no timeout

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

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.

Returns:



79
80
81
# File 'nested_stack_props.rb', line 79

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



81
82
83
84
85
86
87
88
89
90
# File 'nested_stack_props.rb', line 81

def self.jsii_properties
  {
    :description => "description",
    :notification_arns => "notificationArns",
    :parameters => "parameters",
    :removal_policy => "removalPolicy",
    :suppress_template_indentation => "suppressTemplateIndentation",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



92
93
94
95
96
97
98
99
100
101
102
103
# File 'nested_stack_props.rb', line 92

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "notificationArns" => @notification_arns,
    "parameters" => @parameters,
    "removalPolicy" => @removal_policy,
    "suppressTemplateIndentation" => @suppress_template_indentation,
    "timeout" => @timeout,
  })
  result.compact
end