# 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__ = [
    'GetOpensearchSecurityPluginConfigResult',
    'AwaitableGetOpensearchSecurityPluginConfigResult',
    'get_opensearch_security_plugin_config',
    'get_opensearch_security_plugin_config_output',
]

@pulumi.output_type
class GetOpensearchSecurityPluginConfigResult:
    """
    A collection of values returned by getOpensearchSecurityPluginConfig.
    """
    def __init__(__self__, admin_enabled=None, admin_password=None, available=None, enabled=None, id=None, project=None, service_name=None):
        if admin_enabled and not isinstance(admin_enabled, bool):
            raise TypeError("Expected argument 'admin_enabled' to be a bool")
        pulumi.set(__self__, "admin_enabled", admin_enabled)
        if admin_password and not isinstance(admin_password, str):
            raise TypeError("Expected argument 'admin_password' to be a str")
        pulumi.set(__self__, "admin_password", admin_password)
        if available and not isinstance(available, bool):
            raise TypeError("Expected argument 'available' to be a bool")
        pulumi.set(__self__, "available", available)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if service_name and not isinstance(service_name, str):
            raise TypeError("Expected argument 'service_name' to be a str")
        pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="adminEnabled")
    def admin_enabled(self) -> bool:
        """
        Whether the os-sec-admin user is enabled. This indicates whether the user management with the security plugin is enabled. This is always true when the os-sec-admin password was set at least once.
        """
        return pulumi.get(self, "admin_enabled")

    @property
    @pulumi.getter(name="adminPassword")
    def admin_password(self) -> str:
        """
        The password for the os-sec-admin user.
        """
        return pulumi.get(self, "admin_password")

    @property
    @pulumi.getter
    def available(self) -> bool:
        """
        Whether the security plugin is available. This is always true for recently created services.
        """
        return pulumi.get(self, "available")

    @property
    @pulumi.getter
    def enabled(self) -> bool:
        """
        Whether the security plugin is enabled. This is always true for recently created services.
        """
        return pulumi.get(self, "enabled")

    @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 project(self) -> str:
        """
        Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
        """
        return pulumi.get(self, "project")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> str:
        """
        Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
        """
        return pulumi.get(self, "service_name")


class AwaitableGetOpensearchSecurityPluginConfigResult(GetOpensearchSecurityPluginConfigResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOpensearchSecurityPluginConfigResult(
            admin_enabled=self.admin_enabled,
            admin_password=self.admin_password,
            available=self.available,
            enabled=self.enabled,
            id=self.id,
            project=self.project,
            service_name=self.service_name)


def get_opensearch_security_plugin_config(project: Optional[str] = None,
                                          service_name: Optional[str] = None,
                                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOpensearchSecurityPluginConfigResult:
    """
    The OpenSearch Security Plugin Config data source provides information about an existing Aiven OpenSearch Security Plugin Config.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_aiven as aiven

    os_sec_config = aiven.get_opensearch_security_plugin_config(project=aiven_project["os-project"]["project"],
        service_name=aiven_opensearch["os"]["service_name"])
    ```
    <!--End PulumiCodeChooser -->


    :param str project: Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    :param str service_name: Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    """
    __args__ = dict()
    __args__['project'] = project
    __args__['serviceName'] = service_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getOpensearchSecurityPluginConfig:getOpensearchSecurityPluginConfig', __args__, opts=opts, typ=GetOpensearchSecurityPluginConfigResult).value

    return AwaitableGetOpensearchSecurityPluginConfigResult(
        admin_enabled=pulumi.get(__ret__, 'admin_enabled'),
        admin_password=pulumi.get(__ret__, 'admin_password'),
        available=pulumi.get(__ret__, 'available'),
        enabled=pulumi.get(__ret__, 'enabled'),
        id=pulumi.get(__ret__, 'id'),
        project=pulumi.get(__ret__, 'project'),
        service_name=pulumi.get(__ret__, 'service_name'))


@_utilities.lift_output_func(get_opensearch_security_plugin_config)
def get_opensearch_security_plugin_config_output(project: Optional[pulumi.Input[str]] = None,
                                                 service_name: Optional[pulumi.Input[str]] = None,
                                                 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetOpensearchSecurityPluginConfigResult]:
    """
    The OpenSearch Security Plugin Config data source provides information about an existing Aiven OpenSearch Security Plugin Config.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_aiven as aiven

    os_sec_config = aiven.get_opensearch_security_plugin_config(project=aiven_project["os-project"]["project"],
        service_name=aiven_opensearch["os"]["service_name"])
    ```
    <!--End PulumiCodeChooser -->


    :param str project: Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    :param str service_name: Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    """
    ...
