1. Packages
  2. Alicloud Provider
  3. API Docs
  4. fnf
  5. getSchedules
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.fnf.getSchedules

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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.applyValue(getSchedulesResult -> getSchedulesResult.schedules()[0].id()));
        }
    }
    
    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}
    

    Using getSchedules

    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 getSchedules(args: GetSchedulesArgs, opts?: InvokeOptions): Promise<GetSchedulesResult>
    function getSchedulesOutput(args: GetSchedulesOutputArgs, opts?: InvokeOptions): Output<GetSchedulesResult>
    def get_schedules(flow_name: Optional[str] = None,
                      ids: Optional[Sequence[str]] = None,
                      limit: Optional[int] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSchedulesResult
    def get_schedules_output(flow_name: Optional[pulumi.Input[str]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      limit: Optional[pulumi.Input[int]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetSchedulesResult]
    func GetSchedules(ctx *Context, args *GetSchedulesArgs, opts ...InvokeOption) (*GetSchedulesResult, error)
    func GetSchedulesOutput(ctx *Context, args *GetSchedulesOutputArgs, opts ...InvokeOption) GetSchedulesResultOutput

    > Note: This function is named GetSchedules in the Go SDK.

    public static class GetSchedules 
    {
        public static Task<GetSchedulesResult> InvokeAsync(GetSchedulesArgs args, InvokeOptions? opts = null)
        public static Output<GetSchedulesResult> Invoke(GetSchedulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSchedulesResult> getSchedules(GetSchedulesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:fnf/getSchedules:getSchedules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FlowName string
    The name of the flow bound to the time-based schedule you want to create.
    Ids List<string>
    A list of Schedule IDs.
    Limit int
    The number of resource queries.
    NameRegex string
    A regex string to filter results by Schedule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    FlowName string
    The name of the flow bound to the time-based schedule you want to create.
    Ids []string
    A list of Schedule IDs.
    Limit int
    The number of resource queries.
    NameRegex string
    A regex string to filter results by Schedule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    flowName String
    The name of the flow bound to the time-based schedule you want to create.
    ids List<String>
    A list of Schedule IDs.
    limit Integer
    The number of resource queries.
    nameRegex String
    A regex string to filter results by Schedule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    flowName string
    The name of the flow bound to the time-based schedule you want to create.
    ids string[]
    A list of Schedule IDs.
    limit number
    The number of resource queries.
    nameRegex string
    A regex string to filter results by Schedule name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    flow_name str
    The name of the flow bound to the time-based schedule you want to create.
    ids Sequence[str]
    A list of Schedule IDs.
    limit int
    The number of resource queries.
    name_regex str
    A regex string to filter results by Schedule name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    flowName String
    The name of the flow bound to the time-based schedule you want to create.
    ids List<String>
    A list of Schedule IDs.
    limit Number
    The number of resource queries.
    nameRegex String
    A regex string to filter results by Schedule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getSchedules Result

    The following output properties are available:

    FlowName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Schedules List<Pulumi.AliCloud.FNF.Outputs.GetSchedulesSchedule>
    Limit int
    NameRegex string
    OutputFile string
    FlowName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Schedules []GetSchedulesSchedule
    Limit int
    NameRegex string
    OutputFile string
    flowName String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    schedules List<GetSchedulesSchedule>
    limit Integer
    nameRegex String
    outputFile String
    flowName string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    schedules GetSchedulesSchedule[]
    limit number
    nameRegex string
    outputFile string
    flow_name str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    schedules Sequence[GetSchedulesSchedule]
    limit int
    name_regex str
    output_file str
    flowName String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    schedules List<Property Map>
    limit Number
    nameRegex String
    outputFile String

    Supporting Types

    GetSchedulesSchedule

    CronExpression string
    The CRON expression of the time-based schedule to be created.
    Description string
    The description of the time-based schedule to be created.
    Enable bool
    Specifies whether to enable the time-based schedule you want to create.
    Id string
    The ID of the Schedule.
    LastModifiedTime string
    The time when the time-based schedule was last updated.
    Payload string
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    ScheduleId string
    The ID of the time-based schedule.
    ScheduleName string
    The name of the time-based schedule to be created.
    CronExpression string
    The CRON expression of the time-based schedule to be created.
    Description string
    The description of the time-based schedule to be created.
    Enable bool
    Specifies whether to enable the time-based schedule you want to create.
    Id string
    The ID of the Schedule.
    LastModifiedTime string
    The time when the time-based schedule was last updated.
    Payload string
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    ScheduleId string
    The ID of the time-based schedule.
    ScheduleName string
    The name of the time-based schedule to be created.
    cronExpression String
    The CRON expression of the time-based schedule to be created.
    description String
    The description of the time-based schedule to be created.
    enable Boolean
    Specifies whether to enable the time-based schedule you want to create.
    id String
    The ID of the Schedule.
    lastModifiedTime String
    The time when the time-based schedule was last updated.
    payload String
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    scheduleId String
    The ID of the time-based schedule.
    scheduleName String
    The name of the time-based schedule to be created.
    cronExpression string
    The CRON expression of the time-based schedule to be created.
    description string
    The description of the time-based schedule to be created.
    enable boolean
    Specifies whether to enable the time-based schedule you want to create.
    id string
    The ID of the Schedule.
    lastModifiedTime string
    The time when the time-based schedule was last updated.
    payload string
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    scheduleId string
    The ID of the time-based schedule.
    scheduleName string
    The name of the time-based schedule to be created.
    cron_expression str
    The CRON expression of the time-based schedule to be created.
    description str
    The description of the time-based schedule to be created.
    enable bool
    Specifies whether to enable the time-based schedule you want to create.
    id str
    The ID of the Schedule.
    last_modified_time str
    The time when the time-based schedule was last updated.
    payload str
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    schedule_id str
    The ID of the time-based schedule.
    schedule_name str
    The name of the time-based schedule to be created.
    cronExpression String
    The CRON expression of the time-based schedule to be created.
    description String
    The description of the time-based schedule to be created.
    enable Boolean
    Specifies whether to enable the time-based schedule you want to create.
    id String
    The ID of the Schedule.
    lastModifiedTime String
    The time when the time-based schedule was last updated.
    payload String
    The trigger message of the time-based schedule to be created. It must be in JSON object format.
    scheduleId String
    The ID of the time-based schedule.
    scheduleName String
    The name of the time-based schedule to be created.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi