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

__all__ = ['AddonArgs', 'Addon']

@pulumi.input_type
class AddonArgs:
    def __init__(__self__, *,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 config: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_mode: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_node_type: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input['AddonStatusArgs']] = None,
                 version: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Addon resource.
        :param pulumi.Input[builtins.str] cluster_id: 组件所在集群 ID。
        :param pulumi.Input[builtins.str] config: 组件配置。
        :param pulumi.Input[builtins.str] deploy_mode: 组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        :param pulumi.Input[builtins.str] deploy_node_type: 部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        :param pulumi.Input[builtins.str] name: 组件名称。
        :param pulumi.Input['AddonStatusArgs'] status: 组件状态。
        :param pulumi.Input[builtins.str] version: 组件版本。
        """
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if config is not None:
            pulumi.set(__self__, "config", config)
        if deploy_mode is not None:
            pulumi.set(__self__, "deploy_mode", deploy_mode)
        if deploy_node_type is not None:
            pulumi.set(__self__, "deploy_node_type", deploy_node_type)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if version is not None:
            pulumi.set(__self__, "version", version)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件所在集群 ID。
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件配置。
        """
        return pulumi.get(self, "config")

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

    @property
    @pulumi.getter(name="deployMode")
    def deploy_mode(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        """
        return pulumi.get(self, "deploy_mode")

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

    @property
    @pulumi.getter(name="deployNodeType")
    def deploy_node_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        """
        return pulumi.get(self, "deploy_node_type")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件名称。
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input['AddonStatusArgs']]:
        """
        组件状态。
        """
        return pulumi.get(self, "status")

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

    @property
    @pulumi.getter
    def version(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件版本。
        """
        return pulumi.get(self, "version")

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


@pulumi.input_type
class _AddonState:
    def __init__(__self__, *,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 config: Optional[pulumi.Input[builtins.str]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_mode: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_node_type: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input['AddonStatusArgs']] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None,
                 version: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Addon resources.
        :param pulumi.Input[builtins.str] cluster_id: 组件所在集群 ID。
        :param pulumi.Input[builtins.str] config: 组件配置。
        :param pulumi.Input[builtins.str] created_time: 安装组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        :param pulumi.Input[builtins.str] deploy_mode: 组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        :param pulumi.Input[builtins.str] deploy_node_type: 部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        :param pulumi.Input[builtins.str] name: 组件名称。
        :param pulumi.Input['AddonStatusArgs'] status: 组件状态。
        :param pulumi.Input[builtins.str] updated_time: 更新组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        :param pulumi.Input[builtins.str] version: 组件版本。
        """
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if config is not None:
            pulumi.set(__self__, "config", config)
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if deploy_mode is not None:
            pulumi.set(__self__, "deploy_mode", deploy_mode)
        if deploy_node_type is not None:
            pulumi.set(__self__, "deploy_node_type", deploy_node_type)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)
        if version is not None:
            pulumi.set(__self__, "version", version)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件所在集群 ID。
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件配置。
        """
        return pulumi.get(self, "config")

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

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        安装组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        """
        return pulumi.get(self, "created_time")

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

    @property
    @pulumi.getter(name="deployMode")
    def deploy_mode(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        """
        return pulumi.get(self, "deploy_mode")

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

    @property
    @pulumi.getter(name="deployNodeType")
    def deploy_node_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        """
        return pulumi.get(self, "deploy_node_type")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件名称。
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input['AddonStatusArgs']]:
        """
        组件状态。
        """
        return pulumi.get(self, "status")

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

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        更新组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        """
        return pulumi.get(self, "updated_time")

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

    @property
    @pulumi.getter
    def version(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组件版本。
        """
        return pulumi.get(self, "version")

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


@pulumi.type_token("bytepluscc:vke/addon:Addon")
class Addon(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 config: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_mode: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_node_type: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[Union['AddonStatusArgs', 'AddonStatusArgsDict']]] = None,
                 version: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        集群中支持安装多种类型的组件，包括 网络、存储、监控、DNS、安全、镜像、GPU 等，满足您多种业务场景需求。您可按需部署、升级或卸载组件。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_ke_addon_demo = bytepluscc.vke.Addon("VKEAddonDemo",
            cluster_id="cd35mtki***",
            deploy_mode="Unmanaged",
            deploy_node_type="Node",
            name="csi-nas",
            version="v1.2.7",
            config="{\\"CsiNasDriver\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.9\\",\\"Memory\\":\\"1900Mi\\"}}},\\"CsiProvisioner\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.5\\",\\"Memory\\":\\"4Gi\\"}}},\\"LivenessProbe\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.1\\",\\"Memory\\":\\"100Mi\\"}}}}")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vke/addon:Addon example "cluster_id|name"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] cluster_id: 组件所在集群 ID。
        :param pulumi.Input[builtins.str] config: 组件配置。
        :param pulumi.Input[builtins.str] deploy_mode: 组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        :param pulumi.Input[builtins.str] deploy_node_type: 部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        :param pulumi.Input[builtins.str] name: 组件名称。
        :param pulumi.Input[Union['AddonStatusArgs', 'AddonStatusArgsDict']] status: 组件状态。
        :param pulumi.Input[builtins.str] version: 组件版本。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[AddonArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        集群中支持安装多种类型的组件，包括 网络、存储、监控、DNS、安全、镜像、GPU 等，满足您多种业务场景需求。您可按需部署、升级或卸载组件。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_ke_addon_demo = bytepluscc.vke.Addon("VKEAddonDemo",
            cluster_id="cd35mtki***",
            deploy_mode="Unmanaged",
            deploy_node_type="Node",
            name="csi-nas",
            version="v1.2.7",
            config="{\\"CsiNasDriver\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.9\\",\\"Memory\\":\\"1900Mi\\"}}},\\"CsiProvisioner\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.5\\",\\"Memory\\":\\"4Gi\\"}}},\\"LivenessProbe\\":{\\"Resources\\":{\\"Requests\\":{\\"Cpu\\":\\"0.01\\",\\"Memory\\":\\"20Mi\\"},\\"Limits\\":{\\"Cpu\\":\\"0.1\\",\\"Memory\\":\\"100Mi\\"}}}}")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vke/addon:Addon example "cluster_id|name"
        ```

        :param str resource_name: The name of the resource.
        :param AddonArgs 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(AddonArgs, 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,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 config: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_mode: Optional[pulumi.Input[builtins.str]] = None,
                 deploy_node_type: Optional[pulumi.Input[builtins.str]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[Union['AddonStatusArgs', 'AddonStatusArgsDict']]] = None,
                 version: 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__ = AddonArgs.__new__(AddonArgs)

            __props__.__dict__["cluster_id"] = cluster_id
            __props__.__dict__["config"] = config
            __props__.__dict__["deploy_mode"] = deploy_mode
            __props__.__dict__["deploy_node_type"] = deploy_node_type
            __props__.__dict__["name"] = name
            __props__.__dict__["status"] = status
            __props__.__dict__["version"] = version
            __props__.__dict__["created_time"] = None
            __props__.__dict__["updated_time"] = None
        super(Addon, __self__).__init__(
            'bytepluscc:vke/addon:Addon',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            cluster_id: Optional[pulumi.Input[builtins.str]] = None,
            config: Optional[pulumi.Input[builtins.str]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            deploy_mode: Optional[pulumi.Input[builtins.str]] = None,
            deploy_node_type: Optional[pulumi.Input[builtins.str]] = None,
            name: Optional[pulumi.Input[builtins.str]] = None,
            status: Optional[pulumi.Input[Union['AddonStatusArgs', 'AddonStatusArgsDict']]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None,
            version: Optional[pulumi.Input[builtins.str]] = None) -> 'Addon':
        """
        Get an existing Addon 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] cluster_id: 组件所在集群 ID。
        :param pulumi.Input[builtins.str] config: 组件配置。
        :param pulumi.Input[builtins.str] created_time: 安装组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        :param pulumi.Input[builtins.str] deploy_mode: 组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        :param pulumi.Input[builtins.str] deploy_node_type: 部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        :param pulumi.Input[builtins.str] name: 组件名称。
        :param pulumi.Input[Union['AddonStatusArgs', 'AddonStatusArgsDict']] status: 组件状态。
        :param pulumi.Input[builtins.str] updated_time: 更新组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        :param pulumi.Input[builtins.str] version: 组件版本。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _AddonState.__new__(_AddonState)

        __props__.__dict__["cluster_id"] = cluster_id
        __props__.__dict__["config"] = config
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["deploy_mode"] = deploy_mode
        __props__.__dict__["deploy_node_type"] = deploy_node_type
        __props__.__dict__["name"] = name
        __props__.__dict__["status"] = status
        __props__.__dict__["updated_time"] = updated_time
        __props__.__dict__["version"] = version
        return Addon(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Output[builtins.str]:
        """
        组件所在集群 ID。
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter
    def config(self) -> pulumi.Output[builtins.str]:
        """
        组件配置。
        """
        return pulumi.get(self, "config")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        安装组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="deployMode")
    def deploy_mode(self) -> pulumi.Output[builtins.str]:
        """
        组件部署模式，取值：Unmanaged：非托管模式部署。Managed：托管模式部署。
        """
        return pulumi.get(self, "deploy_mode")

    @property
    @pulumi.getter(name="deployNodeType")
    def deploy_node_type(self) -> pulumi.Output[builtins.str]:
        """
        部署节点的类型。仅DeployModes=Unmanaged时，才需要指定该参数。取值：Node：以节点方式部署。VirtualNode：以虚拟节点方式部署。
        """
        return pulumi.get(self, "deploy_node_type")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[builtins.str]:
        """
        组件名称。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output['outputs.AddonStatus']:
        """
        组件状态。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> pulumi.Output[builtins.str]:
        """
        更新组件的时间。标准 RFC3339 格式的 UTC+0 时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter
    def version(self) -> pulumi.Output[builtins.str]:
        """
        组件版本。
        """
        return pulumi.get(self, "version")

