# 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__ = [
    'GetRegistryResult',
    'AwaitableGetRegistryResult',
    'get_registry',
    'get_registry_output',
]

@pulumi.output_type
class GetRegistryResult:
    """
    A collection of values returned by getRegistry.
    """
    def __init__(__self__, charge_type=None, created_time=None, expire_time=None, id=None, name=None, project=None, proxy_cache=None, proxy_cache_enabled=None, renew_type=None, status=None, tags=None, type=None):
        if charge_type and not isinstance(charge_type, str):
            raise TypeError("Expected argument 'charge_type' to be a str")
        pulumi.set(__self__, "charge_type", charge_type)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if expire_time and not isinstance(expire_time, str):
            raise TypeError("Expected argument 'expire_time' to be a str")
        pulumi.set(__self__, "expire_time", expire_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if proxy_cache and not isinstance(proxy_cache, dict):
            raise TypeError("Expected argument 'proxy_cache' to be a dict")
        pulumi.set(__self__, "proxy_cache", proxy_cache)
        if proxy_cache_enabled and not isinstance(proxy_cache_enabled, bool):
            raise TypeError("Expected argument 'proxy_cache_enabled' to be a bool")
        pulumi.set(__self__, "proxy_cache_enabled", proxy_cache_enabled)
        if renew_type and not isinstance(renew_type, str):
            raise TypeError("Expected argument 'renew_type' to be a str")
        pulumi.set(__self__, "renew_type", renew_type)
        if status and not isinstance(status, dict):
            raise TypeError("Expected argument 'status' to be a dict")
        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 type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter(name="chargeType")
    def charge_type(self) -> builtins.str:
        """
        镜像仓库实例的付费类型，目前仅支持 PostCharge按量付费模式。
        """
        return pulumi.get(self, "charge_type")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        创建镜像仓库实例的时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="expireTime")
    def expire_time(self) -> builtins.str:
        """
        仅计费类型为HybridCharge有值，实例到期时间
        """
        return pulumi.get(self, "expire_time")

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

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        标准版实例名称，同一个地域下，名称必须唯一。支持小写英文字母、数字、短划线（-）且数字不能在首位，短划线（-）不能在首位或末位，长度限制为 3～30 个字符。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def project(self) -> builtins.str:
        """
        填写实例需要关联的项目。一个实例仅支持关联一个项目
        """
        return pulumi.get(self, "project")

    @property
    @pulumi.getter(name="proxyCache")
    def proxy_cache(self) -> 'outputs.GetRegistryProxyCacheResult':
        """
        ProxyCache配置，设置为ProxyCache时必填
        """
        return pulumi.get(self, "proxy_cache")

    @property
    @pulumi.getter(name="proxyCacheEnabled")
    def proxy_cache_enabled(self) -> builtins.bool:
        """
        是否设置为ProxyCache实例
        """
        return pulumi.get(self, "proxy_cache_enabled")

    @property
    @pulumi.getter(name="renewType")
    def renew_type(self) -> builtins.str:
        """
        仅计费类型为HybridCharge有值，实例自动续费类型
        """
        return pulumi.get(self, "renew_type")

    @property
    @pulumi.getter
    def status(self) -> 'outputs.GetRegistryStatusResult':
        """
        镜像仓库实例状态，由 Phase 和 Conditions 组成。合法的 Phase 和 Conditions 组合如下所示：{Creating, [Progressing]}：创建中,{Running, [Ok]}：运行中,{Running, [Degraded]}：运行中,{Stopped, [Balance]}：欠费关停,{Stopped, [Released]}：待回收,{Stopped, [Released, Balance]}：欠费关停,{Starting, [Progressing]}：启动中,{Deleting, [Progressing]}：销毁中,{Failed, [Unknown]}：异常
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetRegistryTagResult']:
        """
        实例的标签
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        不填写默认创建标准版实例。Enterprise：标准版，Micro：小微版
        """
        return pulumi.get(self, "type")


class AwaitableGetRegistryResult(GetRegistryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRegistryResult(
            charge_type=self.charge_type,
            created_time=self.created_time,
            expire_time=self.expire_time,
            id=self.id,
            name=self.name,
            project=self.project,
            proxy_cache=self.proxy_cache,
            proxy_cache_enabled=self.proxy_cache_enabled,
            renew_type=self.renew_type,
            status=self.status,
            tags=self.tags,
            type=self.type)


def get_registry(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegistryResult:
    """
    Data Source schema for Byteplus::CR::Registry


    :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:cr/getRegistry:getRegistry', __args__, opts=opts, typ=GetRegistryResult).value

    return AwaitableGetRegistryResult(
        charge_type=pulumi.get(__ret__, 'charge_type'),
        created_time=pulumi.get(__ret__, 'created_time'),
        expire_time=pulumi.get(__ret__, 'expire_time'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        project=pulumi.get(__ret__, 'project'),
        proxy_cache=pulumi.get(__ret__, 'proxy_cache'),
        proxy_cache_enabled=pulumi.get(__ret__, 'proxy_cache_enabled'),
        renew_type=pulumi.get(__ret__, 'renew_type'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        type=pulumi.get(__ret__, 'type'))
def get_registry_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRegistryResult]:
    """
    Data Source schema for Byteplus::CR::Registry


    :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:cr/getRegistry:getRegistry', __args__, opts=opts, typ=GetRegistryResult)
    return __ret__.apply(lambda __response__: GetRegistryResult(
        charge_type=pulumi.get(__response__, 'charge_type'),
        created_time=pulumi.get(__response__, 'created_time'),
        expire_time=pulumi.get(__response__, 'expire_time'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        project=pulumi.get(__response__, 'project'),
        proxy_cache=pulumi.get(__response__, 'proxy_cache'),
        proxy_cache_enabled=pulumi.get(__response__, 'proxy_cache_enabled'),
        renew_type=pulumi.get(__response__, 'renew_type'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        type=pulumi.get(__response__, 'type')))
