# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** 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__ = [
    'MatchkeysResult',
    'AwaitableMatchkeysResult',
    'matchkeys',
    'matchkeys_output',
]

@pulumi.output_type
class MatchkeysResult:
    def __init__(__self__, result=None):
        if result and not isinstance(result, list):
            raise TypeError("Expected argument 'result' to be a list")
        pulumi.set(__self__, "result", result)

    @property
    @pulumi.getter
    def result(self) -> Sequence[str]:
        return pulumi.get(self, "result")


class AwaitableMatchkeysResult(MatchkeysResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return MatchkeysResult(
            result=self.result)


def matchkeys(search_list: Optional[Sequence[str]] = None,
              values: Optional[Sequence[str]] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableMatchkeysResult:
    """
    For two lists values and keys of equal length,
    returns all elements from values where the corresponding element from keys exists in the searchset list.
    """
    __args__ = dict()
    __args__['searchList'] = search_list
    __args__['values'] = values
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('std:index:matchkeys', __args__, opts=opts, typ=MatchkeysResult).value

    return AwaitableMatchkeysResult(
        result=pulumi.get(__ret__, 'result'))


@_utilities.lift_output_func(matchkeys)
def matchkeys_output(search_list: Optional[pulumi.Input[Sequence[str]]] = None,
                     values: Optional[pulumi.Input[Sequence[str]]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[MatchkeysResult]:
    """
    For two lists values and keys of equal length,
    returns all elements from values where the corresponding element from keys exists in the searchset list.
    """
    ...
