<filename>sdk/dotnet/Ecs/GetEcsInvocations.cs// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Ecs
{
    public static class GetEcsInvocations
    {
        /// <summary>
        /// This data source provides the Ecs Invocations of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.168.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Ecs.GetEcsInvocations.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example-id",
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["ecsInvocationId1"] = ids.Apply(getEcsInvocationsResult =&gt; getEcsInvocationsResult.Invocations[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetEcsInvocationsResult> InvokeAsync(GetEcsInvocationsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetEcsInvocationsResult>("alicloud:ecs/getEcsInvocations:getEcsInvocations", args ?? new GetEcsInvocationsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Ecs Invocations of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.168.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Ecs.GetEcsInvocations.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example-id",
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["ecsInvocationId1"] = ids.Apply(getEcsInvocationsResult =&gt; getEcsInvocationsResult.Invocations[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetEcsInvocationsResult> Invoke(GetEcsInvocationsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetEcsInvocationsResult>("alicloud:ecs/getEcsInvocations:getEcsInvocations", args ?? new GetEcsInvocationsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetEcsInvocationsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the command.
        /// </summary>
        [Input("commandId")]
        public string? CommandId { get; set; }

        /// <summary>
        /// The encoding mode of the CommandContent and Output response parameters. Valid values: `PlainText`, `Base64`.
        /// </summary>
        [Input("contentEncoding")]
        public string? ContentEncoding { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Invocation IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("invokeStatus")]
        public string? InvokeStatus { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        [Input("pageNumber")]
        public int? PageNumber { get; set; }

        [Input("pageSize")]
        public int? PageSize { get; set; }

        public GetEcsInvocationsArgs()
        {
        }
        public static new GetEcsInvocationsArgs Empty => new GetEcsInvocationsArgs();
    }

    public sealed class GetEcsInvocationsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the command.
        /// </summary>
        [Input("commandId")]
        public Input<string>? CommandId { get; set; }

        /// <summary>
        /// The encoding mode of the CommandContent and Output response parameters. Valid values: `PlainText`, `Base64`.
        /// </summary>
        [Input("contentEncoding")]
        public Input<string>? ContentEncoding { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Invocation IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("invokeStatus")]
        public Input<string>? InvokeStatus { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        [Input("pageNumber")]
        public Input<int>? PageNumber { get; set; }

        [Input("pageSize")]
        public Input<int>? PageSize { get; set; }

        public GetEcsInvocationsInvokeArgs()
        {
        }
        public static new GetEcsInvocationsInvokeArgs Empty => new GetEcsInvocationsInvokeArgs();
    }


    [OutputType]
    public sealed class GetEcsInvocationsResult
    {
        public readonly string? CommandId;
        public readonly string? ContentEncoding;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly ImmutableArray<Outputs.GetEcsInvocationsInvocationResult> Invocations;
        public readonly string? InvokeStatus;
        public readonly string? OutputFile;
        public readonly int? PageNumber;
        public readonly int? PageSize;

        [OutputConstructor]
        private GetEcsInvocationsResult(
            string? commandId,

            string? contentEncoding,

            string id,

            ImmutableArray<string> ids,

            ImmutableArray<Outputs.GetEcsInvocationsInvocationResult> invocations,

            string? invokeStatus,

            string? outputFile,

            int? pageNumber,

            int? pageSize)
        {
            CommandId = commandId;
            ContentEncoding = contentEncoding;
            Id = id;
            Ids = ids;
            Invocations = invocations;
            InvokeStatus = invokeStatus;
            OutputFile = outputFile;
            PageNumber = pageNumber;
            PageSize = pageSize;
        }
    }
}
