Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.22.0 published on Monday, Jun 27, 2022 by Pulumi

FcTrigger

Provides a CDN Fc Trigger resource.

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

NOTE: Available in v1.165.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultAccount = Output.Create(AliCloud.GetAccount.InvokeAsync());
        var defaultRegions = Output.Create(AliCloud.GetRegions.InvokeAsync(new AliCloud.GetRegionsArgs
        {
            Current = true,
        }));
        var example = new AliCloud.Cdn.FcTrigger("example", new AliCloud.Cdn.FcTriggerArgs
        {
            EventMetaName = "LogFileCreated",
            EventMetaVersion = "1.0.0",
            Notes = "example_value",
            RoleArn = defaultAccount.Apply(defaultAccount => $"acs:ram::{defaultAccount.Id}:role/aliyuncdneventnotificationrole"),
            SourceArn = defaultAccount.Apply(defaultAccount => $"acs:cdn:*:{defaultAccount.Id}:domain/example.com"),
            TriggerArn = Output.Tuple(defaultRegions, defaultAccount).Apply(values =>
            {
                var defaultRegions = values.Item1;
                var defaultAccount = values.Item2;
                return $"acs:fc:{defaultRegions.Regions?[0]?.Id}:{defaultAccount.Id}:services/FCTestService/functions/printEvent/triggers/testtrigger";
            }),
        });
    }

}
package main

import (
	"fmt"

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultAccount, err := alicloud.GetAccount(ctx, nil, nil)
		if err != nil {
			return err
		}
		defaultRegions, err := alicloud.GetRegions(ctx, &GetRegionsArgs{
			Current: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		_, err = cdn.NewFcTrigger(ctx, "example", &cdn.FcTriggerArgs{
			EventMetaName:    pulumi.String("LogFileCreated"),
			EventMetaVersion: pulumi.String("1.0.0"),
			Notes:            pulumi.String("example_value"),
			RoleArn:          pulumi.String(fmt.Sprintf("%v%v%v", "acs:ram::", defaultAccount.Id, ":role/aliyuncdneventnotificationrole")),
			SourceArn:        pulumi.String(fmt.Sprintf("%v%v%v", "acs:cdn:*:", defaultAccount.Id, ":domain/example.com")),
			TriggerArn:       pulumi.String(fmt.Sprintf("%v%v%v%v%v", "acs:fc:", defaultRegions.Regions[0].Id, ":", defaultAccount.Id, ":services/FCTestService/functions/printEvent/triggers/testtrigger")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default_account = alicloud.get_account()
default_regions = alicloud.get_regions(current=True)
example = alicloud.cdn.FcTrigger("example",
    event_meta_name="LogFileCreated",
    event_meta_version="1.0.0",
    notes="example_value",
    role_arn=f"acs:ram::{default_account.id}:role/aliyuncdneventnotificationrole",
    source_arn=f"acs:cdn:*:{default_account.id}:domain/example.com",
    trigger_arn=f"acs:fc:{default_regions.regions[0].id}:{default_account.id}:services/FCTestService/functions/printEvent/triggers/testtrigger")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultAccount = pulumi.output(alicloud.getAccount());
const defaultRegions = pulumi.output(alicloud.getRegions({
    current: true,
}));
const example = new alicloud.cdn.FcTrigger("example", {
    eventMetaName: "LogFileCreated",
    eventMetaVersion: "1.0.0",
    notes: "example_value",
    roleArn: pulumi.interpolate`acs:ram::${defaultAccount.id}:role/aliyuncdneventnotificationrole`,
    sourceArn: pulumi.interpolate`acs:cdn:*:${defaultAccount.id}:domain/example.com`,
    triggerArn: pulumi.interpolate`acs:fc:${defaultRegions.regions[0].id}:${defaultAccount.id}:services/FCTestService/functions/printEvent/triggers/testtrigger`,
});

Coming soon!

Create a FcTrigger Resource

new FcTrigger(name: string, args: FcTriggerArgs, opts?: CustomResourceOptions);
@overload
def FcTrigger(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              event_meta_name: Optional[str] = None,
              event_meta_version: Optional[str] = None,
              function_arn: Optional[str] = None,
              notes: Optional[str] = None,
              role_arn: Optional[str] = None,
              source_arn: Optional[str] = None,
              trigger_arn: Optional[str] = None)
@overload
def FcTrigger(resource_name: str,
              args: FcTriggerArgs,
              opts: Optional[ResourceOptions] = None)
func NewFcTrigger(ctx *Context, name string, args FcTriggerArgs, opts ...ResourceOption) (*FcTrigger, error)
public FcTrigger(string name, FcTriggerArgs args, CustomResourceOptions? opts = null)
public FcTrigger(String name, FcTriggerArgs args)
public FcTrigger(String name, FcTriggerArgs args, CustomResourceOptions options)
type: alicloud:cdn:FcTrigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

FcTrigger Resource Properties

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

Inputs

The FcTrigger resource accepts the following input properties:

EventMetaName string

The name of the Event.

EventMetaVersion string

The version of the Event.

Notes string

The Note information.

RoleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

SourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

TriggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

FunctionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

EventMetaName string

The name of the Event.

EventMetaVersion string

The version of the Event.

Notes string

The Note information.

RoleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

SourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

TriggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

FunctionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

eventMetaName String

The name of the Event.

eventMetaVersion String

The version of the Event.

notes String

The Note information.

roleArn String

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn String

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn String

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

functionArn String

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

eventMetaName string

The name of the Event.

eventMetaVersion string

The version of the Event.

notes string

The Note information.

roleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

functionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

event_meta_name str

The name of the Event.

event_meta_version str

The version of the Event.

notes str

The Note information.

role_arn str

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

source_arn str

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

trigger_arn str

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

function_arn str

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

eventMetaName String

The name of the Event.

eventMetaVersion String

The version of the Event.

notes String

The Note information.

roleArn String

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn String

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn String

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

functionArn String

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing FcTrigger Resource

Get an existing FcTrigger 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?: FcTriggerState, opts?: CustomResourceOptions): FcTrigger
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        event_meta_name: Optional[str] = None,
        event_meta_version: Optional[str] = None,
        function_arn: Optional[str] = None,
        notes: Optional[str] = None,
        role_arn: Optional[str] = None,
        source_arn: Optional[str] = None,
        trigger_arn: Optional[str] = None) -> FcTrigger
func GetFcTrigger(ctx *Context, name string, id IDInput, state *FcTriggerState, opts ...ResourceOption) (*FcTrigger, error)
public static FcTrigger Get(string name, Input<string> id, FcTriggerState? state, CustomResourceOptions? opts = null)
public static FcTrigger get(String name, Output<String> id, FcTriggerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
EventMetaName string

The name of the Event.

EventMetaVersion string

The version of the Event.

FunctionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

Notes string

The Note information.

RoleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

SourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

TriggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

EventMetaName string

The name of the Event.

EventMetaVersion string

The version of the Event.

FunctionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

Notes string

The Note information.

RoleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

SourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

TriggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

eventMetaName String

The name of the Event.

eventMetaVersion String

The version of the Event.

functionArn String

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

notes String

The Note information.

roleArn String

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn String

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn String

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

eventMetaName string

The name of the Event.

eventMetaVersion string

The version of the Event.

functionArn string

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

notes string

The Note information.

roleArn string

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn string

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn string

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

event_meta_name str

The name of the Event.

event_meta_version str

The version of the Event.

function_arn str

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

notes str

The Note information.

role_arn str

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

source_arn str

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

trigger_arn str

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

eventMetaName String

The name of the Event.

eventMetaVersion String

The version of the Event.

functionArn String

The function arn. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}.

notes String

The Note information.

roleArn String

The role authorized by RAM. The value formats as acs:ram::{AccountID}:role/{RoleName}.

sourceArn String

Resources and filters for event listening. The value formats as acs:cdn:{RegionID}:{AccountID}:{Filter}.

triggerArn String

The trigger corresponding to the function Compute Service. The value formats as acs:fc:{RegionID}:{AccountID}:{Filter}. See Create a CDN Fc Trigger for more details.

Import

CDN Fc Trigger can be imported using the id, e.g.

 $ pulumi import alicloud:cdn/fcTrigger:FcTrigger example <trigger_arn>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.