1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. oos
  5. getExecutions
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.oos.getExecutions

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    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";
    
    const example = alicloud.oos.getExecutions({
        ids: ["execution_id"],
        status: "Success",
        templateName: "name",
    });
    export const firstExecutionId = example.then(example => example.executions?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.oos.get_executions(ids=["execution_id"],
        status="Success",
        template_name="name")
    pulumi.export("firstExecutionId", example.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 {
    		example, err := oos.GetExecutions(ctx, &oos.GetExecutionsArgs{
    			Ids: []string{
    				"execution_id",
    			},
    			Status:       pulumi.StringRef("Success"),
    			TemplateName: pulumi.StringRef("name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstExecutionId", example.Executions[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Oos.GetExecutions.Invoke(new()
        {
            Ids = new[]
            {
                "execution_id",
            },
            Status = "Success",
            TemplateName = "name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstExecutionId"] = example.Apply(getExecutionsResult => getExecutionsResult.Executions[0]?.Id),
        };
    });
    
    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) {
            final var example = OosFunctions.getExecutions(GetExecutionsArgs.builder()
                .ids("execution_id")
                .status("Success")
                .templateName("name")
                .build());
    
            ctx.export("firstExecutionId", example.applyValue(getExecutionsResult -> getExecutionsResult.executions()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:oos:getExecutions
          Arguments:
            ids:
              - execution_id
            status: Success
            templateName: name
    outputs:
      firstExecutionId: ${example.executions[0].id}
    

    Using getExecutions

    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 getExecutions(args: GetExecutionsArgs, opts?: InvokeOptions): Promise<GetExecutionsResult>
    function getExecutionsOutput(args: GetExecutionsOutputArgs, opts?: InvokeOptions): Output<GetExecutionsResult>
    def get_executions(category: Optional[str] = None,
                       end_date: Optional[str] = None,
                       end_date_after: Optional[str] = None,
                       executed_by: Optional[str] = None,
                       ids: Optional[Sequence[str]] = None,
                       include_child_execution: Optional[bool] = None,
                       mode: Optional[str] = None,
                       output_file: Optional[str] = None,
                       parent_execution_id: Optional[str] = None,
                       ram_role: Optional[str] = None,
                       sort_field: Optional[str] = None,
                       sort_order: Optional[str] = None,
                       start_date_after: Optional[str] = None,
                       start_date_before: Optional[str] = None,
                       status: Optional[str] = None,
                       tags: Optional[Mapping[str, Any]] = None,
                       template_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetExecutionsResult
    def get_executions_output(category: Optional[pulumi.Input[str]] = None,
                       end_date: Optional[pulumi.Input[str]] = None,
                       end_date_after: Optional[pulumi.Input[str]] = None,
                       executed_by: Optional[pulumi.Input[str]] = None,
                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       include_child_execution: Optional[pulumi.Input[bool]] = None,
                       mode: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       parent_execution_id: Optional[pulumi.Input[str]] = None,
                       ram_role: Optional[pulumi.Input[str]] = None,
                       sort_field: Optional[pulumi.Input[str]] = None,
                       sort_order: Optional[pulumi.Input[str]] = None,
                       start_date_after: Optional[pulumi.Input[str]] = None,
                       start_date_before: Optional[pulumi.Input[str]] = None,
                       status: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                       template_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetExecutionsResult]
    func GetExecutions(ctx *Context, args *GetExecutionsArgs, opts ...InvokeOption) (*GetExecutionsResult, error)
    func GetExecutionsOutput(ctx *Context, args *GetExecutionsOutputArgs, opts ...InvokeOption) GetExecutionsResultOutput

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

    public static class GetExecutions 
    {
        public static Task<GetExecutionsResult> InvokeAsync(GetExecutionsArgs args, InvokeOptions? opts = null)
        public static Output<GetExecutionsResult> Invoke(GetExecutionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExecutionsResult> getExecutions(GetExecutionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:oos/getExecutions:getExecutions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    EndDate string
    The time when the execution was ended.
    EndDateAfter string
    Execution whose end time is less than or equal to the specified time.
    ExecutedBy string
    The user who execute the template.
    Ids List<string>
    A list of OOS Execution ids.
    IncludeChildExecution bool
    Whether to include sub-execution.
    Mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParentExecutionId string
    The id of parent OOS Execution.
    RamRole string
    The role that executes the current template.
    SortField string
    The sort field.
    SortOrder string
    The sort order.
    StartDateAfter string
    The execution whose start time is greater than or equal to the specified time.
    StartDateBefore string
    The execution with start time less than or equal to the specified time.
    Status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of execution template.
    Category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    EndDate string
    The time when the execution was ended.
    EndDateAfter string
    Execution whose end time is less than or equal to the specified time.
    ExecutedBy string
    The user who execute the template.
    Ids []string
    A list of OOS Execution ids.
    IncludeChildExecution bool
    Whether to include sub-execution.
    Mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParentExecutionId string
    The id of parent OOS Execution.
    RamRole string
    The role that executes the current template.
    SortField string
    The sort field.
    SortOrder string
    The sort order.
    StartDateAfter string
    The execution whose start time is greater than or equal to the specified time.
    StartDateBefore string
    The execution with start time less than or equal to the specified time.
    Status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of execution template.
    category String
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    endDate String
    The time when the execution was ended.
    endDateAfter String
    Execution whose end time is less than or equal to the specified time.
    executedBy String
    The user who execute the template.
    ids List<String>
    A list of OOS Execution ids.
    includeChildExecution Boolean
    Whether to include sub-execution.
    mode String
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parentExecutionId String
    The id of parent OOS Execution.
    ramRole String
    The role that executes the current template.
    sortField String
    The sort field.
    sortOrder String
    The sort order.
    startDateAfter String
    The execution whose start time is greater than or equal to the specified time.
    startDateBefore String
    The execution with start time less than or equal to the specified time.
    status String
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateName String
    The name of execution template.
    category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    endDate string
    The time when the execution was ended.
    endDateAfter string
    Execution whose end time is less than or equal to the specified time.
    executedBy string
    The user who execute the template.
    ids string[]
    A list of OOS Execution ids.
    includeChildExecution boolean
    Whether to include sub-execution.
    mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    parentExecutionId string
    The id of parent OOS Execution.
    ramRole string
    The role that executes the current template.
    sortField string
    The sort field.
    sortOrder string
    The sort order.
    startDateAfter string
    The execution whose start time is greater than or equal to the specified time.
    startDateBefore string
    The execution with start time less than or equal to the specified time.
    status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateName string
    The name of execution template.
    category str
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    end_date str
    The time when the execution was ended.
    end_date_after str
    Execution whose end time is less than or equal to the specified time.
    executed_by str
    The user who execute the template.
    ids Sequence[str]
    A list of OOS Execution ids.
    include_child_execution bool
    Whether to include sub-execution.
    mode str
    The mode of OOS Execution. Valid: Automatic, Debug.
    output_file str
    File name where to save data source results (after running pulumi preview).
    parent_execution_id str
    The id of parent OOS Execution.
    ram_role str
    The role that executes the current template.
    sort_field str
    The sort field.
    sort_order str
    The sort order.
    start_date_after str
    The execution whose start time is greater than or equal to the specified time.
    start_date_before str
    The execution with start time less than or equal to the specified time.
    status str
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    template_name str
    The name of execution template.
    category String
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    endDate String
    The time when the execution was ended.
    endDateAfter String
    Execution whose end time is less than or equal to the specified time.
    executedBy String
    The user who execute the template.
    ids List<String>
    A list of OOS Execution ids.
    includeChildExecution Boolean
    Whether to include sub-execution.
    mode String
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parentExecutionId String
    The id of parent OOS Execution.
    ramRole String
    The role that executes the current template.
    sortField String
    The sort field.
    sortOrder String
    The sort order.
    startDateAfter String
    The execution whose start time is greater than or equal to the specified time.
    startDateBefore String
    The execution with start time less than or equal to the specified time.
    status String
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateName String
    The name of execution template.

    getExecutions Result

    The following output properties are available:

    Executions List<Pulumi.AliCloud.Oos.Outputs.GetExecutionsExecution>
    A list of OOS Executions. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of OOS Execution ids.
    Category string
    EndDate string
    EndDateAfter string
    ExecutedBy string
    IncludeChildExecution bool
    Mode string
    OutputFile string
    ParentExecutionId string
    RamRole string
    SortField string
    SortOrder string
    StartDateAfter string
    StartDateBefore string
    Status string
    Tags Dictionary<string, object>
    TemplateName string
    Executions []GetExecutionsExecution
    A list of OOS Executions. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of OOS Execution ids.
    Category string
    EndDate string
    EndDateAfter string
    ExecutedBy string
    IncludeChildExecution bool
    Mode string
    OutputFile string
    ParentExecutionId string
    RamRole string
    SortField string
    SortOrder string
    StartDateAfter string
    StartDateBefore string
    Status string
    Tags map[string]interface{}
    TemplateName string
    executions List<GetExecutionsExecution>
    A list of OOS Executions. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of OOS Execution ids.
    category String
    endDate String
    endDateAfter String
    executedBy String
    includeChildExecution Boolean
    mode String
    outputFile String
    parentExecutionId String
    ramRole String
    sortField String
    sortOrder String
    startDateAfter String
    startDateBefore String
    status String
    tags Map<String,Object>
    templateName String
    executions GetExecutionsExecution[]
    A list of OOS Executions. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of OOS Execution ids.
    category string
    endDate string
    endDateAfter string
    executedBy string
    includeChildExecution boolean
    mode string
    outputFile string
    parentExecutionId string
    ramRole string
    sortField string
    sortOrder string
    startDateAfter string
    startDateBefore string
    status string
    tags {[key: string]: any}
    templateName string
    executions Sequence[GetExecutionsExecution]
    A list of OOS Executions. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of OOS Execution ids.
    category str
    end_date str
    end_date_after str
    executed_by str
    include_child_execution bool
    mode str
    output_file str
    parent_execution_id str
    ram_role str
    sort_field str
    sort_order str
    start_date_after str
    start_date_before str
    status str
    tags Mapping[str, Any]
    template_name str
    executions List<Property Map>
    A list of OOS Executions. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of OOS Execution ids.
    category String
    endDate String
    endDateAfter String
    executedBy String
    includeChildExecution Boolean
    mode String
    outputFile String
    parentExecutionId String
    ramRole String
    sortField String
    sortOrder String
    startDateAfter String
    startDateBefore String
    status String
    tags Map<Any>
    templateName String

    Supporting Types

    GetExecutionsExecution

    Category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    Counters string
    The counters of OOS Execution.
    CreateDate string
    The time when the execution was created.
    EndDate string
    The time when the execution was ended.
    ExecutedBy string
    The user who execute the template.
    ExecutionId string
    ID of the OOS Executions.
    Id string
    ID of the OOS Executions.
    IsParent bool
    Whether to include subtasks.
    Mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    Outputs string
    The outputs of OOS Executions.
    Parameters string
    The parameters required by the template
    ParentExecutionId string
    The id of parent OOS Execution.
    RamRole string
    The role that executes the current template.
    StartDate string
    The time when the template was started.
    Status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    StatusMessage string
    The message of status.
    StatusReason string
    The reason of status.
    TemplateId string
    The id of execution template.
    TemplateName string
    The name of execution template.
    TemplateVersion string
    The version of execution template.
    UpdateDate string
    The time when the template was updated.
    Category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    Counters string
    The counters of OOS Execution.
    CreateDate string
    The time when the execution was created.
    EndDate string
    The time when the execution was ended.
    ExecutedBy string
    The user who execute the template.
    ExecutionId string
    ID of the OOS Executions.
    Id string
    ID of the OOS Executions.
    IsParent bool
    Whether to include subtasks.
    Mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    Outputs string
    The outputs of OOS Executions.
    Parameters string
    The parameters required by the template
    ParentExecutionId string
    The id of parent OOS Execution.
    RamRole string
    The role that executes the current template.
    StartDate string
    The time when the template was started.
    Status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    StatusMessage string
    The message of status.
    StatusReason string
    The reason of status.
    TemplateId string
    The id of execution template.
    TemplateName string
    The name of execution template.
    TemplateVersion string
    The version of execution template.
    UpdateDate string
    The time when the template was updated.
    category String
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    counters String
    The counters of OOS Execution.
    createDate String
    The time when the execution was created.
    endDate String
    The time when the execution was ended.
    executedBy String
    The user who execute the template.
    executionId String
    ID of the OOS Executions.
    id String
    ID of the OOS Executions.
    isParent Boolean
    Whether to include subtasks.
    mode String
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputs String
    The outputs of OOS Executions.
    parameters String
    The parameters required by the template
    parentExecutionId String
    The id of parent OOS Execution.
    ramRole String
    The role that executes the current template.
    startDate String
    The time when the template was started.
    status String
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    statusMessage String
    The message of status.
    statusReason String
    The reason of status.
    templateId String
    The id of execution template.
    templateName String
    The name of execution template.
    templateVersion String
    The version of execution template.
    updateDate String
    The time when the template was updated.
    category string
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    counters string
    The counters of OOS Execution.
    createDate string
    The time when the execution was created.
    endDate string
    The time when the execution was ended.
    executedBy string
    The user who execute the template.
    executionId string
    ID of the OOS Executions.
    id string
    ID of the OOS Executions.
    isParent boolean
    Whether to include subtasks.
    mode string
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputs string
    The outputs of OOS Executions.
    parameters string
    The parameters required by the template
    parentExecutionId string
    The id of parent OOS Execution.
    ramRole string
    The role that executes the current template.
    startDate string
    The time when the template was started.
    status string
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    statusMessage string
    The message of status.
    statusReason string
    The reason of status.
    templateId string
    The id of execution template.
    templateName string
    The name of execution template.
    templateVersion string
    The version of execution template.
    updateDate string
    The time when the template was updated.
    category str
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    counters str
    The counters of OOS Execution.
    create_date str
    The time when the execution was created.
    end_date str
    The time when the execution was ended.
    executed_by str
    The user who execute the template.
    execution_id str
    ID of the OOS Executions.
    id str
    ID of the OOS Executions.
    is_parent bool
    Whether to include subtasks.
    mode str
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputs str
    The outputs of OOS Executions.
    parameters str
    The parameters required by the template
    parent_execution_id str
    The id of parent OOS Execution.
    ram_role str
    The role that executes the current template.
    start_date str
    The time when the template was started.
    status str
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    status_message str
    The message of status.
    status_reason str
    The reason of status.
    template_id str
    The id of execution template.
    template_name str
    The name of execution template.
    template_version str
    The version of execution template.
    update_date str
    The time when the template was updated.
    category String
    The category of template. Valid: AlarmTrigger, EventTrigger, Other and TimerTrigger.
    counters String
    The counters of OOS Execution.
    createDate String
    The time when the execution was created.
    endDate String
    The time when the execution was ended.
    executedBy String
    The user who execute the template.
    executionId String
    ID of the OOS Executions.
    id String
    ID of the OOS Executions.
    isParent Boolean
    Whether to include subtasks.
    mode String
    The mode of OOS Execution. Valid: Automatic, Debug.
    outputs String
    The outputs of OOS Executions.
    parameters String
    The parameters required by the template
    parentExecutionId String
    The id of parent OOS Execution.
    ramRole String
    The role that executes the current template.
    startDate String
    The time when the template was started.
    status String
    The Status of OOS Execution. Valid: Cancelled, Failed, Queued, Running, Started, Success, Waiting.
    statusMessage String
    The message of status.
    statusReason String
    The reason of status.
    templateId String
    The id of execution template.
    templateName String
    The name of execution template.
    templateVersion String
    The version of execution template.
    updateDate String
    The time when the template was updated.

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi