# 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__ = [
    'GetGatewayResult',
    'AwaitableGetGatewayResult',
    'get_gateway',
    'get_gateway_output',
]

@pulumi.output_type
class GetGatewayResult:
    """
    A collection of values returned by getGateway.
    """
    def __init__(__self__, backend_spec=None, comments=None, created_time=None, custom_log=None, events=None, gateway_id=None, id=None, log_spec=None, message=None, monitor_spec=None, name=None, network_spec=None, project_name=None, resource_spec=None, status=None, subnet_ids=None, trace_spec=None, type=None, version=None, vpc_id=None):
        if backend_spec and not isinstance(backend_spec, dict):
            raise TypeError("Expected argument 'backend_spec' to be a dict")
        pulumi.set(__self__, "backend_spec", backend_spec)
        if comments and not isinstance(comments, str):
            raise TypeError("Expected argument 'comments' to be a str")
        pulumi.set(__self__, "comments", comments)
        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 custom_log and not isinstance(custom_log, dict):
            raise TypeError("Expected argument 'custom_log' to be a dict")
        pulumi.set(__self__, "custom_log", custom_log)
        if events and not isinstance(events, list):
            raise TypeError("Expected argument 'events' to be a list")
        pulumi.set(__self__, "events", events)
        if gateway_id and not isinstance(gateway_id, str):
            raise TypeError("Expected argument 'gateway_id' to be a str")
        pulumi.set(__self__, "gateway_id", gateway_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if log_spec and not isinstance(log_spec, dict):
            raise TypeError("Expected argument 'log_spec' to be a dict")
        pulumi.set(__self__, "log_spec", log_spec)
        if message and not isinstance(message, str):
            raise TypeError("Expected argument 'message' to be a str")
        pulumi.set(__self__, "message", message)
        if monitor_spec and not isinstance(monitor_spec, dict):
            raise TypeError("Expected argument 'monitor_spec' to be a dict")
        pulumi.set(__self__, "monitor_spec", monitor_spec)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if network_spec and not isinstance(network_spec, dict):
            raise TypeError("Expected argument 'network_spec' to be a dict")
        pulumi.set(__self__, "network_spec", network_spec)
        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 resource_spec and not isinstance(resource_spec, dict):
            raise TypeError("Expected argument 'resource_spec' to be a dict")
        pulumi.set(__self__, "resource_spec", resource_spec)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if subnet_ids and not isinstance(subnet_ids, list):
            raise TypeError("Expected argument 'subnet_ids' to be a list")
        pulumi.set(__self__, "subnet_ids", subnet_ids)
        if trace_spec and not isinstance(trace_spec, dict):
            raise TypeError("Expected argument 'trace_spec' to be a dict")
        pulumi.set(__self__, "trace_spec", trace_spec)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if version and not isinstance(version, str):
            raise TypeError("Expected argument 'version' to be a str")
        pulumi.set(__self__, "version", version)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)

    @property
    @pulumi.getter(name="backendSpec")
    def backend_spec(self) -> 'outputs.GetGatewayBackendSpecResult':
        """
        后端服务配置信息。
        """
        return pulumi.get(self, "backend_spec")

    @property
    @pulumi.getter
    def comments(self) -> builtins.str:
        """
        网关备注信息。长度限制为0~253个字符。
        """
        return pulumi.get(self, "comments")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        网关创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="customLog")
    def custom_log(self) -> 'outputs.GetGatewayCustomLogResult':
        """
        自定义日志配置。
        """
        return pulumi.get(self, "custom_log")

    @property
    @pulumi.getter
    def events(self) -> Sequence['outputs.GetGatewayEventResult']:
        """
        事件。
        """
        return pulumi.get(self, "events")

    @property
    @pulumi.getter(name="gatewayId")
    def gateway_id(self) -> builtins.str:
        """
        网关实例ID。
        """
        return pulumi.get(self, "gateway_id")

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

    @property
    @pulumi.getter(name="logSpec")
    def log_spec(self) -> 'outputs.GetGatewayLogSpecResult':
        """
        日志配置。
        """
        return pulumi.get(self, "log_spec")

    @property
    @pulumi.getter
    def message(self) -> builtins.str:
        """
        网关创建失败、删除失败或异常时的错误信息。
        """
        return pulumi.get(self, "message")

    @property
    @pulumi.getter(name="monitorSpec")
    def monitor_spec(self) -> 'outputs.GetGatewayMonitorSpecResult':
        """
        监控配置信息。
        """
        return pulumi.get(self, "monitor_spec")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        网关名称。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkSpec")
    def network_spec(self) -> 'outputs.GetGatewayNetworkSpecResult':
        """
        网络配置信息。
        """
        return pulumi.get(self, "network_spec")

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

    @property
    @pulumi.getter(name="resourceSpec")
    def resource_spec(self) -> 'outputs.GetGatewayResourceSpecResult':
        """
        资源规格配置信息。
        """
        return pulumi.get(self, "resource_spec")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        网关状态，取值：Creating：创建中。CreatedFailed：创建失败。Updating：更新中。Running：运行中。Deleting：删除中。DeletedFailed：删除失败。Abnormal：异常。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="subnetIds")
    def subnet_ids(self) -> Sequence[builtins.str]:
        """
        子网ID列表。长度限制为1~2个。
        """
        return pulumi.get(self, "subnet_ids")

    @property
    @pulumi.getter(name="traceSpec")
    def trace_spec(self) -> 'outputs.GetGatewayTraceSpecResult':
        """
        链路追踪配置信息。
        """
        return pulumi.get(self, "trace_spec")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        网关类型，取值：standard：标准网关。serverless：Serverless网关（暂不支持）。
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter
    def version(self) -> builtins.str:
        """
        网关版本。
        """
        return pulumi.get(self, "version")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        VPC ID。
        """
        return pulumi.get(self, "vpc_id")


class AwaitableGetGatewayResult(GetGatewayResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGatewayResult(
            backend_spec=self.backend_spec,
            comments=self.comments,
            created_time=self.created_time,
            custom_log=self.custom_log,
            events=self.events,
            gateway_id=self.gateway_id,
            id=self.id,
            log_spec=self.log_spec,
            message=self.message,
            monitor_spec=self.monitor_spec,
            name=self.name,
            network_spec=self.network_spec,
            project_name=self.project_name,
            resource_spec=self.resource_spec,
            status=self.status,
            subnet_ids=self.subnet_ids,
            trace_spec=self.trace_spec,
            type=self.type,
            version=self.version,
            vpc_id=self.vpc_id)


def get_gateway(id: Optional[builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGatewayResult:
    """
    Data Source schema for Byteplus::APIG::Gateway


    :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:apig/getGateway:getGateway', __args__, opts=opts, typ=GetGatewayResult).value

    return AwaitableGetGatewayResult(
        backend_spec=pulumi.get(__ret__, 'backend_spec'),
        comments=pulumi.get(__ret__, 'comments'),
        created_time=pulumi.get(__ret__, 'created_time'),
        custom_log=pulumi.get(__ret__, 'custom_log'),
        events=pulumi.get(__ret__, 'events'),
        gateway_id=pulumi.get(__ret__, 'gateway_id'),
        id=pulumi.get(__ret__, 'id'),
        log_spec=pulumi.get(__ret__, 'log_spec'),
        message=pulumi.get(__ret__, 'message'),
        monitor_spec=pulumi.get(__ret__, 'monitor_spec'),
        name=pulumi.get(__ret__, 'name'),
        network_spec=pulumi.get(__ret__, 'network_spec'),
        project_name=pulumi.get(__ret__, 'project_name'),
        resource_spec=pulumi.get(__ret__, 'resource_spec'),
        status=pulumi.get(__ret__, 'status'),
        subnet_ids=pulumi.get(__ret__, 'subnet_ids'),
        trace_spec=pulumi.get(__ret__, 'trace_spec'),
        type=pulumi.get(__ret__, 'type'),
        version=pulumi.get(__ret__, 'version'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'))
def get_gateway_output(id: Optional[pulumi.Input[builtins.str]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGatewayResult]:
    """
    Data Source schema for Byteplus::APIG::Gateway


    :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:apig/getGateway:getGateway', __args__, opts=opts, typ=GetGatewayResult)
    return __ret__.apply(lambda __response__: GetGatewayResult(
        backend_spec=pulumi.get(__response__, 'backend_spec'),
        comments=pulumi.get(__response__, 'comments'),
        created_time=pulumi.get(__response__, 'created_time'),
        custom_log=pulumi.get(__response__, 'custom_log'),
        events=pulumi.get(__response__, 'events'),
        gateway_id=pulumi.get(__response__, 'gateway_id'),
        id=pulumi.get(__response__, 'id'),
        log_spec=pulumi.get(__response__, 'log_spec'),
        message=pulumi.get(__response__, 'message'),
        monitor_spec=pulumi.get(__response__, 'monitor_spec'),
        name=pulumi.get(__response__, 'name'),
        network_spec=pulumi.get(__response__, 'network_spec'),
        project_name=pulumi.get(__response__, 'project_name'),
        resource_spec=pulumi.get(__response__, 'resource_spec'),
        status=pulumi.get(__response__, 'status'),
        subnet_ids=pulumi.get(__response__, 'subnet_ids'),
        trace_spec=pulumi.get(__response__, 'trace_spec'),
        type=pulumi.get(__response__, 'type'),
        version=pulumi.get(__response__, 'version'),
        vpc_id=pulumi.get(__response__, 'vpc_id')))
