1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. getEcsInvocations
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.ecs.getEcsInvocations

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Ecs Invocations of the current Alibaba Cloud user.

    NOTE: Available in v1.168.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.ecs.getEcsInvocations({
        ids: ["example-id"],
    });
    export const ecsInvocationId1 = ids.then(ids => ids.invocations?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.ecs.get_ecs_invocations(ids=["example-id"])
    pulumi.export("ecsInvocationId1", ids.invocations[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := ecs.GetEcsInvocations(ctx, &ecs.GetEcsInvocationsArgs{
    			Ids: []string{
    				"example-id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ecsInvocationId1", ids.Invocations[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Ecs.GetEcsInvocations.Invoke(new()
        {
            Ids = new[]
            {
                "example-id",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["ecsInvocationId1"] = ids.Apply(getEcsInvocationsResult => getEcsInvocationsResult.Invocations[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetEcsInvocationsArgs;
    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 ids = EcsFunctions.getEcsInvocations(GetEcsInvocationsArgs.builder()
                .ids("example-id")
                .build());
    
            ctx.export("ecsInvocationId1", ids.applyValue(getEcsInvocationsResult -> getEcsInvocationsResult.invocations()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:ecs:getEcsInvocations
          Arguments:
            ids:
              - example-id
    outputs:
      ecsInvocationId1: ${ids.invocations[0].id}
    

    Using getEcsInvocations

    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 getEcsInvocations(args: GetEcsInvocationsArgs, opts?: InvokeOptions): Promise<GetEcsInvocationsResult>
    function getEcsInvocationsOutput(args: GetEcsInvocationsOutputArgs, opts?: InvokeOptions): Output<GetEcsInvocationsResult>
    def get_ecs_invocations(command_id: Optional[str] = None,
                            content_encoding: Optional[str] = None,
                            ids: Optional[Sequence[str]] = None,
                            invoke_status: Optional[str] = None,
                            output_file: Optional[str] = None,
                            page_number: Optional[int] = None,
                            page_size: Optional[int] = None,
                            opts: Optional[InvokeOptions] = None) -> GetEcsInvocationsResult
    def get_ecs_invocations_output(command_id: Optional[pulumi.Input[str]] = None,
                            content_encoding: Optional[pulumi.Input[str]] = None,
                            ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            invoke_status: Optional[pulumi.Input[str]] = None,
                            output_file: Optional[pulumi.Input[str]] = None,
                            page_number: Optional[pulumi.Input[int]] = None,
                            page_size: Optional[pulumi.Input[int]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetEcsInvocationsResult]
    func GetEcsInvocations(ctx *Context, args *GetEcsInvocationsArgs, opts ...InvokeOption) (*GetEcsInvocationsResult, error)
    func GetEcsInvocationsOutput(ctx *Context, args *GetEcsInvocationsOutputArgs, opts ...InvokeOption) GetEcsInvocationsResultOutput

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

    public static class GetEcsInvocations 
    {
        public static Task<GetEcsInvocationsResult> InvokeAsync(GetEcsInvocationsArgs args, InvokeOptions? opts = null)
        public static Output<GetEcsInvocationsResult> Invoke(GetEcsInvocationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEcsInvocationsResult> getEcsInvocations(GetEcsInvocationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ecs/getEcsInvocations:getEcsInvocations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CommandId string
    The execution ID of the command.
    ContentEncoding string
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    Ids List<string>
    A list of Invocation IDs.
    InvokeStatus string
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    CommandId string
    The execution ID of the command.
    ContentEncoding string
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    Ids []string
    A list of Invocation IDs.
    InvokeStatus string
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    commandId String
    The execution ID of the command.
    contentEncoding String
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    ids List<String>
    A list of Invocation IDs.
    invokeStatus String
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    commandId string
    The execution ID of the command.
    contentEncoding string
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    ids string[]
    A list of Invocation IDs.
    invokeStatus string
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    command_id str
    The execution ID of the command.
    content_encoding str
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    ids Sequence[str]
    A list of Invocation IDs.
    invoke_status str
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    commandId String
    The execution ID of the command.
    contentEncoding String
    The encoding mode of the CommandContent and Output response parameters. Valid values: PlainText, Base64.
    ids List<String>
    A list of Invocation IDs.
    invokeStatus String
    The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values: Running, Finished, Failed, PartialFailed, Stopped.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number

    getEcsInvocations Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Invocations List<Pulumi.AliCloud.Ecs.Outputs.GetEcsInvocationsInvocation>
    CommandId string
    ContentEncoding string
    InvokeStatus string
    OutputFile string
    PageNumber int
    PageSize int
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Invocations []GetEcsInvocationsInvocation
    CommandId string
    ContentEncoding string
    InvokeStatus string
    OutputFile string
    PageNumber int
    PageSize int
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    invocations List<GetEcsInvocationsInvocation>
    commandId String
    contentEncoding String
    invokeStatus String
    outputFile String
    pageNumber Integer
    pageSize Integer
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    invocations GetEcsInvocationsInvocation[]
    commandId string
    contentEncoding string
    invokeStatus string
    outputFile string
    pageNumber number
    pageSize number
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    invocations Sequence[GetEcsInvocationsInvocation]
    command_id str
    content_encoding str
    invoke_status str
    output_file str
    page_number int
    page_size int
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    invocations List<Property Map>
    commandId String
    contentEncoding String
    invokeStatus String
    outputFile String
    pageNumber Number
    pageSize Number

    Supporting Types

    GetEcsInvocationsInvocation

    CommandContent string
    The Base64-encoded command content.
    CommandId string
    The ID of the command.
    CommandName string
    The name of the command.
    CommandType string
    The type of the command.
    CreateTime string
    The creation time of the resource.
    Frequency string
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    Id string
    The ID of the Invocation.
    InvocationId string
    The ID of the Invocation.
    InvocationStatus string
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    InvokeInstances List<Pulumi.AliCloud.Ecs.Inputs.GetEcsInvocationsInvocationInvokeInstance>
    Execute target instance set type.
    InvokeStatus string
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    Parameters string
    The custom parameters in the command.
    RepeatMode string
    Indicates the execution mode of the command.
    Timed bool
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    Username string
    The username that was used to run the command on the instance.
    CommandContent string
    The Base64-encoded command content.
    CommandId string
    The ID of the command.
    CommandName string
    The name of the command.
    CommandType string
    The type of the command.
    CreateTime string
    The creation time of the resource.
    Frequency string
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    Id string
    The ID of the Invocation.
    InvocationId string
    The ID of the Invocation.
    InvocationStatus string
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    InvokeInstances []GetEcsInvocationsInvocationInvokeInstance
    Execute target instance set type.
    InvokeStatus string
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    Parameters string
    The custom parameters in the command.
    RepeatMode string
    Indicates the execution mode of the command.
    Timed bool
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    Username string
    The username that was used to run the command on the instance.
    commandContent String
    The Base64-encoded command content.
    commandId String
    The ID of the command.
    commandName String
    The name of the command.
    commandType String
    The type of the command.
    createTime String
    The creation time of the resource.
    frequency String
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    id String
    The ID of the Invocation.
    invocationId String
    The ID of the Invocation.
    invocationStatus String
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    invokeInstances List<GetEcsInvocationsInvocationInvokeInstance>
    Execute target instance set type.
    invokeStatus String
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    parameters String
    The custom parameters in the command.
    repeatMode String
    Indicates the execution mode of the command.
    timed Boolean
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    username String
    The username that was used to run the command on the instance.
    commandContent string
    The Base64-encoded command content.
    commandId string
    The ID of the command.
    commandName string
    The name of the command.
    commandType string
    The type of the command.
    createTime string
    The creation time of the resource.
    frequency string
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    id string
    The ID of the Invocation.
    invocationId string
    The ID of the Invocation.
    invocationStatus string
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    invokeInstances GetEcsInvocationsInvocationInvokeInstance[]
    Execute target instance set type.
    invokeStatus string
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    parameters string
    The custom parameters in the command.
    repeatMode string
    Indicates the execution mode of the command.
    timed boolean
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    username string
    The username that was used to run the command on the instance.
    command_content str
    The Base64-encoded command content.
    command_id str
    The ID of the command.
    command_name str
    The name of the command.
    command_type str
    The type of the command.
    create_time str
    The creation time of the resource.
    frequency str
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    id str
    The ID of the Invocation.
    invocation_id str
    The ID of the Invocation.
    invocation_status str
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    invoke_instances Sequence[GetEcsInvocationsInvocationInvokeInstance]
    Execute target instance set type.
    invoke_status str
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    parameters str
    The custom parameters in the command.
    repeat_mode str
    Indicates the execution mode of the command.
    timed bool
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    username str
    The username that was used to run the command on the instance.
    commandContent String
    The Base64-encoded command content.
    commandId String
    The ID of the command.
    commandName String
    The name of the command.
    commandType String
    The type of the command.
    createTime String
    The creation time of the resource.
    frequency String
    The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
    id String
    The ID of the Invocation.
    invocationId String
    The ID of the Invocation.
    invocationStatus String
    The execution state on a single instance. Valid values: Pending, Scheduled, Running, Success, Failed, Stopping, Stopped, PartialFailed.
    invokeInstances List<Property Map>
    Execute target instance set type.
    invokeStatus String
    The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    parameters String
    The custom parameters in the command.
    repeatMode String
    Indicates the execution mode of the command.
    timed Boolean
    Indicates whether the commands are to be automatically run.

    • error_code - The code that indicates why the command failed to be sent or run.
    • instance_invoke_status - Note: We recommend that you ignore this parameter and check the value of the invocation_status response parameter for the overall execution state.
    username String
    The username that was used to run the command on the instance.

    GetEcsInvocationsInvocationInvokeInstance

    creationTime String
    dropped Integer
    errorCode String
    errorInfo String
    exitCode Integer
    finishTime String
    instanceId String
    instanceInvokeStatus String
    invocationStatus String
    output String
    repeats Integer
    startTime String
    stopTime String
    timed Boolean
    updateTime String
    creationTime string
    dropped number
    errorCode string
    errorInfo string
    exitCode number
    finishTime string
    instanceId string
    instanceInvokeStatus string
    invocationStatus string
    output string
    repeats number
    startTime string
    stopTime string
    timed boolean
    updateTime string
    creationTime String
    dropped Number
    errorCode String
    errorInfo String
    exitCode Number
    finishTime String
    instanceId String
    instanceInvokeStatus String
    invocationStatus String
    output String
    repeats Number
    startTime String
    stopTime String
    timed Boolean
    updateTime String

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi