# 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 Cluster(pulumi.CustomResource):
    agent_version: pulumi.Output[str]
    cidr_block: pulumi.Output[str]
    disk_category: pulumi.Output[str]
    disk_size: pulumi.Output[float]
    image_id: pulumi.Output[str]
    instance_type: pulumi.Output[str]
    is_outdated: pulumi.Output[bool]
    name: pulumi.Output[str]
    name_prefix: pulumi.Output[str]
    need_slb: pulumi.Output[bool]
    node_number: pulumi.Output[float]
    nodes: pulumi.Output[list]
    password: pulumi.Output[str]
    release_eip: pulumi.Output[bool]
    security_group_id: pulumi.Output[str]
    size: pulumi.Output[float]
    slb_id: pulumi.Output[str]
    vpc_id: pulumi.Output[str]
    vswitch_id: pulumi.Output[str]
    def __init__(__self__, resource_name, opts=None, cidr_block=None, disk_category=None, disk_size=None, image_id=None, instance_type=None, is_outdated=None, name=None, name_prefix=None, need_slb=None, node_number=None, password=None, release_eip=None, size=None, vswitch_id=None, __props__=None, __name__=None, __opts__=None):
        """
        Create a Cluster 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.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/r/container_cluster.html.markdown.
        """
        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 cidr_block is None:
                raise TypeError("Missing required property 'cidr_block'")
            __props__['cidr_block'] = cidr_block
            __props__['disk_category'] = disk_category
            __props__['disk_size'] = disk_size
            __props__['image_id'] = image_id
            if instance_type is None:
                raise TypeError("Missing required property 'instance_type'")
            __props__['instance_type'] = instance_type
            __props__['is_outdated'] = is_outdated
            __props__['name'] = name
            __props__['name_prefix'] = name_prefix
            __props__['need_slb'] = need_slb
            __props__['node_number'] = node_number
            if password is None:
                raise TypeError("Missing required property 'password'")
            __props__['password'] = password
            __props__['release_eip'] = release_eip
            __props__['size'] = size
            if vswitch_id is None:
                raise TypeError("Missing required property 'vswitch_id'")
            __props__['vswitch_id'] = vswitch_id
            __props__['agent_version'] = None
            __props__['nodes'] = None
            __props__['security_group_id'] = None
            __props__['slb_id'] = None
            __props__['vpc_id'] = None
        super(Cluster, __self__).__init__(
            'alicloud:cs/cluster:Cluster',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, agent_version=None, cidr_block=None, disk_category=None, disk_size=None, image_id=None, instance_type=None, is_outdated=None, name=None, name_prefix=None, need_slb=None, node_number=None, nodes=None, password=None, release_eip=None, security_group_id=None, size=None, slb_id=None, vpc_id=None, vswitch_id=None):
        """
        Get an existing Cluster 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.
        
        The **nodes** object supports the following:
        
          * `eip` (`pulumi.Input[str]`)
          * `id` (`pulumi.Input[str]`)
          * `name` (`pulumi.Input[str]`)
          * `privateIp` (`pulumi.Input[str]`)
          * `status` (`pulumi.Input[str]`)

        > This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/r/container_cluster.html.markdown.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()
        __props__["agent_version"] = agent_version
        __props__["cidr_block"] = cidr_block
        __props__["disk_category"] = disk_category
        __props__["disk_size"] = disk_size
        __props__["image_id"] = image_id
        __props__["instance_type"] = instance_type
        __props__["is_outdated"] = is_outdated
        __props__["name"] = name
        __props__["name_prefix"] = name_prefix
        __props__["need_slb"] = need_slb
        __props__["node_number"] = node_number
        __props__["nodes"] = nodes
        __props__["password"] = password
        __props__["release_eip"] = release_eip
        __props__["security_group_id"] = security_group_id
        __props__["size"] = size
        __props__["slb_id"] = slb_id
        __props__["vpc_id"] = vpc_id
        __props__["vswitch_id"] = vswitch_id
        return Cluster(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

