// *** 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;
using Pulumi;

namespace PiersKarsenbarg.Codefresh
{
    public static class GetIdps
    {
        /// <summary>
        /// ## # data codefresh.getIdps
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var idpAzure = Codefresh.GetIdps.Invoke(new()
        ///     {
        ///         DisplayName = "codefresh-onprem-tst-2",
        ///         ClientType = "azure",
        ///     });
        /// 
        ///     var local = Codefresh.GetIdps.Invoke(new()
        ///     {
        ///         DisplayName = "local",
        ///     });
        /// 
        ///     var acc = new Codefresh.Account("acc", new()
        ///     {
        ///         Features = @var.AccountFeatures,
        ///         Limits = new[]
        ///         {
        ///             new Codefresh.Inputs.AccountLimitArgs
        ///             {
        ///                 Collaborators = 25,
        ///                 DataRetentionWeeks = 5,
        ///             },
        ///         },
        ///         Builds = new[]
        ///         {
        ///             new Codefresh.Inputs.AccountBuildArgs
        ///             {
        ///                 Parallel = 25,
        ///                 Nodes = 7,
        ///             },
        ///         },
        ///     });
        /// 
        ///     var user1 = new Codefresh.User("user1", new()
        ///     {
        ///         Email = "ychag@example.com",
        ///         UserName = "user1",
        ///         Activate = true,
        ///         Roles = new[]
        ///         {
        ///             "Admin",
        ///             "User",
        ///         },
        ///         Logins = new[]
        ///         {
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = idpAzure.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///                 Sso = true,
        ///             },
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = local.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///             },
        ///         },
        ///         Personal = new Codefresh.Inputs.UserPersonalArgs
        ///         {
        ///             FirstName = "John",
        ///             LastName = "Smith",
        ///         },
        ///         Accounts = new[]
        ///         {
        ///             acc.Id,
        ///         },
        ///     });
        /// 
        ///     var accIdp = new Codefresh.IdpAccounts("accIdp", new()
        ///     {
        ///         IdpId = idpAzure.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///         AccountIds = new[]
        ///         {
        ///             acc.Id,
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Task<GetIdpsResult> InvokeAsync(GetIdpsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetIdpsResult>("codefresh:index/getIdps:getIdps", args ?? new GetIdpsArgs(), options.WithDefaults());

        /// <summary>
        /// ## # data codefresh.getIdps
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var idpAzure = Codefresh.GetIdps.Invoke(new()
        ///     {
        ///         DisplayName = "codefresh-onprem-tst-2",
        ///         ClientType = "azure",
        ///     });
        /// 
        ///     var local = Codefresh.GetIdps.Invoke(new()
        ///     {
        ///         DisplayName = "local",
        ///     });
        /// 
        ///     var acc = new Codefresh.Account("acc", new()
        ///     {
        ///         Features = @var.AccountFeatures,
        ///         Limits = new[]
        ///         {
        ///             new Codefresh.Inputs.AccountLimitArgs
        ///             {
        ///                 Collaborators = 25,
        ///                 DataRetentionWeeks = 5,
        ///             },
        ///         },
        ///         Builds = new[]
        ///         {
        ///             new Codefresh.Inputs.AccountBuildArgs
        ///             {
        ///                 Parallel = 25,
        ///                 Nodes = 7,
        ///             },
        ///         },
        ///     });
        /// 
        ///     var user1 = new Codefresh.User("user1", new()
        ///     {
        ///         Email = "ychag@example.com",
        ///         UserName = "user1",
        ///         Activate = true,
        ///         Roles = new[]
        ///         {
        ///             "Admin",
        ///             "User",
        ///         },
        ///         Logins = new[]
        ///         {
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = idpAzure.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///                 Sso = true,
        ///             },
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = local.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///             },
        ///         },
        ///         Personal = new Codefresh.Inputs.UserPersonalArgs
        ///         {
        ///             FirstName = "John",
        ///             LastName = "Smith",
        ///         },
        ///         Accounts = new[]
        ///         {
        ///             acc.Id,
        ///         },
        ///     });
        /// 
        ///     var accIdp = new Codefresh.IdpAccounts("accIdp", new()
        ///     {
        ///         IdpId = idpAzure.Apply(getIdpsResult =&gt; getIdpsResult.Id),
        ///         AccountIds = new[]
        ///         {
        ///             acc.Id,
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Output<GetIdpsResult> Invoke(GetIdpsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetIdpsResult>("codefresh:index/getIdps:getIdps", args ?? new GetIdpsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetIdpsArgs : global::Pulumi.InvokeArgs
    {
        [Input("_id")]
        public string? _id { get; set; }

        [Input("clientName")]
        public string? ClientName { get; set; }

        [Input("clientType")]
        public string? ClientType { get; set; }

        [Input("displayName")]
        public string? DisplayName { get; set; }

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

    public sealed class GetIdpsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("_id")]
        public Input<string>? _id { get; set; }

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

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

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

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


    [OutputType]
    public sealed class GetIdpsResult
    {
        public readonly string? _id;
        public readonly string AccessToken;
        public readonly ImmutableArray<string> Accounts;
        public readonly string AppId;
        public readonly string ClientHost;
        public readonly string ClientId;
        public readonly string? ClientName;
        public readonly string ClientSecret;
        public readonly string? ClientType;
        public readonly string CookieIv;
        public readonly string CookieKey;
        public readonly string? DisplayName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Scopes;
        public readonly string Tenant;

        [OutputConstructor]
        private GetIdpsResult(
            string? _id,

            string accessToken,

            ImmutableArray<string> accounts,

            string appId,

            string clientHost,

            string clientId,

            string? clientName,

            string clientSecret,

            string? clientType,

            string cookieIv,

            string cookieKey,

            string? displayName,

            string id,

            ImmutableArray<string> scopes,

            string tenant)
        {
            this._id = _id;
            AccessToken = accessToken;
            Accounts = accounts;
            AppId = appId;
            ClientHost = clientHost;
            ClientId = clientId;
            ClientName = clientName;
            ClientSecret = clientSecret;
            ClientType = clientType;
            CookieIv = cookieIv;
            CookieKey = cookieKey;
            DisplayName = displayName;
            Id = id;
            Scopes = scopes;
            Tenant = tenant;
        }
    }
}
