// *** 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.Yandex
{
    public static class GetAlbBackendGroup
    {
        /// <summary>
        /// Get information about a Yandex Application Load Balancer Backend Group. For more information, see
        /// [Yandex.Cloud Application Load Balancer](https://cloud.yandex.com/en/docs/application-load-balancer/quickstart).
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Yandex = Pulumi.Yandex;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var foo = Yandex.GetAlbBackendGroup.Invoke(new()
        ///     {
        ///         BackendGroupId = "my-backend-group-id",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This data source is used to define [Application Load Balancer Backend Groups] that can be used by other resources.
        /// </summary>
        public static Task<GetAlbBackendGroupResult> InvokeAsync(GetAlbBackendGroupArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetAlbBackendGroupResult>("yandex:index/getAlbBackendGroup:getAlbBackendGroup", args ?? new GetAlbBackendGroupArgs(), options.WithDefaults());

        /// <summary>
        /// Get information about a Yandex Application Load Balancer Backend Group. For more information, see
        /// [Yandex.Cloud Application Load Balancer](https://cloud.yandex.com/en/docs/application-load-balancer/quickstart).
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Yandex = Pulumi.Yandex;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var foo = Yandex.GetAlbBackendGroup.Invoke(new()
        ///     {
        ///         BackendGroupId = "my-backend-group-id",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This data source is used to define [Application Load Balancer Backend Groups] that can be used by other resources.
        /// </summary>
        public static Output<GetAlbBackendGroupResult> Invoke(GetAlbBackendGroupInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetAlbBackendGroupResult>("yandex:index/getAlbBackendGroup:getAlbBackendGroup", args ?? new GetAlbBackendGroupInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAlbBackendGroupArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Backend Group ID.
        /// </summary>
        [Input("backendGroupId")]
        public string? BackendGroupId { get; set; }

        /// <summary>
        /// Description of the backend group.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
        /// </summary>
        [Input("folderId")]
        public string? FolderId { get; set; }

        [Input("grpcBackends")]
        private List<Inputs.GetAlbBackendGroupGrpcBackendArgs>? _grpcBackends;

        /// <summary>
        /// Grpc backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public List<Inputs.GetAlbBackendGroupGrpcBackendArgs> GrpcBackends
        {
            get => _grpcBackends ?? (_grpcBackends = new List<Inputs.GetAlbBackendGroupGrpcBackendArgs>());
            set => _grpcBackends = value;
        }

        [Input("httpBackends")]
        private List<Inputs.GetAlbBackendGroupHttpBackendArgs>? _httpBackends;

        /// <summary>
        /// Http backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public List<Inputs.GetAlbBackendGroupHttpBackendArgs> HttpBackends
        {
            get => _httpBackends ?? (_httpBackends = new List<Inputs.GetAlbBackendGroupHttpBackendArgs>());
            set => _httpBackends = value;
        }

        [Input("labels")]
        private Dictionary<string, string>? _labels;

        /// <summary>
        /// Labels to assign to this backend group.
        /// </summary>
        public Dictionary<string, string> Labels
        {
            get => _labels ?? (_labels = new Dictionary<string, string>());
            set => _labels = value;
        }

        /// <summary>
        /// - Name of the Backend Group.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        [Input("sessionAffinity")]
        public Inputs.GetAlbBackendGroupSessionAffinityArgs? SessionAffinity { get; set; }

        [Input("streamBackends")]
        private List<Inputs.GetAlbBackendGroupStreamBackendArgs>? _streamBackends;

        /// <summary>
        /// Stream backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public List<Inputs.GetAlbBackendGroupStreamBackendArgs> StreamBackends
        {
            get => _streamBackends ?? (_streamBackends = new List<Inputs.GetAlbBackendGroupStreamBackendArgs>());
            set => _streamBackends = value;
        }

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

    public sealed class GetAlbBackendGroupInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Backend Group ID.
        /// </summary>
        [Input("backendGroupId")]
        public Input<string>? BackendGroupId { get; set; }

        /// <summary>
        /// Description of the backend group.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Folder that the resource belongs to. If value is omitted, the default provider folder is used.
        /// </summary>
        [Input("folderId")]
        public Input<string>? FolderId { get; set; }

        [Input("grpcBackends")]
        private InputList<Inputs.GetAlbBackendGroupGrpcBackendInputArgs>? _grpcBackends;

        /// <summary>
        /// Grpc backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public InputList<Inputs.GetAlbBackendGroupGrpcBackendInputArgs> GrpcBackends
        {
            get => _grpcBackends ?? (_grpcBackends = new InputList<Inputs.GetAlbBackendGroupGrpcBackendInputArgs>());
            set => _grpcBackends = value;
        }

        [Input("httpBackends")]
        private InputList<Inputs.GetAlbBackendGroupHttpBackendInputArgs>? _httpBackends;

        /// <summary>
        /// Http backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public InputList<Inputs.GetAlbBackendGroupHttpBackendInputArgs> HttpBackends
        {
            get => _httpBackends ?? (_httpBackends = new InputList<Inputs.GetAlbBackendGroupHttpBackendInputArgs>());
            set => _httpBackends = value;
        }

        [Input("labels")]
        private InputMap<string>? _labels;

        /// <summary>
        /// Labels to assign to this backend group.
        /// </summary>
        public InputMap<string> Labels
        {
            get => _labels ?? (_labels = new InputMap<string>());
            set => _labels = value;
        }

        /// <summary>
        /// - Name of the Backend Group.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("sessionAffinity")]
        public Input<Inputs.GetAlbBackendGroupSessionAffinityInputArgs>? SessionAffinity { get; set; }

        [Input("streamBackends")]
        private InputList<Inputs.GetAlbBackendGroupStreamBackendInputArgs>? _streamBackends;

        /// <summary>
        /// Stream backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public InputList<Inputs.GetAlbBackendGroupStreamBackendInputArgs> StreamBackends
        {
            get => _streamBackends ?? (_streamBackends = new InputList<Inputs.GetAlbBackendGroupStreamBackendInputArgs>());
            set => _streamBackends = value;
        }

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


    [OutputType]
    public sealed class GetAlbBackendGroupResult
    {
        public readonly string BackendGroupId;
        /// <summary>
        /// Creation timestamp of this backend group.
        /// </summary>
        public readonly string CreatedAt;
        /// <summary>
        /// Description of the backend group.
        /// </summary>
        public readonly string Description;
        public readonly string FolderId;
        /// <summary>
        /// Grpc backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAlbBackendGroupGrpcBackendResult> GrpcBackends;
        /// <summary>
        /// Http backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAlbBackendGroupHttpBackendResult> HttpBackends;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Labels to assign to this backend group.
        /// </summary>
        public readonly ImmutableDictionary<string, string> Labels;
        /// <summary>
        /// Name of the backend.
        /// </summary>
        public readonly string Name;
        public readonly Outputs.GetAlbBackendGroupSessionAffinityResult SessionAffinity;
        /// <summary>
        /// Stream backend specification that will be used by the ALB Backend Group. Structure is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAlbBackendGroupStreamBackendResult> StreamBackends;

        [OutputConstructor]
        private GetAlbBackendGroupResult(
            string backendGroupId,

            string createdAt,

            string description,

            string folderId,

            ImmutableArray<Outputs.GetAlbBackendGroupGrpcBackendResult> grpcBackends,

            ImmutableArray<Outputs.GetAlbBackendGroupHttpBackendResult> httpBackends,

            string id,

            ImmutableDictionary<string, string> labels,

            string name,

            Outputs.GetAlbBackendGroupSessionAffinityResult sessionAffinity,

            ImmutableArray<Outputs.GetAlbBackendGroupStreamBackendResult> streamBackends)
        {
            BackendGroupId = backendGroupId;
            CreatedAt = createdAt;
            Description = description;
            FolderId = folderId;
            GrpcBackends = grpcBackends;
            HttpBackends = httpBackends;
            Id = id;
            Labels = labels;
            Name = name;
            SessionAffinity = sessionAffinity;
            StreamBackends = streamBackends;
        }
    }
}
