get Executions
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.Apply(getExecutionsResult => getExecutionsResult.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.applyValue(getExecutionsResult -> getExecutionsResult.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
A collection of arguments for invoking getExecutions.
Return
A collection of values returned by getExecutions.
Parameters
The category of template. Valid: AlarmTrigger
, EventTrigger
, Other
and TimerTrigger
.
The time when the execution was ended.
Execution whose end time is less than or equal to the specified time.
The user who execute the template.
A list of OOS Execution ids.
Whether to include sub-execution.
The mode of OOS Execution. Valid: Automatic
, Debug
.
File name where to save data source results (after running pulumi preview
).
The id of parent OOS Execution.
The role that executes the current template.
The sort field.
The sort order.
The execution whose start time is greater than or equal to the specified time.
The execution with start time less than or equal to the specified time.
The Status of OOS Execution. Valid: Cancelled
, Failed
, Queued
, Running
, Started
, Success
, Waiting
.
A mapping of tags to assign to the resource.
The name of execution template.
See also
Return
A collection of values returned by getExecutions.
Parameters
Builder for com.pulumi.alicloud.oos.kotlin.inputs.GetExecutionsPlainArgs.