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

__all__ = [
    'GetPrefixResult',
    'AwaitableGetPrefixResult',
    'get_prefix',
    'get_prefix_output',
]

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

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

    @property
    @pulumi.getter
    def id(self) -> int:
        """
        The ID of this resource.
        """
        return pulumi.get(self, "id")


class AwaitableGetPrefixResult(GetPrefixResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPrefixResult(
            cidr=self.cidr,
            id=self.id)


def get_prefix(cidr: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPrefixResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['cidr'] = cidr
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('netbox:index/getPrefix:getPrefix', __args__, opts=opts, typ=GetPrefixResult).value

    return AwaitableGetPrefixResult(
        cidr=__ret__.cidr,
        id=__ret__.id)


@_utilities.lift_output_func(get_prefix)
def get_prefix_output(cidr: Optional[pulumi.Input[str]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPrefixResult]:
    """
    Use this data source to access information about an existing resource.
    """
    ...
