Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.21.0 published on Tuesday, Jun 14, 2022 by Pulumi

getScheduledTasks

This data source provides available scheduled task resources.

NOTE: Available in 1.72.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ds = Output.Create(AliCloud.Ess.GetScheduledTasks.InvokeAsync(new AliCloud.Ess.GetScheduledTasksArgs
        {
            NameRegex = "scheduled_task_name",
            ScheduledTaskId = "scheduled_task_id",
        }));
        this.FirstScheduledTask = ds.Apply(ds => ds.Tasks?[0]?.Id);
    }

    [Output("firstScheduledTask")]
    public Output<string> FirstScheduledTask { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ds, err := ess.GetScheduledTasks(ctx, &ess.GetScheduledTasksArgs{
			NameRegex:       pulumi.StringRef("scheduled_task_name"),
			ScheduledTaskId: pulumi.StringRef("scheduled_task_id"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstScheduledTask", ds.Tasks[0].Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

ds = alicloud.ess.get_scheduled_tasks(name_regex="scheduled_task_name",
    scheduled_task_id="scheduled_task_id")
pulumi.export("firstScheduledTask", ds.tasks[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ds = pulumi.output(alicloud.ess.getScheduledTasks({
    nameRegex: "scheduled_task_name",
    scheduledTaskId: "scheduled_task_id",
}));

export const firstScheduledTask = ds.tasks[0].id;

Coming soon!

Using getScheduledTasks

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 getScheduledTasks(args: GetScheduledTasksArgs, opts?: InvokeOptions): Promise<GetScheduledTasksResult>
function getScheduledTasksOutput(args: GetScheduledTasksOutputArgs, opts?: InvokeOptions): Output<GetScheduledTasksResult>
def get_scheduled_tasks(ids: Optional[Sequence[str]] = None,
                        name_regex: Optional[str] = None,
                        output_file: Optional[str] = None,
                        scheduled_action: Optional[str] = None,
                        scheduled_task_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetScheduledTasksResult
def get_scheduled_tasks_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        name_regex: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        scheduled_action: Optional[pulumi.Input[str]] = None,
                        scheduled_task_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetScheduledTasksResult]
func GetScheduledTasks(ctx *Context, args *GetScheduledTasksArgs, opts ...InvokeOption) (*GetScheduledTasksResult, error)
func GetScheduledTasksOutput(ctx *Context, args *GetScheduledTasksOutputArgs, opts ...InvokeOption) GetScheduledTasksResultOutput

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

public static class GetScheduledTasks 
{
    public static Task<GetScheduledTasksResult> InvokeAsync(GetScheduledTasksArgs args, InvokeOptions? opts = null)
    public static Output<GetScheduledTasksResult> Invoke(GetScheduledTasksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetScheduledTasksResult> getScheduledTasks(GetScheduledTasksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:ess/getScheduledTasks:getScheduledTasks
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Ids List<string>

A list of scheduled task IDs.

NameRegex string

A regex string to filter resulting scheduled tasks by name.

OutputFile string
ScheduledAction string

The operation to be performed when a scheduled task is triggered.

ScheduledTaskId string

The id of the scheduled task.

Ids []string

A list of scheduled task IDs.

NameRegex string

A regex string to filter resulting scheduled tasks by name.

OutputFile string
ScheduledAction string

The operation to be performed when a scheduled task is triggered.

ScheduledTaskId string

The id of the scheduled task.

ids List<String>

A list of scheduled task IDs.

nameRegex String

A regex string to filter resulting scheduled tasks by name.

outputFile String
scheduledAction String

The operation to be performed when a scheduled task is triggered.

scheduledTaskId String

The id of the scheduled task.

ids string[]

A list of scheduled task IDs.

nameRegex string

A regex string to filter resulting scheduled tasks by name.

outputFile string
scheduledAction string

The operation to be performed when a scheduled task is triggered.

scheduledTaskId string

The id of the scheduled task.

ids Sequence[str]

A list of scheduled task IDs.

name_regex str

A regex string to filter resulting scheduled tasks by name.

output_file str
scheduled_action str

The operation to be performed when a scheduled task is triggered.

scheduled_task_id str

The id of the scheduled task.

ids List<String>

A list of scheduled task IDs.

nameRegex String

A regex string to filter resulting scheduled tasks by name.

outputFile String
scheduledAction String

The operation to be performed when a scheduled task is triggered.

scheduledTaskId String

The id of the scheduled task.

getScheduledTasks Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of scheduled task ids.

Names List<string>

A list of scheduled task names.

Tasks List<Pulumi.AliCloud.Ess.Outputs.GetScheduledTasksTask>

A list of scheduled tasks. Each element contains the following attributes:

NameRegex string
OutputFile string
ScheduledAction string

The operation to be performed when a scheduled task is triggered.

ScheduledTaskId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of scheduled task ids.

Names []string

A list of scheduled task names.

Tasks []GetScheduledTasksTask

A list of scheduled tasks. Each element contains the following attributes:

NameRegex string
OutputFile string
ScheduledAction string

The operation to be performed when a scheduled task is triggered.

ScheduledTaskId string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of scheduled task ids.

names List<String>

A list of scheduled task names.

tasks List<GetScheduledTasksTask>

A list of scheduled tasks. Each element contains the following attributes:

nameRegex String
outputFile String
scheduledAction String

The operation to be performed when a scheduled task is triggered.

scheduledTaskId String
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of scheduled task ids.

names string[]

A list of scheduled task names.

tasks GetScheduledTasksTask[]

A list of scheduled tasks. Each element contains the following attributes:

nameRegex string
outputFile string
scheduledAction string

The operation to be performed when a scheduled task is triggered.

scheduledTaskId string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of scheduled task ids.

names Sequence[str]

A list of scheduled task names.

tasks Sequence[GetScheduledTasksTask]

A list of scheduled tasks. Each element contains the following attributes:

name_regex str
output_file str
scheduled_action str

The operation to be performed when a scheduled task is triggered.

scheduled_task_id str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of scheduled task ids.

names List<String>

A list of scheduled task names.

tasks List<Property Map>

A list of scheduled tasks. Each element contains the following attributes:

nameRegex String
outputFile String
scheduledAction String

The operation to be performed when a scheduled task is triggered.

scheduledTaskId String

Supporting Types

GetScheduledTasksTask

Description string

Description of the scheduled task.

Id string

ID of the scheduled task id.

LaunchExpirationTime int

The time period during which a failed scheduled task is retried.

LaunchTime string

The time at which the scheduled task is triggered.

MaxValue int
MinValue int
Name string

Name of the scheduled task name.

RecurrenceEndTime string

Specifies the end time after which the scheduled task is no longer repeated.

RecurrenceType string

Specifies the recurrence type of the scheduled task.

RecurrenceValue string

Specifies how often a scheduled task recurs.

ScheduledAction string

The operation to be performed when a scheduled task is triggered.

TaskEnabled bool
Description string

Description of the scheduled task.

Id string

ID of the scheduled task id.

LaunchExpirationTime int

The time period during which a failed scheduled task is retried.

LaunchTime string

The time at which the scheduled task is triggered.

MaxValue int
MinValue int
Name string

Name of the scheduled task name.

RecurrenceEndTime string

Specifies the end time after which the scheduled task is no longer repeated.

RecurrenceType string

Specifies the recurrence type of the scheduled task.

RecurrenceValue string

Specifies how often a scheduled task recurs.

ScheduledAction string

The operation to be performed when a scheduled task is triggered.

TaskEnabled bool
description String

Description of the scheduled task.

id String

ID of the scheduled task id.

launchExpirationTime Integer

The time period during which a failed scheduled task is retried.

launchTime String

The time at which the scheduled task is triggered.

maxValue Integer
minValue Integer
name String

Name of the scheduled task name.

recurrenceEndTime String

Specifies the end time after which the scheduled task is no longer repeated.

recurrenceType String

Specifies the recurrence type of the scheduled task.

recurrenceValue String

Specifies how often a scheduled task recurs.

scheduledAction String

The operation to be performed when a scheduled task is triggered.

taskEnabled Boolean
description string

Description of the scheduled task.

id string

ID of the scheduled task id.

launchExpirationTime number

The time period during which a failed scheduled task is retried.

launchTime string

The time at which the scheduled task is triggered.

maxValue number
minValue number
name string

Name of the scheduled task name.

recurrenceEndTime string

Specifies the end time after which the scheduled task is no longer repeated.

recurrenceType string

Specifies the recurrence type of the scheduled task.

recurrenceValue string

Specifies how often a scheduled task recurs.

scheduledAction string

The operation to be performed when a scheduled task is triggered.

taskEnabled boolean
description str

Description of the scheduled task.

id str

ID of the scheduled task id.

launch_expiration_time int

The time period during which a failed scheduled task is retried.

launch_time str

The time at which the scheduled task is triggered.

max_value int
min_value int
name str

Name of the scheduled task name.

recurrence_end_time str

Specifies the end time after which the scheduled task is no longer repeated.

recurrence_type str

Specifies the recurrence type of the scheduled task.

recurrence_value str

Specifies how often a scheduled task recurs.

scheduled_action str

The operation to be performed when a scheduled task is triggered.

task_enabled bool
description String

Description of the scheduled task.

id String

ID of the scheduled task id.

launchExpirationTime Number

The time period during which a failed scheduled task is retried.

launchTime String

The time at which the scheduled task is triggered.

maxValue Number
minValue Number
name String

Name of the scheduled task name.

recurrenceEndTime String

Specifies the end time after which the scheduled task is no longer repeated.

recurrenceType String

Specifies the recurrence type of the scheduled task.

recurrenceValue String

Specifies how often a scheduled task recurs.

scheduledAction String

The operation to be performed when a scheduled task is triggered.

taskEnabled Boolean

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.