# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables

__all__ = [
    'GetIruleResult',
    'AwaitableGetIruleResult',
    'get_irule',
]

@pulumi.output_type
class GetIruleResult:
    """
    A collection of values returned by getIrule.
    """
    def __init__(__self__, id=None, irule=None, name=None, partition=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if irule and not isinstance(irule, str):
            raise TypeError("Expected argument 'irule' to be a str")
        pulumi.set(__self__, "irule", irule)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if partition and not isinstance(partition, str):
            raise TypeError("Expected argument 'partition' to be a str")
        pulumi.set(__self__, "partition", partition)

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def irule(self) -> str:
        return pulumi.get(self, "irule")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def partition(self) -> str:
        return pulumi.get(self, "partition")


class AwaitableGetIruleResult(GetIruleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetIruleResult(
            id=self.id,
            irule=self.irule,
            name=self.name,
            partition=self.partition)


def get_irule(name: Optional[str] = None,
              partition: Optional[str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIruleResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['partition'] = partition
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('f5bigip:ltm/getIrule:getIrule', __args__, opts=opts, typ=GetIruleResult).value

    return AwaitableGetIruleResult(
        id=__ret__.id,
        irule=__ret__.irule,
        name=__ret__.name,
        partition=__ret__.partition)
