@Generated(value="jsii-pacmak/1.79.0 (build b22f628)", date="2023-04-14T14:24:19.114Z") @Stability(value=Experimental) public class FnGenerated extends software.amazon.jsii.JsiiObject
Modifier | Constructor and Description |
---|---|
|
FnGenerated() |
protected |
FnGenerated(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FnGenerated(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static Number |
abs(Number num)
(experimental)
abs returns the absolute value of the given number. |
static String |
abspath(String path)
(experimental)
abspath takes a string containing a filesystem path and converts it to an absolute path. |
static IResolvable |
alltrue(List<? extends Object> list)
(experimental)
alltrue returns `true` if all elements in a given collection are `true` or `"true"`. |
static IResolvable |
anytrue(List<? extends Object> list)
(experimental)
anytrue returns `true` if any element in a given collection is `true` or `"true"`. |
static String |
base64decode(String str)
(experimental)
base64decode takes a string containing a Base64 character sequence and returns the original string. |
static String |
base64encode(String str)
(experimental)
base64encode applies Base64 encoding to a string. |
static String |
base64gzip(String str)
(experimental)
base64gzip compresses a string with gzip and then encodes the result in Base64 encoding. |
static String |
base64sha256(String str)
(experimental)
base64sha256 computes the SHA256 hash of a given string and encodes it with Base64. |
static String |
base64sha512(String str)
(experimental)
base64sha512 computes the SHA512 hash of a given string and encodes it with Base64. |
static String |
basename(String path)
(experimental)
basename takes a string containing a filesystem path and removes all except the last portion from it. |
static IResolvable |
can(Object expression)
(experimental)
can evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
static Number |
ceil(Number num)
(experimental)
ceil returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
static String |
chomp(String str)
(experimental)
chomp removes newline characters at the end of a string. |
static List<String> |
chunklist(List<? extends Object> list,
Number size)
(experimental)
chunklist splits a single list into fixed-size chunks, returning a list of lists. |
static String |
cidrhost(String prefix,
Number hostnum)
(experimental)
cidrhost calculates a full host IP address for a given host number within a given IP network address prefix. |
static String |
cidrnetmask(String prefix)
(experimental)
cidrnetmask converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
static String |
cidrsubnet(String prefix,
Number newbits,
Number netnum)
(experimental)
cidrsubnet calculates a subnet address within given IP network address prefix. |
static List<String> |
cidrsubnets(String prefix,
List<? extends Number> newbits)
(experimental)
cidrsubnets calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
static Object |
coalesce(List<? extends Object> vals)
(experimental)
coalesce takes any number of arguments and returns the first one that isn't null or an empty string. |
static Object |
coalescelist(List<? extends Object> vals)
(experimental)
coalescelist takes any number of list arguments and returns the first one that isn't empty. |
static List<String> |
compact(List<String> list)
(experimental)
compact takes a list of strings and returns a new list with any empty string elements removed. |
static Object |
concat(List<? extends Object> seqs)
(experimental)
concat takes two or more lists and combines them into a single list. |
static Object |
contains(Object list,
Object value)
(experimental)
contains determines whether a given list or set contains a given single value as one of its elements. |
static Object |
csvdecode(String str)
(experimental)
csvdecode decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
static String |
dirname(String path)
(experimental)
dirname takes a string containing a filesystem path and removes the last portion from it. |
static List<String> |
distinct(List<? extends Object> list)
(experimental)
distinct takes a list and returns a new list with any duplicate elements removed. |
static Object |
doTry(List<? extends Object> expressions)
(experimental)
try evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
static Object |
element(Object list,
Number index)
(experimental)
element retrieves a single element from a list. |
static IResolvable |
endswith(String str,
String suffix)
(experimental)
endswith takes two values: a string to check and a suffix string. |
static String |
file(String path)
(experimental)
file reads the contents of a file at the given path and returns them as a string. |
static String |
filebase64(String path)
(experimental)
filebase64 reads the contents of a file at the given path and returns them as a base64-encoded string. |
static String |
filebase64sha256(String path)
(experimental)
filebase64sha256 is a variant of `base64sha256` that hashes the contents of a given file rather than a literal string. |
static String |
filebase64sha512(String path)
(experimental)
filebase64sha512 is a variant of `base64sha512` that hashes the contents of a given file rather than a literal string. |
static IResolvable |
fileexists(String path)
(experimental)
fileexists determines whether a file exists at a given path. |
static String |
filemd5(String path)
(experimental)
filemd5 is a variant of `md5` that hashes the contents of a given file rather than a literal string. |
static List<String> |
fileset(String path,
String pattern)
(experimental)
fileset enumerates a set of regular file names given a path and pattern. |
static String |
filesha1(String path)
(experimental)
filesha1 is a variant of `sha1` that hashes the contents of a given file rather than a literal string. |
static String |
filesha256(String path)
(experimental)
filesha256 is a variant of `sha256` that hashes the contents of a given file rather than a literal string. |
static String |
filesha512(String path)
(experimental)
filesha512 is a variant of `sha512` that hashes the contents of a given file rather than a literal string. |
static Object |
flatten(Object list)
(experimental)
flatten takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
static Number |
floor(Number num)
(experimental)
floor returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
static Object |
format(String format,
List<? extends Object> args)
(experimental) The
format function produces a string by formatting a number of other values according to a specification string. |
static String |
formatdate(String format,
String time)
(experimental)
formatdate converts a timestamp into a different time format. |
static Object |
formatlist(String format,
List<? extends Object> args)
(experimental)
formatlist produces a list of strings by formatting a number of other values according to a specification string. |
static String |
indent(Number spaces,
String str)
(experimental)
indent adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
static Object |
index(Object list,
Object value)
(experimental)
index finds the element index for a given value in a list. |
static Object |
jsondecode(String str)
(experimental)
jsondecode interprets a given string as JSON, returning a representation of the result of decoding that string. |
static String |
jsonencode(Object val)
(experimental)
jsonencode encodes a given value to a string using JSON syntax. |
static Object |
keys(Object inputMap)
(experimental)
keys takes a map and returns a list containing the keys from that map. |
static Number |
lengthOf(Object value)
(experimental)
length determines the length of a given list, map, or string. |
static Number |
log(Number num,
Number base)
(experimental)
log returns the logarithm of a given number in a given base. |
static String |
lower(String str)
(experimental)
lower converts all cased letters in the given string to lowercase. |
static List<String> |
matchkeys(List<? extends Object> values,
List<? extends Object> keys,
List<? extends Object> searchset)
(experimental)
matchkeys constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
static Number |
max(List<? extends Number> numbers)
(experimental)
max takes one or more numbers and returns the greatest number from the set. |
static String |
md5(String str)
(experimental)
md5 computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
static Object |
merge(List<? extends Object> maps)
(experimental)
merge takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
static Number |
min(List<? extends Number> numbers)
(experimental)
min takes one or more numbers and returns the smallest number from the set. |
static Object |
nonsensitive(Object value)
(experimental)
nonsensitive takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
static Object |
one(Object list)
(experimental)
one takes a list, set, or tuple value with either zero or one elements. |
static Object |
parseint(Object number,
Number base)
(experimental)
parseint parses the given string as a representation of an integer in the specified base and returns the resulting number. |
static String |
pathexpand(String path)
(experimental)
pathexpand takes a filesystem path that might begin with a `~` segment, and if so it replaces that segment with the current user's home directory path. |
static Number |
pow(Number num,
Number power)
(experimental)
pow calculates an exponent, by raising its first argument to the power of the second argument. |
static Object |
regex(String pattern,
String str)
(experimental)
regex applies a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) to a string and returns the matching substrings. |
static List<String> |
regexall(String pattern,
String str)
(experimental)
regexall applies a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) to a string and returns a list of all matches. |
static String |
replace(String str,
String substr,
String replace)
(experimental)
replace searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
static Object |
reverse(Object list)
(experimental)
reverse takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
static String |
rsadecrypt(String ciphertext,
String privatekey)
(experimental)
rsadecrypt decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
static Object |
sensitive(Object value)
(experimental)
sensitive takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for [sensitive input variables](/language/values/variables#suppressing-values-in-cli-output). |
static List<String> |
setintersection(List<? extends Object> first_set,
List<? extends List<? extends Object>> other_sets)
(experimental) The
setintersection function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. |
static Object |
setproduct(List<? extends Object> sets)
(experimental) The
setproduct function finds all of the possible combinations of elements from all of the given sets by computing the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product). |
static List<String> |
setsubtract(List<? extends Object> a,
List<? extends Object> b)
(experimental) The
setsubtract function returns a new set containing the elements from the first set that are not present in the second set. |
static List<String> |
setunion(List<? extends Object> first_set,
List<? extends List<? extends Object>> other_sets)
(experimental) The
setunion function takes multiple sets and produces a single set containing the elements from all of the given sets. |
static String |
sha1(String str)
(experimental)
sha1 computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
static String |
sha256(String str)
(experimental)
sha256 computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
static String |
sha512(String str)
(experimental)
sha512 computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
static Number |
signum(Number num)
(experimental)
signum determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
static Object |
slice(Object list,
Number start_index,
Number end_index)
(experimental)
slice extracts some consecutive elements from within a list. |
static List<String> |
sort(List<String> list)
(experimental)
sort takes a list of strings and returns a new list with those strings sorted lexicographically. |
static List<String> |
split(String separator,
String str)
(experimental)
split produces a list by dividing a given string at all occurrences of a given separator. |
static IResolvable |
startswith(String str,
String prefix)
(experimental)
startswith takes two values: a string to check and a prefix string. |
static String |
strrev(String str)
(experimental)
strrev reverses the characters in a string. |
static String |
substr(String str,
Number offset,
Number length)
(experimental)
substr extracts a substring from a given string by offset and (maximum) length. |
static Object |
sum(Object list)
(experimental)
sum takes a list or set of numbers and returns the sum of those numbers. |
static Object |
templatefile(String path,
Object vars)
(experimental)
templatefile reads the file at the given path and renders its content as a template using a supplied set of template variables. |
static String |
textdecodebase64(String source,
String encoding)
(experimental)
textdecodebase64 function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
static String |
textencodebase64(String str,
String encoding)
(experimental)
textencodebase64 encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
static String |
timeadd(String timestamp,
String duration)
(experimental)
timeadd adds a duration to a timestamp, returning a new timestamp. |
static Number |
timecmp(String timestamp_a,
String timestamp_b)
(experimental)
timecmp compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
static String |
timestamp()
(experimental)
timestamp returns a UTC timestamp string in [RFC 3339](https://tools.ietf.org/html/rfc3339) format. |
static String |
title(String str)
(experimental)
title converts the first letter of each word in the given string to uppercase. |
static IResolvable |
tobool(Object v)
(experimental)
tobool converts its argument to a boolean value. |
static List<String> |
tolist(Object v)
(experimental)
tolist converts its argument to a list value. |
static Object |
tomap(Object v)
(experimental)
tomap converts its argument to a map value. |
static Number |
tonumber(Object v)
(experimental)
tonumber converts its argument to a number value. |
static List<String> |
toset(Object v)
(experimental)
toset converts its argument to a set value. |
static String |
tostring(Object v)
(experimental)
tostring converts its argument to a string value. |
static Object |
transpose(Object values)
(experimental)
transpose takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
static String |
trim(String str,
String cutset)
(experimental)
trim removes the specified set of characters from the start and end of the given string. |
static String |
trimprefix(String str,
String prefix)
(experimental)
trimprefix removes the specified prefix from the start of the given string. |
static String |
trimspace(String str)
(experimental)
trimspace removes any space characters from the start and end of the given string. |
static String |
trimsuffix(String str,
String suffix)
(experimental)
trimsuffix removes the specified suffix from the end of the given string. |
static String |
upper(String str)
(experimental)
upper converts all cased letters in the given string to uppercase. |
static String |
urlencode(String str)
(experimental)
urlencode applies URL encoding to a given string. |
static String |
uuid()
(experimental)
uuid generates a unique identifier string. |
static String |
uuidv5(String namespace,
String name)
(experimental)
uuidv5 generates a _name-based_ UUID, as described in [RFC 4122 section 4.3](https://tools.ietf.org/html/rfc4122#section-4.3), also known as a "version 5" UUID. |
static Object |
values(Object mapping)
(experimental)
values takes a map and returns a list containing the values of the elements in that map. |
static Object |
yamldecode(String src)
(experimental)
yamldecode parses a string as a subset of YAML, and produces a representation of its value. |
static String |
yamlencode(Object value)
(experimental)
yamlencode encodes a given value to a string using [YAML 1.2](https://yaml.org/spec/1.2/spec.html) block syntax. |
static Object |
zipmap(List<String> keys,
Object values)
(experimental)
zipmap constructs a map from a list of keys and a corresponding list of values. |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
protected FnGenerated(software.amazon.jsii.JsiiObjectRef objRef)
protected FnGenerated(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) public FnGenerated()
@Stability(value=Experimental) @NotNull public static Number abs(@NotNull Number num)
abs
returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it.
num
- This parameter is required.@Stability(value=Experimental) @NotNull public static String abspath(@NotNull String path)
abspath
takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable alltrue(@NotNull List<? extends Object> list)
alltrue
returns `true` if all elements in a given collection are `true` or `"true"`. It also returns `true` if the collection is empty.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable anytrue(@NotNull List<? extends Object> list)
anytrue
returns `true` if any element in a given collection is `true` or `"true"`. It also returns `false` if the collection is empty.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static String base64decode(@NotNull String str)
base64decode
takes a string containing a Base64 character sequence and returns the original string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String base64encode(@NotNull String str)
base64encode
applies Base64 encoding to a string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String base64gzip(@NotNull String str)
base64gzip
compresses a string with gzip and then encodes the result in Base64 encoding.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String base64sha256(@NotNull String str)
base64sha256
computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to `base64encode(sha256("test"))` since `sha256()` returns hexadecimal representation.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String base64sha512(@NotNull String str)
base64sha512
computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to `base64encode(sha512("test"))` since `sha512()` returns hexadecimal representation.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String basename(@NotNull String path)
basename
takes a string containing a filesystem path and removes all except the last portion from it.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable can(@NotNull Object expression)
can
evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expression
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number ceil(@NotNull Number num)
ceil
returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
num
- This parameter is required.@Stability(value=Experimental) @NotNull public static String chomp(@NotNull String str)
chomp
removes newline characters at the end of a string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> chunklist(@NotNull List<? extends Object> list, @NotNull Number size)
chunklist
splits a single list into fixed-size chunks, returning a list of lists.
list
- This parameter is required.size
- This parameter is required.@Stability(value=Experimental) @NotNull public static String cidrhost(@NotNull String prefix, @NotNull Number hostnum)
cidrhost
calculates a full host IP address for a given host number within a given IP network address prefix.
prefix
- This parameter is required.hostnum
- This parameter is required.@Stability(value=Experimental) @NotNull public static String cidrnetmask(@NotNull String prefix)
cidrnetmask
converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefix
- This parameter is required.@Stability(value=Experimental) @NotNull public static String cidrsubnet(@NotNull String prefix, @NotNull Number newbits, @NotNull Number netnum)
cidrsubnet
calculates a subnet address within given IP network address prefix.
prefix
- This parameter is required.newbits
- This parameter is required.netnum
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> cidrsubnets(@NotNull String prefix, @NotNull List<? extends Number> newbits)
cidrsubnets
calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefix
- This parameter is required.newbits
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object coalesce(@NotNull List<? extends Object> vals)
coalesce
takes any number of arguments and returns the first one that isn't null or an empty string.
vals
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object coalescelist(@NotNull List<? extends Object> vals)
coalescelist
takes any number of list arguments and returns the first one that isn't empty.
vals
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> compact(@NotNull List<String> list)
compact
takes a list of strings and returns a new list with any empty string elements removed.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object concat(@NotNull List<? extends Object> seqs)
concat
takes two or more lists and combines them into a single list.
seqs
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object contains(@NotNull Object list, @NotNull Object value)
contains
determines whether a given list or set contains a given single value as one of its elements.
list
- This parameter is required.value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object csvdecode(@NotNull String str)
csvdecode
decodes a string containing CSV-formatted data and produces a list of maps representing that data.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String dirname(@NotNull String path)
dirname
takes a string containing a filesystem path and removes the last portion from it.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> distinct(@NotNull List<? extends Object> list)
distinct
takes a list and returns a new list with any duplicate elements removed.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object element(@NotNull Object list, @NotNull Number index)
element
retrieves a single element from a list.
list
- This parameter is required.index
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable endswith(@NotNull String str, @NotNull String suffix)
endswith
takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.
str
- This parameter is required.suffix
- This parameter is required.@Stability(value=Experimental) @NotNull public static String file(@NotNull String path)
file
reads the contents of a file at the given path and returns them as a string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filebase64(@NotNull String path)
filebase64
reads the contents of a file at the given path and returns them as a base64-encoded string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filebase64sha256(@NotNull String path)
filebase64sha256
is a variant of `base64sha256` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filebase64sha512(@NotNull String path)
filebase64sha512
is a variant of `base64sha512` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable fileexists(@NotNull String path)
fileexists
determines whether a file exists at a given path.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filemd5(@NotNull String path)
filemd5
is a variant of `md5` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> fileset(@NotNull String path, @NotNull String pattern)
fileset
enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (`/`) as the path separator for cross-system compatibility.
path
- This parameter is required.pattern
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filesha1(@NotNull String path)
filesha1
is a variant of `sha1` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filesha256(@NotNull String path)
filesha256
is a variant of `sha256` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static String filesha512(@NotNull String path)
filesha512
is a variant of `sha512` that hashes the contents of a given file rather than a literal string.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object flatten(@NotNull Object list)
flatten
takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number floor(@NotNull Number num)
floor
returns the closest whole number that is less than or equal to the given value, which may be a fraction.
num
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object format(@NotNull String format, @NotNull List<? extends Object> args)
format
function produces a string by formatting a number of other values according to a specification string. It is similar to the `printf` function in C, and other similar functions in other programming languages.
format
- This parameter is required.args
- This parameter is required.@Stability(value=Experimental) @NotNull public static String formatdate(@NotNull String format, @NotNull String time)
formatdate
converts a timestamp into a different time format.
format
- This parameter is required.time
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object formatlist(@NotNull String format, @NotNull List<? extends Object> args)
formatlist
produces a list of strings by formatting a number of other values according to a specification string.
format
- This parameter is required.args
- This parameter is required.@Stability(value=Experimental) @NotNull public static String indent(@NotNull Number spaces, @NotNull String str)
indent
adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
spaces
- This parameter is required.str
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object index(@NotNull Object list, @NotNull Object value)
index
finds the element index for a given value in a list.
list
- This parameter is required.value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object jsondecode(@NotNull String str)
jsondecode
interprets a given string as JSON, returning a representation of the result of decoding that string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String jsonencode(@NotNull Object val)
jsonencode
encodes a given value to a string using JSON syntax.
val
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object keys(@NotNull Object inputMap)
keys
takes a map and returns a list containing the keys from that map.
inputMap
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number lengthOf(@NotNull Object value)
length
determines the length of a given list, map, or string.
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number log(@NotNull Number num, @NotNull Number base)
log
returns the logarithm of a given number in a given base.
num
- This parameter is required.base
- This parameter is required.@Stability(value=Experimental) @NotNull public static String lower(@NotNull String str)
lower
converts all cased letters in the given string to lowercase.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> matchkeys(@NotNull List<? extends Object> values, @NotNull List<? extends Object> keys, @NotNull List<? extends Object> searchset)
matchkeys
constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
values
- This parameter is required.keys
- This parameter is required.searchset
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number max(@NotNull List<? extends Number> numbers)
max
takes one or more numbers and returns the greatest number from the set.
numbers
- This parameter is required.@Stability(value=Experimental) @NotNull public static String md5(@NotNull String str)
md5
computes the MD5 hash of a given string and encodes it with hexadecimal digits.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object merge(@NotNull List<? extends Object> maps)
merge
takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
maps
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number min(@NotNull List<? extends Number> numbers)
min
takes one or more numbers and returns the smallest number from the set.
numbers
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object nonsensitive(@NotNull Object value)
nonsensitive
takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object one(@NotNull Object list)
one
takes a list, set, or tuple value with either zero or one elements. If the collection is empty, `one` returns `null`. Otherwise, `one` returns the first element. If there are two or more elements then `one` will return an error.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object parseint(@NotNull Object number, @NotNull Number base)
parseint
parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
number
- This parameter is required.base
- This parameter is required.@Stability(value=Experimental) @NotNull public static String pathexpand(@NotNull String path)
pathexpand
takes a filesystem path that might begin with a `~` segment, and if so it replaces that segment with the current user's home directory path.
path
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number pow(@NotNull Number num, @NotNull Number power)
pow
calculates an exponent, by raising its first argument to the power of the second argument.
num
- This parameter is required.power
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object regex(@NotNull String pattern, @NotNull String str)
regex
applies a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) to a string and returns the matching substrings.
pattern
- This parameter is required.str
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> regexall(@NotNull String pattern, @NotNull String str)
regexall
applies a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) to a string and returns a list of all matches.
pattern
- This parameter is required.str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String replace(@NotNull String str, @NotNull String substr, @NotNull String replace)
replace
searches a given string for another given substring, and replaces each occurrence with a given replacement string.
str
- This parameter is required.substr
- This parameter is required.replace
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object reverse(@NotNull Object list)
reverse
takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static String rsadecrypt(@NotNull String ciphertext, @NotNull String privatekey)
rsadecrypt
decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
- This parameter is required.privatekey
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object sensitive(@NotNull Object value)
sensitive
takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for [sensitive input variables](/language/values/variables#suppressing-values-in-cli-output).
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> setintersection(@NotNull List<? extends Object> first_set, @NotNull List<? extends List<? extends Object>> other_sets)
setintersection
function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the [intersection](https://en.wikipedia.org/wiki/Intersection_\(set_theory\)) of the sets.
first_set
- This parameter is required.other_sets
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object setproduct(@NotNull List<? extends Object> sets)
setproduct
function finds all of the possible combinations of elements from all of the given sets by computing the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product).
sets
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> setsubtract(@NotNull List<? extends Object> a, @NotNull List<? extends Object> b)
setsubtract
function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the [relative complement](https://en.wikipedia.org/wiki/Complement_\(set_theory\)#Relative_complement) of the second set.
a
- This parameter is required.b
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> setunion(@NotNull List<? extends Object> first_set, @NotNull List<? extends List<? extends Object>> other_sets)
setunion
function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the [union](https://en.wikipedia.org/wiki/Union_\(set_theory\)) of the sets.
first_set
- This parameter is required.other_sets
- This parameter is required.@Stability(value=Experimental) @NotNull public static String sha1(@NotNull String str)
sha1
computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String sha256(@NotNull String str)
sha256
computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String sha512(@NotNull String str)
sha512
computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number signum(@NotNull Number num)
signum
determines the sign of a number, returning a number between -1 and 1 to represent the sign.
num
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object slice(@NotNull Object list, @NotNull Number start_index, @NotNull Number end_index)
slice
extracts some consecutive elements from within a list.
list
- This parameter is required.start_index
- This parameter is required.end_index
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> sort(@NotNull List<String> list)
sort
takes a list of strings and returns a new list with those strings sorted lexicographically.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> split(@NotNull String separator, @NotNull String str)
split
produces a list by dividing a given string at all occurrences of a given separator.
separator
- This parameter is required.str
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable startswith(@NotNull String str, @NotNull String prefix)
startswith
takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.
str
- This parameter is required.prefix
- This parameter is required.@Stability(value=Experimental) @NotNull public static String strrev(@NotNull String str)
strrev
reverses the characters in a string. Note that the characters are treated as _Unicode characters_ (in technical terms, Unicode [grapheme cluster boundaries](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) are respected).
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String substr(@NotNull String str, @NotNull Number offset, @NotNull Number length)
substr
extracts a substring from a given string by offset and (maximum) length.
str
- This parameter is required.offset
- This parameter is required.length
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object sum(@NotNull Object list)
sum
takes a list or set of numbers and returns the sum of those numbers.
list
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object templatefile(@NotNull String path, @NotNull Object vars)
templatefile
reads the file at the given path and renders its content as a template using a supplied set of template variables.
path
- This parameter is required.vars
- This parameter is required.@Stability(value=Experimental) @NotNull public static String textdecodebase64(@NotNull String source, @NotNull String encoding)
textdecodebase64
function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
source
- This parameter is required.encoding
- This parameter is required.@Stability(value=Experimental) @NotNull public static String textencodebase64(@NotNull String str, @NotNull String encoding)
textencodebase64
encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
str
- This parameter is required.encoding
- This parameter is required.@Stability(value=Experimental) @NotNull public static String timeadd(@NotNull String timestamp, @NotNull String duration)
timeadd
adds a duration to a timestamp, returning a new timestamp.
timestamp
- This parameter is required.duration
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number timecmp(@NotNull String timestamp_a, @NotNull String timestamp_b)
timecmp
compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent.
timestamp_a
- This parameter is required.timestamp_b
- This parameter is required.@Stability(value=Experimental) @NotNull public static String timestamp()
timestamp
returns a UTC timestamp string in [RFC 3339](https://tools.ietf.org/html/rfc3339) format.@Stability(value=Experimental) @NotNull public static String title(@NotNull String str)
title
converts the first letter of each word in the given string to uppercase.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable tobool(@NotNull Object v)
tobool
converts its argument to a boolean value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> tolist(@NotNull Object v)
tolist
converts its argument to a list value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object tomap(@NotNull Object v)
tomap
converts its argument to a map value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number tonumber(@NotNull Object v)
tonumber
converts its argument to a number value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> toset(@NotNull Object v)
toset
converts its argument to a set value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static String tostring(@NotNull Object v)
tostring
converts its argument to a string value.
v
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object transpose(@NotNull Object values)
transpose
takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
values
- This parameter is required.@Stability(value=Experimental) @NotNull public static String trim(@NotNull String str, @NotNull String cutset)
trim
removes the specified set of characters from the start and end of the given string.
str
- This parameter is required.cutset
- This parameter is required.@Stability(value=Experimental) @NotNull public static String trimprefix(@NotNull String str, @NotNull String prefix)
trimprefix
removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
str
- This parameter is required.prefix
- This parameter is required.@Stability(value=Experimental) @NotNull public static String trimspace(@NotNull String str)
trimspace
removes any space characters from the start and end of the given string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String trimsuffix(@NotNull String str, @NotNull String suffix)
trimsuffix
removes the specified suffix from the end of the given string.
str
- This parameter is required.suffix
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object doTry(@NotNull List<? extends Object> expressions)
try
evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressions
- This parameter is required.@Stability(value=Experimental) @NotNull public static String upper(@NotNull String str)
upper
converts all cased letters in the given string to uppercase.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String urlencode(@NotNull String str)
urlencode
applies URL encoding to a given string.
str
- This parameter is required.@Stability(value=Experimental) @NotNull public static String uuid()
uuid
generates a unique identifier string.@Stability(value=Experimental) @NotNull public static String uuidv5(@NotNull String namespace, @NotNull String name)
uuidv5
generates a _name-based_ UUID, as described in [RFC 4122 section 4.3](https://tools.ietf.org/html/rfc4122#section-4.3), also known as a "version 5" UUID.
namespace
- This parameter is required.name
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object values(@NotNull Object mapping)
values
takes a map and returns a list containing the values of the elements in that map.
mapping
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object yamldecode(@NotNull String src)
yamldecode
parses a string as a subset of YAML, and produces a representation of its value.
src
- This parameter is required.@Stability(value=Experimental) @NotNull public static String yamlencode(@NotNull Object value)
yamlencode
encodes a given value to a string using [YAML 1.2](https://yaml.org/spec/1.2/spec.html) block syntax.
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Object zipmap(@NotNull List<String> keys, @NotNull Object values)
zipmap
constructs a map from a list of keys and a corresponding list of values.
keys
- This parameter is required.values
- This parameter is required.Copyright © 2023. All rights reserved.