<reponame>pierskarsenbarg/pulumi-codefresh<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;
using Pulumi;

namespace PiersKarsenbarg.Codefresh
{
    public static class GetTeam
    {
        /// <summary>
        /// ## # data codefresh.Team
        /// 
        /// *Note*: Teams resources should be called with account specific access token  
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var admin = Codefresh.GetTeam.Invoke(new()
        ///     {
        ///         Name = "users",
        ///     });
        /// 
        ///     var permission2 = new Codefresh.Permission("permission2", new()
        ///     {
        ///         Team = admin.Apply(getTeamResult =&gt; getTeamResult.Id),
        ///         Action = "create",
        ///         Resource = "pipeline",
        ///         Tags = new[]
        ///         {
        ///             "frontend",
        ///         },
        ///     }, new CustomResourceOptions
        ///     {
        ///         Provider = codefresh.Acc1,
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Task<GetTeamResult> InvokeAsync(GetTeamArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetTeamResult>("codefresh:index/getTeam:getTeam", args ?? new GetTeamArgs(), options.WithDefaults());

        /// <summary>
        /// ## # data codefresh.Team
        /// 
        /// *Note*: Teams resources should be called with account specific access token  
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var admin = Codefresh.GetTeam.Invoke(new()
        ///     {
        ///         Name = "users",
        ///     });
        /// 
        ///     var permission2 = new Codefresh.Permission("permission2", new()
        ///     {
        ///         Team = admin.Apply(getTeamResult =&gt; getTeamResult.Id),
        ///         Action = "create",
        ///         Resource = "pipeline",
        ///         Tags = new[]
        ///         {
        ///             "frontend",
        ///         },
        ///     }, new CustomResourceOptions
        ///     {
        ///         Provider = codefresh.Acc1,
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Output<GetTeamResult> Invoke(GetTeamInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetTeamResult>("codefresh:index/getTeam:getTeam", args ?? new GetTeamInvokeArgs(), options.WithDefaults());
    }


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

        [Input("accountId")]
        public string? AccountId { get; set; }

        [Input("name")]
        public string? Name { get; set; }

        [Input("tags")]
        private List<string>? _tags;
        public List<string> Tags
        {
            get => _tags ?? (_tags = new List<string>());
            set => _tags = value;
        }

        [Input("type")]
        public string? Type { get; set; }

        [Input("users")]
        private List<string>? _users;
        public List<string> Users
        {
            get => _users ?? (_users = new List<string>());
            set => _users = value;
        }

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

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

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

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

        [Input("tags")]
        private InputList<string>? _tags;
        public InputList<string> Tags
        {
            get => _tags ?? (_tags = new InputList<string>());
            set => _tags = value;
        }

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

        [Input("users")]
        private InputList<string>? _users;
        public InputList<string> Users
        {
            get => _users ?? (_users = new InputList<string>());
            set => _users = value;
        }

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


    [OutputType]
    public sealed class GetTeamResult
    {
        public readonly string? _id;
        public readonly string? AccountId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? Name;
        public readonly ImmutableArray<string> Tags;
        public readonly string? Type;
        public readonly ImmutableArray<string> Users;

        [OutputConstructor]
        private GetTeamResult(
            string? _id,

            string? accountId,

            string id,

            string? name,

            ImmutableArray<string> tags,

            string? type,

            ImmutableArray<string> users)
        {
            this._id = _id;
            AccountId = accountId;
            Id = id;
            Name = name;
            Tags = tags;
            Type = type;
            Users = users;
        }
    }
}
