# 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__ = ['SKSKubeconfigArgs', 'SKSKubeconfig']

@pulumi.input_type
class SKSKubeconfigArgs:
    def __init__(__self__, *,
                 cluster_id: pulumi.Input[str],
                 groups: pulumi.Input[Sequence[pulumi.Input[str]]],
                 user: pulumi.Input[str],
                 zone: pulumi.Input[str],
                 early_renewal_seconds: Optional[pulumi.Input[int]] = None,
                 ttl_seconds: Optional[pulumi.Input[float]] = None):
        """
        The set of arguments for constructing a SKSKubeconfig resource.
        :param pulumi.Input[str] cluster_id: The parent SKSCluster ID.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        :param pulumi.Input[str] user: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        :param pulumi.Input[float] ttl_seconds: The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        """
        pulumi.set(__self__, "cluster_id", cluster_id)
        pulumi.set(__self__, "groups", groups)
        pulumi.set(__self__, "user", user)
        pulumi.set(__self__, "zone", zone)
        if early_renewal_seconds is not None:
            pulumi.set(__self__, "early_renewal_seconds", early_renewal_seconds)
        if ttl_seconds is not None:
            pulumi.set(__self__, "ttl_seconds", ttl_seconds)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Input[str]:
        """
        The parent SKSCluster ID.
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter
    def groups(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
        """
        Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        """
        return pulumi.get(self, "groups")

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

    @property
    @pulumi.getter
    def user(self) -> pulumi.Input[str]:
        """
        User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        """
        return pulumi.get(self, "user")

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

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Input[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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

    @property
    @pulumi.getter(name="earlyRenewalSeconds")
    def early_renewal_seconds(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "early_renewal_seconds")

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

    @property
    @pulumi.getter(name="ttlSeconds")
    def ttl_seconds(self) -> Optional[pulumi.Input[float]]:
        """
        The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        """
        return pulumi.get(self, "ttl_seconds")

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


@pulumi.input_type
class _SKSKubeconfigState:
    def __init__(__self__, *,
                 cluster_id: Optional[pulumi.Input[str]] = None,
                 early_renewal_seconds: Optional[pulumi.Input[int]] = None,
                 groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 kubeconfig: Optional[pulumi.Input[str]] = None,
                 ready_for_renewal: Optional[pulumi.Input[bool]] = None,
                 ttl_seconds: Optional[pulumi.Input[float]] = None,
                 user: Optional[pulumi.Input[str]] = None,
                 zone: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering SKSKubeconfig resources.
        :param pulumi.Input[str] cluster_id: The parent SKSCluster ID.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        :param pulumi.Input[str] kubeconfig: The generated Kubeconfig (YAML content).
        :param pulumi.Input[float] ttl_seconds: The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        :param pulumi.Input[str] user: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if early_renewal_seconds is not None:
            pulumi.set(__self__, "early_renewal_seconds", early_renewal_seconds)
        if groups is not None:
            pulumi.set(__self__, "groups", groups)
        if kubeconfig is not None:
            pulumi.set(__self__, "kubeconfig", kubeconfig)
        if ready_for_renewal is not None:
            pulumi.set(__self__, "ready_for_renewal", ready_for_renewal)
        if ttl_seconds is not None:
            pulumi.set(__self__, "ttl_seconds", ttl_seconds)
        if user is not None:
            pulumi.set(__self__, "user", user)
        if zone is not None:
            pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[str]]:
        """
        The parent SKSCluster ID.
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter(name="earlyRenewalSeconds")
    def early_renewal_seconds(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "early_renewal_seconds")

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

    @property
    @pulumi.getter
    def groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        """
        return pulumi.get(self, "groups")

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

    @property
    @pulumi.getter
    def kubeconfig(self) -> Optional[pulumi.Input[str]]:
        """
        The generated Kubeconfig (YAML content).
        """
        return pulumi.get(self, "kubeconfig")

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

    @property
    @pulumi.getter(name="readyForRenewal")
    def ready_for_renewal(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "ready_for_renewal")

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

    @property
    @pulumi.getter(name="ttlSeconds")
    def ttl_seconds(self) -> Optional[pulumi.Input[float]]:
        """
        The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        """
        return pulumi.get(self, "ttl_seconds")

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

    @property
    @pulumi.getter
    def user(self) -> Optional[pulumi.Input[str]]:
        """
        User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        """
        return pulumi.get(self, "user")

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

    @property
    @pulumi.getter
    def zone(self) -> Optional[pulumi.Input[str]]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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


class SKSKubeconfig(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cluster_id: Optional[pulumi.Input[str]] = None,
                 early_renewal_seconds: Optional[pulumi.Input[int]] = None,
                 groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 ttl_seconds: Optional[pulumi.Input[float]] = None,
                 user: Optional[pulumi.Input[str]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Create a SKSKubeconfig 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] cluster_id: The parent SKSCluster ID.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        :param pulumi.Input[float] ttl_seconds: The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        :param pulumi.Input[str] user: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: SKSKubeconfigArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a SKSKubeconfig resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param SKSKubeconfigArgs 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(SKSKubeconfigArgs, 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[str]] = None,
                 early_renewal_seconds: Optional[pulumi.Input[int]] = None,
                 groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 ttl_seconds: Optional[pulumi.Input[float]] = None,
                 user: Optional[pulumi.Input[str]] = None,
                 zone: 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__ = SKSKubeconfigArgs.__new__(SKSKubeconfigArgs)

            if cluster_id is None and not opts.urn:
                raise TypeError("Missing required property 'cluster_id'")
            __props__.__dict__["cluster_id"] = cluster_id
            __props__.__dict__["early_renewal_seconds"] = early_renewal_seconds
            if groups is None and not opts.urn:
                raise TypeError("Missing required property 'groups'")
            __props__.__dict__["groups"] = groups
            __props__.__dict__["ttl_seconds"] = ttl_seconds
            if user is None and not opts.urn:
                raise TypeError("Missing required property 'user'")
            __props__.__dict__["user"] = user
            if zone is None and not opts.urn:
                raise TypeError("Missing required property 'zone'")
            __props__.__dict__["zone"] = zone
            __props__.__dict__["kubeconfig"] = None
            __props__.__dict__["ready_for_renewal"] = None
        secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["kubeconfig"])
        opts = pulumi.ResourceOptions.merge(opts, secret_opts)
        super(SKSKubeconfig, __self__).__init__(
            'exoscale:index/sKSKubeconfig:SKSKubeconfig',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            cluster_id: Optional[pulumi.Input[str]] = None,
            early_renewal_seconds: Optional[pulumi.Input[int]] = None,
            groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            kubeconfig: Optional[pulumi.Input[str]] = None,
            ready_for_renewal: Optional[pulumi.Input[bool]] = None,
            ttl_seconds: Optional[pulumi.Input[float]] = None,
            user: Optional[pulumi.Input[str]] = None,
            zone: Optional[pulumi.Input[str]] = None) -> 'SKSKubeconfig':
        """
        Get an existing SKSKubeconfig 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] cluster_id: The parent SKSCluster ID.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        :param pulumi.Input[str] kubeconfig: The generated Kubeconfig (YAML content).
        :param pulumi.Input[float] ttl_seconds: The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        :param pulumi.Input[str] user: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _SKSKubeconfigState.__new__(_SKSKubeconfigState)

        __props__.__dict__["cluster_id"] = cluster_id
        __props__.__dict__["early_renewal_seconds"] = early_renewal_seconds
        __props__.__dict__["groups"] = groups
        __props__.__dict__["kubeconfig"] = kubeconfig
        __props__.__dict__["ready_for_renewal"] = ready_for_renewal
        __props__.__dict__["ttl_seconds"] = ttl_seconds
        __props__.__dict__["user"] = user
        __props__.__dict__["zone"] = zone
        return SKSKubeconfig(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Output[str]:
        """
        The parent SKSCluster ID.
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="earlyRenewalSeconds")
    def early_renewal_seconds(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "early_renewal_seconds")

    @property
    @pulumi.getter
    def groups(self) -> pulumi.Output[Sequence[str]]:
        """
        Group names in the generated Kubeconfig. The certificate present in the Kubeconfig will have these roles set in the Organization field.
        """
        return pulumi.get(self, "groups")

    @property
    @pulumi.getter
    def kubeconfig(self) -> pulumi.Output[str]:
        """
        The generated Kubeconfig (YAML content).
        """
        return pulumi.get(self, "kubeconfig")

    @property
    @pulumi.getter(name="readyForRenewal")
    def ready_for_renewal(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "ready_for_renewal")

    @property
    @pulumi.getter(name="ttlSeconds")
    def ttl_seconds(self) -> pulumi.Output[Optional[float]]:
        """
        The Time-to-Live of the Kubeconfig, after which it will expire / become invalid (seconds; default: 2592000 = 30 days).
        """
        return pulumi.get(self, "ttl_seconds")

    @property
    @pulumi.getter
    def user(self) -> pulumi.Output[str]:
        """
        User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.
        """
        return pulumi.get(self, "user")

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Output[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

