All Products
Search
Document Center

Resource Orchestration Service:Fn::Base64Encode

Last Updated:Mar 15, 2024

The built-in function Fn::Base64Encode returns the Base64-encoded format of a string.

Declaration

  • JSON

    {"Fn::Base64Encode": "stringToEncode"}
  • YAML

    • Syntax for the full function name:

      Fn::Base64Encode: stringToEncode
    • Syntax for the short form:

      !Base64Encode stringToEncode

Parameters

stringToEncode: the string that you want to encode in Base64.

Return value

The Base64-encoded format of the string.

Examples

!Base64Encode ALIYUN ROS
{ "Fn::Base64Encode" : "ALIYUN ROS" }

In this example, QUxJWVVOIFJPUw== is returned.