get Schedules
This data source provides the Fnf Schedules of the current Alibaba Cloud user.
NOTE: Available in v1.105.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.fnf.getSchedules({
flowName: "example_value",
ids: ["example_value"],
nameRegex: "the_resource_name",
});
export const firstFnfScheduleId = example.then(example => example.schedules?.[0]?.id);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.fnf.get_schedules(flow_name="example_value",
ids=["example_value"],
name_regex="the_resource_name")
pulumi.export("firstFnfScheduleId", example.schedules[0].id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.FNF.GetSchedules.Invoke(new()
{
FlowName = "example_value",
Ids = new[]
{
"example_value",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstFnfScheduleId"] = example.Apply(getSchedulesResult => getSchedulesResult.Schedules[0]?.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fnf"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := fnf.GetSchedules(ctx, &fnf.GetSchedulesArgs{
FlowName: "example_value",
Ids: []string{
"example_value",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstFnfScheduleId", example.Schedules[0].Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fnf.FnfFunctions;
import com.pulumi.alicloud.fnf.inputs.GetSchedulesArgs;
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 example = FnfFunctions.getSchedules(GetSchedulesArgs.builder()
.flowName("example_value")
.ids("example_value")
.nameRegex("the_resource_name")
.build());
ctx.export("firstFnfScheduleId", example.schedules()[0].id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: alicloud:fnf:getSchedules
arguments:
flowName: example_value
ids:
- example_value
nameRegex: the_resource_name
outputs:
firstFnfScheduleId: ${example.schedules[0].id}
Content copied to clipboard
Return
A collection of values returned by getSchedules.
Parameters
argument
A collection of arguments for invoking getSchedules.
suspend fun getSchedules(flowName: String, ids: List<String>? = null, limit: Int? = null, nameRegex: String? = null, outputFile: String? = null): GetSchedulesResult
Return
A collection of values returned by getSchedules.
Parameters
flow Name
The name of the flow bound to the time-based schedule you want to create.
ids
A list of Schedule IDs.
limit
The number of resource queries.
name Regex
A regex string to filter results by Schedule name.
output File
File name where to save data source results (after running pulumi preview
).
See also
suspend fun getSchedules(argument: suspend GetSchedulesPlainArgsBuilder.() -> Unit): GetSchedulesResult
Return
A collection of values returned by getSchedules.
Parameters
argument
Builder for com.pulumi.alicloud.fnf.kotlin.inputs.GetSchedulesPlainArgs.