# 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__ = [
    'GetOkmsServiceKeyPemResult',
    'AwaitableGetOkmsServiceKeyPemResult',
    'get_okms_service_key_pem',
    'get_okms_service_key_pem_output',
]

@pulumi.output_type
class GetOkmsServiceKeyPemResult:
    """
    A collection of values returned by getOkmsServiceKeyPem.
    """
    def __init__(__self__, created_at=None, curve=None, iam=None, id=None, keys_pems=None, name=None, okms_id=None, operations=None, size=None, state=None, type=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if curve and not isinstance(curve, str):
            raise TypeError("Expected argument 'curve' to be a str")
        pulumi.set(__self__, "curve", curve)
        if iam and not isinstance(iam, dict):
            raise TypeError("Expected argument 'iam' to be a dict")
        pulumi.set(__self__, "iam", iam)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if keys_pems and not isinstance(keys_pems, list):
            raise TypeError("Expected argument 'keys_pems' to be a list")
        pulumi.set(__self__, "keys_pems", keys_pems)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if okms_id and not isinstance(okms_id, str):
            raise TypeError("Expected argument 'okms_id' to be a str")
        pulumi.set(__self__, "okms_id", okms_id)
        if operations and not isinstance(operations, list):
            raise TypeError("Expected argument 'operations' to be a list")
        pulumi.set(__self__, "operations", operations)
        if size and not isinstance(size, float):
            raise TypeError("Expected argument 'size' to be a float")
        pulumi.set(__self__, "size", size)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        return pulumi.get(self, "created_at")

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

    @property
    @pulumi.getter
    def iam(self) -> 'outputs.GetOkmsServiceKeyPemIamResult':
        return pulumi.get(self, "iam")

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

    @property
    @pulumi.getter(name="keysPems")
    def keys_pems(self) -> Sequence['outputs.GetOkmsServiceKeyPemKeysPemResult']:
        return pulumi.get(self, "keys_pems")

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

    @property
    @pulumi.getter(name="okmsId")
    def okms_id(self) -> builtins.str:
        return pulumi.get(self, "okms_id")

    @property
    @pulumi.getter
    def operations(self) -> Sequence[builtins.str]:
        return pulumi.get(self, "operations")

    @property
    @pulumi.getter
    def size(self) -> builtins.float:
        return pulumi.get(self, "size")

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

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


class AwaitableGetOkmsServiceKeyPemResult(GetOkmsServiceKeyPemResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOkmsServiceKeyPemResult(
            created_at=self.created_at,
            curve=self.curve,
            iam=self.iam,
            id=self.id,
            keys_pems=self.keys_pems,
            name=self.name,
            okms_id=self.okms_id,
            operations=self.operations,
            size=self.size,
            state=self.state,
            type=self.type)


def get_okms_service_key_pem(id: Optional[builtins.str] = None,
                             okms_id: Optional[builtins.str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOkmsServiceKeyPemResult:
    """
    Use this data source to retrieve information about a KMS service key, in the PEM format.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['okmsId'] = okms_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('ovh:Okms/getOkmsServiceKeyPem:getOkmsServiceKeyPem', __args__, opts=opts, typ=GetOkmsServiceKeyPemResult).value

    return AwaitableGetOkmsServiceKeyPemResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        curve=pulumi.get(__ret__, 'curve'),
        iam=pulumi.get(__ret__, 'iam'),
        id=pulumi.get(__ret__, 'id'),
        keys_pems=pulumi.get(__ret__, 'keys_pems'),
        name=pulumi.get(__ret__, 'name'),
        okms_id=pulumi.get(__ret__, 'okms_id'),
        operations=pulumi.get(__ret__, 'operations'),
        size=pulumi.get(__ret__, 'size'),
        state=pulumi.get(__ret__, 'state'),
        type=pulumi.get(__ret__, 'type'))
def get_okms_service_key_pem_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                    okms_id: Optional[pulumi.Input[builtins.str]] = None,
                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOkmsServiceKeyPemResult]:
    """
    Use this data source to retrieve information about a KMS service key, in the PEM format.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['okmsId'] = okms_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('ovh:Okms/getOkmsServiceKeyPem:getOkmsServiceKeyPem', __args__, opts=opts, typ=GetOkmsServiceKeyPemResult)
    return __ret__.apply(lambda __response__: GetOkmsServiceKeyPemResult(
        created_at=pulumi.get(__response__, 'created_at'),
        curve=pulumi.get(__response__, 'curve'),
        iam=pulumi.get(__response__, 'iam'),
        id=pulumi.get(__response__, 'id'),
        keys_pems=pulumi.get(__response__, 'keys_pems'),
        name=pulumi.get(__response__, 'name'),
        okms_id=pulumi.get(__response__, 'okms_id'),
        operations=pulumi.get(__response__, 'operations'),
        size=pulumi.get(__response__, 'size'),
        state=pulumi.get(__response__, 'state'),
        type=pulumi.get(__response__, 'type')))
