1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. fc
  5. V3Trigger
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.fc.V3Trigger

Explore with Pulumi AI

Provides a FCV3 Trigger resource.

A trigger is a way of triggering the execution of a function. In the event-driven computing model, the event source is the producer of the event, the function is the handler of the event, and the trigger provides a centralized and unified way to manage different event sources. In the event source, when the event occurs, if the rules defined by the trigger are met,.

For information about FCV3 Trigger and how to use it, see What is Trigger.

NOTE: Available since v1.228.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const functionName = config.get("functionName") || "TerraformTriggerResourceAPI";
const triggerName = config.get("triggerName") || "TerraformTrigger_CDN";
const _function = new alicloud.fc.V3Function("function", {
    memorySize: 512,
    cpu: 0.5,
    handler: "index.Handler",
    code: {
        zipFile: "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
    },
    functionName: name,
    runtime: "python3.9",
    diskSize: 512,
    logConfig: {
        logBeginRule: "None",
    },
});
const current = alicloud.getAccount({});
const _default = new alicloud.fc.V3Trigger("default", {
    triggerType: "cdn_events",
    triggerName: name,
    description: "create",
    qualifier: "LATEST",
    triggerConfig: JSON.stringify({
        eventName: "CachedObjectsPushed",
        eventVersion: "1.0.0",
        notes: "example",
        filter: {
            domain: ["example.com"],
        },
    }),
    sourceArn: current.then(current => `acs:cdn:*:${current.id}`),
    invocationRole: current.then(current => `acs:ram::${current.id}:role/aliyuncdneventnotificationrole`),
    functionName: _function.functionName,
});
Copy
import pulumi
import json
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
function_name = config.get("functionName")
if function_name is None:
    function_name = "TerraformTriggerResourceAPI"
trigger_name = config.get("triggerName")
if trigger_name is None:
    trigger_name = "TerraformTrigger_CDN"
function = alicloud.fc.V3Function("function",
    memory_size=512,
    cpu=0.5,
    handler="index.Handler",
    code={
        "zip_file": "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
    },
    function_name=name,
    runtime="python3.9",
    disk_size=512,
    log_config={
        "log_begin_rule": "None",
    })
current = alicloud.get_account()
default = alicloud.fc.V3Trigger("default",
    trigger_type="cdn_events",
    trigger_name=name,
    description="create",
    qualifier="LATEST",
    trigger_config=json.dumps({
        "eventName": "CachedObjectsPushed",
        "eventVersion": "1.0.0",
        "notes": "example",
        "filter": {
            "domain": ["example.com"],
        },
    }),
    source_arn=f"acs:cdn:*:{current.id}",
    invocation_role=f"acs:ram::{current.id}:role/aliyuncdneventnotificationrole",
    function_name=function.function_name)
Copy
package main

import (
	"encoding/json"
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		functionName := "TerraformTriggerResourceAPI"
		if param := cfg.Get("functionName"); param != "" {
			functionName = param
		}
		triggerName := "TerraformTrigger_CDN"
		if param := cfg.Get("triggerName"); param != "" {
			triggerName = param
		}
		function, err := fc.NewV3Function(ctx, "function", &fc.V3FunctionArgs{
			MemorySize: pulumi.Int(512),
			Cpu:        pulumi.Float64(0.5),
			Handler:    pulumi.String("index.Handler"),
			Code: &fc.V3FunctionCodeArgs{
				ZipFile: pulumi.String("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA="),
			},
			FunctionName: pulumi.String(name),
			Runtime:      pulumi.String("python3.9"),
			DiskSize:     pulumi.Int(512),
			LogConfig: &fc.V3FunctionLogConfigArgs{
				LogBeginRule: pulumi.String("None"),
			},
		})
		if err != nil {
			return err
		}
		current, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"eventName":    "CachedObjectsPushed",
			"eventVersion": "1.0.0",
			"notes":        "example",
			"filter": map[string]interface{}{
				"domain": []string{
					"example.com",
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = fc.NewV3Trigger(ctx, "default", &fc.V3TriggerArgs{
			TriggerType:    pulumi.String("cdn_events"),
			TriggerName:    pulumi.String(name),
			Description:    pulumi.String("create"),
			Qualifier:      pulumi.String("LATEST"),
			TriggerConfig:  pulumi.String(json0),
			SourceArn:      pulumi.Sprintf("acs:cdn:*:%v", current.Id),
			InvocationRole: pulumi.Sprintf("acs:ram::%v:role/aliyuncdneventnotificationrole", current.Id),
			FunctionName:   function.FunctionName,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var functionName = config.Get("functionName") ?? "TerraformTriggerResourceAPI";
    var triggerName = config.Get("triggerName") ?? "TerraformTrigger_CDN";
    var function = new AliCloud.FC.V3Function("function", new()
    {
        MemorySize = 512,
        Cpu = 0.5,
        Handler = "index.Handler",
        Code = new AliCloud.FC.Inputs.V3FunctionCodeArgs
        {
            ZipFile = "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
        },
        FunctionName = name,
        Runtime = "python3.9",
        DiskSize = 512,
        LogConfig = new AliCloud.FC.Inputs.V3FunctionLogConfigArgs
        {
            LogBeginRule = "None",
        },
    });

    var current = AliCloud.GetAccount.Invoke();

    var @default = new AliCloud.FC.V3Trigger("default", new()
    {
        TriggerType = "cdn_events",
        TriggerName = name,
        Description = "create",
        Qualifier = "LATEST",
        TriggerConfig = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["eventName"] = "CachedObjectsPushed",
            ["eventVersion"] = "1.0.0",
            ["notes"] = "example",
            ["filter"] = new Dictionary<string, object?>
            {
                ["domain"] = new[]
                {
                    "example.com",
                },
            },
        }),
        SourceArn = $"acs:cdn:*:{current.Apply(getAccountResult => getAccountResult.Id)}",
        InvocationRole = $"acs:ram::{current.Apply(getAccountResult => getAccountResult.Id)}:role/aliyuncdneventnotificationrole",
        FunctionName = function.FunctionName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.V3Function;
import com.pulumi.alicloud.fc.V3FunctionArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionCodeArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionLogConfigArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.fc.V3Trigger;
import com.pulumi.alicloud.fc.V3TriggerArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var functionName = config.get("functionName").orElse("TerraformTriggerResourceAPI");
        final var triggerName = config.get("triggerName").orElse("TerraformTrigger_CDN");
        var function = new V3Function("function", V3FunctionArgs.builder()
            .memorySize("512")
            .cpu(0.5)
            .handler("index.Handler")
            .code(V3FunctionCodeArgs.builder()
                .zipFile("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=")
                .build())
            .functionName(name)
            .runtime("python3.9")
            .diskSize("512")
            .logConfig(V3FunctionLogConfigArgs.builder()
                .logBeginRule("None")
                .build())
            .build());

        final var current = AlicloudFunctions.getAccount();

        var default_ = new V3Trigger("default", V3TriggerArgs.builder()
            .triggerType("cdn_events")
            .triggerName(name)
            .description("create")
            .qualifier("LATEST")
            .triggerConfig(serializeJson(
                jsonObject(
                    jsonProperty("eventName", "CachedObjectsPushed"),
                    jsonProperty("eventVersion", "1.0.0"),
                    jsonProperty("notes", "example"),
                    jsonProperty("filter", jsonObject(
                        jsonProperty("domain", jsonArray("example.com"))
                    ))
                )))
            .sourceArn(String.format("acs:cdn:*:%s", current.applyValue(getAccountResult -> getAccountResult.id())))
            .invocationRole(String.format("acs:ram::%s:role/aliyuncdneventnotificationrole", current.applyValue(getAccountResult -> getAccountResult.id())))
            .functionName(function.functionName())
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
  functionName:
    type: string
    default: TerraformTriggerResourceAPI
  triggerName:
    type: string
    default: TerraformTrigger_CDN
resources:
  function:
    type: alicloud:fc:V3Function
    properties:
      memorySize: '512'
      cpu: 0.5
      handler: index.Handler
      code:
        zipFile: UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=
      functionName: ${name}
      runtime: python3.9
      diskSize: '512'
      logConfig:
        logBeginRule: None
  default:
    type: alicloud:fc:V3Trigger
    properties:
      triggerType: cdn_events
      triggerName: ${name}
      description: create
      qualifier: LATEST
      triggerConfig:
        fn::toJSON:
          eventName: CachedObjectsPushed
          eventVersion: 1.0.0
          notes: example
          filter:
            domain:
              - example.com
      sourceArn: acs:cdn:*:${current.id}
      invocationRole: acs:ram::${current.id}:role/aliyuncdneventnotificationrole
      functionName: ${function.functionName}
variables:
  current:
    fn::invoke:
      function: alicloud:getAccount
      arguments: {}
Copy

HTTP Trigger

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const functionName = config.get("functionName") || "TerraformTriggerResourceAPI";
const triggerName = config.get("triggerName") || "TerraformTrigger_HTTP";
const _function = new alicloud.fc.V3Function("function", {
    memorySize: 512,
    cpu: 0.5,
    handler: "index.Handler",
    code: {
        zipFile: "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
    },
    functionName: name,
    runtime: "python3.9",
    diskSize: 512,
    logConfig: {
        logBeginRule: "None",
    },
});
const current = alicloud.getAccount({});
const _default = new alicloud.fc.V3Trigger("default", {
    triggerType: "http",
    triggerName: name,
    description: "create",
    qualifier: "LATEST",
    triggerConfig: JSON.stringify({
        authType: "anonymous",
        methods: [
            "GET",
            "POST",
        ],
    }),
    functionName: _function.functionName,
});
export const outputCalicloudFcv3TriggerInternet = alicloudFcv3Trigger["default"].httpTrigger[0].urlInternet;
export const outputCalicloudFcv3TriggerIntranet = alicloudFcv3Trigger["default"].httpTrigger[0].urlIntranet;
Copy
import pulumi
import json
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
function_name = config.get("functionName")
if function_name is None:
    function_name = "TerraformTriggerResourceAPI"
trigger_name = config.get("triggerName")
if trigger_name is None:
    trigger_name = "TerraformTrigger_HTTP"
function = alicloud.fc.V3Function("function",
    memory_size=512,
    cpu=0.5,
    handler="index.Handler",
    code={
        "zip_file": "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
    },
    function_name=name,
    runtime="python3.9",
    disk_size=512,
    log_config={
        "log_begin_rule": "None",
    })
current = alicloud.get_account()
default = alicloud.fc.V3Trigger("default",
    trigger_type="http",
    trigger_name=name,
    description="create",
    qualifier="LATEST",
    trigger_config=json.dumps({
        "authType": "anonymous",
        "methods": [
            "GET",
            "POST",
        ],
    }),
    function_name=function.function_name)
pulumi.export("outputCalicloudFcv3TriggerInternet", alicloud_fcv3_trigger["default"]["httpTrigger"][0]["urlInternet"])
pulumi.export("outputCalicloudFcv3TriggerIntranet", alicloud_fcv3_trigger["default"]["httpTrigger"][0]["urlIntranet"])
Copy
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		functionName := "TerraformTriggerResourceAPI"
		if param := cfg.Get("functionName"); param != "" {
			functionName = param
		}
		triggerName := "TerraformTrigger_HTTP"
		if param := cfg.Get("triggerName"); param != "" {
			triggerName = param
		}
		function, err := fc.NewV3Function(ctx, "function", &fc.V3FunctionArgs{
			MemorySize: pulumi.Int(512),
			Cpu:        pulumi.Float64(0.5),
			Handler:    pulumi.String("index.Handler"),
			Code: &fc.V3FunctionCodeArgs{
				ZipFile: pulumi.String("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA="),
			},
			FunctionName: pulumi.String(name),
			Runtime:      pulumi.String("python3.9"),
			DiskSize:     pulumi.Int(512),
			LogConfig: &fc.V3FunctionLogConfigArgs{
				LogBeginRule: pulumi.String("None"),
			},
		})
		if err != nil {
			return err
		}
		_, err = alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"authType": "anonymous",
			"methods": []string{
				"GET",
				"POST",
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = fc.NewV3Trigger(ctx, "default", &fc.V3TriggerArgs{
			TriggerType:   pulumi.String("http"),
			TriggerName:   pulumi.String(name),
			Description:   pulumi.String("create"),
			Qualifier:     pulumi.String("LATEST"),
			TriggerConfig: pulumi.String(json0),
			FunctionName:  function.FunctionName,
		})
		if err != nil {
			return err
		}
		ctx.Export("outputCalicloudFcv3TriggerInternet", alicloudFcv3Trigger.Default.HttpTrigger[0].UrlInternet)
		ctx.Export("outputCalicloudFcv3TriggerIntranet", alicloudFcv3Trigger.Default.HttpTrigger[0].UrlIntranet)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var functionName = config.Get("functionName") ?? "TerraformTriggerResourceAPI";
    var triggerName = config.Get("triggerName") ?? "TerraformTrigger_HTTP";
    var function = new AliCloud.FC.V3Function("function", new()
    {
        MemorySize = 512,
        Cpu = 0.5,
        Handler = "index.Handler",
        Code = new AliCloud.FC.Inputs.V3FunctionCodeArgs
        {
            ZipFile = "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=",
        },
        FunctionName = name,
        Runtime = "python3.9",
        DiskSize = 512,
        LogConfig = new AliCloud.FC.Inputs.V3FunctionLogConfigArgs
        {
            LogBeginRule = "None",
        },
    });

    var current = AliCloud.GetAccount.Invoke();

    var @default = new AliCloud.FC.V3Trigger("default", new()
    {
        TriggerType = "http",
        TriggerName = name,
        Description = "create",
        Qualifier = "LATEST",
        TriggerConfig = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["authType"] = "anonymous",
            ["methods"] = new[]
            {
                "GET",
                "POST",
            },
        }),
        FunctionName = function.FunctionName,
    });

    return new Dictionary<string, object?>
    {
        ["outputCalicloudFcv3TriggerInternet"] = alicloudFcv3Trigger.Default.HttpTrigger[0].UrlInternet,
        ["outputCalicloudFcv3TriggerIntranet"] = alicloudFcv3Trigger.Default.HttpTrigger[0].UrlIntranet,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.V3Function;
import com.pulumi.alicloud.fc.V3FunctionArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionCodeArgs;
import com.pulumi.alicloud.fc.inputs.V3FunctionLogConfigArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.fc.V3Trigger;
import com.pulumi.alicloud.fc.V3TriggerArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var functionName = config.get("functionName").orElse("TerraformTriggerResourceAPI");
        final var triggerName = config.get("triggerName").orElse("TerraformTrigger_HTTP");
        var function = new V3Function("function", V3FunctionArgs.builder()
            .memorySize("512")
            .cpu(0.5)
            .handler("index.Handler")
            .code(V3FunctionCodeArgs.builder()
                .zipFile("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=")
                .build())
            .functionName(name)
            .runtime("python3.9")
            .diskSize("512")
            .logConfig(V3FunctionLogConfigArgs.builder()
                .logBeginRule("None")
                .build())
            .build());

        final var current = AlicloudFunctions.getAccount();

        var default_ = new V3Trigger("default", V3TriggerArgs.builder()
            .triggerType("http")
            .triggerName(name)
            .description("create")
            .qualifier("LATEST")
            .triggerConfig(serializeJson(
                jsonObject(
                    jsonProperty("authType", "anonymous"),
                    jsonProperty("methods", jsonArray(
                        "GET", 
                        "POST"
                    ))
                )))
            .functionName(function.functionName())
            .build());

        ctx.export("outputCalicloudFcv3TriggerInternet", alicloudFcv3Trigger.default().httpTrigger()[0].urlInternet());
        ctx.export("outputCalicloudFcv3TriggerIntranet", alicloudFcv3Trigger.default().httpTrigger()[0].urlIntranet());
    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
  functionName:
    type: string
    default: TerraformTriggerResourceAPI
  triggerName:
    type: string
    default: TerraformTrigger_HTTP
resources:
  function:
    type: alicloud:fc:V3Function
    properties:
      memorySize: '512'
      cpu: 0.5
      handler: index.Handler
      code:
        zipFile: UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=
      functionName: ${name}
      runtime: python3.9
      diskSize: '512'
      logConfig:
        logBeginRule: None
  default:
    type: alicloud:fc:V3Trigger
    properties:
      triggerType: http
      triggerName: ${name}
      description: create
      qualifier: LATEST
      triggerConfig:
        fn::toJSON:
          authType: anonymous
          methods:
            - GET
            - POST
      functionName: ${function.functionName}
variables:
  current:
    fn::invoke:
      function: alicloud:getAccount
      arguments: {}
outputs:
  outputCalicloudFcv3TriggerInternet: ${alicloudFcv3Trigger.default.httpTrigger[0].urlInternet}
  outputCalicloudFcv3TriggerIntranet: ${alicloudFcv3Trigger.default.httpTrigger[0].urlIntranet}
Copy

Create V3Trigger Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new V3Trigger(name: string, args: V3TriggerArgs, opts?: CustomResourceOptions);
@overload
def V3Trigger(resource_name: str,
              args: V3TriggerArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def V3Trigger(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              function_name: Optional[str] = None,
              qualifier: Optional[str] = None,
              trigger_type: Optional[str] = None,
              description: Optional[str] = None,
              invocation_role: Optional[str] = None,
              source_arn: Optional[str] = None,
              trigger_config: Optional[str] = None,
              trigger_name: Optional[str] = None)
func NewV3Trigger(ctx *Context, name string, args V3TriggerArgs, opts ...ResourceOption) (*V3Trigger, error)
public V3Trigger(string name, V3TriggerArgs args, CustomResourceOptions? opts = null)
public V3Trigger(String name, V3TriggerArgs args)
public V3Trigger(String name, V3TriggerArgs args, CustomResourceOptions options)
type: alicloud:fc:V3Trigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. V3TriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. V3TriggerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. V3TriggerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. V3TriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. V3TriggerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var v3triggerResource = new AliCloud.FC.V3Trigger("v3triggerResource", new()
{
    FunctionName = "string",
    Qualifier = "string",
    TriggerType = "string",
    Description = "string",
    InvocationRole = "string",
    SourceArn = "string",
    TriggerConfig = "string",
    TriggerName = "string",
});
Copy
example, err := fc.NewV3Trigger(ctx, "v3triggerResource", &fc.V3TriggerArgs{
	FunctionName:   pulumi.String("string"),
	Qualifier:      pulumi.String("string"),
	TriggerType:    pulumi.String("string"),
	Description:    pulumi.String("string"),
	InvocationRole: pulumi.String("string"),
	SourceArn:      pulumi.String("string"),
	TriggerConfig:  pulumi.String("string"),
	TriggerName:    pulumi.String("string"),
})
Copy
var v3triggerResource = new V3Trigger("v3triggerResource", V3TriggerArgs.builder()
    .functionName("string")
    .qualifier("string")
    .triggerType("string")
    .description("string")
    .invocationRole("string")
    .sourceArn("string")
    .triggerConfig("string")
    .triggerName("string")
    .build());
Copy
v3trigger_resource = alicloud.fc.V3Trigger("v3triggerResource",
    function_name="string",
    qualifier="string",
    trigger_type="string",
    description="string",
    invocation_role="string",
    source_arn="string",
    trigger_config="string",
    trigger_name="string")
Copy
const v3triggerResource = new alicloud.fc.V3Trigger("v3triggerResource", {
    functionName: "string",
    qualifier: "string",
    triggerType: "string",
    description: "string",
    invocationRole: "string",
    sourceArn: "string",
    triggerConfig: "string",
    triggerName: "string",
});
Copy
type: alicloud:fc:V3Trigger
properties:
    description: string
    functionName: string
    invocationRole: string
    qualifier: string
    sourceArn: string
    triggerConfig: string
    triggerName: string
    triggerType: string
Copy

V3Trigger Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The V3Trigger resource accepts the following input properties:

FunctionName
This property is required.
Changes to this property will trigger replacement.
string
Function Name
Qualifier
This property is required.
Changes to this property will trigger replacement.
string
The version or alias of the function
TriggerType
This property is required.
Changes to this property will trigger replacement.
string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
Description string
Description of the trigger
InvocationRole string
The role required by the event source (such as OSS) to call the function.
SourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
TriggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
TriggerName Changes to this property will trigger replacement. string
Trigger Name
FunctionName
This property is required.
Changes to this property will trigger replacement.
string
Function Name
Qualifier
This property is required.
Changes to this property will trigger replacement.
string
The version or alias of the function
TriggerType
This property is required.
Changes to this property will trigger replacement.
string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
Description string
Description of the trigger
InvocationRole string
The role required by the event source (such as OSS) to call the function.
SourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
TriggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
TriggerName Changes to this property will trigger replacement. string
Trigger Name
functionName
This property is required.
Changes to this property will trigger replacement.
String
Function Name
qualifier
This property is required.
Changes to this property will trigger replacement.
String
The version or alias of the function
triggerType
This property is required.
Changes to this property will trigger replacement.
String
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
description String
Description of the trigger
invocationRole String
The role required by the event source (such as OSS) to call the function.
sourceArn Changes to this property will trigger replacement. String
Trigger Event source ARN
triggerConfig String
Trigger configuration. The configuration varies for different types of triggers.
triggerName Changes to this property will trigger replacement. String
Trigger Name
functionName
This property is required.
Changes to this property will trigger replacement.
string
Function Name
qualifier
This property is required.
Changes to this property will trigger replacement.
string
The version or alias of the function
triggerType
This property is required.
Changes to this property will trigger replacement.
string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
description string
Description of the trigger
invocationRole string
The role required by the event source (such as OSS) to call the function.
sourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
triggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
triggerName Changes to this property will trigger replacement. string
Trigger Name
function_name
This property is required.
Changes to this property will trigger replacement.
str
Function Name
qualifier
This property is required.
Changes to this property will trigger replacement.
str
The version or alias of the function
trigger_type
This property is required.
Changes to this property will trigger replacement.
str
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
description str
Description of the trigger
invocation_role str
The role required by the event source (such as OSS) to call the function.
source_arn Changes to this property will trigger replacement. str
Trigger Event source ARN
trigger_config str
Trigger configuration. The configuration varies for different types of triggers.
trigger_name Changes to this property will trigger replacement. str
Trigger Name
functionName
This property is required.
Changes to this property will trigger replacement.
String
Function Name
qualifier
This property is required.
Changes to this property will trigger replacement.
String
The version or alias of the function
triggerType
This property is required.
Changes to this property will trigger replacement.
String
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
description String
Description of the trigger
invocationRole String
The role required by the event source (such as OSS) to call the function.
sourceArn Changes to this property will trigger replacement. String
Trigger Event source ARN
triggerConfig String
Trigger configuration. The configuration varies for different types of triggers.
triggerName Changes to this property will trigger replacement. String
Trigger Name

Outputs

All input properties are implicitly available as output properties. Additionally, the V3Trigger resource produces the following output properties:

CreateTime string
Creation time
HttpTrigger Pulumi.AliCloud.FC.Outputs.V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
Id string
The provider-assigned unique ID for this managed resource.
LastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
Status string
The state of the trigger
TargetArn string
(Available since v1.234.0) Resource identity of the function
TriggerId string
(Available since v1.234.0) Trigger ID
CreateTime string
Creation time
HttpTrigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
Id string
The provider-assigned unique ID for this managed resource.
LastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
Status string
The state of the trigger
TargetArn string
(Available since v1.234.0) Resource identity of the function
TriggerId string
(Available since v1.234.0) Trigger ID
createTime String
Creation time
httpTrigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
id String
The provider-assigned unique ID for this managed resource.
lastModifiedTime String
(Available since v1.234.0) The last modified time of the trigger
status String
The state of the trigger
targetArn String
(Available since v1.234.0) Resource identity of the function
triggerId String
(Available since v1.234.0) Trigger ID
createTime string
Creation time
httpTrigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
id string
The provider-assigned unique ID for this managed resource.
lastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
status string
The state of the trigger
targetArn string
(Available since v1.234.0) Resource identity of the function
triggerId string
(Available since v1.234.0) Trigger ID
create_time str
Creation time
http_trigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
id str
The provider-assigned unique ID for this managed resource.
last_modified_time str
(Available since v1.234.0) The last modified time of the trigger
status str
The state of the trigger
target_arn str
(Available since v1.234.0) Resource identity of the function
trigger_id str
(Available since v1.234.0) Trigger ID
createTime String
Creation time
httpTrigger Property Map
(Available since v1.234.0) HTTP trigger information
id String
The provider-assigned unique ID for this managed resource.
lastModifiedTime String
(Available since v1.234.0) The last modified time of the trigger
status String
The state of the trigger
targetArn String
(Available since v1.234.0) Resource identity of the function
triggerId String
(Available since v1.234.0) Trigger ID

Look up Existing V3Trigger Resource

Get an existing V3Trigger resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: V3TriggerState, opts?: CustomResourceOptions): V3Trigger
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        function_name: Optional[str] = None,
        http_trigger: Optional[V3TriggerHttpTriggerArgs] = None,
        invocation_role: Optional[str] = None,
        last_modified_time: Optional[str] = None,
        qualifier: Optional[str] = None,
        source_arn: Optional[str] = None,
        status: Optional[str] = None,
        target_arn: Optional[str] = None,
        trigger_config: Optional[str] = None,
        trigger_id: Optional[str] = None,
        trigger_name: Optional[str] = None,
        trigger_type: Optional[str] = None) -> V3Trigger
func GetV3Trigger(ctx *Context, name string, id IDInput, state *V3TriggerState, opts ...ResourceOption) (*V3Trigger, error)
public static V3Trigger Get(string name, Input<string> id, V3TriggerState? state, CustomResourceOptions? opts = null)
public static V3Trigger get(String name, Output<String> id, V3TriggerState state, CustomResourceOptions options)
resources:  _:    type: alicloud:fc:V3Trigger    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
Creation time
Description string
Description of the trigger
FunctionName Changes to this property will trigger replacement. string
Function Name
HttpTrigger Pulumi.AliCloud.FC.Inputs.V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
InvocationRole string
The role required by the event source (such as OSS) to call the function.
LastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
Qualifier Changes to this property will trigger replacement. string
The version or alias of the function
SourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
Status string
The state of the trigger
TargetArn string
(Available since v1.234.0) Resource identity of the function
TriggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
TriggerId string
(Available since v1.234.0) Trigger ID
TriggerName Changes to this property will trigger replacement. string
Trigger Name
TriggerType Changes to this property will trigger replacement. string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
CreateTime string
Creation time
Description string
Description of the trigger
FunctionName Changes to this property will trigger replacement. string
Function Name
HttpTrigger V3TriggerHttpTriggerArgs
(Available since v1.234.0) HTTP trigger information
InvocationRole string
The role required by the event source (such as OSS) to call the function.
LastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
Qualifier Changes to this property will trigger replacement. string
The version or alias of the function
SourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
Status string
The state of the trigger
TargetArn string
(Available since v1.234.0) Resource identity of the function
TriggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
TriggerId string
(Available since v1.234.0) Trigger ID
TriggerName Changes to this property will trigger replacement. string
Trigger Name
TriggerType Changes to this property will trigger replacement. string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
createTime String
Creation time
description String
Description of the trigger
functionName Changes to this property will trigger replacement. String
Function Name
httpTrigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
invocationRole String
The role required by the event source (such as OSS) to call the function.
lastModifiedTime String
(Available since v1.234.0) The last modified time of the trigger
qualifier Changes to this property will trigger replacement. String
The version or alias of the function
sourceArn Changes to this property will trigger replacement. String
Trigger Event source ARN
status String
The state of the trigger
targetArn String
(Available since v1.234.0) Resource identity of the function
triggerConfig String
Trigger configuration. The configuration varies for different types of triggers.
triggerId String
(Available since v1.234.0) Trigger ID
triggerName Changes to this property will trigger replacement. String
Trigger Name
triggerType Changes to this property will trigger replacement. String
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
createTime string
Creation time
description string
Description of the trigger
functionName Changes to this property will trigger replacement. string
Function Name
httpTrigger V3TriggerHttpTrigger
(Available since v1.234.0) HTTP trigger information
invocationRole string
The role required by the event source (such as OSS) to call the function.
lastModifiedTime string
(Available since v1.234.0) The last modified time of the trigger
qualifier Changes to this property will trigger replacement. string
The version or alias of the function
sourceArn Changes to this property will trigger replacement. string
Trigger Event source ARN
status string
The state of the trigger
targetArn string
(Available since v1.234.0) Resource identity of the function
triggerConfig string
Trigger configuration. The configuration varies for different types of triggers.
triggerId string
(Available since v1.234.0) Trigger ID
triggerName Changes to this property will trigger replacement. string
Trigger Name
triggerType Changes to this property will trigger replacement. string
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
create_time str
Creation time
description str
Description of the trigger
function_name Changes to this property will trigger replacement. str
Function Name
http_trigger V3TriggerHttpTriggerArgs
(Available since v1.234.0) HTTP trigger information
invocation_role str
The role required by the event source (such as OSS) to call the function.
last_modified_time str
(Available since v1.234.0) The last modified time of the trigger
qualifier Changes to this property will trigger replacement. str
The version or alias of the function
source_arn Changes to this property will trigger replacement. str
Trigger Event source ARN
status str
The state of the trigger
target_arn str
(Available since v1.234.0) Resource identity of the function
trigger_config str
Trigger configuration. The configuration varies for different types of triggers.
trigger_id str
(Available since v1.234.0) Trigger ID
trigger_name Changes to this property will trigger replacement. str
Trigger Name
trigger_type Changes to this property will trigger replacement. str
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.
createTime String
Creation time
description String
Description of the trigger
functionName Changes to this property will trigger replacement. String
Function Name
httpTrigger Property Map
(Available since v1.234.0) HTTP trigger information
invocationRole String
The role required by the event source (such as OSS) to call the function.
lastModifiedTime String
(Available since v1.234.0) The last modified time of the trigger
qualifier Changes to this property will trigger replacement. String
The version or alias of the function
sourceArn Changes to this property will trigger replacement. String
Trigger Event source ARN
status String
The state of the trigger
targetArn String
(Available since v1.234.0) Resource identity of the function
triggerConfig String
Trigger configuration. The configuration varies for different types of triggers.
triggerId String
(Available since v1.234.0) Trigger ID
triggerName Changes to this property will trigger replacement. String
Trigger Name
triggerType Changes to this property will trigger replacement. String
The type of the trigger. Currently, the supported types include oss, log, http, timer, tablestore, cdn_events, mns_topic and eventbridge.

Supporting Types

V3TriggerHttpTrigger
, V3TriggerHttpTriggerArgs

UrlInternet string
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
UrlIntranet string
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.
UrlInternet string
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
UrlIntranet string
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.
urlInternet String
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
urlIntranet String
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.
urlInternet string
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
urlIntranet string
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.
url_internet str
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
url_intranet str
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.
urlInternet String
The public domain name address. On the Internet, you can access the HTTP Trigger through the HTTP protocol or HTTPS protocol.
urlIntranet String
The private domain name address. In a VPC, you can access the HTTP Trigger through HTTP or HTTPS.

Import

FCV3 Trigger can be imported using the id, e.g.

$ pulumi import alicloud:fc/v3Trigger:V3Trigger example <function_name>:<trigger_name>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.