# 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 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

__all__ = [
    'GetPluginResult',
    'AwaitableGetPluginResult',
    'get_plugin',
    'get_plugin_output',
]

@pulumi.output_type
class GetPluginResult:
    """
    A collection of values returned by getPlugin.
    """
    def __init__(__self__, api=None, data=None, digest=None, id=None, plugin=None, type=None, validation_delay=None):
        if api and not isinstance(api, str):
            raise TypeError("Expected argument 'api' to be a str")
        pulumi.set(__self__, "api", api)
        if data and not isinstance(data, dict):
            raise TypeError("Expected argument 'data' to be a dict")
        pulumi.set(__self__, "data", data)
        if digest and not isinstance(digest, str):
            raise TypeError("Expected argument 'digest' to be a str")
        pulumi.set(__self__, "digest", digest)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if plugin and not isinstance(plugin, str):
            raise TypeError("Expected argument 'plugin' to be a str")
        pulumi.set(__self__, "plugin", plugin)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if validation_delay and not isinstance(validation_delay, int):
            raise TypeError("Expected argument 'validation_delay' to be a int")
        pulumi.set(__self__, "validation_delay", validation_delay)

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

    @property
    @pulumi.getter
    def data(self) -> Mapping[str, str]:
        """
        DNS plugin data.
        """
        return pulumi.get(self, "data")

    @property
    @pulumi.getter
    def digest(self) -> str:
        """
        Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
        """
        return pulumi.get(self, "digest")

    @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 plugin(self) -> str:
        """
        ACME Plugin ID name.
        """
        return pulumi.get(self, "plugin")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        ACME challenge type (dns, standalone).
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="validationDelay")
    def validation_delay(self) -> int:
        """
        Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records (0 - 172800).
        """
        return pulumi.get(self, "validation_delay")


class AwaitableGetPluginResult(GetPluginResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPluginResult(
            api=self.api,
            data=self.data,
            digest=self.digest,
            id=self.id,
            plugin=self.plugin,
            type=self.type,
            validation_delay=self.validation_delay)


def get_plugin(plugin: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPluginResult:
    """
    Retrieves a single ACME plugin by plugin ID name.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    example = proxmoxve.Acme.get_plugin(plugin="standalone")
    pulumi.export("dataProxmoxVirtualEnvironmentAcmePlugin", example)
    ```


    :param str plugin: ACME Plugin ID name.
    """
    __args__ = dict()
    __args__['plugin'] = plugin
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('proxmoxve:Acme/getPlugin:getPlugin', __args__, opts=opts, typ=GetPluginResult).value

    return AwaitableGetPluginResult(
        api=pulumi.get(__ret__, 'api'),
        data=pulumi.get(__ret__, 'data'),
        digest=pulumi.get(__ret__, 'digest'),
        id=pulumi.get(__ret__, 'id'),
        plugin=pulumi.get(__ret__, 'plugin'),
        type=pulumi.get(__ret__, 'type'),
        validation_delay=pulumi.get(__ret__, 'validation_delay'))
def get_plugin_output(plugin: Optional[pulumi.Input[str]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPluginResult]:
    """
    Retrieves a single ACME plugin by plugin ID name.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    example = proxmoxve.Acme.get_plugin(plugin="standalone")
    pulumi.export("dataProxmoxVirtualEnvironmentAcmePlugin", example)
    ```


    :param str plugin: ACME Plugin ID name.
    """
    __args__ = dict()
    __args__['plugin'] = plugin
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('proxmoxve:Acme/getPlugin:getPlugin', __args__, opts=opts, typ=GetPluginResult)
    return __ret__.apply(lambda __response__: GetPluginResult(
        api=pulumi.get(__response__, 'api'),
        data=pulumi.get(__response__, 'data'),
        digest=pulumi.get(__response__, 'digest'),
        id=pulumi.get(__response__, 'id'),
        plugin=pulumi.get(__response__, 'plugin'),
        type=pulumi.get(__response__, 'type'),
        validation_delay=pulumi.get(__response__, 'validation_delay')))
