<gh_stars>0// *** 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.Mhub
{
    public static class GetApps
    {
        /// <summary>
        /// This data source provides the Mhub Apps of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.138.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "example_value";
        ///     var @default = new AliCloud.Mhub.App("default", new()
        ///     {
        ///         AppName = name,
        ///         ProductId = alicloud_mhub_product.Default.Id,
        ///         PackageName = "com.test.android",
        ///         Type = "2",
        ///     });
        /// 
        ///     var ids = AliCloud.Mhub.GetApps.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Mhub.GetApps.Invoke(new()
        ///     {
        ///         NameRegex = "^my-App",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["mhubAppId1"] = ids.Apply(getAppsResult =&gt; getAppsResult.Apps[0]?.Id),
        ///         ["mhubAppId2"] = nameRegex.Apply(getAppsResult =&gt; getAppsResult.Apps[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAppsResult> InvokeAsync(GetAppsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAppsResult>("alicloud:mhub/getApps:getApps", args ?? new GetAppsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Mhub Apps of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.138.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "example_value";
        ///     var @default = new AliCloud.Mhub.App("default", new()
        ///     {
        ///         AppName = name,
        ///         ProductId = alicloud_mhub_product.Default.Id,
        ///         PackageName = "com.test.android",
        ///         Type = "2",
        ///     });
        /// 
        ///     var ids = AliCloud.Mhub.GetApps.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Mhub.GetApps.Invoke(new()
        ///     {
        ///         NameRegex = "^my-App",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["mhubAppId1"] = ids.Apply(getAppsResult =&gt; getAppsResult.Apps[0]?.Id),
        ///         ["mhubAppId2"] = nameRegex.Apply(getAppsResult =&gt; getAppsResult.Apps[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAppsResult> Invoke(GetAppsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAppsResult>("alicloud:mhub/getApps:getApps", args ?? new GetAppsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAppsArgs : global::Pulumi.InvokeArgs
    {
        /// <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 App IDs. The value formats as `&lt;product_id&gt;:&lt;app_key&gt;`
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

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

        /// <summary>
        /// The os type. Valid values: `Android` and `iOS`.
        /// </summary>
        [Input("osType")]
        public string? OsType { get; set; }

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

        /// <summary>
        /// The ID of the Product.
        /// </summary>
        [Input("productId", required: true)]
        public string ProductId { get; set; } = null!;

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

    public sealed class GetAppsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <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 App IDs. The value formats as `&lt;product_id&gt;:&lt;app_key&gt;`
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

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

        /// <summary>
        /// The os type. Valid values: `Android` and `iOS`.
        /// </summary>
        [Input("osType")]
        public Input<string>? OsType { get; set; }

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

        /// <summary>
        /// The ID of the Product.
        /// </summary>
        [Input("productId", required: true)]
        public Input<string> ProductId { get; set; } = null!;

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


    [OutputType]
    public sealed class GetAppsResult
    {
        public readonly ImmutableArray<Outputs.GetAppsAppResult> Apps;
        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? OsType;
        public readonly string? OutputFile;
        public readonly string ProductId;

        [OutputConstructor]
        private GetAppsResult(
            ImmutableArray<Outputs.GetAppsAppResult> apps,

            bool? enableDetails,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? osType,

            string? outputFile,

            string productId)
        {
            Apps = apps;
            EnableDetails = enableDetails;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OsType = osType;
            OutputFile = outputFile;
            ProductId = productId;
        }
    }
}
