/
getSchedules.go
77 lines (72 loc) · 2.26 KB
/
getSchedules.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package fnf
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// This data source provides the Fnf Schedules of the current Alibaba Cloud user.
//
// > **NOTE:** Available in v1.105.0+.
//
// ## Example Usage
//
// Basic Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/fnf"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "the_resource_name"
// example, err := fnf.GetSchedules(ctx, &fnf.GetSchedulesArgs{
// FlowName: "example_value",
// Ids: []string{
// "example_value",
// },
// NameRegex: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("firstFnfScheduleId", example.Schedules[0].Id)
// return nil
// })
// }
// ```
func GetSchedules(ctx *pulumi.Context, args *GetSchedulesArgs, opts ...pulumi.InvokeOption) (*GetSchedulesResult, error) {
var rv GetSchedulesResult
err := ctx.Invoke("alicloud:fnf/getSchedules:getSchedules", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSchedules.
type GetSchedulesArgs struct {
// The name of the flow bound to the time-based schedule you want to create.
FlowName string `pulumi:"flowName"`
// A list of Schedule IDs.
Ids []string `pulumi:"ids"`
// The number of resource queries.
Limit *int `pulumi:"limit"`
// A regex string to filter results by Schedule name.
NameRegex *string `pulumi:"nameRegex"`
OutputFile *string `pulumi:"outputFile"`
}
// A collection of values returned by getSchedules.
type GetSchedulesResult struct {
FlowName string `pulumi:"flowName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Ids []string `pulumi:"ids"`
Limit *int `pulumi:"limit"`
NameRegex *string `pulumi:"nameRegex"`
Names []string `pulumi:"names"`
OutputFile *string `pulumi:"outputFile"`
Schedules []GetSchedulesSchedule `pulumi:"schedules"`
}