Class: AWSCDK::CfnOutput
- Inherits:
-
CfnElement
- Object
- CfnElement
- AWSCDK::CfnOutput
- Defined in:
- cfn_output.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#condition ⇒ AWSCDK::CfnCondition?
A condition to associate with this output value.
- #condition=(value) ⇒ Object
- #creation_stack ⇒ Array<String>
-
#description ⇒ String?
A String type that describes the output value.
- #description=(value) ⇒ Object
-
#export_name ⇒ String?
The name used to export the value of this output across stacks.
- #export_name=(value) ⇒ Object
-
#import_value ⇒ String
Return the
Fn.importValueexpression to import this value into another stack. -
#initialize(scope, id, props) ⇒ CfnOutput
constructor
Creates a CfnOutput value for this stack.
-
#logical_id ⇒ String
The logical ID for this CloudFormation stack element.
-
#node ⇒ Constructs::Node
The tree node.
-
#override_logical_id(new_logical_id) ⇒ void
Overrides the auto-generated logical ID with a specific ID.
-
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#value ⇒ Object
The value of the property returned by the aws cloudformation describe-stacks command.
- #value=(value) ⇒ Object
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ CfnOutput
Creates a CfnOutput value for this stack.
12 13 14 15 16 17 18 |
# File 'cfn_output.rb', line 12 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::CfnOutputProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5PdXRwdXRQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'cfn_output.rb', line 20 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :creation_stack => { kind: :property, name: "creationStack", is_optional: false }, :logical_id => { kind: :property, name: "logicalId", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :import_value => { kind: :property, name: "importValue", is_optional: false }, :value => { kind: :property, name: "value", is_optional: false }, :condition => { kind: :property, name: "condition", is_optional: true }, :description => { kind: :property, name: "description", is_optional: true }, :export_name => { kind: :property, name: "exportName", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :override_logical_id => { kind: :method, name: "overrideLogicalId", is_optional: false }, } end |
Instance Method Details
#condition ⇒ AWSCDK::CfnCondition?
Default: - No condition is associated with the output.
A condition to associate with this output value.
If the condition evaluates
to false, this output value will not be included in the stack.
112 113 114 |
# File 'cfn_output.rb', line 112 def condition() jsii_get_property("condition") end |
#condition=(value) ⇒ Object
116 117 118 119 |
# File 'cfn_output.rb', line 116 def condition=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db25kaXRpb24ifQ==")), "condition") unless value.nil? jsii_set_property("condition", value) end |
#creation_stack ⇒ Array<String>
45 46 47 |
# File 'cfn_output.rb', line 45 def creation_stack() jsii_get_property("creationStack") end |
#description ⇒ String?
Default: - No description.
A String type that describes the output value.
The description can be a maximum of 4 K in length.
127 128 129 |
# File 'cfn_output.rb', line 127 def description() jsii_get_property("description") end |
#description=(value) ⇒ Object
131 132 133 134 |
# File 'cfn_output.rb', line 131 def description=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless value.nil? jsii_set_property("description", value) end |
#export_name ⇒ String?
Default: - the output is not exported
The name used to export the value of this output across stacks.
To use the value in another stack, pass the value of
output.importValue to it.
143 144 145 |
# File 'cfn_output.rb', line 143 def export_name() jsii_get_property("exportName") end |
#export_name=(value) ⇒ Object
147 148 149 150 |
# File 'cfn_output.rb', line 147 def export_name=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "exportName") unless value.nil? jsii_set_property("exportName", value) end |
#import_value ⇒ String
Return the Fn.importValue expression to import this value into another stack.
The returned value should not be used in the same stack, but in a different one. It must be deployed to the same environment, as CloudFormation exports can only be imported in the same Region and account.
The is no automatic registration of dependencies between stacks when using this mechanism, so you should make sure to deploy them in the right order yourself.
You can use this mechanism to share values across Stacks in different Stages. If you intend to share the value to another Stack inside the same Stage, the automatic cross-stack referencing mechanism is more convenient.
86 87 88 |
# File 'cfn_output.rb', line 86 def import_value() jsii_get_property("importValue") end |
#logical_id ⇒ String
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use override_logical_id(new_logical_id).
57 58 59 |
# File 'cfn_output.rb', line 57 def logical_id() jsii_get_property("logicalId") end |
#node ⇒ Constructs::Node
The tree node.
40 41 42 |
# File 'cfn_output.rb', line 40 def node() jsii_get_property("node") end |
#override_logical_id(new_logical_id) ⇒ void
This method returns an undefined value.
Overrides the auto-generated logical ID with a specific ID.
179 180 181 182 |
# File 'cfn_output.rb', line 179 def override_logical_id(new_logical_id) Jsii::Type.check_type(new_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newLogicalId") jsii_call_method("overrideLogicalId", [new_logical_id]) end |
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
66 67 68 |
# File 'cfn_output.rb', line 66 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
155 156 157 |
# File 'cfn_output.rb', line 155 def to_string() jsii_call_method("toString", []) end |
#value ⇒ Object
The value of the property returned by the aws cloudformation describe-stacks command.
The value of an output can include literals, parameter references, pseudo-parameters, a mapping value, or intrinsic functions.
96 97 98 |
# File 'cfn_output.rb', line 96 def value() jsii_get_property("value") end |
#value=(value) ⇒ Object
100 101 102 103 |
# File 'cfn_output.rb', line 100 def value=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_set_property("value", value) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
168 169 170 171 172 173 |
# File 'cfn_output.rb', line 168 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |