getExecutions

This data source provides a list of OOS Executions in an Alibaba Cloud account according to the specified filters.

NOTE: Available in v1.93.0+.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const example = alicloud.oos.getExecutions({
ids: ["execution_id"],
templateName: "name",
status: "Success",
});
export const firstExecutionId = example.then(example => example.executions?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
example = alicloud.oos.get_executions(ids=["execution_id"],
template_name="name",
status="Success")
pulumi.export("firstExecutionId", example.executions[0].id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var example = AliCloud.Oos.GetExecutions.Invoke(new()
{
Ids = new[]
{
"execution_id",
},
TemplateName = "name",
Status = "Success",
});
return new Dictionary<string, object?>
{
["firstExecutionId"] = example&#46;Apply(getExecutionsResult => getExecutionsResult&#46;Executions[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
example, err := oos.GetExecutions(ctx, &oos.GetExecutionsArgs{
Ids: []string{
"execution_id",
},
TemplateName: pulumi.StringRef("name"),
Status: pulumi.StringRef("Success"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstExecutionId", example.Executions[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oos.OosFunctions;
import com.pulumi.alicloud.oos.inputs.GetExecutionsArgs;
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) {
// Declare the data source
final var example = OosFunctions.getExecutions(GetExecutionsArgs.builder()
.ids("execution_id")
.templateName("name")
.status("Success")
.build());
ctx.export("firstExecutionId", example.executions()[0].id());
}
}
variables:
# Declare the data source
example:
fn::invoke:
function: alicloud:oos:getExecutions
arguments:
ids:
- execution_id
templateName: name
status: Success
outputs:
firstExecutionId: ${example.executions[0].id}

Return

A collection of values returned by getExecutions.

Parameters

argument

A collection of arguments for invoking getExecutions.


suspend fun getExecutions(category: String? = null, endDate: String? = null, endDateAfter: String? = null, executedBy: String? = null, ids: List<String>? = null, includeChildExecution: Boolean? = null, mode: String? = null, outputFile: String? = null, parentExecutionId: String? = null, ramRole: String? = null, sortField: String? = null, sortOrder: String? = null, startDateAfter: String? = null, startDateBefore: String? = null, status: String? = null, tags: Map<String, String>? = null, templateName: String? = null): GetExecutionsResult

Return

A collection of values returned by getExecutions.

Parameters

category

The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.

endDate

The time when the execution was ended.

endDateAfter

Execution whose end time is less than or equal to the specified time.

executedBy

The user who execute the template.

ids

A list of OOS Execution ids.

includeChildExecution

Whether to include sub-execution.

mode

The mode of OOS Execution. Valid: Automatic, Debug.

outputFile

File name where to save data source results (after running pulumi preview).

parentExecutionId

The id of parent OOS Execution.

ramRole

The role that executes the current template.

sortField

The sort field.

sortOrder

The sort order.

startDateAfter

The execution whose start time is greater than or equal to the specified time.

startDateBefore

The execution with start time less than or equal to the specified time.

status

The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.

tags

A mapping of tags to assign to the resource.

templateName

The name of execution template.

See also


Return

A collection of values returned by getExecutions.

Parameters

argument

Builder for com.pulumi.alicloud.oos.kotlin.inputs.GetExecutionsPlainArgs.

See also