# coding=utf-8
# *** 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! ***

import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetQosBandwidthLimitRuleResult:
    """
    A collection of values returned by getQosBandwidthLimitRule.
    """
    def __init__(__self__, direction=None, id=None, max_burst_kbps=None, max_kbps=None, qos_policy_id=None, region=None):
        if direction and not isinstance(direction, str):
            raise TypeError("Expected argument 'direction' to be a str")
        __self__.direction = direction
        """
        See Argument Reference above.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
        if max_burst_kbps and not isinstance(max_burst_kbps, float):
            raise TypeError("Expected argument 'max_burst_kbps' to be a float")
        __self__.max_burst_kbps = max_burst_kbps
        """
        See Argument Reference above.
        """
        if max_kbps and not isinstance(max_kbps, float):
            raise TypeError("Expected argument 'max_kbps' to be a float")
        __self__.max_kbps = max_kbps
        """
        See Argument Reference above.
        """
        if qos_policy_id and not isinstance(qos_policy_id, str):
            raise TypeError("Expected argument 'qos_policy_id' to be a str")
        __self__.qos_policy_id = qos_policy_id
        """
        See Argument Reference above.
        """
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        __self__.region = region
        """
        See Argument Reference above.
        """
class AwaitableGetQosBandwidthLimitRuleResult(GetQosBandwidthLimitRuleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetQosBandwidthLimitRuleResult(
            direction=self.direction,
            id=self.id,
            max_burst_kbps=self.max_burst_kbps,
            max_kbps=self.max_kbps,
            qos_policy_id=self.qos_policy_id,
            region=self.region)

def get_qos_bandwidth_limit_rule(max_burst_kbps=None,max_kbps=None,qos_policy_id=None,region=None,opts=None):
    """
    Use this data source to get the ID of an available OpenStack QoS bandwidth limit rule.




    :param float max_burst_kbps: The maximum burst size in kilobits of a QoS bandwidth limit rule.
    :param float max_kbps: The maximum kilobits per second of a QoS bandwidth limit rule.
    :param str qos_policy_id: The QoS policy reference.
    :param str region: The region in which to obtain the V2 Networking client.
           A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
           `region` argument of the provider is used.
    """
    __args__ = dict()


    __args__['maxBurstKbps'] = max_burst_kbps
    __args__['maxKbps'] = max_kbps
    __args__['qosPolicyId'] = qos_policy_id
    __args__['region'] = region
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('openstack:networking/getQosBandwidthLimitRule:getQosBandwidthLimitRule', __args__, opts=opts).value

    return AwaitableGetQosBandwidthLimitRuleResult(
        direction=__ret__.get('direction'),
        id=__ret__.get('id'),
        max_burst_kbps=__ret__.get('maxBurstKbps'),
        max_kbps=__ret__.get('maxKbps'),
        qos_policy_id=__ret__.get('qosPolicyId'),
        region=__ret__.get('region'))
