# 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 pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['ProvisioningKeyArgs', 'ProvisioningKey']

@pulumi.input_type
class ProvisioningKeyArgs:
    def __init__(__self__, *,
                 association_type: pulumi.Input[str],
                 enrollment_cert_id: pulumi.Input[str],
                 max_usage: pulumi.Input[str],
                 zcomponent_id: pulumi.Input[str],
                 app_connector_group_id: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 ip_acls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ui_config: Optional[pulumi.Input[str]] = None,
                 usage_count: Optional[pulumi.Input[str]] = None,
                 zcomponent_name: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a ProvisioningKey resource.
        :param pulumi.Input[str] association_type: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        :param pulumi.Input[str] enrollment_cert_id: ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        :param pulumi.Input[str] max_usage: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        :param pulumi.Input[str] zcomponent_id: ID of the existing App Connector or Service Edge Group.
        :param pulumi.Input[bool] enabled: Whether the provisioning key is enabled or not. Supported values: true, false
        :param pulumi.Input[str] microtenant_id: The ID of the microtenant the resource is to be associated with.
               
               ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        :param pulumi.Input[str] name: Name of the provisioning key.
        :param pulumi.Input[str] usage_count: The provisioning key utilization count.
        :param pulumi.Input[str] zcomponent_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        pulumi.set(__self__, "association_type", association_type)
        pulumi.set(__self__, "enrollment_cert_id", enrollment_cert_id)
        pulumi.set(__self__, "max_usage", max_usage)
        pulumi.set(__self__, "zcomponent_id", zcomponent_id)
        if app_connector_group_id is not None:
            pulumi.set(__self__, "app_connector_group_id", app_connector_group_id)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if ip_acls is not None:
            pulumi.set(__self__, "ip_acls", ip_acls)
        if microtenant_id is not None:
            pulumi.set(__self__, "microtenant_id", microtenant_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if ui_config is not None:
            pulumi.set(__self__, "ui_config", ui_config)
        if usage_count is not None:
            pulumi.set(__self__, "usage_count", usage_count)
        if zcomponent_name is not None:
            pulumi.set(__self__, "zcomponent_name", zcomponent_name)

    @property
    @pulumi.getter(name="associationType")
    def association_type(self) -> pulumi.Input[str]:
        """
        Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        """
        return pulumi.get(self, "association_type")

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

    @property
    @pulumi.getter(name="enrollmentCertId")
    def enrollment_cert_id(self) -> pulumi.Input[str]:
        """
        ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        """
        return pulumi.get(self, "enrollment_cert_id")

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

    @property
    @pulumi.getter(name="maxUsage")
    def max_usage(self) -> pulumi.Input[str]:
        """
        The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        """
        return pulumi.get(self, "max_usage")

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

    @property
    @pulumi.getter(name="zcomponentId")
    def zcomponent_id(self) -> pulumi.Input[str]:
        """
        ID of the existing App Connector or Service Edge Group.
        """
        return pulumi.get(self, "zcomponent_id")

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

    @property
    @pulumi.getter(name="appConnectorGroupId")
    def app_connector_group_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "app_connector_group_id")

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the provisioning key is enabled or not. Supported values: true, false
        """
        return pulumi.get(self, "enabled")

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

    @property
    @pulumi.getter(name="ipAcls")
    def ip_acls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        return pulumi.get(self, "ip_acls")

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

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the microtenant the resource is to be associated with.

        ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        """
        return pulumi.get(self, "microtenant_id")

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

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

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

    @property
    @pulumi.getter(name="uiConfig")
    def ui_config(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "ui_config")

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

    @property
    @pulumi.getter(name="usageCount")
    def usage_count(self) -> Optional[pulumi.Input[str]]:
        """
        The provisioning key utilization count.
        """
        return pulumi.get(self, "usage_count")

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

    @property
    @pulumi.getter(name="zcomponentName")
    def zcomponent_name(self) -> Optional[pulumi.Input[str]]:
        """
        Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        return pulumi.get(self, "zcomponent_name")

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


@pulumi.input_type
class _ProvisioningKeyState:
    def __init__(__self__, *,
                 provisioning_key_value: Optional[pulumi.Input[str]] = None,
                 app_connector_group_id: Optional[pulumi.Input[str]] = None,
                 app_connector_group_name: Optional[pulumi.Input[str]] = None,
                 association_type: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 enrollment_cert_id: Optional[pulumi.Input[str]] = None,
                 ip_acls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 max_usage: Optional[pulumi.Input[str]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ui_config: Optional[pulumi.Input[str]] = None,
                 usage_count: Optional[pulumi.Input[str]] = None,
                 zcomponent_id: Optional[pulumi.Input[str]] = None,
                 zcomponent_name: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering ProvisioningKey resources.
        :param pulumi.Input[str] provisioning_key_value: read only field. Ignored in PUT/POST calls.
        :param pulumi.Input[str] app_connector_group_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        :param pulumi.Input[str] association_type: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        :param pulumi.Input[bool] enabled: Whether the provisioning key is enabled or not. Supported values: true, false
        :param pulumi.Input[str] enrollment_cert_id: ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        :param pulumi.Input[str] max_usage: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        :param pulumi.Input[str] microtenant_id: The ID of the microtenant the resource is to be associated with.
               
               ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        :param pulumi.Input[str] name: Name of the provisioning key.
        :param pulumi.Input[str] usage_count: The provisioning key utilization count.
        :param pulumi.Input[str] zcomponent_id: ID of the existing App Connector or Service Edge Group.
        :param pulumi.Input[str] zcomponent_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        if provisioning_key_value is not None:
            pulumi.set(__self__, "provisioning_key_value", provisioning_key_value)
        if app_connector_group_id is not None:
            pulumi.set(__self__, "app_connector_group_id", app_connector_group_id)
        if app_connector_group_name is not None:
            pulumi.set(__self__, "app_connector_group_name", app_connector_group_name)
        if association_type is not None:
            pulumi.set(__self__, "association_type", association_type)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if enrollment_cert_id is not None:
            pulumi.set(__self__, "enrollment_cert_id", enrollment_cert_id)
        if ip_acls is not None:
            pulumi.set(__self__, "ip_acls", ip_acls)
        if max_usage is not None:
            pulumi.set(__self__, "max_usage", max_usage)
        if microtenant_id is not None:
            pulumi.set(__self__, "microtenant_id", microtenant_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if ui_config is not None:
            pulumi.set(__self__, "ui_config", ui_config)
        if usage_count is not None:
            pulumi.set(__self__, "usage_count", usage_count)
        if zcomponent_id is not None:
            pulumi.set(__self__, "zcomponent_id", zcomponent_id)
        if zcomponent_name is not None:
            pulumi.set(__self__, "zcomponent_name", zcomponent_name)

    @property
    @pulumi.getter(name="ProvisioningKeyValue")
    def provisioning_key_value(self) -> Optional[pulumi.Input[str]]:
        """
        read only field. Ignored in PUT/POST calls.
        """
        return pulumi.get(self, "provisioning_key_value")

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

    @property
    @pulumi.getter(name="appConnectorGroupId")
    def app_connector_group_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "app_connector_group_id")

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

    @property
    @pulumi.getter(name="appConnectorGroupName")
    def app_connector_group_name(self) -> Optional[pulumi.Input[str]]:
        """
        Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        return pulumi.get(self, "app_connector_group_name")

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

    @property
    @pulumi.getter(name="associationType")
    def association_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        """
        return pulumi.get(self, "association_type")

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the provisioning key is enabled or not. Supported values: true, false
        """
        return pulumi.get(self, "enabled")

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

    @property
    @pulumi.getter(name="enrollmentCertId")
    def enrollment_cert_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        """
        return pulumi.get(self, "enrollment_cert_id")

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

    @property
    @pulumi.getter(name="ipAcls")
    def ip_acls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        return pulumi.get(self, "ip_acls")

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

    @property
    @pulumi.getter(name="maxUsage")
    def max_usage(self) -> Optional[pulumi.Input[str]]:
        """
        The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        """
        return pulumi.get(self, "max_usage")

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

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the microtenant the resource is to be associated with.

        ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        """
        return pulumi.get(self, "microtenant_id")

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

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

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

    @property
    @pulumi.getter(name="uiConfig")
    def ui_config(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "ui_config")

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

    @property
    @pulumi.getter(name="usageCount")
    def usage_count(self) -> Optional[pulumi.Input[str]]:
        """
        The provisioning key utilization count.
        """
        return pulumi.get(self, "usage_count")

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

    @property
    @pulumi.getter(name="zcomponentId")
    def zcomponent_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID of the existing App Connector or Service Edge Group.
        """
        return pulumi.get(self, "zcomponent_id")

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

    @property
    @pulumi.getter(name="zcomponentName")
    def zcomponent_name(self) -> Optional[pulumi.Input[str]]:
        """
        Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        return pulumi.get(self, "zcomponent_name")

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


class ProvisioningKey(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 app_connector_group_id: Optional[pulumi.Input[str]] = None,
                 association_type: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 enrollment_cert_id: Optional[pulumi.Input[str]] = None,
                 ip_acls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 max_usage: Optional[pulumi.Input[str]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ui_config: Optional[pulumi.Input[str]] = None,
                 usage_count: Optional[pulumi.Input[str]] = None,
                 zcomponent_id: Optional[pulumi.Input[str]] = None,
                 zcomponent_name: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        ## Import

        Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. Visit Provisioning key can be imported by using `<PROVISIONING KEY ID>` or `<PROVISIONING KEY NAME>` as the import ID. For example

        ```sh
         $ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_id>
        ```

         or

        ```sh
         $ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_name>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] association_type: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        :param pulumi.Input[bool] enabled: Whether the provisioning key is enabled or not. Supported values: true, false
        :param pulumi.Input[str] enrollment_cert_id: ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        :param pulumi.Input[str] max_usage: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        :param pulumi.Input[str] microtenant_id: The ID of the microtenant the resource is to be associated with.
               
               ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        :param pulumi.Input[str] name: Name of the provisioning key.
        :param pulumi.Input[str] usage_count: The provisioning key utilization count.
        :param pulumi.Input[str] zcomponent_id: ID of the existing App Connector or Service Edge Group.
        :param pulumi.Input[str] zcomponent_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ProvisioningKeyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. Visit Provisioning key can be imported by using `<PROVISIONING KEY ID>` or `<PROVISIONING KEY NAME>` as the import ID. For example

        ```sh
         $ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_id>
        ```

         or

        ```sh
         $ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_name>
        ```

        :param str resource_name: The name of the resource.
        :param ProvisioningKeyArgs 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(ProvisioningKeyArgs, 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,
                 app_connector_group_id: Optional[pulumi.Input[str]] = None,
                 association_type: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 enrollment_cert_id: Optional[pulumi.Input[str]] = None,
                 ip_acls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 max_usage: Optional[pulumi.Input[str]] = None,
                 microtenant_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ui_config: Optional[pulumi.Input[str]] = None,
                 usage_count: Optional[pulumi.Input[str]] = None,
                 zcomponent_id: Optional[pulumi.Input[str]] = None,
                 zcomponent_name: 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__ = ProvisioningKeyArgs.__new__(ProvisioningKeyArgs)

            __props__.__dict__["app_connector_group_id"] = app_connector_group_id
            if association_type is None and not opts.urn:
                raise TypeError("Missing required property 'association_type'")
            __props__.__dict__["association_type"] = association_type
            __props__.__dict__["enabled"] = enabled
            if enrollment_cert_id is None and not opts.urn:
                raise TypeError("Missing required property 'enrollment_cert_id'")
            __props__.__dict__["enrollment_cert_id"] = enrollment_cert_id
            __props__.__dict__["ip_acls"] = ip_acls
            if max_usage is None and not opts.urn:
                raise TypeError("Missing required property 'max_usage'")
            __props__.__dict__["max_usage"] = max_usage
            __props__.__dict__["microtenant_id"] = microtenant_id
            __props__.__dict__["name"] = name
            __props__.__dict__["ui_config"] = ui_config
            __props__.__dict__["usage_count"] = usage_count
            if zcomponent_id is None and not opts.urn:
                raise TypeError("Missing required property 'zcomponent_id'")
            __props__.__dict__["zcomponent_id"] = zcomponent_id
            __props__.__dict__["zcomponent_name"] = zcomponent_name
            __props__.__dict__["provisioning_key_value"] = None
            __props__.__dict__["app_connector_group_name"] = None
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["ProvisioningKeyValue"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(ProvisioningKey, __self__).__init__(
            'zpa:index/provisioningKey:ProvisioningKey',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            provisioning_key_value: Optional[pulumi.Input[str]] = None,
            app_connector_group_id: Optional[pulumi.Input[str]] = None,
            app_connector_group_name: Optional[pulumi.Input[str]] = None,
            association_type: Optional[pulumi.Input[str]] = None,
            enabled: Optional[pulumi.Input[bool]] = None,
            enrollment_cert_id: Optional[pulumi.Input[str]] = None,
            ip_acls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            max_usage: Optional[pulumi.Input[str]] = None,
            microtenant_id: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            ui_config: Optional[pulumi.Input[str]] = None,
            usage_count: Optional[pulumi.Input[str]] = None,
            zcomponent_id: Optional[pulumi.Input[str]] = None,
            zcomponent_name: Optional[pulumi.Input[str]] = None) -> 'ProvisioningKey':
        """
        Get an existing ProvisioningKey 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] provisioning_key_value: read only field. Ignored in PUT/POST calls.
        :param pulumi.Input[str] app_connector_group_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        :param pulumi.Input[str] association_type: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        :param pulumi.Input[bool] enabled: Whether the provisioning key is enabled or not. Supported values: true, false
        :param pulumi.Input[str] enrollment_cert_id: ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        :param pulumi.Input[str] max_usage: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        :param pulumi.Input[str] microtenant_id: The ID of the microtenant the resource is to be associated with.
               
               ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        :param pulumi.Input[str] name: Name of the provisioning key.
        :param pulumi.Input[str] usage_count: The provisioning key utilization count.
        :param pulumi.Input[str] zcomponent_id: ID of the existing App Connector or Service Edge Group.
        :param pulumi.Input[str] zcomponent_name: Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ProvisioningKeyState.__new__(_ProvisioningKeyState)

        __props__.__dict__["provisioning_key_value"] = provisioning_key_value
        __props__.__dict__["app_connector_group_id"] = app_connector_group_id
        __props__.__dict__["app_connector_group_name"] = app_connector_group_name
        __props__.__dict__["association_type"] = association_type
        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["enrollment_cert_id"] = enrollment_cert_id
        __props__.__dict__["ip_acls"] = ip_acls
        __props__.__dict__["max_usage"] = max_usage
        __props__.__dict__["microtenant_id"] = microtenant_id
        __props__.__dict__["name"] = name
        __props__.__dict__["ui_config"] = ui_config
        __props__.__dict__["usage_count"] = usage_count
        __props__.__dict__["zcomponent_id"] = zcomponent_id
        __props__.__dict__["zcomponent_name"] = zcomponent_name
        return ProvisioningKey(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="ProvisioningKeyValue")
    def provisioning_key_value(self) -> pulumi.Output[str]:
        """
        read only field. Ignored in PUT/POST calls.
        """
        return pulumi.get(self, "provisioning_key_value")

    @property
    @pulumi.getter(name="appConnectorGroupId")
    def app_connector_group_id(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "app_connector_group_id")

    @property
    @pulumi.getter(name="appConnectorGroupName")
    def app_connector_group_name(self) -> pulumi.Output[str]:
        """
        Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        return pulumi.get(self, "app_connector_group_name")

    @property
    @pulumi.getter(name="associationType")
    def association_type(self) -> pulumi.Output[str]:
        """
        Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are `CONNECTOR_GRP` and `SERVICE_EDGE_GRP`
        """
        return pulumi.get(self, "association_type")

    @property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Whether the provisioning key is enabled or not. Supported values: true, false
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="enrollmentCertId")
    def enrollment_cert_id(self) -> pulumi.Output[str]:
        """
        ID of the enrollment certificate that can be used for this provisioning key. `ID` of the existing enrollment certificate that has the private key
        """
        return pulumi.get(self, "enrollment_cert_id")

    @property
    @pulumi.getter(name="ipAcls")
    def ip_acls(self) -> pulumi.Output[Optional[Sequence[str]]]:
        return pulumi.get(self, "ip_acls")

    @property
    @pulumi.getter(name="maxUsage")
    def max_usage(self) -> pulumi.Output[str]:
        """
        The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
        """
        return pulumi.get(self, "max_usage")

    @property
    @pulumi.getter(name="microtenantId")
    def microtenant_id(self) -> pulumi.Output[Optional[str]]:
        """
        The ID of the microtenant the resource is to be associated with.

        ⚠️ **WARNING:**: The attribute ``microtenant_id`` is optional and requires the microtenant license and feature flag enabled for the respective tenant. The provider also supports the microtenant ID configuration via the environment variable `ZPA_MICROTENANT_ID` which is the recommended method.
        """
        return pulumi.get(self, "microtenant_id")

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

    @property
    @pulumi.getter(name="uiConfig")
    def ui_config(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "ui_config")

    @property
    @pulumi.getter(name="usageCount")
    def usage_count(self) -> pulumi.Output[str]:
        """
        The provisioning key utilization count.
        """
        return pulumi.get(self, "usage_count")

    @property
    @pulumi.getter(name="zcomponentId")
    def zcomponent_id(self) -> pulumi.Output[str]:
        """
        ID of the existing App Connector or Service Edge Group.
        """
        return pulumi.get(self, "zcomponent_id")

    @property
    @pulumi.getter(name="zcomponentName")
    def zcomponent_name(self) -> pulumi.Output[str]:
        """
        Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
        """
        return pulumi.get(self, "zcomponent_name")

