Provides string transformation utility functions.
Place the transform where you would like the output to be placed and provide the input string as the value for the InputString Parameter. The example below shows converting an input parameter to upper case and setting it as the value for a tag on an s3 bucket.
Parameters:
InputString:
Default: "This is a test input string"
Type: String
Resources:
S3Bucket:
Type: "AWS::S3::Bucket"
Properties:
Tags:
- Key: Upper
Value:
'Fn::Transform':
- Name: 'String'
Parameters:
InputString: !Ref InputString
Operation: Upper
Return a copy of the string with all the cased characters converted to uppercase.
Return a copy of the string with all the cased characters [4] converted to lowercase.
Return a copy of the string with its first character capitalized and the rest lowercased.
Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.
Return a copy of the string with uppercase characters converted to lowercase and vice versa.
Return a copy of the string with the leading and trailing characters removed. The Chars
parameter is a string
specifying the set of characters to be removed. If omitted default is to remove whitespace. The Chars argument is not a
prefix or suffix; rather, all combinations of its values are stripped.
Chars: [optional] characters to strip from beginning and end of string
Return a copy of the string with all occurrences of substring Old
replaced by New
.
Old: [required] sub-string to search for
New: [required] string to replace Old with
Return a copy of the string with a maximum length as specified by the Length
parameter. Default is to strip
characters from the end of the string.
Length: [required] maximum length of string
StripFrom: [optional] specifying Left
will strip characters from the beginning of the string, Right
from the end
(default)
Jay McConnell
Partner Solutions Architect
Amazon Web Services