# 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
from . import outputs

__all__ = [
    'GetKeypairResult',
    'AwaitableGetKeypairResult',
    'get_keypair',
    'get_keypair_output',
]

@pulumi.output_type
class GetKeypairResult:
    """
    A collection of values returned by getKeypair.
    """
    def __init__(__self__, created_time=None, description=None, finger_print=None, id=None, instance_ids=None, key_pair_id=None, key_pair_name=None, project_name=None, public_key=None, tags=None, updated_time=None):
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if finger_print and not isinstance(finger_print, str):
            raise TypeError("Expected argument 'finger_print' to be a str")
        pulumi.set(__self__, "finger_print", finger_print)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_ids and not isinstance(instance_ids, list):
            raise TypeError("Expected argument 'instance_ids' to be a list")
        pulumi.set(__self__, "instance_ids", instance_ids)
        if key_pair_id and not isinstance(key_pair_id, str):
            raise TypeError("Expected argument 'key_pair_id' to be a str")
        pulumi.set(__self__, "key_pair_id", key_pair_id)
        if key_pair_name and not isinstance(key_pair_name, str):
            raise TypeError("Expected argument 'key_pair_name' to be a str")
        pulumi.set(__self__, "key_pair_name", key_pair_name)
        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 public_key and not isinstance(public_key, str):
            raise TypeError("Expected argument 'public_key' to be a str")
        pulumi.set(__self__, "public_key", public_key)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        密钥对创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        密钥对的描述，默认值为空字符串。必须以字母或中文开头。只能包含中文、字母、数字、点“.”、空格、下划线“_”、中划线“-”、等号“=”、英文逗号“,”、中文逗号“，”和中文句号“。”长度限制在255个字符以内。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="fingerPrint")
    def finger_print(self) -> builtins.str:
        """
        密钥对的指纹。根据RFC4716定义的公钥指纹格式，采用MD5信息摘要算法。
        """
        return pulumi.get(self, "finger_print")

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

    @property
    @pulumi.getter(name="instanceIds")
    def instance_ids(self) -> Sequence[builtins.str]:
        """
        操作的实例ID。
        """
        return pulumi.get(self, "instance_ids")

    @property
    @pulumi.getter(name="keyPairId")
    def key_pair_id(self) -> builtins.str:
        """
        密钥对唯一ID。
        """
        return pulumi.get(self, "key_pair_id")

    @property
    @pulumi.getter(name="keyPairName")
    def key_pair_name(self) -> builtins.str:
        """
        密钥对名称。不可与已有名称重复。长度限制在 2～64 个字符之间。允许使用点号“.”分隔字符成多段，每段允许使用大小写字母、数字或连字符“-”。不能以“-”和“.”开头或结尾，不能连续使用“-”或者“.”。
        """
        return pulumi.get(self, "key_pair_name")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        资源所属项目，一个资源只能归属于一个项目。只能包含字母、数字、下划线“_”、点“.”和中划线“-”。长度限制在64个字符以内。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="publicKey")
    def public_key(self) -> builtins.str:
        """
        密钥对的公钥信息。
        """
        return pulumi.get(self, "public_key")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetKeypairTagResult']:
        """
        密钥对的标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        密钥对更新时间。
        """
        return pulumi.get(self, "updated_time")


class AwaitableGetKeypairResult(GetKeypairResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKeypairResult(
            created_time=self.created_time,
            description=self.description,
            finger_print=self.finger_print,
            id=self.id,
            instance_ids=self.instance_ids,
            key_pair_id=self.key_pair_id,
            key_pair_name=self.key_pair_name,
            project_name=self.project_name,
            public_key=self.public_key,
            tags=self.tags,
            updated_time=self.updated_time)


def get_keypair(id: Optional[builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKeypairResult:
    """
    Data Source schema for Byteplus::ECS::Keypair


    :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:ecs/getKeypair:getKeypair', __args__, opts=opts, typ=GetKeypairResult).value

    return AwaitableGetKeypairResult(
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        finger_print=pulumi.get(__ret__, 'finger_print'),
        id=pulumi.get(__ret__, 'id'),
        instance_ids=pulumi.get(__ret__, 'instance_ids'),
        key_pair_id=pulumi.get(__ret__, 'key_pair_id'),
        key_pair_name=pulumi.get(__ret__, 'key_pair_name'),
        project_name=pulumi.get(__ret__, 'project_name'),
        public_key=pulumi.get(__ret__, 'public_key'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_keypair_output(id: Optional[pulumi.Input[builtins.str]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeypairResult]:
    """
    Data Source schema for Byteplus::ECS::Keypair


    :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:ecs/getKeypair:getKeypair', __args__, opts=opts, typ=GetKeypairResult)
    return __ret__.apply(lambda __response__: GetKeypairResult(
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        finger_print=pulumi.get(__response__, 'finger_print'),
        id=pulumi.get(__response__, 'id'),
        instance_ids=pulumi.get(__response__, 'instance_ids'),
        key_pair_id=pulumi.get(__response__, 'key_pair_id'),
        key_pair_name=pulumi.get(__response__, 'key_pair_name'),
        project_name=pulumi.get(__response__, 'project_name'),
        public_key=pulumi.get(__response__, 'public_key'),
        tags=pulumi.get(__response__, 'tags'),
        updated_time=pulumi.get(__response__, 'updated_time')))
