# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import _utilities, _tables

__all__ = ['K8sCluster']


class K8sCluster(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cs_cluster_id: Optional[pulumi.Input[str]] = None,
                 namespace_id: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Provides an EDAS K8s cluster resource. For information about EDAS K8s Cluster and how to use it, see[What is EDAS K8s Cluster](https://www.alibabacloud.com/help/en/doc-detail/85108.htm).

        > **NOTE:** Available in 1.93.0+

        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        default = alicloud.edas.K8sCluster("default", cs_cluster_id="xxxx-xxx-xxx")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] cs_cluster_id: The ID of the alicloud container service kubernetes cluster that you want to import.
        :param pulumi.Input[str] namespace_id: The ID of the namespace where you want to import. You can call the [ListUserDefineRegion](https://www.alibabacloud.com/help/en/doc-detail/149377.htm?spm=a2c63.p38356.879954.34.331054faK2yNvC#doc-api-Edas-ListUserDefineRegion) operation to query the namespace ID.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__ = dict()

            if cs_cluster_id is None:
                raise TypeError("Missing required property 'cs_cluster_id'")
            __props__['cs_cluster_id'] = cs_cluster_id
            __props__['namespace_id'] = namespace_id
            __props__['cluster_import_status'] = None
            __props__['cluster_name'] = None
            __props__['cluster_type'] = None
            __props__['network_mode'] = None
            __props__['vpc_id'] = None
        super(K8sCluster, __self__).__init__(
            'alicloud:edas/k8sCluster:K8sCluster',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            cluster_import_status: Optional[pulumi.Input[float]] = None,
            cluster_name: Optional[pulumi.Input[str]] = None,
            cluster_type: Optional[pulumi.Input[float]] = None,
            cs_cluster_id: Optional[pulumi.Input[str]] = None,
            namespace_id: Optional[pulumi.Input[str]] = None,
            network_mode: Optional[pulumi.Input[float]] = None,
            vpc_id: Optional[pulumi.Input[str]] = None) -> 'K8sCluster':
        """
        Get an existing K8sCluster 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[float] cluster_import_status: The import status of cluster: 
               `1`: success.
               `2`: failed.
               `3`: importing.
               `4`: deleted.
        :param pulumi.Input[str] cluster_name: The name of the cluster that you want to create.
        :param pulumi.Input[float] cluster_type: The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
        :param pulumi.Input[str] cs_cluster_id: The ID of the alicloud container service kubernetes cluster that you want to import.
        :param pulumi.Input[str] namespace_id: The ID of the namespace where you want to import. You can call the [ListUserDefineRegion](https://www.alibabacloud.com/help/en/doc-detail/149377.htm?spm=a2c63.p38356.879954.34.331054faK2yNvC#doc-api-Edas-ListUserDefineRegion) operation to query the namespace ID.
        :param pulumi.Input[float] network_mode: The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
        :param pulumi.Input[str] vpc_id: The ID of the Virtual Private Cloud (VPC) for the cluster.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["cluster_import_status"] = cluster_import_status
        __props__["cluster_name"] = cluster_name
        __props__["cluster_type"] = cluster_type
        __props__["cs_cluster_id"] = cs_cluster_id
        __props__["namespace_id"] = namespace_id
        __props__["network_mode"] = network_mode
        __props__["vpc_id"] = vpc_id
        return K8sCluster(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="clusterImportStatus")
    def cluster_import_status(self) -> pulumi.Output[float]:
        """
        The import status of cluster: 
        `1`: success.
        `2`: failed.
        `3`: importing.
        `4`: deleted.
        """
        return pulumi.get(self, "cluster_import_status")

    @property
    @pulumi.getter(name="clusterName")
    def cluster_name(self) -> pulumi.Output[str]:
        """
        The name of the cluster that you want to create.
        """
        return pulumi.get(self, "cluster_name")

    @property
    @pulumi.getter(name="clusterType")
    def cluster_type(self) -> pulumi.Output[float]:
        """
        The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
        """
        return pulumi.get(self, "cluster_type")

    @property
    @pulumi.getter(name="csClusterId")
    def cs_cluster_id(self) -> pulumi.Output[str]:
        """
        The ID of the alicloud container service kubernetes cluster that you want to import.
        """
        return pulumi.get(self, "cs_cluster_id")

    @property
    @pulumi.getter(name="namespaceId")
    def namespace_id(self) -> pulumi.Output[Optional[str]]:
        """
        The ID of the namespace where you want to import. You can call the [ListUserDefineRegion](https://www.alibabacloud.com/help/en/doc-detail/149377.htm?spm=a2c63.p38356.879954.34.331054faK2yNvC#doc-api-Edas-ListUserDefineRegion) operation to query the namespace ID.
        """
        return pulumi.get(self, "namespace_id")

    @property
    @pulumi.getter(name="networkMode")
    def network_mode(self) -> pulumi.Output[float]:
        """
        The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
        """
        return pulumi.get(self, "network_mode")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> pulumi.Output[str]:
        """
        The ID of the Virtual Private Cloud (VPC) for the cluster.
        """
        return pulumi.get(self, "vpc_id")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

