Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi
alicloud.ess.getScheduledTasks
Explore with Pulumi AI
This data source provides available scheduled task resources.
NOTE: Available in 1.72.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ds = alicloud.ess.getScheduledTasks({
scheduledTaskId: "scheduled_task_id",
nameRegex: "scheduled_task_name",
});
export const firstScheduledTask = ds.then(ds => ds.tasks?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ds = alicloud.ess.get_scheduled_tasks(scheduled_task_id="scheduled_task_id",
name_regex="scheduled_task_name")
pulumi.export("firstScheduledTask", ds.tasks[0].id)
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{
ScheduledTaskId: pulumi.StringRef("scheduled_task_id"),
NameRegex: pulumi.StringRef("scheduled_task_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstScheduledTask", ds.Tasks[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ds = AliCloud.Ess.GetScheduledTasks.Invoke(new()
{
ScheduledTaskId = "scheduled_task_id",
NameRegex = "scheduled_task_name",
});
return new Dictionary<string, object?>
{
["firstScheduledTask"] = ds.Apply(getScheduledTasksResult => getScheduledTasksResult.Tasks[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ess.EssFunctions;
import com.pulumi.alicloud.ess.inputs.GetScheduledTasksArgs;
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 ds = EssFunctions.getScheduledTasks(GetScheduledTasksArgs.builder()
.scheduledTaskId("scheduled_task_id")
.nameRegex("scheduled_task_name")
.build());
ctx.export("firstScheduledTask", ds.applyValue(getScheduledTasksResult -> getScheduledTasksResult.tasks()[0].id()));
}
}
variables:
ds:
fn::invoke:
Function: alicloud:ess:getScheduledTasks
Arguments:
scheduledTaskId: scheduled_task_id
nameRegex: scheduled_task_name
outputs:
firstScheduledTask: ${ds.tasks[0].id}
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.
- Name
Regex string - A regex string to filter resulting scheduled tasks by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- Scheduled
Task stringId - The id of the scheduled task.
- Ids []string
- A list of scheduled task IDs.
- Name
Regex string - A regex string to filter resulting scheduled tasks by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- Scheduled
Task stringId - The id of the scheduled task.
- ids List<String>
- A list of scheduled task IDs.
- name
Regex String - A regex string to filter resulting scheduled tasks by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- scheduled
Task StringId - The id of the scheduled task.
- ids string[]
- A list of scheduled task IDs.
- name
Regex string - A regex string to filter resulting scheduled tasks by name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- scheduled
Task stringId - 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 - File name where to save data source results (after running
pulumi preview
). - scheduled_
action str - The operation to be performed when a scheduled task is triggered.
- scheduled_
task_ strid - The id of the scheduled task.
- ids List<String>
- A list of scheduled task IDs.
- name
Regex String - A regex string to filter resulting scheduled tasks by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- scheduled
Task StringId - 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.
Ali Cloud. Ess. Outputs. Get Scheduled Tasks Task> - A list of scheduled tasks. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- Scheduled
Task stringId
- 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
[]Get
Scheduled Tasks Task - A list of scheduled tasks. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- Scheduled
Task stringId
- 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<Get
Scheduled Tasks Task> - A list of scheduled tasks. Each element contains the following attributes:
- name
Regex String - output
File String - scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- scheduled
Task StringId
- 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
Get
Scheduled Tasks Task[] - A list of scheduled tasks. Each element contains the following attributes:
- name
Regex string - output
File string - scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- scheduled
Task stringId
- 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[Get
Scheduled Tasks Task] - 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_ strid
- 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:
- name
Regex String - output
File String - scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- scheduled
Task StringId
Supporting Types
GetScheduledTasksTask
- Description string
- Description of the scheduled task.
- Id string
- ID of the scheduled task id.
- Launch
Expiration intTime - The time period during which a failed scheduled task is retried.
- Launch
Time string - The time at which the scheduled task is triggered.
- Max
Value int - Min
Value int - Name string
- Name of the scheduled task name.
- Recurrence
End stringTime - Specifies the end time after which the scheduled task is no longer repeated.
- Recurrence
Type string - Specifies the recurrence type of the scheduled task.
- Recurrence
Value string - Specifies how often a scheduled task recurs.
- Scheduled
Action string - 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.
- Launch
Expiration intTime - The time period during which a failed scheduled task is retried.
- Launch
Time string - The time at which the scheduled task is triggered.
- Max
Value int - Min
Value int - Name string
- Name of the scheduled task name.
- Recurrence
End stringTime - Specifies the end time after which the scheduled task is no longer repeated.
- Recurrence
Type string - Specifies the recurrence type of the scheduled task.
- Recurrence
Value string - Specifies how often a scheduled task recurs.
- Scheduled
Action string - 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.
- launch
Expiration IntegerTime - The time period during which a failed scheduled task is retried.
- launch
Time String - The time at which the scheduled task is triggered.
- max
Value Integer - min
Value Integer - name String
- Name of the scheduled task name.
- recurrence
End StringTime - Specifies the end time after which the scheduled task is no longer repeated.
- recurrence
Type String - Specifies the recurrence type of the scheduled task.
- recurrence
Value String - Specifies how often a scheduled task recurs.
- scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- task
Enabled Boolean
- description string
- Description of the scheduled task.
- id string
- ID of the scheduled task id.
- launch
Expiration numberTime - The time period during which a failed scheduled task is retried.
- launch
Time string - The time at which the scheduled task is triggered.
- max
Value number - min
Value number - name string
- Name of the scheduled task name.
- recurrence
End stringTime - Specifies the end time after which the scheduled task is no longer repeated.
- recurrence
Type string - Specifies the recurrence type of the scheduled task.
- recurrence
Value string - Specifies how often a scheduled task recurs.
- scheduled
Action string - The operation to be performed when a scheduled task is triggered.
- task
Enabled boolean
- description str
- Description of the scheduled task.
- id str
- ID of the scheduled task id.
- launch_
expiration_ inttime - 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_ strtime - 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.
- launch
Expiration NumberTime - The time period during which a failed scheduled task is retried.
- launch
Time String - The time at which the scheduled task is triggered.
- max
Value Number - min
Value Number - name String
- Name of the scheduled task name.
- recurrence
End StringTime - Specifies the end time after which the scheduled task is no longer repeated.
- recurrence
Type String - Specifies the recurrence type of the scheduled task.
- recurrence
Value String - Specifies how often a scheduled task recurs.
- scheduled
Action String - The operation to be performed when a scheduled task is triggered.
- task
Enabled Boolean
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.