Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.fc.getTriggers
Explore with Pulumi AI
This data source provides the Function Compute triggers of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const fcTriggersDs = alicloud.fc.getTriggers({
serviceName: "sample_service",
functionName: "sample_function",
nameRegex: "sample_fc_trigger",
});
export const firstFcTriggerName = fcTriggersDs.then(fcTriggersDs => fcTriggersDs.triggers?.[0]?.name);
import pulumi
import pulumi_alicloud as alicloud
fc_triggers_ds = alicloud.fc.get_triggers(service_name="sample_service",
function_name="sample_function",
name_regex="sample_fc_trigger")
pulumi.export("firstFcTriggerName", fc_triggers_ds.triggers[0].name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fcTriggersDs, err := fc.GetTriggers(ctx, &fc.GetTriggersArgs{
ServiceName: "sample_service",
FunctionName: "sample_function",
NameRegex: pulumi.StringRef("sample_fc_trigger"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstFcTriggerName", fcTriggersDs.Triggers[0].Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var fcTriggersDs = AliCloud.FC.GetTriggers.Invoke(new()
{
ServiceName = "sample_service",
FunctionName = "sample_function",
NameRegex = "sample_fc_trigger",
});
return new Dictionary<string, object?>
{
["firstFcTriggerName"] = fcTriggersDs.Apply(getTriggersResult => getTriggersResult.Triggers[0]?.Name),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.FcFunctions;
import com.pulumi.alicloud.fc.inputs.GetTriggersArgs;
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 fcTriggersDs = FcFunctions.getTriggers(GetTriggersArgs.builder()
.serviceName("sample_service")
.functionName("sample_function")
.nameRegex("sample_fc_trigger")
.build());
ctx.export("firstFcTriggerName", fcTriggersDs.applyValue(getTriggersResult -> getTriggersResult.triggers()[0].name()));
}
}
variables:
fcTriggersDs:
fn::invoke:
Function: alicloud:fc:getTriggers
Arguments:
serviceName: sample_service
functionName: sample_function
nameRegex: sample_fc_trigger
outputs:
firstFcTriggerName: ${fcTriggersDs.triggers[0].name}
Using getTriggers
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTriggers(args: GetTriggersArgs, opts?: InvokeOptions): Promise<GetTriggersResult>
function getTriggersOutput(args: GetTriggersOutputArgs, opts?: InvokeOptions): Output<GetTriggersResult>
def get_triggers(function_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTriggersResult
def get_triggers_output(function_name: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTriggersResult]
func GetTriggers(ctx *Context, args *GetTriggersArgs, opts ...InvokeOption) (*GetTriggersResult, error)
func GetTriggersOutput(ctx *Context, args *GetTriggersOutputArgs, opts ...InvokeOption) GetTriggersResultOutput
> Note: This function is named GetTriggers
in the Go SDK.
public static class GetTriggers
{
public static Task<GetTriggersResult> InvokeAsync(GetTriggersArgs args, InvokeOptions? opts = null)
public static Output<GetTriggersResult> Invoke(GetTriggersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTriggersResult> getTriggers(GetTriggersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:fc/getTriggers:getTriggers
arguments:
# arguments dictionary
The following arguments are supported:
- Function
Name string - FC function name.
- Service
Name string - FC service name.
- Ids List<string>
- A list of FC triggers ids.
- Name
Regex string - A regex string to filter results by FC trigger name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Function
Name string - FC function name.
- Service
Name string - FC service name.
- Ids []string
- A list of FC triggers ids.
- Name
Regex string - A regex string to filter results by FC trigger name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- function
Name String - FC function name.
- service
Name String - FC service name.
- ids List<String>
- A list of FC triggers ids.
- name
Regex String - A regex string to filter results by FC trigger name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- function
Name string - FC function name.
- service
Name string - FC service name.
- ids string[]
- A list of FC triggers ids.
- name
Regex string - A regex string to filter results by FC trigger name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- function_
name str - FC function name.
- service_
name str - FC service name.
- ids Sequence[str]
- A list of FC triggers ids.
- name_
regex str - A regex string to filter results by FC trigger name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- function
Name String - FC function name.
- service
Name String - FC service name.
- ids List<String>
- A list of FC triggers ids.
- name
Regex String - A regex string to filter results by FC trigger name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getTriggers Result
The following output properties are available:
- Function
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of FC triggers ids.
- Names List<string>
- A list of FC triggers names.
- Service
Name string - Triggers
List<Pulumi.
Ali Cloud. FC. Outputs. Get Triggers Trigger> - A list of FC triggers. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Function
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of FC triggers ids.
- Names []string
- A list of FC triggers names.
- Service
Name string - Triggers
[]Get
Triggers Trigger - A list of FC triggers. Each element contains the following attributes:
- Name
Regex string - Output
File string
- function
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of FC triggers ids.
- names List<String>
- A list of FC triggers names.
- service
Name String - triggers
List<Get
Triggers Trigger> - A list of FC triggers. Each element contains the following attributes:
- name
Regex String - output
File String
- function
Name string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of FC triggers ids.
- names string[]
- A list of FC triggers names.
- service
Name string - triggers
Get
Triggers Trigger[] - A list of FC triggers. Each element contains the following attributes:
- name
Regex string - output
File string
- function_
name str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of FC triggers ids.
- names Sequence[str]
- A list of FC triggers names.
- service_
name str - triggers
Sequence[Get
Triggers Trigger] - A list of FC triggers. Each element contains the following attributes:
- name_
regex str - output_
file str
- function
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of FC triggers ids.
- names List<String>
- A list of FC triggers names.
- service
Name String - triggers List<Property Map>
- A list of FC triggers. Each element contains the following attributes:
- name
Regex String - output
File String
Supporting Types
GetTriggersTrigger
- Config string
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- Creation
Time string - FC trigger creation time.
- Id string
- FC trigger ID.
- Invocation
Role string - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- Last
Modification stringTime - FC trigger last modification time.
- Name string
- FC trigger name.
- Source
Arn string - Event source resource address. See Create a trigger for more details.
- Type string
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
- Config string
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- Creation
Time string - FC trigger creation time.
- Id string
- FC trigger ID.
- Invocation
Role string - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- Last
Modification stringTime - FC trigger last modification time.
- Name string
- FC trigger name.
- Source
Arn string - Event source resource address. See Create a trigger for more details.
- Type string
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
- config String
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- creation
Time String - FC trigger creation time.
- id String
- FC trigger ID.
- invocation
Role String - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- last
Modification StringTime - FC trigger last modification time.
- name String
- FC trigger name.
- source
Arn String - Event source resource address. See Create a trigger for more details.
- type String
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
- config string
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- creation
Time string - FC trigger creation time.
- id string
- FC trigger ID.
- invocation
Role string - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- last
Modification stringTime - FC trigger last modification time.
- name string
- FC trigger name.
- source
Arn string - Event source resource address. See Create a trigger for more details.
- type string
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
- config str
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- creation_
time str - FC trigger creation time.
- id str
- FC trigger ID.
- invocation_
role str - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- last_
modification_ strtime - FC trigger last modification time.
- name str
- FC trigger name.
- source_
arn str - Event source resource address. See Create a trigger for more details.
- type str
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
- config String
- JSON-encoded trigger configuration. See Configure triggers and events for more details.
- creation
Time String - FC trigger creation time.
- id String
- FC trigger ID.
- invocation
Role String - RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is "acs:ram::$account-id:role/$role-name". See Create a trigger for more details.
- last
Modification StringTime - FC trigger last modification time.
- name String
- FC trigger name.
- source
Arn String - Event source resource address. See Create a trigger for more details.
- type String
- Type of the trigger. Valid values:
oss
,log
,timer
,http
,mns_topic
,cdn_events
andeventbridge
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.