Class: AWSCDK::CfnDynamicReference

Inherits:
Intrinsic
  • Object
show all
Defined in:
cfn_dynamic_reference.rb

Overview

References a dynamically retrieved value.

This is a Construct so that subclasses will (eventually) be able to attach metadata to themselves without having to change call signatures.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service, key) ⇒ CfnDynamicReference

Returns a new instance of CfnDynamicReference.

Parameters:



15
16
17
18
19
# File 'cfn_dynamic_reference.rb', line 15

def initialize(service, key)
  Jsii::Type.check_type(service, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5EeW5hbWljUmVmZXJlbmNlU2VydmljZSJ9")), "service")
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Object.instance_method(:initialize).bind(self).call(service, key)
end

Class Method Details

.jsii_overridable_methodsObject



21
22
23
24
25
26
27
28
29
30
31
# File 'cfn_dynamic_reference.rb', line 21

def self.jsii_overridable_methods
  {
    :creation_stack => { kind: :property, name: "creationStack", is_optional: false },
    :type_hint => { kind: :property, name: "typeHint", is_optional: true },
    :new_error => { kind: :method, name: "newError", is_optional: false },
    :resolve => { kind: :method, name: "resolve", is_optional: false },
    :to_json => { kind: :method, name: "toJSON", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :to_string_list => { kind: :method, name: "toStringList", is_optional: false },
  }
end

Instance Method Details

#creation_stackArray<String>

The captured stack trace which represents the location in which this token was created.

Returns:

  • (Array<String>)


36
37
38
# File 'cfn_dynamic_reference.rb', line 36

def creation_stack()
  jsii_get_property("creationStack")
end

#new_error(message) ⇒ Object

Creates a throwable Error object that contains the token creation stack trace.

Parameters:

  • message (String)

    Error message.

Returns:

  • (Object)


51
52
53
54
# File 'cfn_dynamic_reference.rb', line 51

def new_error(message)
  Jsii::Type.check_type(message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "message")
  jsii_call_method("newError", [message])
end

#resolve(_context) ⇒ Object

Produce the Token's value at resolution time.

Parameters:

Returns:

  • (Object)


60
61
62
63
# File 'cfn_dynamic_reference.rb', line 60

def resolve(_context)
  Jsii::Type.check_type(_context, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2ZUNvbnRleHQifQ==")), "_context")
  jsii_call_method("resolve", [_context])
end

#to_jsonObject

Turn this Token into JSON.

Called automatically when JSON.stringify() is called on a Token.

Returns:

  • (Object)


70
71
72
# File 'cfn_dynamic_reference.rb', line 70

def to_json()
  jsii_call_method("toJSON", [])
end

#to_stringString

Convert an instance of this Token to a string.

This method will be called implicitly by language runtimes if the object is embedded into a string. We treat it the same as an explicit stringification.

Returns:

  • (String)


81
82
83
# File 'cfn_dynamic_reference.rb', line 81

def to_string()
  jsii_call_method("toString", [])
end

#to_string_listArray<String>

Convert an instance of this Token to a string list.

This method will be called implicitly by language runtimes if the object is embedded into a list. We treat it the same as an explicit stringification.

Returns:

  • (Array<String>)


92
93
94
# File 'cfn_dynamic_reference.rb', line 92

def to_string_list()
  jsii_call_method("toStringList", [])
end

#type_hintAWSCDK::ResolutionTypeHint?

Type that the Intrinsic is expected to evaluate to.

Returns:



43
44
45
# File 'cfn_dynamic_reference.rb', line 43

def type_hint()
  jsii_get_property("typeHint")
end