Class: AWSCDK::Fn
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Fn
- Defined in:
- fn.rb
Overview
CloudFormation intrinsic functions.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
Class Method Summary collapse
-
.base64(data) ⇒ String
The intrinsic function
Fn::Base64returns the Base64 representation of the input string. -
.cidr(ip_block, count, size_mask = nil) ⇒ Array<String>
The intrinsic function
Fn::Cidrreturns the specified Cidr address block. -
.condition_and(*conditions) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if all the specified conditions evaluate to true, or returns false if any one of the conditions evaluates to false.
-
.condition_contains(list_of_strings, value) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if a specified string matches at least one value in a list of strings.
-
.condition_each_member_equals(list_of_strings, value) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if a specified string matches all values in a list.
-
.condition_each_member_in(strings_to_check, strings_to_match) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if each member in a list of strings matches at least one value in a second list of strings.
-
.condition_equals(lhs, rhs) ⇒ AWSCDK::ICfnRuleConditionExpression
Compares if two values are equal.
-
.condition_if(condition_id, value_if_true, value_if_false) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns one value if the specified condition evaluates to true and another value if the specified condition evaluates to false.
-
.condition_not(condition) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true for a condition that evaluates to false or returns false for a condition that evaluates to true.
-
.condition_or(*conditions) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if any one of the specified conditions evaluate to true, or returns false if all of the conditions evaluates to false.
-
.find_in_map(map_name, top_level_key, second_level_key, default_value = nil) ⇒ String
The intrinsic function
Fn::FindInMapreturns the value corresponding to keys in a two-level map that is declared in the Mappings section. -
.get_att(logical_name_of_resource, attribute_name) ⇒ AWSCDK::IResolvable
The
Fn::GetAttintrinsic function returns the value of an attribute from a resource in the template. -
.get_azs(region = nil) ⇒ Array<String>
The intrinsic function
Fn::GetAZsreturns an array that lists Availability Zones for a specified region. -
.get_stack_output(stack_name, output_name, region = nil, role_arn = nil) ⇒ String
The intrinsic function
Fn::GetStackOutputreturns the value of an output from another stack. -
.import_list_value(shared_value_to_import, assumed_length, delimiter = nil) ⇒ Array<String>
Like
Fn.importValue, but import a list with a known length. -
.import_value(shared_value_to_import) ⇒ String
The intrinsic function
Fn::ImportValuereturns the value of an output exported by another stack. -
.join(delimiter, list_of_values) ⇒ String
The intrinsic function
Fn::Joinappends a set of values into a single value, separated by the specified delimiter. - .jsii_overridable_methods ⇒ Object
-
.len(array) ⇒ Numeric
The intrinsic function
Fn::Lengthreturns the number of elements within an array or an intrinsic function that returns an array. -
.parse_domain_name(url) ⇒ String
Given an url, parse the domain name.
-
.ref(logical_name) ⇒ String
The
Refintrinsic function returns the value of the specified parameter or resource. -
.ref_all(parameter_type) ⇒ Array<String>
Returns all values for a specified parameter type.
-
.select(index, array) ⇒ String
The intrinsic function
Fn::Selectreturns a single object from a list of objects by index. -
.split(delimiter, source, assumed_length = nil) ⇒ Array<String>
Split a string token into a token list of string values.
-
.sub(body, variables = nil) ⇒ String
The intrinsic function
Fn::Subsubstitutes variables in an input string with values that you specify. -
.to_json_string(object) ⇒ String
The
Fn::ToJsonStringintrinsic function converts an object or array to its corresponding JSON string. -
.transform(macro_name, parameters) ⇒ AWSCDK::IResolvable
Creates a token representing the
Fn::Transformexpression. -
.value_of(parameter_or_logical_id, attribute) ⇒ String
Returns an attribute value or list of values for a specific parameter and attribute.
-
.value_of_all(parameter_type, attribute) ⇒ Array<String>
Returns a list of all attribute values for a given parameter type and attribute.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Fn
constructor
A new instance of Fn.
Constructor Details
#initialize(*args) ⇒ Fn
Returns a new instance of Fn.
10 11 12 |
# File 'fn.rb', line 10 def initialize(*args) raise NoMethodError, "aws-cdk-lib.Fn does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.base64(data) ⇒ String
The intrinsic function Fn::Base64 returns the Base64 representation of the input string.
This function is typically used to pass encoded data to Amazon EC2 instances by way of the UserData property.
26 27 28 29 |
# File 'fn.rb', line 26 def self.base64(data) Jsii::Type.check_type(data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "data") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "base64", [data]) end |
.cidr(ip_block, count, size_mask = nil) ⇒ Array<String>
The intrinsic function Fn::Cidr returns the specified Cidr address block.
37 38 39 40 41 42 |
# File 'fn.rb', line 37 def self.cidr(ip_block, count, size_mask = nil) Jsii::Type.check_type(ip_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipBlock") Jsii::Type.check_type(count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "count") Jsii::Type.check_type(size_mask, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sizeMask") unless size_mask.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "cidr", [ip_block, count, size_mask]) end |
.condition_and(*conditions) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if all the specified conditions evaluate to true, or returns false if any one of the conditions evaluates to false.
Fn::And acts as
an AND operator. The minimum number of conditions that you can include is
1.
52 53 54 55 56 57 |
# File 'fn.rb', line 52 def self.condition_and(*conditions) conditions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JQ2ZuQ29uZGl0aW9uRXhwcmVzc2lvbiJ9")), "conditions[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionAnd", [*conditions]) end |
.condition_contains(list_of_strings, value) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if a specified string matches at least one value in a list of strings.
64 65 66 67 68 |
# File 'fn.rb', line 64 def self.condition_contains(list_of_strings, value) Jsii::Type.check_type(list_of_strings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "listOfStrings") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionContains", [list_of_strings, value]) end |
.condition_each_member_equals(list_of_strings, value) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if a specified string matches all values in a list.
75 76 77 78 79 |
# File 'fn.rb', line 75 def self.condition_each_member_equals(list_of_strings, value) Jsii::Type.check_type(list_of_strings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "listOfStrings") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionEachMemberEquals", [list_of_strings, value]) end |
.condition_each_member_in(strings_to_check, strings_to_match) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if each member in a list of strings matches at least one value in a second list of strings.
86 87 88 89 90 |
# File 'fn.rb', line 86 def self.condition_each_member_in(strings_to_check, strings_to_match) Jsii::Type.check_type(strings_to_check, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stringsToCheck") Jsii::Type.check_type(strings_to_match, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stringsToMatch") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionEachMemberIn", [strings_to_check, strings_to_match]) end |
.condition_equals(lhs, rhs) ⇒ AWSCDK::ICfnRuleConditionExpression
Compares if two values are equal.
Returns true if the two values are equal or false if they aren't.
100 101 102 103 104 |
# File 'fn.rb', line 100 def self.condition_equals(lhs, rhs) Jsii::Type.check_type(lhs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "lhs") Jsii::Type.check_type(rhs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "rhs") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionEquals", [lhs, rhs]) end |
.condition_if(condition_id, value_if_true, value_if_false) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns one value if the specified condition evaluates to true and another value if the specified condition evaluates to false.
Currently, AWS
CloudFormation supports the Fn::If intrinsic function in the metadata
attribute, update policy attribute, and property values in the Resources
section and Outputs sections of a template. You can use the AWS::NoValue
pseudo parameter as a return value to remove the corresponding property.
118 119 120 121 122 123 |
# File 'fn.rb', line 118 def self.condition_if(condition_id, value_if_true, value_if_false) Jsii::Type.check_type(condition_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "conditionId") Jsii::Type.check_type(value_if_true, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "valueIfTrue") Jsii::Type.check_type(value_if_false, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "valueIfFalse") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionIf", [condition_id, value_if_true, value_if_false]) end |
.condition_not(condition) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true for a condition that evaluates to false or returns false for a condition that evaluates to true.
Fn::Not acts as a NOT operator.
131 132 133 134 |
# File 'fn.rb', line 131 def self.condition_not(condition) Jsii::Type.check_type(condition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JQ2ZuQ29uZGl0aW9uRXhwcmVzc2lvbiJ9")), "condition") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionNot", [condition]) end |
.condition_or(*conditions) ⇒ AWSCDK::ICfnRuleConditionExpression
Returns true if any one of the specified conditions evaluate to true, or returns false if all of the conditions evaluates to false.
Fn::Or acts
as an OR operator. The minimum number of conditions that you can include is
1.
144 145 146 147 148 149 |
# File 'fn.rb', line 144 def self.condition_or(*conditions) conditions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JQ2ZuQ29uZGl0aW9uRXhwcmVzc2lvbiJ9")), "conditions[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "conditionOr", [*conditions]) end |
.find_in_map(map_name, top_level_key, second_level_key, default_value = nil) ⇒ String
The intrinsic function Fn::FindInMap returns the value corresponding to keys in a two-level map that is declared in the Mappings section.
Warning: do not use with lazy mappings as this function will not guarantee a lazy mapping to render in the template.
Prefer to use CfnMapping.findInMap in general.
161 162 163 164 165 166 167 |
# File 'fn.rb', line 161 def self.find_in_map(map_name, top_level_key, second_level_key, default_value = nil) Jsii::Type.check_type(map_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mapName") Jsii::Type.check_type(top_level_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topLevelKey") Jsii::Type.check_type(second_level_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secondLevelKey") Jsii::Type.check_type(default_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultValue") unless default_value.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "findInMap", [map_name, top_level_key, second_level_key, default_value]) end |
.get_att(logical_name_of_resource, attribute_name) ⇒ AWSCDK::IResolvable
The Fn::GetAtt intrinsic function returns the value of an attribute from a resource in the template.
174 175 176 177 178 |
# File 'fn.rb', line 174 def self.get_att(logical_name_of_resource, attribute_name) Jsii::Type.check_type(logical_name_of_resource, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logicalNameOfResource") Jsii::Type.check_type(attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "getAtt", [logical_name_of_resource, attribute_name]) end |
.get_azs(region = nil) ⇒ Array<String>
The intrinsic function Fn::GetAZs returns an array that lists Availability Zones for a specified region.
Because customers have access to
different Availability Zones, the intrinsic function Fn::GetAZs enables
template authors to write templates that adapt to the calling user's
access. That way you don't have to hard-code a full list of Availability
Zones for a specified region.
190 191 192 193 |
# File 'fn.rb', line 190 def self.get_azs(region = nil) Jsii::Type.check_type(region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless region.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "getAzs", [region]) end |
.get_stack_output(stack_name, output_name, region = nil, role_arn = nil) ⇒ String
The intrinsic function Fn::GetStackOutput returns the value of an output from another stack.
This is similar to Fn::ImportValue, but it can reference
a normal output, without the need to export anything. As with Fn::ImportValue,
you typically use this function to create cross-stack references.
206 207 208 209 210 211 212 |
# File 'fn.rb', line 206 def self.get_stack_output(stack_name, output_name, region = nil, role_arn = nil) Jsii::Type.check_type(stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName") Jsii::Type.check_type(output_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputName") Jsii::Type.check_type(region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless region.nil? Jsii::Type.check_type(role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless role_arn.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "getStackOutput", [stack_name, output_name, region, role_arn]) end |
.import_list_value(shared_value_to_import, assumed_length, delimiter = nil) ⇒ Array<String>
Like Fn.importValue, but import a list with a known length.
If you explicitly want a list with an unknown length, call Fn.split(',', Fn.importValue(exportName)). See the documentation of Fn.split to read
more about the limitations of using lists of unknown length.
Fn.importListValue(exportName, assumedLength) is the same as
Fn.split(',', Fn.importValue(exportName), assumedLength),
but easier to read and impossible to forget to pass assumed_length.
227 228 229 230 231 232 |
# File 'fn.rb', line 227 def self.import_list_value(shared_value_to_import, assumed_length, delimiter = nil) Jsii::Type.check_type(shared_value_to_import, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sharedValueToImport") Jsii::Type.check_type(assumed_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "assumedLength") Jsii::Type.check_type(delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") unless delimiter.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "importListValue", [shared_value_to_import, assumed_length, delimiter]) end |
.import_value(shared_value_to_import) ⇒ String
The intrinsic function Fn::ImportValue returns the value of an output exported by another stack.
You typically use this function to create cross-stack references. In the following example template snippets, Stack A exports VPC security group values and Stack B imports them.
242 243 244 245 |
# File 'fn.rb', line 242 def self.import_value(shared_value_to_import) Jsii::Type.check_type(shared_value_to_import, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sharedValueToImport") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "importValue", [shared_value_to_import]) end |
.join(delimiter, list_of_values) ⇒ String
The intrinsic function Fn::Join appends a set of values into a single value, separated by the specified delimiter.
If a delimiter is the empty string, the set of values are concatenated with no delimiter.
255 256 257 258 259 |
# File 'fn.rb', line 255 def self.join(delimiter, list_of_values) Jsii::Type.check_type(delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") Jsii::Type.check_type(list_of_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "listOfValues") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "join", [delimiter, list_of_values]) end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 |
# File 'fn.rb', line 14 def self.jsii_overridable_methods { } end |
.len(array) ⇒ Numeric
The intrinsic function Fn::Length returns the number of elements within an array or an intrinsic function that returns an array.
265 266 267 268 |
# File 'fn.rb', line 265 def self.len(array) Jsii::Type.check_type(array, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "array") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "len", [array]) end |
.parse_domain_name(url) ⇒ String
Given an url, parse the domain name.
274 275 276 277 |
# File 'fn.rb', line 274 def self.parse_domain_name(url) Jsii::Type.check_type(url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "url") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "parseDomainName", [url]) end |
.ref(logical_name) ⇒ String
The Ref intrinsic function returns the value of the specified parameter or resource.
Note that it doesn't validate the logicalName, it mainly serves parameter/resource reference defined in a CfnInclude template.
285 286 287 288 |
# File 'fn.rb', line 285 def self.ref(logical_name) Jsii::Type.check_type(logical_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logicalName") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "ref", [logical_name]) end |
.ref_all(parameter_type) ⇒ Array<String>
Returns all values for a specified parameter type.
294 295 296 297 |
# File 'fn.rb', line 294 def self.ref_all(parameter_type) Jsii::Type.check_type(parameter_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parameterType") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "refAll", [parameter_type]) end |
.select(index, array) ⇒ String
The intrinsic function Fn::Select returns a single object from a list of objects by index.
304 305 306 307 308 |
# File 'fn.rb', line 304 def self.select(index, array) Jsii::Type.check_type(index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "index") Jsii::Type.check_type(array, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "array") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "select", [index, array]) end |
.split(delimiter, source, assumed_length = nil) ⇒ Array<String>
Split a string token into a token list of string values.
Specify the location of splits with a delimiter such as ',' (a comma).
Renders to the Fn::Split intrinsic function.
Lists with unknown lengths (default)
Since this function is used to work with deploy-time values, if assumed_length
is not given the CDK cannot know the length of the resulting list at synthesis time.
This brings the following restrictions:
- You must use
Fn.select(i, list)to pick elements out of the list (you must not uselist[i]). - You cannot add elements to the list, remove elements from the list, combine two such lists together, or take a slice of the list.
- You cannot pass the list to constructs that do any of the above.
The only valid operation with such a tokenized list is to pass it unmodified to a CloudFormation Resource construct.
Lists with assumed lengths
Pass assumed_length if you know the length of the list that will be
produced by splitting. The actual list length at deploy time may be
longer than the number you pass, but not shorter.
The returned list will look like:
[Fn.select(0, split), Fn.select(1, split), Fn.select(2, split), ...]
The restrictions from the section "Lists with unknown lengths" will now be lifted, at the expense of having to know and fix the length of the list.
349 350 351 352 353 354 |
# File 'fn.rb', line 349 def self.split(delimiter, source, assumed_length = nil) Jsii::Type.check_type(delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") Jsii::Type.check_type(source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") Jsii::Type.check_type(assumed_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "assumedLength") unless assumed_length.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "split", [delimiter, source, assumed_length]) end |
.sub(body, variables = nil) ⇒ String
The intrinsic function Fn::Sub substitutes variables in an input string with values that you specify.
In your templates, you can use this function to construct commands or outputs that include values that aren't available until you create or update a stack.
365 366 367 368 369 |
# File 'fn.rb', line 365 def self.sub(body, variables = nil) Jsii::Type.check_type(body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body") Jsii::Type.check_type(variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "variables") unless variables.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "sub", [body, variables]) end |
.to_json_string(object) ⇒ String
The Fn::ToJsonString intrinsic function converts an object or array to its corresponding JSON string.
375 376 377 378 |
# File 'fn.rb', line 375 def self.to_json_string(object) Jsii::Type.check_type(object, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "object") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "toJsonString", [object]) end |
.transform(macro_name, parameters) ⇒ AWSCDK::IResolvable
Creates a token representing the Fn::Transform expression.
386 387 388 389 390 |
# File 'fn.rb', line 386 def self.transform(macro_name, parameters) Jsii::Type.check_type(macro_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "macroName") Jsii::Type.check_type(parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "parameters") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "transform", [macro_name, parameters]) end |
.value_of(parameter_or_logical_id, attribute) ⇒ String
Returns an attribute value or list of values for a specific parameter and attribute.
397 398 399 400 401 |
# File 'fn.rb', line 397 def self.value_of(parameter_or_logical_id, attribute) Jsii::Type.check_type(parameter_or_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parameterOrLogicalId") Jsii::Type.check_type(attribute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attribute") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "valueOf", [parameter_or_logical_id, attribute]) end |
.value_of_all(parameter_type, attribute) ⇒ Array<String>
Returns a list of all attribute values for a given parameter type and attribute.
408 409 410 411 412 |
# File 'fn.rb', line 408 def self.value_of_all(parameter_type, attribute) Jsii::Type.check_type(parameter_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parameterType") Jsii::Type.check_type(attribute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attribute") Jsii::Kernel.instance.call_static("aws-cdk-lib.Fn", "valueOfAll", [parameter_type, attribute]) end |