// *** 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.Ros
{
    public static class GetChangeSets
    {
        /// <summary>
        /// This data source provides the Ros Change Sets of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.105.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Ros.GetChangeSets.Invoke(new()
        ///     {
        ///         StackId = "example_value",
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstRosChangeSetId"] = example.Apply(getChangeSetsResult =&gt; getChangeSetsResult.Sets[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetChangeSetsResult> InvokeAsync(GetChangeSetsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetChangeSetsResult>("alicloud:ros/getChangeSets:getChangeSets", args ?? new GetChangeSetsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Ros Change Sets of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.105.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Ros.GetChangeSets.Invoke(new()
        ///     {
        ///         StackId = "example_value",
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstRosChangeSetId"] = example.Apply(getChangeSetsResult =&gt; getChangeSetsResult.Sets[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetChangeSetsResult> Invoke(GetChangeSetsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetChangeSetsResult>("alicloud:ros/getChangeSets:getChangeSets", args ?? new GetChangeSetsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetChangeSetsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the change set.  The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
        /// </summary>
        [Input("changeSetName")]
        public string? ChangeSetName { get; set; }

        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public bool? EnableDetails { get; set; }

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

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

        /// <summary>
        /// A regex string to filter results by Change Set name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

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

        /// <summary>
        /// The ID of the stack for which you want to create the change set. ROS generates the change set by comparing the stack information with the information that you submit, such as a modified template or different inputs.
        /// </summary>
        [Input("stackId", required: true)]
        public string StackId { get; set; } = null!;

        /// <summary>
        /// The status of the change set.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

    public sealed class GetChangeSetsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the change set.  The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
        /// </summary>
        [Input("changeSetName")]
        public Input<string>? ChangeSetName { get; set; }

        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public Input<bool>? EnableDetails { get; set; }

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

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

        /// <summary>
        /// A regex string to filter results by Change Set name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

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

        /// <summary>
        /// The ID of the stack for which you want to create the change set. ROS generates the change set by comparing the stack information with the information that you submit, such as a modified template or different inputs.
        /// </summary>
        [Input("stackId", required: true)]
        public Input<string> StackId { get; set; } = null!;

        /// <summary>
        /// The status of the change set.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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


    [OutputType]
    public sealed class GetChangeSetsResult
    {
        public readonly string? ChangeSetName;
        public readonly bool? EnableDetails;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly ImmutableArray<Outputs.GetChangeSetsSetResult> Sets;
        public readonly string StackId;
        public readonly string? Status;

        [OutputConstructor]
        private GetChangeSetsResult(
            string? changeSetName,

            bool? enableDetails,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            ImmutableArray<Outputs.GetChangeSetsSetResult> sets,

            string stackId,

            string? status)
        {
            ChangeSetName = changeSetName;
            EnableDetails = enableDetails;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Sets = sets;
            StackId = stackId;
            Status = status;
        }
    }
}
