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

Syntax

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

Properties

Property Type Required Editable Description Constraint
FunctionName String Yes Yes The name of the function. None
ServiceName String Yes Yes The name of the service. None
Prefix String No Yes The 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.

Response parameters (Fn::GetAtt)

  • TriggerNames: the names of triggers.
  • Triggers: the information about triggers.
Parameter Type Description Constraint
TriggerNames List The names of triggers. None
Triggers List The information about triggers. None
TriggerName String The name of the trigger. None
TriggerId String The ID of the trigger. None
TriggerConfig String The configurations of the trigger. None
TriggerType String The type of the trigger. Valid values:
  • oss: Object Storage Service (OSS) event trigger.

    For more information, see Overview 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: CDN event trigger.

    For more information, see Overview of CDN event triggers.

  • mns_topic: Message Service (MNS) topic trigger.

    For more information, see Overview of MNS topic triggers of MNS topic triggers.

Description String The description of the trigger. None
InvocationRole String The Alibaba Cloud Resource Name (ARN) of the RAM role that is used by the event source such as OSS to invoke the function. For more information, see Overview.
CreatedTime String The time when the trigger was created. None
LastModifiedTime String The time when the trigger was last modified. None
Qualifier String The version of the service. For more information, see Manage versions.
SourceArn String The ARN of the event source for the trigger. None
DomainName String The 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"
        ]
      }
    }
  }
}