# 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

__all__ = [
    'GetWorkspaceResult',
    'AwaitableGetWorkspaceResult',
    'get_workspace',
    'get_workspace_output',
]

@pulumi.output_type
class GetWorkspaceResult:
    """
    A collection of values returned by getWorkspace.
    """
    def __init__(__self__, create_time=None, delete_protection_enabled=None, description=None, id=None, instance_type=None, instance_type_id=None, name=None, overdue_reclaim_time=None, password=None, project_name=None, prometheus_push_intranet_endpoint=None, prometheus_query_intranet_endpoint=None, prometheus_write_intranet_endpoint=None, quota=None, status=None, tags=None, usage=None, username=None, workspace_id=None):
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if delete_protection_enabled and not isinstance(delete_protection_enabled, bool):
            raise TypeError("Expected argument 'delete_protection_enabled' to be a bool")
        pulumi.set(__self__, "delete_protection_enabled", delete_protection_enabled)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_type and not isinstance(instance_type, dict):
            raise TypeError("Expected argument 'instance_type' to be a dict")
        pulumi.set(__self__, "instance_type", instance_type)
        if instance_type_id and not isinstance(instance_type_id, str):
            raise TypeError("Expected argument 'instance_type_id' to be a str")
        pulumi.set(__self__, "instance_type_id", instance_type_id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if overdue_reclaim_time and not isinstance(overdue_reclaim_time, str):
            raise TypeError("Expected argument 'overdue_reclaim_time' to be a str")
        pulumi.set(__self__, "overdue_reclaim_time", overdue_reclaim_time)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if prometheus_push_intranet_endpoint and not isinstance(prometheus_push_intranet_endpoint, str):
            raise TypeError("Expected argument 'prometheus_push_intranet_endpoint' to be a str")
        pulumi.set(__self__, "prometheus_push_intranet_endpoint", prometheus_push_intranet_endpoint)
        if prometheus_query_intranet_endpoint and not isinstance(prometheus_query_intranet_endpoint, str):
            raise TypeError("Expected argument 'prometheus_query_intranet_endpoint' to be a str")
        pulumi.set(__self__, "prometheus_query_intranet_endpoint", prometheus_query_intranet_endpoint)
        if prometheus_write_intranet_endpoint and not isinstance(prometheus_write_intranet_endpoint, str):
            raise TypeError("Expected argument 'prometheus_write_intranet_endpoint' to be a str")
        pulumi.set(__self__, "prometheus_write_intranet_endpoint", prometheus_write_intranet_endpoint)
        if quota and not isinstance(quota, dict):
            raise TypeError("Expected argument 'quota' to be a dict")
        pulumi.set(__self__, "quota", quota)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if usage and not isinstance(usage, dict):
            raise TypeError("Expected argument 'usage' to be a dict")
        pulumi.set(__self__, "usage", usage)
        if username and not isinstance(username, str):
            raise TypeError("Expected argument 'username' to be a str")
        pulumi.set(__self__, "username", username)
        if workspace_id and not isinstance(workspace_id, str):
            raise TypeError("Expected argument 'workspace_id' to be a str")
        pulumi.set(__self__, "workspace_id", workspace_id)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        """
        工作区创建时间，RFC3339 格式。
        """
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter(name="deleteProtectionEnabled")
    def delete_protection_enabled(self) -> builtins.bool:
        """
        是否开启工作区删除保护,true：开启，false：关闭。
        """
        return pulumi.get(self, "delete_protection_enabled")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        工作区描述信息，字符串形式，长度限制为 0～200。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> 'outputs.GetWorkspaceInstanceTypeResult':
        """
        工作区规格详情。
        """
        return pulumi.get(self, "instance_type")

    @property
    @pulumi.getter(name="instanceTypeId")
    def instance_type_id(self) -> builtins.str:
        """
        工作区规格,vmp.standard.15d：15 天存储时长工作区。vmp.standard.30d：30 天存储时长工作区。vmp.standard.90d：90 天存储时长工作区。vmp.standard.180d：180 天存储时长工作区。vmp.standard.1y：1 年存储时长工作区。
        """
        return pulumi.get(self, "instance_type_id")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        工作区名称，字符串形式，长度限制为 1～100。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="overdueReclaimTime")
    def overdue_reclaim_time(self) -> builtins.str:
        """
        工作区预期欠费回收时间，RFC3339 格式。
        """
        return pulumi.get(self, "overdue_reclaim_time")

    @property
    @pulumi.getter
    def password(self) -> builtins.str:
        """
        工作区 BasicAuth 密码。
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        项目名称。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="prometheusPushIntranetEndpoint")
    def prometheus_push_intranet_endpoint(self) -> builtins.str:
        """
        工作区 Push Gateway URL 地址。
        """
        return pulumi.get(self, "prometheus_push_intranet_endpoint")

    @property
    @pulumi.getter(name="prometheusQueryIntranetEndpoint")
    def prometheus_query_intranet_endpoint(self) -> builtins.str:
        """
        工作区 Query URL 地址。
        """
        return pulumi.get(self, "prometheus_query_intranet_endpoint")

    @property
    @pulumi.getter(name="prometheusWriteIntranetEndpoint")
    def prometheus_write_intranet_endpoint(self) -> builtins.str:
        """
        工作区 RemoteWrite URL 地址。
        """
        return pulumi.get(self, "prometheus_write_intranet_endpoint")

    @property
    @pulumi.getter
    def quota(self) -> 'outputs.GetWorkspaceQuotaResult':
        """
        工作区配额详情。
        """
        return pulumi.get(self, "quota")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        工作区状态，取值：Creating：创建中 Active：正常 Updating：更新中 Deleting：删除中 OverdueShutted：欠费关停 Resuming：恢复中 Error：错误。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetWorkspaceTagResult']:
        """
        工作区标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def usage(self) -> 'outputs.GetWorkspaceUsageResult':
        """
        工作区用量。
        """
        return pulumi.get(self, "usage")

    @property
    @pulumi.getter
    def username(self) -> builtins.str:
        """
        工作区 BasicAuth 用户名。
        """
        return pulumi.get(self, "username")

    @property
    @pulumi.getter(name="workspaceId")
    def workspace_id(self) -> builtins.str:
        """
        工作区Id。
        """
        return pulumi.get(self, "workspace_id")


class AwaitableGetWorkspaceResult(GetWorkspaceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetWorkspaceResult(
            create_time=self.create_time,
            delete_protection_enabled=self.delete_protection_enabled,
            description=self.description,
            id=self.id,
            instance_type=self.instance_type,
            instance_type_id=self.instance_type_id,
            name=self.name,
            overdue_reclaim_time=self.overdue_reclaim_time,
            password=self.password,
            project_name=self.project_name,
            prometheus_push_intranet_endpoint=self.prometheus_push_intranet_endpoint,
            prometheus_query_intranet_endpoint=self.prometheus_query_intranet_endpoint,
            prometheus_write_intranet_endpoint=self.prometheus_write_intranet_endpoint,
            quota=self.quota,
            status=self.status,
            tags=self.tags,
            usage=self.usage,
            username=self.username,
            workspace_id=self.workspace_id)


def get_workspace(id: Optional[builtins.str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWorkspaceResult:
    """
    Data Source schema for Byteplus::VMP::Workspace


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:vmp/getWorkspace:getWorkspace', __args__, opts=opts, typ=GetWorkspaceResult).value

    return AwaitableGetWorkspaceResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        delete_protection_enabled=pulumi.get(__ret__, 'delete_protection_enabled'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        instance_type=pulumi.get(__ret__, 'instance_type'),
        instance_type_id=pulumi.get(__ret__, 'instance_type_id'),
        name=pulumi.get(__ret__, 'name'),
        overdue_reclaim_time=pulumi.get(__ret__, 'overdue_reclaim_time'),
        password=pulumi.get(__ret__, 'password'),
        project_name=pulumi.get(__ret__, 'project_name'),
        prometheus_push_intranet_endpoint=pulumi.get(__ret__, 'prometheus_push_intranet_endpoint'),
        prometheus_query_intranet_endpoint=pulumi.get(__ret__, 'prometheus_query_intranet_endpoint'),
        prometheus_write_intranet_endpoint=pulumi.get(__ret__, 'prometheus_write_intranet_endpoint'),
        quota=pulumi.get(__ret__, 'quota'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        usage=pulumi.get(__ret__, 'usage'),
        username=pulumi.get(__ret__, 'username'),
        workspace_id=pulumi.get(__ret__, 'workspace_id'))
def get_workspace_output(id: Optional[pulumi.Input[builtins.str]] = None,
                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetWorkspaceResult]:
    """
    Data Source schema for Byteplus::VMP::Workspace


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:vmp/getWorkspace:getWorkspace', __args__, opts=opts, typ=GetWorkspaceResult)
    return __ret__.apply(lambda __response__: GetWorkspaceResult(
        create_time=pulumi.get(__response__, 'create_time'),
        delete_protection_enabled=pulumi.get(__response__, 'delete_protection_enabled'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        instance_type=pulumi.get(__response__, 'instance_type'),
        instance_type_id=pulumi.get(__response__, 'instance_type_id'),
        name=pulumi.get(__response__, 'name'),
        overdue_reclaim_time=pulumi.get(__response__, 'overdue_reclaim_time'),
        password=pulumi.get(__response__, 'password'),
        project_name=pulumi.get(__response__, 'project_name'),
        prometheus_push_intranet_endpoint=pulumi.get(__response__, 'prometheus_push_intranet_endpoint'),
        prometheus_query_intranet_endpoint=pulumi.get(__response__, 'prometheus_query_intranet_endpoint'),
        prometheus_write_intranet_endpoint=pulumi.get(__response__, 'prometheus_write_intranet_endpoint'),
        quota=pulumi.get(__response__, 'quota'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        usage=pulumi.get(__response__, 'usage'),
        username=pulumi.get(__response__, 'username'),
        workspace_id=pulumi.get(__response__, 'workspace_id')))
