DATASOURCE::FC::Aliases is used to query the aliases of a Function Compute service.

Syntax

{
  "Type": "DATASOURCE::FC::Aliases",
  "Properties": {
    "ServiceName": String,
    "Prefix": String
  }
}

Properties

Property Type Required Editable Description Constraint
ServiceName String Yes Yes The name of the service. None.
Prefix String No Yes The prefix of the aliases that you want to query. The aliases must be prefixed with the value of this property.

For example, if you set the Prefix property to a, the aliases that are prefixed with a are returned.

Return values (Fn::GetAtt)

  • AliasNames: the list of alias names.
  • Aliases: details of aliases.
Property Type Description Constraint
AliasNames List The list of alias names. None.
Aliases List Details of aliases. None.
AliasName String The name of the alias. None.
Description String The description of the alias. None.
CreatedTime String The time when the alias was created. None.
LastModifiedTime String The time when the alias was last modified. None.
AdditionalVersionWeight Map The canary release version to which the alias points and the weight of the canary release version.

The value consists of the canary release version and the weight of the canary release version. The canary release version takes effect only when the function is invoked.

For example, 2:0.05 indicates that when a function is invoked, Version 2 is the canary release version, 5% of the traffic is distributed to the canary release version, and 95% of the traffic is distributed to the major version.

Example: {"Float":1}.
VersionId String The version to which the alias points. None.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ServiceName": {
          "Type": "String",
          "Description": "Service name."
        }
      },
      "Resources": {
        "Aliases": {
          "Type": "DATASOURCE::FC::Aliases",
          "Properties": {
            "ServiceName": {
              "Ref": "ServiceName"
            }
          }
        }
      },
      "Outputs": {
        "AliasNames": {
          "Description": "The list of alias names.",
          "Value": {
            "Fn::GetAtt": [
              "Aliases",
              "AliasNames"
            ]
          }
        },
        "Aliases": {
          "Description": "The list of aliases.",
          "Value": {
            "Fn::GetAtt": [
              "Aliases",
              "Aliases"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ServiceName:
        Type: String
        Description: Service name.
    Resources:
      Aliases:
        Type: DATASOURCE::FC::Aliases
        Properties:
          ServiceName:
            Ref: ServiceName
    Outputs:
      AliasNames:
        Description: The list of alias names.
        Value:
          Fn::GetAtt:
            - Aliases
            - AliasNames
      Aliases:
        Description: The list of aliases.
        Value:
          Fn::GetAtt:
            - Aliases
            - Aliases