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

__all__ = ['CertificatePoolArgs', 'CertificatePool']

@pulumi.input_type
class CertificatePoolArgs:
    def __init__(__self__, *,
                 certificate_authority: pulumi.Input['CertificatePoolCertificateAuthorityArgs'],
                 description: pulumi.Input[str],
                 display_name: pulumi.Input[str],
                 external_identifier: pulumi.Input[str],
                 filter: pulumi.Input[str]):
        """
        The set of arguments for constructing a CertificatePool resource.
        :param pulumi.Input[str] description: A description of the Certificate Pool.
        :param pulumi.Input[str] display_name: The name of the Certificate Pool.
        :param pulumi.Input[str] external_identifier: The certificate field that will be used to represent the pool's external identity for audit logging.
        :param pulumi.Input[str] filter: A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        pulumi.set(__self__, "certificate_authority", certificate_authority)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "external_identifier", external_identifier)
        pulumi.set(__self__, "filter", filter)

    @property
    @pulumi.getter(name="certificateAuthority")
    def certificate_authority(self) -> pulumi.Input['CertificatePoolCertificateAuthorityArgs']:
        return pulumi.get(self, "certificate_authority")

    @certificate_authority.setter
    def certificate_authority(self, value: pulumi.Input['CertificatePoolCertificateAuthorityArgs']):
        pulumi.set(self, "certificate_authority", value)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Input[str]:
        """
        A description of the Certificate Pool.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[str]:
        """
        The name of the Certificate Pool.
        """
        return pulumi.get(self, "display_name")

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

    @property
    @pulumi.getter(name="externalIdentifier")
    def external_identifier(self) -> pulumi.Input[str]:
        """
        The certificate field that will be used to represent the pool's external identity for audit logging.
        """
        return pulumi.get(self, "external_identifier")

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

    @property
    @pulumi.getter
    def filter(self) -> pulumi.Input[str]:
        """
        A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        return pulumi.get(self, "filter")

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


@pulumi.input_type
class _CertificatePoolState:
    def __init__(__self__, *,
                 certificate_authority: Optional[pulumi.Input['CertificatePoolCertificateAuthorityArgs']] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 external_identifier: Optional[pulumi.Input[str]] = None,
                 filter: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering CertificatePool resources.
        :param pulumi.Input[str] description: A description of the Certificate Pool.
        :param pulumi.Input[str] display_name: The name of the Certificate Pool.
        :param pulumi.Input[str] external_identifier: The certificate field that will be used to represent the pool's external identity for audit logging.
        :param pulumi.Input[str] filter: A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        if certificate_authority is not None:
            pulumi.set(__self__, "certificate_authority", certificate_authority)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if external_identifier is not None:
            pulumi.set(__self__, "external_identifier", external_identifier)
        if filter is not None:
            pulumi.set(__self__, "filter", filter)

    @property
    @pulumi.getter(name="certificateAuthority")
    def certificate_authority(self) -> Optional[pulumi.Input['CertificatePoolCertificateAuthorityArgs']]:
        return pulumi.get(self, "certificate_authority")

    @certificate_authority.setter
    def certificate_authority(self, value: Optional[pulumi.Input['CertificatePoolCertificateAuthorityArgs']]):
        pulumi.set(self, "certificate_authority", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A description of the Certificate Pool.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the Certificate Pool.
        """
        return pulumi.get(self, "display_name")

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

    @property
    @pulumi.getter(name="externalIdentifier")
    def external_identifier(self) -> Optional[pulumi.Input[str]]:
        """
        The certificate field that will be used to represent the pool's external identity for audit logging.
        """
        return pulumi.get(self, "external_identifier")

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

    @property
    @pulumi.getter
    def filter(self) -> Optional[pulumi.Input[str]]:
        """
        A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        return pulumi.get(self, "filter")

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


class CertificatePool(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 certificate_authority: Optional[pulumi.Input[Union['CertificatePoolCertificateAuthorityArgs', 'CertificatePoolCertificateAuthorityArgsDict']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 external_identifier: Optional[pulumi.Input[str]] = None,
                 filter: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        [![Limited Availability](https://img.shields.io/badge/Lifecycle%20Stage-Limited%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

        `CertificatePool` provides a Certificate Pool resource that enables creating, editing, and deleting Certificate Pools on Confluent Cloud.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_confluentcloud as confluentcloud

        main = confluentcloud.CertificatePool("main",
            certificate_authority={
                "id": main_confluent_certificate_authority["id"],
            },
            display_name="my-certificate-pool",
            description="example description",
            external_identifier="CN",
            filter="CN == \\"test\\"")
        ```

        ## Import

        You can import a Certificate Pool by using Certificate Authority ID and Certificate Pool ID, in the format `<Certificate Authority ID>/<Certificate Pool ID>`. The following example shows how to import a Certificate Pool:

        $ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

        $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

        ```sh
        $ pulumi import confluentcloud:index/certificatePool:CertificatePool main op-abc123/pool-abc123
        ```

        !> **Warning:** Do not forget to delete terminal command history afterwards for security purposes.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: A description of the Certificate Pool.
        :param pulumi.Input[str] display_name: The name of the Certificate Pool.
        :param pulumi.Input[str] external_identifier: The certificate field that will be used to represent the pool's external identity for audit logging.
        :param pulumi.Input[str] filter: A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: CertificatePoolArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Limited Availability](https://img.shields.io/badge/Lifecycle%20Stage-Limited%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

        `CertificatePool` provides a Certificate Pool resource that enables creating, editing, and deleting Certificate Pools on Confluent Cloud.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_confluentcloud as confluentcloud

        main = confluentcloud.CertificatePool("main",
            certificate_authority={
                "id": main_confluent_certificate_authority["id"],
            },
            display_name="my-certificate-pool",
            description="example description",
            external_identifier="CN",
            filter="CN == \\"test\\"")
        ```

        ## Import

        You can import a Certificate Pool by using Certificate Authority ID and Certificate Pool ID, in the format `<Certificate Authority ID>/<Certificate Pool ID>`. The following example shows how to import a Certificate Pool:

        $ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

        $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

        ```sh
        $ pulumi import confluentcloud:index/certificatePool:CertificatePool main op-abc123/pool-abc123
        ```

        !> **Warning:** Do not forget to delete terminal command history afterwards for security purposes.

        :param str resource_name: The name of the resource.
        :param CertificatePoolArgs 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(CertificatePoolArgs, 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,
                 certificate_authority: Optional[pulumi.Input[Union['CertificatePoolCertificateAuthorityArgs', 'CertificatePoolCertificateAuthorityArgsDict']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 external_identifier: Optional[pulumi.Input[str]] = None,
                 filter: Optional[pulumi.Input[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__ = CertificatePoolArgs.__new__(CertificatePoolArgs)

            if certificate_authority is None and not opts.urn:
                raise TypeError("Missing required property 'certificate_authority'")
            __props__.__dict__["certificate_authority"] = certificate_authority
            if description is None and not opts.urn:
                raise TypeError("Missing required property 'description'")
            __props__.__dict__["description"] = description
            if display_name is None and not opts.urn:
                raise TypeError("Missing required property 'display_name'")
            __props__.__dict__["display_name"] = display_name
            if external_identifier is None and not opts.urn:
                raise TypeError("Missing required property 'external_identifier'")
            __props__.__dict__["external_identifier"] = external_identifier
            if filter is None and not opts.urn:
                raise TypeError("Missing required property 'filter'")
            __props__.__dict__["filter"] = filter
        super(CertificatePool, __self__).__init__(
            'confluentcloud:index/certificatePool:CertificatePool',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            certificate_authority: Optional[pulumi.Input[Union['CertificatePoolCertificateAuthorityArgs', 'CertificatePoolCertificateAuthorityArgsDict']]] = None,
            description: Optional[pulumi.Input[str]] = None,
            display_name: Optional[pulumi.Input[str]] = None,
            external_identifier: Optional[pulumi.Input[str]] = None,
            filter: Optional[pulumi.Input[str]] = None) -> 'CertificatePool':
        """
        Get an existing CertificatePool 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[str] description: A description of the Certificate Pool.
        :param pulumi.Input[str] display_name: The name of the Certificate Pool.
        :param pulumi.Input[str] external_identifier: The certificate field that will be used to represent the pool's external identity for audit logging.
        :param pulumi.Input[str] filter: A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _CertificatePoolState.__new__(_CertificatePoolState)

        __props__.__dict__["certificate_authority"] = certificate_authority
        __props__.__dict__["description"] = description
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["external_identifier"] = external_identifier
        __props__.__dict__["filter"] = filter
        return CertificatePool(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="certificateAuthority")
    def certificate_authority(self) -> pulumi.Output['outputs.CertificatePoolCertificateAuthority']:
        return pulumi.get(self, "certificate_authority")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[str]:
        """
        A description of the Certificate Pool.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[str]:
        """
        The name of the Certificate Pool.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="externalIdentifier")
    def external_identifier(self) -> pulumi.Output[str]:
        """
        The certificate field that will be used to represent the pool's external identity for audit logging.
        """
        return pulumi.get(self, "external_identifier")

    @property
    @pulumi.getter
    def filter(self) -> pulumi.Output[str]:
        """
        A filter expression in [Supported Common Expression Language (CEL)](https://docs.confluent.io/cloud/current/access-management/authenticate/mtls/cel-filters.html) that specifies which identities can authenticate using your certificate pool.
        """
        return pulumi.get(self, "filter")

