# 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__ = [
    'GetStaticCredentialsResult',
    'AwaitableGetStaticCredentialsResult',
    'get_static_credentials',
    'get_static_credentials_output',
]

@pulumi.output_type
class GetStaticCredentialsResult:
    """
    A collection of values returned by getStaticCredentials.
    """
    def __init__(__self__, dn=None, id=None, last_password=None, last_vault_rotation=None, mount=None, namespace=None, password=None, role_name=None, rotation_period=None, ttl=None, username=None):
        if dn and not isinstance(dn, str):
            raise TypeError("Expected argument 'dn' to be a str")
        pulumi.set(__self__, "dn", dn)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_password and not isinstance(last_password, str):
            raise TypeError("Expected argument 'last_password' to be a str")
        pulumi.set(__self__, "last_password", last_password)
        if last_vault_rotation and not isinstance(last_vault_rotation, str):
            raise TypeError("Expected argument 'last_vault_rotation' to be a str")
        pulumi.set(__self__, "last_vault_rotation", last_vault_rotation)
        if mount and not isinstance(mount, str):
            raise TypeError("Expected argument 'mount' to be a str")
        pulumi.set(__self__, "mount", mount)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if role_name and not isinstance(role_name, str):
            raise TypeError("Expected argument 'role_name' to be a str")
        pulumi.set(__self__, "role_name", role_name)
        if rotation_period and not isinstance(rotation_period, int):
            raise TypeError("Expected argument 'rotation_period' to be a int")
        pulumi.set(__self__, "rotation_period", rotation_period)
        if ttl and not isinstance(ttl, int):
            raise TypeError("Expected argument 'ttl' to be a int")
        pulumi.set(__self__, "ttl", ttl)
        if username and not isinstance(username, str):
            raise TypeError("Expected argument 'username' to be a str")
        pulumi.set(__self__, "username", username)

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

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

    @property
    @pulumi.getter(name="lastPassword")
    def last_password(self) -> str:
        return pulumi.get(self, "last_password")

    @property
    @pulumi.getter(name="lastVaultRotation")
    def last_vault_rotation(self) -> str:
        return pulumi.get(self, "last_vault_rotation")

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

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

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

    @property
    @pulumi.getter(name="roleName")
    def role_name(self) -> str:
        return pulumi.get(self, "role_name")

    @property
    @pulumi.getter(name="rotationPeriod")
    def rotation_period(self) -> int:
        return pulumi.get(self, "rotation_period")

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

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


class AwaitableGetStaticCredentialsResult(GetStaticCredentialsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetStaticCredentialsResult(
            dn=self.dn,
            id=self.id,
            last_password=self.last_password,
            last_vault_rotation=self.last_vault_rotation,
            mount=self.mount,
            namespace=self.namespace,
            password=self.password,
            role_name=self.role_name,
            rotation_period=self.rotation_period,
            ttl=self.ttl,
            username=self.username)


def get_static_credentials(mount: Optional[str] = None,
                           namespace: Optional[str] = None,
                           role_name: Optional[str] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetStaticCredentialsResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['mount'] = mount
    __args__['namespace'] = namespace
    __args__['roleName'] = role_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vault:ldap/getStaticCredentials:getStaticCredentials', __args__, opts=opts, typ=GetStaticCredentialsResult).value

    return AwaitableGetStaticCredentialsResult(
        dn=pulumi.get(__ret__, 'dn'),
        id=pulumi.get(__ret__, 'id'),
        last_password=pulumi.get(__ret__, 'last_password'),
        last_vault_rotation=pulumi.get(__ret__, 'last_vault_rotation'),
        mount=pulumi.get(__ret__, 'mount'),
        namespace=pulumi.get(__ret__, 'namespace'),
        password=pulumi.get(__ret__, 'password'),
        role_name=pulumi.get(__ret__, 'role_name'),
        rotation_period=pulumi.get(__ret__, 'rotation_period'),
        ttl=pulumi.get(__ret__, 'ttl'),
        username=pulumi.get(__ret__, 'username'))


@_utilities.lift_output_func(get_static_credentials)
def get_static_credentials_output(mount: Optional[pulumi.Input[str]] = None,
                                  namespace: Optional[pulumi.Input[Optional[str]]] = None,
                                  role_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetStaticCredentialsResult]:
    """
    Use this data source to access information about an existing resource.
    """
    ...
