# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class ServerlessKubernetes(pulumi.CustomResource):
    client_cert: pulumi.Output[str]
    """
    The path of client certificate, like `~/.kube/client-cert.pem`.
    """
    client_key: pulumi.Output[str]
    """
    The path of client key, like `~/.kube/client-key.pem`.
    """
    cluster_ca_cert: pulumi.Output[str]
    """
    The path of cluster ca certificate, like `~/.kube/cluster-ca-cert.pem`
    """
    deletion_protection: pulumi.Output[bool]
    """
    Whether enable the deletion protection or not.
    - true: Enable deletion protection.
    - false: Disable deletion protection.
    """
    endpoint_public_access_enabled: pulumi.Output[bool]
    """
    Whether to create internet  eip for API Server. Default to false.
    """
    force_update: pulumi.Output[bool]
    """
    Default false, when you want to change `vpc_id` and `vswitch_id`, you have to set this field to true, then the cluster will be recreated.
    """
    kube_config: pulumi.Output[str]
    """
    The path of kube config, like `~/.kube/config`.
    """
    name: pulumi.Output[str]
    """
    The kubernetes cluster's name. It is the only in one Alicloud account.
    """
    name_prefix: pulumi.Output[str]
    new_nat_gateway: pulumi.Output[bool]
    """
    Whether to create a new nat gateway while creating kubernetes cluster. Default to true.
    """
    private_zone: pulumi.Output[bool]
    """
    Whether to create internet  eip for API Server. Default to false.
    """
    tags: pulumi.Output[dict]
    """
    Default nil, A map of tags assigned to the kubernetes cluster .
    """
    vpc_id: pulumi.Output[str]
    """
    The vpc where new kubernetes cluster will be located. Specify one vpc's id, if it is not specified, a new VPC  will be built.
    """
    vswitch_id: pulumi.Output[str]
    """
    The vswitch where new kubernetes cluster will be located. Specify one vswitch's id, if it is not specified, a new VPC and VSwicth will be built. It must be in the zone which `availability_zone` specified.
    """
    def __init__(__self__, resource_name, opts=None, client_cert=None, client_key=None, cluster_ca_cert=None, deletion_protection=None, endpoint_public_access_enabled=None, force_update=None, kube_config=None, name=None, name_prefix=None, new_nat_gateway=None, private_zone=None, tags=None, vpc_id=None, vswitch_id=None, __props__=None, __name__=None, __opts__=None):
        """
        Create a ServerlessKubernetes resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] client_cert: The path of client certificate, like `~/.kube/client-cert.pem`.
        :param pulumi.Input[str] client_key: The path of client key, like `~/.kube/client-key.pem`.
        :param pulumi.Input[str] cluster_ca_cert: The path of cluster ca certificate, like `~/.kube/cluster-ca-cert.pem`
        :param pulumi.Input[bool] deletion_protection: Whether enable the deletion protection or not.
               - true: Enable deletion protection.
               - false: Disable deletion protection.
        :param pulumi.Input[bool] endpoint_public_access_enabled: Whether to create internet  eip for API Server. Default to false.
        :param pulumi.Input[bool] force_update: Default false, when you want to change `vpc_id` and `vswitch_id`, you have to set this field to true, then the cluster will be recreated.
        :param pulumi.Input[str] kube_config: The path of kube config, like `~/.kube/config`.
        :param pulumi.Input[str] name: The kubernetes cluster's name. It is the only in one Alicloud account.
        :param pulumi.Input[bool] new_nat_gateway: Whether to create a new nat gateway while creating kubernetes cluster. Default to true.
        :param pulumi.Input[bool] private_zone: Whether to create internet  eip for API Server. Default to false.
        :param pulumi.Input[dict] tags: Default nil, A map of tags assigned to the kubernetes cluster .
        :param pulumi.Input[str] vpc_id: The vpc where new kubernetes cluster will be located. Specify one vpc's id, if it is not specified, a new VPC  will be built.
        :param pulumi.Input[str] vswitch_id: The vswitch where new kubernetes cluster will be located. Specify one vswitch's id, if it is not specified, a new VPC and VSwicth will be built. It must be in the zone which `availability_zone` specified.
        """
        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()

            __props__['client_cert'] = client_cert
            __props__['client_key'] = client_key
            __props__['cluster_ca_cert'] = cluster_ca_cert
            __props__['deletion_protection'] = deletion_protection
            __props__['endpoint_public_access_enabled'] = endpoint_public_access_enabled
            __props__['force_update'] = force_update
            __props__['kube_config'] = kube_config
            __props__['name'] = name
            __props__['name_prefix'] = name_prefix
            __props__['new_nat_gateway'] = new_nat_gateway
            __props__['private_zone'] = private_zone
            __props__['tags'] = tags
            if vpc_id is None:
                raise TypeError("Missing required property 'vpc_id'")
            __props__['vpc_id'] = vpc_id
            if vswitch_id is None:
                raise TypeError("Missing required property 'vswitch_id'")
            __props__['vswitch_id'] = vswitch_id
        super(ServerlessKubernetes, __self__).__init__(
            'alicloud:cs/serverlessKubernetes:ServerlessKubernetes',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, client_cert=None, client_key=None, cluster_ca_cert=None, deletion_protection=None, endpoint_public_access_enabled=None, force_update=None, kube_config=None, name=None, name_prefix=None, new_nat_gateway=None, private_zone=None, tags=None, vpc_id=None, vswitch_id=None):
        """
        Get an existing ServerlessKubernetes 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 str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] client_cert: The path of client certificate, like `~/.kube/client-cert.pem`.
        :param pulumi.Input[str] client_key: The path of client key, like `~/.kube/client-key.pem`.
        :param pulumi.Input[str] cluster_ca_cert: The path of cluster ca certificate, like `~/.kube/cluster-ca-cert.pem`
        :param pulumi.Input[bool] deletion_protection: Whether enable the deletion protection or not.
               - true: Enable deletion protection.
               - false: Disable deletion protection.
        :param pulumi.Input[bool] endpoint_public_access_enabled: Whether to create internet  eip for API Server. Default to false.
        :param pulumi.Input[bool] force_update: Default false, when you want to change `vpc_id` and `vswitch_id`, you have to set this field to true, then the cluster will be recreated.
        :param pulumi.Input[str] kube_config: The path of kube config, like `~/.kube/config`.
        :param pulumi.Input[str] name: The kubernetes cluster's name. It is the only in one Alicloud account.
        :param pulumi.Input[bool] new_nat_gateway: Whether to create a new nat gateway while creating kubernetes cluster. Default to true.
        :param pulumi.Input[bool] private_zone: Whether to create internet  eip for API Server. Default to false.
        :param pulumi.Input[dict] tags: Default nil, A map of tags assigned to the kubernetes cluster .
        :param pulumi.Input[str] vpc_id: The vpc where new kubernetes cluster will be located. Specify one vpc's id, if it is not specified, a new VPC  will be built.
        :param pulumi.Input[str] vswitch_id: The vswitch where new kubernetes cluster will be located. Specify one vswitch's id, if it is not specified, a new VPC and VSwicth will be built. It must be in the zone which `availability_zone` specified.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["client_cert"] = client_cert
        __props__["client_key"] = client_key
        __props__["cluster_ca_cert"] = cluster_ca_cert
        __props__["deletion_protection"] = deletion_protection
        __props__["endpoint_public_access_enabled"] = endpoint_public_access_enabled
        __props__["force_update"] = force_update
        __props__["kube_config"] = kube_config
        __props__["name"] = name
        __props__["name_prefix"] = name_prefix
        __props__["new_nat_gateway"] = new_nat_gateway
        __props__["private_zone"] = private_zone
        __props__["tags"] = tags
        __props__["vpc_id"] = vpc_id
        __props__["vswitch_id"] = vswitch_id
        return ServerlessKubernetes(resource_name, opts=opts, __props__=__props__)
    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

