All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::FC::Triggers

Last Updated:Oct 29, 2024

DATASOURCE::FC::Triggers is used to query triggers.

Syntax

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

Properties

PropertyTypeRequiredEditableDescriptionConstraint
FunctionNameStringYesYesThe name of the function. None.
ServiceNameStringYesYesThe name of the service. None.
PrefixStringNoYesThe prefix of the resource name. The resource name must be prefixed with the value of this property.

For example, if you set the Prefix property to a, the returned resource name is prefixed with a.

Return values (Fn::GetAtt)

  • TriggerNames: the names of the triggers.
  • Triggers: the details of the triggers.
PropertyTypeDescriptionConstraint
TriggerNamesListThe names of the triggers. None.
TriggersListThe details of the triggers. None.
TriggerNameStringThe name of the trigger. None.
TriggerIdStringThe ID of the trigger. None.
TriggerConfigStringThe configurations of the trigger. None.
TriggerTypeStringThe type of the trigger. Valid values:
  • oss: Object Storage Service (OSS) event trigger.

    For more information, see Overview of OSS event triggers of OSS event triggers.

  • log: Log Service trigger.

    For more information, see Overview of Log Service triggers.

  • timer: time trigger.

    For more information, see Overview of time triggers.

  • http: HTTP trigger.

    For more information, see Overview of HTTP triggers.

  • tablestore: Tablestore trigger.

    For more information, see Overview of Tablestore triggers.

  • cdn_events: Alibaba Cloud CDN event trigger.

    For more information, see Overview of Alibaba Cloud CDN event triggers.

  • mns_topic: Message Service (MNS) topic trigger.

    For more information, see Overview of MNS topic triggers.

DescriptionStringThe description of the trigger. None.
InvocationRoleStringThe RAM role that is used by the event source such as OSS to invoke the function. For more information, see Trigger overview.
CreatedTimeStringThe time when the trigger was created. None.
LastModifiedTimeStringThe time when the trigger was last modified. None.
QualifierStringThe version of the service. For more information, see Manage versions.
SourceArnStringThe Alibaba Cloud Resource Name (ARN) of the event source for the trigger. None.
DomainNameStringThe domain name. None.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "FunctionName": {
          "Type": "String",
          "Description": "Function name."
        },
        "ServiceName": {
          "Type": "String",
          "Description": "Service name."
        }
      },
      "Resources": {
        "Triggers": {
          "Type": "DATASOURCE::FC::Triggers",
          "Properties": {
            "FunctionName": {
              "Ref": "FunctionName"
            },
            "ServiceName": {
              "Ref": "ServiceName"
            }
          }
        }
      },
      "Outputs": {
        "TriggerNames": {
          "Description": "The list of trigger names.",
          "Value": {
            "Fn::GetAtt": [
              "Triggers",
              "TriggerNames"
            ]
          }
        },
        "Triggers": {
          "Description": "The list of triggers.",
          "Value": {
            "Fn::GetAtt": [
              "Triggers",
              "Triggers"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      FunctionName:
        Type: String
        Description: Function name.
      ServiceName:
        Type: String
        Description: Service name.
    Resources:
      Triggers:
        Type: DATASOURCE::FC::Triggers
        Properties:
          FunctionName:
            Ref: FunctionName
          ServiceName:
            Ref: ServiceName
    Outputs:
      TriggerNames:
        Description: The list of trigger names.
        Value:
          Fn::GetAtt:
            - Triggers
            - TriggerNames
      Triggers:
        Description: The list of triggers.
        Value:
          Fn::GetAtt:
            - Triggers
            - Triggers