All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::FC::Aliases

Last Updated:Oct 29, 2024

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

PropertyTypeRequiredEditableDescriptionConstraint
ServiceNameStringYesYesThe name of the service. None.
PrefixStringNoYesThe 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.
PropertyTypeDescriptionConstraint
AliasNamesListThe list of alias names. None.
AliasesListDetails of aliases. None.
AliasNameStringThe name of the alias. None.
DescriptionStringThe description of the alias. None.
CreatedTimeStringThe time when the alias was created. None.
LastModifiedTimeStringThe time when the alias was last modified. None.
AdditionalVersionWeightMapThe 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}.
VersionIdStringThe 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