# 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 builtins
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__ = [
    'GetKeyRingResult',
    'AwaitableGetKeyRingResult',
    'get_key_ring',
    'get_key_ring_output',
]

@pulumi.output_type
class GetKeyRingResult:
    """
    A collection of values returned by getKeyRing.
    """
    def __init__(__self__, create_date=None, description=None, id=None, key_count=None, key_ring_id=None, keyring_name=None, keyring_type=None, project_name=None, uid=None, update_date=None):
        if create_date and not isinstance(create_date, int):
            raise TypeError("Expected argument 'create_date' to be a int")
        pulumi.set(__self__, "create_date", create_date)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if key_count and not isinstance(key_count, int):
            raise TypeError("Expected argument 'key_count' to be a int")
        pulumi.set(__self__, "key_count", key_count)
        if key_ring_id and not isinstance(key_ring_id, str):
            raise TypeError("Expected argument 'key_ring_id' to be a str")
        pulumi.set(__self__, "key_ring_id", key_ring_id)
        if keyring_name and not isinstance(keyring_name, str):
            raise TypeError("Expected argument 'keyring_name' to be a str")
        pulumi.set(__self__, "keyring_name", keyring_name)
        if keyring_type and not isinstance(keyring_type, str):
            raise TypeError("Expected argument 'keyring_type' to be a str")
        pulumi.set(__self__, "keyring_type", keyring_type)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if uid and not isinstance(uid, str):
            raise TypeError("Expected argument 'uid' to be a str")
        pulumi.set(__self__, "uid", uid)
        if update_date and not isinstance(update_date, int):
            raise TypeError("Expected argument 'update_date' to be a int")
        pulumi.set(__self__, "update_date", update_date)

    @property
    @pulumi.getter(name="createDate")
    def create_date(self) -> builtins.int:
        """
        密钥环创建日期。
        """
        return pulumi.get(self, "create_date")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        密钥环描述，长度为 0   - 8192 个字符。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="keyCount")
    def key_count(self) -> builtins.int:
        """
        密钥环密钥次数。
        """
        return pulumi.get(self, "key_count")

    @property
    @pulumi.getter(name="keyRingId")
    def key_ring_id(self) -> builtins.str:
        """
        密钥环唯一标识符，UUID形式。
        """
        return pulumi.get(self, "key_ring_id")

    @property
    @pulumi.getter(name="keyringName")
    def keyring_name(self) -> builtins.str:
        """
        密钥环名称，长度为 2   - 31 个字符。合法字符：[a-zA-Z0-9-_]。
        """
        return pulumi.get(self, "keyring_name")

    @property
    @pulumi.getter(name="keyringType")
    def keyring_type(self) -> builtins.str:
        """
        密钥环类型，取值：CustomKeyring。
        """
        return pulumi.get(self, "keyring_type")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        项目名称，默认值：default。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def uid(self) -> builtins.str:
        """
        密钥环租户ID。
        """
        return pulumi.get(self, "uid")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.int:
        """
        密钥环更新日期。
        """
        return pulumi.get(self, "update_date")


class AwaitableGetKeyRingResult(GetKeyRingResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKeyRingResult(
            create_date=self.create_date,
            description=self.description,
            id=self.id,
            key_count=self.key_count,
            key_ring_id=self.key_ring_id,
            keyring_name=self.keyring_name,
            keyring_type=self.keyring_type,
            project_name=self.project_name,
            uid=self.uid,
            update_date=self.update_date)


def get_key_ring(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKeyRingResult:
    """
    Data Source schema for Byteplus::KMS::KeyRing


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:kms/getKeyRing:getKeyRing', __args__, opts=opts, typ=GetKeyRingResult).value

    return AwaitableGetKeyRingResult(
        create_date=pulumi.get(__ret__, 'create_date'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        key_count=pulumi.get(__ret__, 'key_count'),
        key_ring_id=pulumi.get(__ret__, 'key_ring_id'),
        keyring_name=pulumi.get(__ret__, 'keyring_name'),
        keyring_type=pulumi.get(__ret__, 'keyring_type'),
        project_name=pulumi.get(__ret__, 'project_name'),
        uid=pulumi.get(__ret__, 'uid'),
        update_date=pulumi.get(__ret__, 'update_date'))
def get_key_ring_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeyRingResult]:
    """
    Data Source schema for Byteplus::KMS::KeyRing


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:kms/getKeyRing:getKeyRing', __args__, opts=opts, typ=GetKeyRingResult)
    return __ret__.apply(lambda __response__: GetKeyRingResult(
        create_date=pulumi.get(__response__, 'create_date'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        key_count=pulumi.get(__response__, 'key_count'),
        key_ring_id=pulumi.get(__response__, 'key_ring_id'),
        keyring_name=pulumi.get(__response__, 'keyring_name'),
        keyring_type=pulumi.get(__response__, 'keyring_type'),
        project_name=pulumi.get(__response__, 'project_name'),
        uid=pulumi.get(__response__, 'uid'),
        update_date=pulumi.get(__response__, 'update_date')))
