@Generated(value="jsii-pacmak/1.12.0 (build 5ddc9f2)", date="2020-09-22T23:51:19.594Z") @Stability(value=Stable) public class Fn extends software.amazon.jsii.JsiiObject
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
| Modifier | Constructor and Description |
|---|---|
protected |
Fn(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Fn(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static String |
base64(String data)
The intrinsic function ``Fn::Base64`` returns the Base64 representation of the input string.
|
static List<String> |
cidr(String ipBlock,
Number count)
The intrinsic function ``Fn::Cidr`` returns the specified Cidr address block.
|
static List<String> |
cidr(String ipBlock,
Number count,
String sizeMask)
The intrinsic function ``Fn::Cidr`` returns the specified Cidr address block.
|
static ICfnConditionExpression |
conditionAnd(ICfnConditionExpression... conditions)
Returns true if all the specified conditions evaluate to true, or returns false if any one of the conditions evaluates to false.
|
static ICfnConditionExpression |
conditionContains(List<String> listOfStrings,
String value)
Returns true if a specified string matches at least one value in a list of strings.
|
static ICfnConditionExpression |
conditionEachMemberEquals(List<String> listOfStrings,
String value)
Returns true if a specified string matches all values in a list.
|
static ICfnConditionExpression |
conditionEachMemberIn(List<String> stringsToCheck,
List<String> stringsToMatch)
Returns true if each member in a list of strings matches at least one value in a second list of strings.
|
static ICfnConditionExpression |
conditionEquals(Object lhs,
Object rhs)
Compares if two values are equal.
|
static ICfnConditionExpression |
conditionIf(String conditionId,
Object valueIfTrue,
Object valueIfFalse)
Returns one value if the specified condition evaluates to true and another value if the specified condition evaluates to false.
|
static ICfnConditionExpression |
conditionNot(ICfnConditionExpression condition)
Returns true for a condition that evaluates to false or returns false for a condition that evaluates to true.
|
static ICfnConditionExpression |
conditionOr(ICfnConditionExpression... conditions)
Returns true if any one of the specified conditions evaluate to true, or returns false if all of the conditions evaluates to false.
|
static String |
findInMap(String mapName,
String topLevelKey,
String secondLevelKey)
The intrinsic function ``Fn::FindInMap`` returns the value corresponding to keys in a two-level map that is declared in the Mappings section.
|
static IResolvable |
getAtt(String logicalNameOfResource,
String attributeName)
The ``Fn::GetAtt`` intrinsic function returns the value of an attribute from a resource in the template.
|
static List<String> |
getAzs()
The intrinsic function ``Fn::GetAZs`` returns an array that lists Availability Zones for a specified region.
|
static List<String> |
getAzs(String region)
The intrinsic function ``Fn::GetAZs`` returns an array that lists Availability Zones for a specified region.
|
static String |
importValue(String sharedValueToImport)
The intrinsic function ``Fn::ImportValue`` returns the value of an output exported by another stack.
|
static String |
join(String delimiter,
List<String> listOfValues)
The intrinsic function ``Fn::Join`` appends a set of values into a single value, separated by the specified delimiter.
|
static String |
ref(String logicalName)
The ``Ref`` intrinsic function returns the value of the specified parameter or resource.
|
static List<String> |
refAll(String parameterType)
Returns all values for a specified parameter type.
|
static String |
select(Number index,
List<String> array)
The intrinsic function ``Fn::Select`` returns a single object from a list of objects by index.
|
static List<String> |
split(String delimiter,
String source)
To split a string into a list of string values so that you can select an element from the resulting string list, use the ``Fn::Split`` intrinsic function.
|
static String |
sub(String body)
The intrinsic function ``Fn::Sub`` substitutes variables in an input string with values that you specify.
|
static String |
sub(String body,
Map<String,String> variables)
The intrinsic function ``Fn::Sub`` substitutes variables in an input string with values that you specify.
|
static IResolvable |
transform(String macroName,
Map<String,? extends Object> parameters)
Creates a token representing the ``Fn::Transform`` expression.
|
static String |
valueOf(String parameterOrLogicalId,
String attribute)
Returns an attribute value or list of values for a specific parameter and attribute.
|
static List<String> |
valueOfAll(String parameterType,
String attribute)
Returns a list of all attribute values for a given parameter type and attribute.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSetprotected Fn(software.amazon.jsii.JsiiObjectRef objRef)
protected Fn(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static String base64(@NotNull String data)
This function is typically used to pass encoded data to Amazon EC2 instances by way of the UserData property.
data - The string value you want to convert to Base64. This parameter is required.@Stability(value=Stable) @NotNull public static List<String> cidr(@NotNull String ipBlock, @NotNull Number count, @Nullable String sizeMask)
ipBlock - The user-specified default Cidr address block. This parameter is required.count - The number of subnets' Cidr block wanted. This parameter is required.sizeMask - The digit covered in the subnet.@Stability(value=Stable) @NotNull public static List<String> cidr(@NotNull String ipBlock, @NotNull Number count)
ipBlock - The user-specified default Cidr address block. This parameter is required.count - The number of subnets' Cidr block wanted. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionAnd(@NotNull ICfnConditionExpression... conditions)
Fn::And acts as
an AND operator. The minimum number of conditions that you can include is
2, and the maximum is 10.
conditions - conditions to AND. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionContains(@NotNull List<String> listOfStrings, @NotNull String value)
listOfStrings - A list of strings, such as "A", "B", "C". This parameter is required.value - A string, such as "A", that you want to compare against a list of strings. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionEachMemberEquals(@NotNull List<String> listOfStrings, @NotNull String value)
listOfStrings - A list of strings, such as "A", "B", "C". This parameter is required.value - A string, such as "A", that you want to compare against a list of strings. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionEachMemberIn(@NotNull List<String> stringsToCheck, @NotNull List<String> stringsToMatch)
stringsToCheck - A list of strings, such as "A", "B", "C". This parameter is required.stringsToMatch - A list of strings, such as "A", "B", "C". This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionEquals(@NotNull Object lhs, @NotNull Object rhs)
Returns true if the two values are equal or false if they aren't.
lhs - A value of any type that you want to compare. This parameter is required.rhs - A value of any type that you want to compare. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionIf(@NotNull String conditionId, @NotNull Object valueIfTrue, @NotNull Object valueIfFalse)
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.
conditionId - A reference to a condition in the Conditions section. This parameter is required.valueIfTrue - A value to be returned if the specified condition evaluates to true. This parameter is required.valueIfFalse - A value to be returned if the specified condition evaluates to false. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionNot(@NotNull ICfnConditionExpression condition)
Fn::Not acts as a NOT operator.
condition - A condition such as ``Fn::Equals`` that evaluates to true or false. This parameter is required.@Stability(value=Stable) @NotNull public static ICfnConditionExpression conditionOr(@NotNull ICfnConditionExpression... conditions)
Fn::Or acts
as an OR operator. The minimum number of conditions that you can include is
2, and the maximum is 10.
conditions - conditions that evaluates to true or false. This parameter is required.@Stability(value=Stable) @NotNull public static String findInMap(@NotNull String mapName, @NotNull String topLevelKey, @NotNull String secondLevelKey)
mapName - This parameter is required.topLevelKey - This parameter is required.secondLevelKey - This parameter is required.@Stability(value=Stable) @NotNull public static IResolvable getAtt(@NotNull String logicalNameOfResource, @NotNull String attributeName)
logicalNameOfResource - The logical name (also called logical ID) of the resource that contains the attribute that you want. This parameter is required.attributeName - The name of the resource-specific attribute whose value you want. This parameter is required.@Stability(value=Stable) @NotNull public static List<String> getAzs(@Nullable String 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.
region - The name of the region for which you want to get the Availability Zones.@Stability(value=Stable) @NotNull public static List<String> getAzs()
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.
@Stability(value=Stable) @NotNull public static String importValue(@NotNull String sharedValueToImport)
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.
sharedValueToImport - The stack output value that you want to import. This parameter is required.@Stability(value=Stable) @NotNull public static String join(@NotNull String delimiter, @NotNull List<String> listOfValues)
If a delimiter is the empty string, the set of values are concatenated with no delimiter.
delimiter - The value you want to occur between fragments. This parameter is required.listOfValues - The list of values you want combined. This parameter is required.@Stability(value=Stable) @NotNull public static String ref(@NotNull String logicalName)
Note that it doesn't validate the logicalName, it mainly serves paremeter/resource reference defined in a CfnInclude template.
logicalName - The logical name of a parameter/resource for which you want to retrieve its value. This parameter is required.@Stability(value=Stable) @NotNull public static List<String> refAll(@NotNull String parameterType)
parameterType - An AWS-specific parameter type, such as AWS::EC2::SecurityGroup::Id or AWS::EC2::VPC::Id. This parameter is required.@Stability(value=Stable) @NotNull public static String select(@NotNull Number index, @NotNull List<String> array)
index - The index of the object to retrieve. This parameter is required.array - The list of objects to select from. This parameter is required.@Stability(value=Stable) @NotNull public static List<String> split(@NotNull String delimiter, @NotNull String source)
Specify the location of splits
with a delimiter, such as , (a comma). After you split a string, use the Fn::Select function
to pick a specific element.
delimiter - A string value that determines where the source string is divided. This parameter is required.source - The string value that you want to split. This parameter is required.@Stability(value=Stable) @NotNull public static String sub(@NotNull String body, @Nullable Map<String,String> variables)
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.
body - A string with variables that AWS CloudFormation substitutes with their associated values at runtime. This parameter is required.variables - The name of a variable that you included in the String parameter.@Stability(value=Stable) @NotNull public static String sub(@NotNull String body)
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.
body - A string with variables that AWS CloudFormation substitutes with their associated values at runtime. This parameter is required.@Stability(value=Stable) @NotNull public static IResolvable transform(@NotNull String macroName, @NotNull Map<String,? extends Object> parameters)
macroName - The name of the macro to perform the processing. This parameter is required.parameters - The parameters to be passed to the macro. This parameter is required.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html@Stability(value=Stable) @NotNull public static String valueOf(@NotNull String parameterOrLogicalId, @NotNull String attribute)
parameterOrLogicalId - The name of a parameter for which you want to retrieve attribute values. This parameter is required.attribute - The name of an attribute from which you want to retrieve a value. This parameter is required.@Stability(value=Stable) @NotNull public static List<String> valueOfAll(@NotNull String parameterType, @NotNull String attribute)
parameterType - An AWS-specific parameter type, such as AWS::EC2::SecurityGroup::Id or AWS::EC2::VPC::Id. This parameter is required.attribute - The name of an attribute from which you want to retrieve a value. This parameter is required.Copyright © 2020. All rights reserved.