# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__ = ['FeatureFlagApiKeyArgs', 'FeatureFlagApiKey']

@pulumi.input_type
class FeatureFlagApiKeyArgs:
    def __init__(__self__, *,
                 env_id: pulumi.Input[_builtins.str],
                 identifier: pulumi.Input[_builtins.str],
                 org_id: pulumi.Input[_builtins.str],
                 project_id: pulumi.Input[_builtins.str],
                 type: pulumi.Input[_builtins.str],
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 expired_at: Optional[pulumi.Input[_builtins.int]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a FeatureFlagApiKey resource.
        :param pulumi.Input[_builtins.str] env_id: Environment Identifier
        :param pulumi.Input[_builtins.str] identifier: Identifier of the SDK API Key
        :param pulumi.Input[_builtins.str] org_id: Organization Identifier
        :param pulumi.Input[_builtins.str] project_id: Project Identifier
        :param pulumi.Input[_builtins.str] type: Type of SDK. Valid values are `Server` or `Client`.
        :param pulumi.Input[_builtins.str] description: Description of the SDK API Key
        :param pulumi.Input[_builtins.int] expired_at: Expiration datetime of the SDK API Key
        :param pulumi.Input[_builtins.str] name: Name of the SDK API Key
        """
        pulumi.set(__self__, "env_id", env_id)
        pulumi.set(__self__, "identifier", identifier)
        pulumi.set(__self__, "org_id", org_id)
        pulumi.set(__self__, "project_id", project_id)
        pulumi.set(__self__, "type", type)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if expired_at is not None:
            pulumi.set(__self__, "expired_at", expired_at)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter(name="envId")
    def env_id(self) -> pulumi.Input[_builtins.str]:
        """
        Environment Identifier
        """
        return pulumi.get(self, "env_id")

    @env_id.setter
    def env_id(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "env_id", value)

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Input[_builtins.str]:
        """
        Identifier of the SDK API Key
        """
        return pulumi.get(self, "identifier")

    @identifier.setter
    def identifier(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "identifier", value)

    @_builtins.property
    @pulumi.getter(name="orgId")
    def org_id(self) -> pulumi.Input[_builtins.str]:
        """
        Organization Identifier
        """
        return pulumi.get(self, "org_id")

    @org_id.setter
    def org_id(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "org_id", value)

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Input[_builtins.str]:
        """
        Project Identifier
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "project_id", value)

    @_builtins.property
    @pulumi.getter
    def type(self) -> pulumi.Input[_builtins.str]:
        """
        Type of SDK. Valid values are `Server` or `Client`.
        """
        return pulumi.get(self, "type")

    @type.setter
    def type(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "type", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the SDK API Key
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter(name="expiredAt")
    def expired_at(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Expiration datetime of the SDK API Key
        """
        return pulumi.get(self, "expired_at")

    @expired_at.setter
    def expired_at(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "expired_at", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the SDK API Key
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)


@pulumi.input_type
class _FeatureFlagApiKeyState:
    def __init__(__self__, *,
                 api_key: Optional[pulumi.Input[_builtins.str]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 env_id: Optional[pulumi.Input[_builtins.str]] = None,
                 expired_at: Optional[pulumi.Input[_builtins.int]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering FeatureFlagApiKey resources.
        :param pulumi.Input[_builtins.str] api_key: The value of the SDK API Key
        :param pulumi.Input[_builtins.str] description: Description of the SDK API Key
        :param pulumi.Input[_builtins.str] env_id: Environment Identifier
        :param pulumi.Input[_builtins.int] expired_at: Expiration datetime of the SDK API Key
        :param pulumi.Input[_builtins.str] identifier: Identifier of the SDK API Key
        :param pulumi.Input[_builtins.str] name: Name of the SDK API Key
        :param pulumi.Input[_builtins.str] org_id: Organization Identifier
        :param pulumi.Input[_builtins.str] project_id: Project Identifier
        :param pulumi.Input[_builtins.str] type: Type of SDK. Valid values are `Server` or `Client`.
        """
        if api_key is not None:
            pulumi.set(__self__, "api_key", api_key)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if env_id is not None:
            pulumi.set(__self__, "env_id", env_id)
        if expired_at is not None:
            pulumi.set(__self__, "expired_at", expired_at)
        if identifier is not None:
            pulumi.set(__self__, "identifier", identifier)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if org_id is not None:
            pulumi.set(__self__, "org_id", org_id)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @_builtins.property
    @pulumi.getter(name="apiKey")
    def api_key(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The value of the SDK API Key
        """
        return pulumi.get(self, "api_key")

    @api_key.setter
    def api_key(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "api_key", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the SDK API Key
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter(name="envId")
    def env_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Environment Identifier
        """
        return pulumi.get(self, "env_id")

    @env_id.setter
    def env_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "env_id", value)

    @_builtins.property
    @pulumi.getter(name="expiredAt")
    def expired_at(self) -> Optional[pulumi.Input[_builtins.int]]:
        """
        Expiration datetime of the SDK API Key
        """
        return pulumi.get(self, "expired_at")

    @expired_at.setter
    def expired_at(self, value: Optional[pulumi.Input[_builtins.int]]):
        pulumi.set(self, "expired_at", value)

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Identifier of the SDK API Key
        """
        return pulumi.get(self, "identifier")

    @identifier.setter
    def identifier(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "identifier", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the SDK API Key
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="orgId")
    def org_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Organization Identifier
        """
        return pulumi.get(self, "org_id")

    @org_id.setter
    def org_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "org_id", value)

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Project Identifier
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "project_id", value)

    @_builtins.property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Type of SDK. Valid values are `Server` or `Client`.
        """
        return pulumi.get(self, "type")

    @type.setter
    def type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "type", value)


@pulumi.type_token("harness:platform/featureFlagApiKey:FeatureFlagApiKey")
class FeatureFlagApiKey(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 env_id: Optional[pulumi.Input[_builtins.str]] = None,
                 expired_at: Optional[pulumi.Input[_builtins.int]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Resource for creating an environment SDK key for Feature Flags.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        testserverapikey = harness.platform.FeatureFlagApiKey("testserverapikey",
            identifier="testserver",
            name="TestServer",
            description="this is a server SDK key",
            org_id="test",
            project_id="testff",
            env_id="testenv",
            expired_at=1713729225,
            type="Server")
        pulumi.export("serversdkkey", testserverapikey.api_key)
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] description: Description of the SDK API Key
        :param pulumi.Input[_builtins.str] env_id: Environment Identifier
        :param pulumi.Input[_builtins.int] expired_at: Expiration datetime of the SDK API Key
        :param pulumi.Input[_builtins.str] identifier: Identifier of the SDK API Key
        :param pulumi.Input[_builtins.str] name: Name of the SDK API Key
        :param pulumi.Input[_builtins.str] org_id: Organization Identifier
        :param pulumi.Input[_builtins.str] project_id: Project Identifier
        :param pulumi.Input[_builtins.str] type: Type of SDK. Valid values are `Server` or `Client`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: FeatureFlagApiKeyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource for creating an environment SDK key for Feature Flags.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        testserverapikey = harness.platform.FeatureFlagApiKey("testserverapikey",
            identifier="testserver",
            name="TestServer",
            description="this is a server SDK key",
            org_id="test",
            project_id="testff",
            env_id="testenv",
            expired_at=1713729225,
            type="Server")
        pulumi.export("serversdkkey", testserverapikey.api_key)
        ```

        :param str resource_name: The name of the resource.
        :param FeatureFlagApiKeyArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(FeatureFlagApiKeyArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 env_id: Optional[pulumi.Input[_builtins.str]] = None,
                 expired_at: Optional[pulumi.Input[_builtins.int]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 org_id: Optional[pulumi.Input[_builtins.str]] = None,
                 project_id: Optional[pulumi.Input[_builtins.str]] = None,
                 type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = FeatureFlagApiKeyArgs.__new__(FeatureFlagApiKeyArgs)

            __props__.__dict__["description"] = description
            if env_id is None and not opts.urn:
                raise TypeError("Missing required property 'env_id'")
            __props__.__dict__["env_id"] = env_id
            __props__.__dict__["expired_at"] = expired_at
            if identifier is None and not opts.urn:
                raise TypeError("Missing required property 'identifier'")
            __props__.__dict__["identifier"] = identifier
            __props__.__dict__["name"] = name
            if org_id is None and not opts.urn:
                raise TypeError("Missing required property 'org_id'")
            __props__.__dict__["org_id"] = org_id
            if project_id is None and not opts.urn:
                raise TypeError("Missing required property 'project_id'")
            __props__.__dict__["project_id"] = project_id
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["api_key"] = None
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["apiKey"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(FeatureFlagApiKey, __self__).__init__(
            'harness:platform/featureFlagApiKey:FeatureFlagApiKey',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            api_key: Optional[pulumi.Input[_builtins.str]] = None,
            description: Optional[pulumi.Input[_builtins.str]] = None,
            env_id: Optional[pulumi.Input[_builtins.str]] = None,
            expired_at: Optional[pulumi.Input[_builtins.int]] = None,
            identifier: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            org_id: Optional[pulumi.Input[_builtins.str]] = None,
            project_id: Optional[pulumi.Input[_builtins.str]] = None,
            type: Optional[pulumi.Input[_builtins.str]] = None) -> 'FeatureFlagApiKey':
        """
        Get an existing FeatureFlagApiKey resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] api_key: The value of the SDK API Key
        :param pulumi.Input[_builtins.str] description: Description of the SDK API Key
        :param pulumi.Input[_builtins.str] env_id: Environment Identifier
        :param pulumi.Input[_builtins.int] expired_at: Expiration datetime of the SDK API Key
        :param pulumi.Input[_builtins.str] identifier: Identifier of the SDK API Key
        :param pulumi.Input[_builtins.str] name: Name of the SDK API Key
        :param pulumi.Input[_builtins.str] org_id: Organization Identifier
        :param pulumi.Input[_builtins.str] project_id: Project Identifier
        :param pulumi.Input[_builtins.str] type: Type of SDK. Valid values are `Server` or `Client`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _FeatureFlagApiKeyState.__new__(_FeatureFlagApiKeyState)

        __props__.__dict__["api_key"] = api_key
        __props__.__dict__["description"] = description
        __props__.__dict__["env_id"] = env_id
        __props__.__dict__["expired_at"] = expired_at
        __props__.__dict__["identifier"] = identifier
        __props__.__dict__["name"] = name
        __props__.__dict__["org_id"] = org_id
        __props__.__dict__["project_id"] = project_id
        __props__.__dict__["type"] = type
        return FeatureFlagApiKey(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="apiKey")
    def api_key(self) -> pulumi.Output[_builtins.str]:
        """
        The value of the SDK API Key
        """
        return pulumi.get(self, "api_key")

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Description of the SDK API Key
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter(name="envId")
    def env_id(self) -> pulumi.Output[_builtins.str]:
        """
        Environment Identifier
        """
        return pulumi.get(self, "env_id")

    @_builtins.property
    @pulumi.getter(name="expiredAt")
    def expired_at(self) -> pulumi.Output[Optional[_builtins.int]]:
        """
        Expiration datetime of the SDK API Key
        """
        return pulumi.get(self, "expired_at")

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Output[_builtins.str]:
        """
        Identifier of the SDK API Key
        """
        return pulumi.get(self, "identifier")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        Name of the SDK API Key
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="orgId")
    def org_id(self) -> pulumi.Output[_builtins.str]:
        """
        Organization Identifier
        """
        return pulumi.get(self, "org_id")

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Output[_builtins.str]:
        """
        Project Identifier
        """
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter
    def type(self) -> pulumi.Output[_builtins.str]:
        """
        Type of SDK. Valid values are `Server` or `Client`.
        """
        return pulumi.get(self, "type")

