// *** 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 GetVpcSecurityGroupRule
    {
        public static Task<GetVpcSecurityGroupRuleResult> InvokeAsync(GetVpcSecurityGroupRuleArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetVpcSecurityGroupRuleResult>("yandex:index/getVpcSecurityGroupRule:getVpcSecurityGroupRule", args ?? new GetVpcSecurityGroupRuleArgs(), options.WithDefaults());

        public static Output<GetVpcSecurityGroupRuleResult> Invoke(GetVpcSecurityGroupRuleInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetVpcSecurityGroupRuleResult>("yandex:index/getVpcSecurityGroupRule:getVpcSecurityGroupRule", args ?? new GetVpcSecurityGroupRuleInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetVpcSecurityGroupRuleArgs : global::Pulumi.InvokeArgs
    {
        [Input("ruleId", required: true)]
        public string RuleId { get; set; } = null!;

        [Input("securityGroupBinding", required: true)]
        public string SecurityGroupBinding { get; set; } = null!;

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

    public sealed class GetVpcSecurityGroupRuleInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ruleId", required: true)]
        public Input<string> RuleId { get; set; } = null!;

        [Input("securityGroupBinding", required: true)]
        public Input<string> SecurityGroupBinding { get; set; } = null!;

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


    [OutputType]
    public sealed class GetVpcSecurityGroupRuleResult
    {
        public readonly string Description;
        public readonly string Direction;
        public readonly int FromPort;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableDictionary<string, string> Labels;
        public readonly int Port;
        public readonly string PredefinedTarget;
        public readonly string Protocol;
        public readonly string RuleId;
        public readonly string SecurityGroupBinding;
        public readonly string SecurityGroupId;
        public readonly int ToPort;
        public readonly ImmutableArray<string> V4CidrBlocks;
        public readonly ImmutableArray<string> V6CidrBlocks;

        [OutputConstructor]
        private GetVpcSecurityGroupRuleResult(
            string description,

            string direction,

            int fromPort,

            string id,

            ImmutableDictionary<string, string> labels,

            int port,

            string predefinedTarget,

            string protocol,

            string ruleId,

            string securityGroupBinding,

            string securityGroupId,

            int toPort,

            ImmutableArray<string> v4CidrBlocks,

            ImmutableArray<string> v6CidrBlocks)
        {
            Description = description;
            Direction = direction;
            FromPort = fromPort;
            Id = id;
            Labels = labels;
            Port = port;
            PredefinedTarget = predefinedTarget;
            Protocol = protocol;
            RuleId = ruleId;
            SecurityGroupBinding = securityGroupBinding;
            SecurityGroupId = securityGroupId;
            ToPort = toPort;
            V4CidrBlocks = v4CidrBlocks;
            V6CidrBlocks = v6CidrBlocks;
        }
    }
}
