# 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 builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetGenaiOpenaiApiKeysResult',
    'AwaitableGetGenaiOpenaiApiKeysResult',
    'get_genai_openai_api_keys',
    'get_genai_openai_api_keys_output',
]

@pulumi.output_type
class GetGenaiOpenaiApiKeysResult:
    """
    A collection of values returned by getGenaiOpenaiApiKeys.
    """
    def __init__(__self__, filters=None, id=None, openai_api_keys=None, sorts=None):
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if openai_api_keys and not isinstance(openai_api_keys, list):
            raise TypeError("Expected argument 'openai_api_keys' to be a list")
        pulumi.set(__self__, "openai_api_keys", openai_api_keys)
        if sorts and not isinstance(sorts, list):
            raise TypeError("Expected argument 'sorts' to be a list")
        pulumi.set(__self__, "sorts", sorts)

    @_builtins.property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetGenaiOpenaiApiKeysFilterResult']]:
        return pulumi.get(self, "filters")

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

    @_builtins.property
    @pulumi.getter(name="openaiApiKeys")
    def openai_api_keys(self) -> Sequence['outputs.GetGenaiOpenaiApiKeysOpenaiApiKeyResult']:
        return pulumi.get(self, "openai_api_keys")

    @_builtins.property
    @pulumi.getter
    def sorts(self) -> Optional[Sequence['outputs.GetGenaiOpenaiApiKeysSortResult']]:
        return pulumi.get(self, "sorts")


class AwaitableGetGenaiOpenaiApiKeysResult(GetGenaiOpenaiApiKeysResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGenaiOpenaiApiKeysResult(
            filters=self.filters,
            id=self.id,
            openai_api_keys=self.openai_api_keys,
            sorts=self.sorts)


def get_genai_openai_api_keys(filters: Optional[Sequence[Union['GetGenaiOpenaiApiKeysFilterArgs', 'GetGenaiOpenaiApiKeysFilterArgsDict']]] = None,
                              sorts: Optional[Sequence[Union['GetGenaiOpenaiApiKeysSortArgs', 'GetGenaiOpenaiApiKeysSortArgsDict']]] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGenaiOpenaiApiKeysResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['sorts'] = sorts
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getGenaiOpenaiApiKeys:getGenaiOpenaiApiKeys', __args__, opts=opts, typ=GetGenaiOpenaiApiKeysResult).value

    return AwaitableGetGenaiOpenaiApiKeysResult(
        filters=pulumi.get(__ret__, 'filters'),
        id=pulumi.get(__ret__, 'id'),
        openai_api_keys=pulumi.get(__ret__, 'openai_api_keys'),
        sorts=pulumi.get(__ret__, 'sorts'))
def get_genai_openai_api_keys_output(filters: Optional[pulumi.Input[Optional[Sequence[Union['GetGenaiOpenaiApiKeysFilterArgs', 'GetGenaiOpenaiApiKeysFilterArgsDict']]]]] = None,
                                     sorts: Optional[pulumi.Input[Optional[Sequence[Union['GetGenaiOpenaiApiKeysSortArgs', 'GetGenaiOpenaiApiKeysSortArgsDict']]]]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGenaiOpenaiApiKeysResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['sorts'] = sorts
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getGenaiOpenaiApiKeys:getGenaiOpenaiApiKeys', __args__, opts=opts, typ=GetGenaiOpenaiApiKeysResult)
    return __ret__.apply(lambda __response__: GetGenaiOpenaiApiKeysResult(
        filters=pulumi.get(__response__, 'filters'),
        id=pulumi.get(__response__, 'id'),
        openai_api_keys=pulumi.get(__response__, 'openai_api_keys'),
        sorts=pulumi.get(__response__, 'sorts')))
