Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::FC3::Trigger

Última atualização: Jun 27, 2026

Cria um trigger do Function Compute 3.0.

Sintaxe

{
  "Type": "ALIYUN::FC3::Trigger",
  "Properties": {
    "FunctionName": String,
    "TriggerType": String,
    "TriggerName": String,
    "TriggerConfig": Map,
    "Description": String,
    "InvocationRole": String,
    "Qualifier": String,
    "SourceArn": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

FunctionName

String

Sim

Não

Nome da função.

Nenhuma.

TriggerType

String

Sim

Não

Tipo do trigger.

Nenhuma.

TriggerName

String

Sim

Não

Nome do trigger.

De 1 a 128 caracteres. Aceita letras, dígitos, hifens (-) e sublinhados (_). Não pode começar com dígito ou hífen (-).

TriggerConfig

Map

Sim

Sim

Configuração do trigger.

Nenhuma.

Description

String

Não

Sim

Descrição do trigger.

Nenhuma.

InvocationRole

String

Não

Sim

Função do Resource Access Management (RAM) usada pela origem do evento, como o Object Storage Service (OSS), para invocar a função.

Nenhuma.

Qualifier

String

Não

Sim

Versão ou alias da função.

Nenhuma.

SourceArn

String

Não

Não

Alibaba Cloud Resource Name (ARN) da origem do evento do trigger.

Nenhuma.

Valores de retorno

Fn::GetAtt

  • FunctionName: nome da função.

  • UrlIntranet: endpoint privado.

  • TriggerName: nome do trigger.

  • TriggerId: ID do trigger.

  • UrlInternet: endpoint público.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TriggerType:
    Type: String
    Description:
      en: Type of the trigger.
    Required: true
  FunctionName:
    Type: String
    Description:
      en: The name of the function.
    Required: true
  TriggerName:
    Type: String
    Description:
      en: Name of the trigger.
    Required: true
  TriggerConfig:
    Type: Json
    Description:
      en: Trigger config.
    Required: true
Resources:
  Trigger:
    Type: ALIYUN::FC3::Trigger
    Properties:
      TriggerType:
        Ref: TriggerType
      FunctionName:
        Ref: FunctionName
      TriggerName:
        Ref: TriggerName
      TriggerConfig:
        Ref: TriggerConfig
Outputs:
  FunctionName:
    Description: Function name.
    Value:
      Fn::GetAtt:
        - Trigger
        - FunctionName
  UrlIntranet:
    Description: The private endpoint. In a VPC, you can access HTTP triggers by using HTTP or HTTPS.
    Value:
      Fn::GetAtt:
        - Trigger
        - UrlIntranet
  TriggerName:
    Description: Trigger name.
    Value:
      Fn::GetAtt:
        - Trigger
        - TriggerName
  TriggerId:
    Description: The trigger ID.
    Value:
      Fn::GetAtt:
        - Trigger
        - TriggerId
  UrlInternet:
    Description: The public domain address. You can access HTTP triggers over the Internet by using HTTP or HTTPS.
    Value:
      Fn::GetAtt:
        - Trigger
        - UrlInternet
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TriggerType": {
      "Type": "String",
      "Description": {
        "en": "Type of the trigger."
      },
      "Required": true
    },
    "FunctionName": {
      "Type": "String",
      "Description": {
        "en": "The name of the function."
      },
      "Required": true
    },
    "TriggerName": {
      "Type": "String",
      "Description": {
        "en": "Name of the trigger."
      },
      "Required": true
    },
    "TriggerConfig": {
      "Type": "Json",
      "Description": {
        "en": "Trigger config."
      },
      "Required": true
    }
  },
  "Resources": {
    "Trigger": {
      "Type": "ALIYUN::FC3::Trigger",
      "Properties": {
        "TriggerType": {
          "Ref": "TriggerType"
        },
        "FunctionName": {
          "Ref": "FunctionName"
        },
        "TriggerName": {
          "Ref": "TriggerName"
        },
        "TriggerConfig": {
          "Ref": "TriggerConfig"
        }
      }
    }
  },
  "Outputs": {
    "FunctionName": {
      "Description": "Function name.",
      "Value": {
        "Fn::GetAtt": [
          "Trigger",
          "FunctionName"
        ]
      }
    },
    "UrlIntranet": {
      "Description": "The private endpoint. In a VPC, you can access HTTP triggers by using HTTP or HTTPS.",
      "Value": {
        "Fn::GetAtt": [
          "Trigger",
          "UrlIntranet"
        ]
      }
    },
    "TriggerName": {
      "Description": "Trigger name.",
      "Value": {
        "Fn::GetAtt": [
          "Trigger",
          "TriggerName"
        ]
      }
    },
    "TriggerId": {
      "Description": "The trigger ID.",
      "Value": {
        "Fn::GetAtt": [
          "Trigger",
          "TriggerId"
        ]
      }
    },
    "UrlInternet": {
      "Description": "The public domain address. You can access HTTP triggers over the Internet by using HTTP or HTTPS.",
      "Value": {
        "Fn::GetAtt": [
          "Trigger",
          "UrlInternet"
        ]
      }
    }
  }
}