Class: AWSCDK::CfnHook
- Inherits:
-
CfnElement
- Object
- CfnElement
- AWSCDK::CfnHook
- Defined in:
- cfn_hook.rb
Overview
Represents a CloudFormation resource.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #creation_stack ⇒ Array<String>
-
#initialize(scope, id, props) ⇒ CfnHook
constructor
Creates a new Hook object.
-
#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.
- #render_properties(props = nil) ⇒ Hash{String => Object}?
-
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#type ⇒ String
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ CfnHook
Creates a new Hook object.
13 14 15 16 17 18 19 |
# File 'cfn_hook.rb', line 13 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::CfnHookProps.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("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Ib29rUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'cfn_hook.rb', line 21 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 }, :type => { kind: :property, name: "type", is_optional: false }, :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 }, :render_properties => { kind: :method, name: "renderProperties", is_optional: false }, } end |
Instance Method Details
#creation_stack ⇒ Array<String>
43 44 45 |
# File 'cfn_hook.rb', line 43 def creation_stack() jsii_get_property("creationStack") 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).
55 56 57 |
# File 'cfn_hook.rb', line 55 def logical_id() jsii_get_property("logicalId") end |
#node ⇒ Constructs::Node
The tree node.
38 39 40 |
# File 'cfn_hook.rb', line 38 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.
102 103 104 105 |
# File 'cfn_hook.rb', line 102 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 |
#render_properties(props = nil) ⇒ Hash{String => Object}?
109 110 111 112 |
# File 'cfn_hook.rb', line 109 def render_properties(props = nil) Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "props") unless props.nil? jsii_call_method("renderProperties", [props]) end |
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
64 65 66 |
# File 'cfn_hook.rb', line 64 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
78 79 80 |
# File 'cfn_hook.rb', line 78 def to_string() jsii_call_method("toString", []) end |
#type ⇒ String
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
71 72 73 |
# File 'cfn_hook.rb', line 71 def type() jsii_get_property("type") 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.
91 92 93 94 95 96 |
# File 'cfn_hook.rb', line 91 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 |