# 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
from ._inputs import *

__all__ = ['GatewayArgs', 'Gateway']

@pulumi.input_type
class GatewayArgs:
    def __init__(__self__, *,
                 name: pulumi.Input[builtins.str],
                 comments: Optional[pulumi.Input[builtins.str]] = None,
                 custom_log: Optional[pulumi.Input['GatewayCustomLogArgs']] = None,
                 log_spec: Optional[pulumi.Input['GatewayLogSpecArgs']] = None,
                 monitor_spec: Optional[pulumi.Input['GatewayMonitorSpecArgs']] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 resource_spec: Optional[pulumi.Input['GatewayResourceSpecArgs']] = None,
                 subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 trace_spec: Optional[pulumi.Input['GatewayTraceSpecArgs']] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 vpc_id: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Gateway resource.
        :param pulumi.Input[builtins.str] name: 网关名称。
        :param pulumi.Input[builtins.str] comments: 网关备注信息。长度限制为0~253个字符。
        :param pulumi.Input['GatewayCustomLogArgs'] custom_log: 自定义日志配置。
        :param pulumi.Input['GatewayLogSpecArgs'] log_spec: 日志配置。
        :param pulumi.Input['GatewayMonitorSpecArgs'] monitor_spec: 监控配置信息。
        :param pulumi.Input[builtins.str] project_name: 项目名称。
        :param pulumi.Input['GatewayResourceSpecArgs'] resource_spec: 资源规格配置信息。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] subnet_ids: 子网ID列表。长度限制为1~2个。
        :param pulumi.Input['GatewayTraceSpecArgs'] trace_spec: 链路追踪配置信息。
        :param pulumi.Input[builtins.str] type: 网关类型，取值：standard：标准网关。serverless：Serverless网关（暂不支持）。
        :param pulumi.Input[builtins.str] vpc_id: VPC ID。
        """
        pulumi.set(__self__, "name", name)
        if comments is not None:
            pulumi.set(__self__, "comments", comments)
        if custom_log is not None:
            pulumi.set(__self__, "custom_log", custom_log)
        if log_spec is not None:
            pulumi.set(__self__, "log_spec", log_spec)
        if monitor_spec is not None:
            pulumi.set(__self__, "monitor_spec", monitor_spec)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if resource_spec is not None:
            pulumi.set(__self__, "resource_spec", resource_spec)
        if subnet_ids is not None:
            pulumi.set(__self__, "subnet_ids", subnet_ids)
        if trace_spec is not None:
            pulumi.set(__self__, "trace_spec", trace_spec)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if vpc_id is not None:
            pulumi.set(__self__, "vpc_id", vpc_id)

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

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

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

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

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

    @custom_log.setter
    def custom_log(self, value: Optional[pulumi.Input['GatewayCustomLogArgs']]):
        pulumi.set(self, "custom_log", value)

    @property
    @pulumi.getter(name="logSpec")
    def log_spec(self) -> Optional[pulumi.Input['GatewayLogSpecArgs']]:
        """
        日志配置。
        """
        return pulumi.get(self, "log_spec")

    @log_spec.setter
    def log_spec(self, value: Optional[pulumi.Input['GatewayLogSpecArgs']]):
        pulumi.set(self, "log_spec", value)

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

    @monitor_spec.setter
    def monitor_spec(self, value: Optional[pulumi.Input['GatewayMonitorSpecArgs']]):
        pulumi.set(self, "monitor_spec", value)

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

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

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

    @resource_spec.setter
    def resource_spec(self, value: Optional[pulumi.Input['GatewayResourceSpecArgs']]):
        pulumi.set(self, "resource_spec", value)

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

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

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

    @trace_spec.setter
    def trace_spec(self, value: Optional[pulumi.Input['GatewayTraceSpecArgs']]):
        pulumi.set(self, "trace_spec", value)

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

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

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

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


@pulumi.input_type
class _GatewayState:
    def __init__(__self__, *,
                 backend_spec: Optional[pulumi.Input['GatewayBackendSpecArgs']] = None,
                 comments: Optional[pulumi.Input[builtins.str]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 custom_log: Optional[pulumi.Input['GatewayCustomLogArgs']] = None,
                 events: Optional[pulumi.Input[Sequence[pulumi.Input['GatewayEventArgs']]]] = None,
                 gateway_id: Optional[pulumi.Input[builtins.str]] = None,
                 log_spec: Optional[pulumi.Input['GatewayLogSpecArgs']] = None,
                 message: Optional[pulumi.Input[builtins.str]] = None,
                 monitor_spec: Optional[pulumi.Input['GatewayMonitorSpecArgs']] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 network_spec: Optional[pulumi.Input['GatewayNetworkSpecArgs']] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 resource_spec: Optional[pulumi.Input['GatewayResourceSpecArgs']] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 trace_spec: Optional[pulumi.Input['GatewayTraceSpecArgs']] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 version: Optional[pulumi.Input[builtins.str]] = None,
                 vpc_id: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Gateway resources.
        :param pulumi.Input['GatewayBackendSpecArgs'] backend_spec: 后端服务配置信息。
        :param pulumi.Input[builtins.str] comments: 网关备注信息。长度限制为0~253个字符。
        :param pulumi.Input[builtins.str] created_time: 网关创建时间。
        :param pulumi.Input['GatewayCustomLogArgs'] custom_log: 自定义日志配置。
        :param pulumi.Input[builtins.str] gateway_id: 网关实例ID。
        :param pulumi.Input['GatewayLogSpecArgs'] log_spec: 日志配置。
        :param pulumi.Input[builtins.str] message: 网关创建失败、删除失败或异常时的错误信息。
        :param pulumi.Input['GatewayMonitorSpecArgs'] monitor_spec: 监控配置信息。
        :param pulumi.Input[builtins.str] name: 网关名称。
        :param pulumi.Input['GatewayNetworkSpecArgs'] network_spec: 网络配置信息。
        :param pulumi.Input[builtins.str] project_name: 项目名称。
        :param pulumi.Input['GatewayResourceSpecArgs'] resource_spec: 资源规格配置信息。
        :param pulumi.Input[builtins.str] status: 网关状态，取值：Creating：创建中。CreatedFailed：创建失败。Updating：更新中。Running：运行中。Deleting：删除中。DeletedFailed：删除失败。Abnormal：异常。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] subnet_ids: 子网ID列表。长度限制为1~2个。
        :param pulumi.Input['GatewayTraceSpecArgs'] trace_spec: 链路追踪配置信息。
        :param pulumi.Input[builtins.str] type: 网关类型，取值：standard：标准网关。serverless：Serverless网关（暂不支持）。
        :param pulumi.Input[builtins.str] version: 网关版本。
        :param pulumi.Input[builtins.str] vpc_id: VPC ID。
        """
        if backend_spec is not None:
            pulumi.set(__self__, "backend_spec", backend_spec)
        if comments is not None:
            pulumi.set(__self__, "comments", comments)
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if custom_log is not None:
            pulumi.set(__self__, "custom_log", custom_log)
        if events is not None:
            pulumi.set(__self__, "events", events)
        if gateway_id is not None:
            pulumi.set(__self__, "gateway_id", gateway_id)
        if log_spec is not None:
            pulumi.set(__self__, "log_spec", log_spec)
        if message is not None:
            pulumi.set(__self__, "message", message)
        if monitor_spec is not None:
            pulumi.set(__self__, "monitor_spec", monitor_spec)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if network_spec is not None:
            pulumi.set(__self__, "network_spec", network_spec)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if resource_spec is not None:
            pulumi.set(__self__, "resource_spec", resource_spec)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if subnet_ids is not None:
            pulumi.set(__self__, "subnet_ids", subnet_ids)
        if trace_spec is not None:
            pulumi.set(__self__, "trace_spec", trace_spec)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if version is not None:
            pulumi.set(__self__, "version", version)
        if vpc_id is not None:
            pulumi.set(__self__, "vpc_id", vpc_id)

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

    @backend_spec.setter
    def backend_spec(self, value: Optional[pulumi.Input['GatewayBackendSpecArgs']]):
        pulumi.set(self, "backend_spec", value)

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

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

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

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

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

    @custom_log.setter
    def custom_log(self, value: Optional[pulumi.Input['GatewayCustomLogArgs']]):
        pulumi.set(self, "custom_log", value)

    @property
    @pulumi.getter
    def events(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GatewayEventArgs']]]]:
        return pulumi.get(self, "events")

    @events.setter
    def events(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GatewayEventArgs']]]]):
        pulumi.set(self, "events", value)

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

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

    @property
    @pulumi.getter(name="logSpec")
    def log_spec(self) -> Optional[pulumi.Input['GatewayLogSpecArgs']]:
        """
        日志配置。
        """
        return pulumi.get(self, "log_spec")

    @log_spec.setter
    def log_spec(self, value: Optional[pulumi.Input['GatewayLogSpecArgs']]):
        pulumi.set(self, "log_spec", value)

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

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

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

    @monitor_spec.setter
    def monitor_spec(self, value: Optional[pulumi.Input['GatewayMonitorSpecArgs']]):
        pulumi.set(self, "monitor_spec", value)

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

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

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

    @network_spec.setter
    def network_spec(self, value: Optional[pulumi.Input['GatewayNetworkSpecArgs']]):
        pulumi.set(self, "network_spec", value)

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

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

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

    @resource_spec.setter
    def resource_spec(self, value: Optional[pulumi.Input['GatewayResourceSpecArgs']]):
        pulumi.set(self, "resource_spec", value)

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

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

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

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

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

    @trace_spec.setter
    def trace_spec(self, value: Optional[pulumi.Input['GatewayTraceSpecArgs']]):
        pulumi.set(self, "trace_spec", value)

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

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

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

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

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

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


@pulumi.type_token("bytepluscc:apig/gateway:Gateway")
class Gateway(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 comments: Optional[pulumi.Input[builtins.str]] = None,
                 custom_log: Optional[pulumi.Input[Union['GatewayCustomLogArgs', 'GatewayCustomLogArgsDict']]] = None,
                 log_spec: Optional[pulumi.Input[Union['GatewayLogSpecArgs', 'GatewayLogSpecArgsDict']]] = None,
                 monitor_spec: Optional[pulumi.Input[Union['GatewayMonitorSpecArgs', 'GatewayMonitorSpecArgsDict']]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 resource_spec: Optional[pulumi.Input[Union['GatewayResourceSpecArgs', 'GatewayResourceSpecArgsDict']]] = None,
                 subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 trace_spec: Optional[pulumi.Input[Union['GatewayTraceSpecArgs', 'GatewayTraceSpecArgsDict']]] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 vpc_id: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        API网关(Gateway)是API管理服务的核心组件，负责接收、处理、转发API请求，并提供安全认证、流量控制等功能。

        ## Import

        ```sh
        $ pulumi import bytepluscc:apig/gateway:Gateway example "gateway_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] comments: 网关备注信息。长度限制为0~253个字符。
        :param pulumi.Input[Union['GatewayCustomLogArgs', 'GatewayCustomLogArgsDict']] custom_log: 自定义日志配置。
        :param pulumi.Input[Union['GatewayLogSpecArgs', 'GatewayLogSpecArgsDict']] log_spec: 日志配置。
        :param pulumi.Input[Union['GatewayMonitorSpecArgs', 'GatewayMonitorSpecArgsDict']] monitor_spec: 监控配置信息。
        :param pulumi.Input[builtins.str] name: 网关名称。
        :param pulumi.Input[builtins.str] project_name: 项目名称。
        :param pulumi.Input[Union['GatewayResourceSpecArgs', 'GatewayResourceSpecArgsDict']] resource_spec: 资源规格配置信息。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] subnet_ids: 子网ID列表。长度限制为1~2个。
        :param pulumi.Input[Union['GatewayTraceSpecArgs', 'GatewayTraceSpecArgsDict']] trace_spec: 链路追踪配置信息。
        :param pulumi.Input[builtins.str] type: 网关类型，取值：standard：标准网关。serverless：Serverless网关（暂不支持）。
        :param pulumi.Input[builtins.str] vpc_id: VPC ID。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GatewayArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        API网关(Gateway)是API管理服务的核心组件，负责接收、处理、转发API请求，并提供安全认证、流量控制等功能。

        ## Import

        ```sh
        $ pulumi import bytepluscc:apig/gateway:Gateway example "gateway_id"
        ```

        :param str resource_name: The name of the resource.
        :param GatewayArgs 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(GatewayArgs, 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,
                 comments: Optional[pulumi.Input[builtins.str]] = None,
                 custom_log: Optional[pulumi.Input[Union['GatewayCustomLogArgs', 'GatewayCustomLogArgsDict']]] = None,
                 log_spec: Optional[pulumi.Input[Union['GatewayLogSpecArgs', 'GatewayLogSpecArgsDict']]] = None,
                 monitor_spec: Optional[pulumi.Input[Union['GatewayMonitorSpecArgs', 'GatewayMonitorSpecArgsDict']]] = None,
                 name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 resource_spec: Optional[pulumi.Input[Union['GatewayResourceSpecArgs', 'GatewayResourceSpecArgsDict']]] = None,
                 subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 trace_spec: Optional[pulumi.Input[Union['GatewayTraceSpecArgs', 'GatewayTraceSpecArgsDict']]] = None,
                 type: Optional[pulumi.Input[builtins.str]] = None,
                 vpc_id: Optional[pulumi.Input[builtins.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__ = GatewayArgs.__new__(GatewayArgs)

            __props__.__dict__["comments"] = comments
            __props__.__dict__["custom_log"] = custom_log
            __props__.__dict__["log_spec"] = log_spec
            __props__.__dict__["monitor_spec"] = monitor_spec
            if name is None and not opts.urn:
                raise TypeError("Missing required property 'name'")
            __props__.__dict__["name"] = name
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["resource_spec"] = resource_spec
            __props__.__dict__["subnet_ids"] = subnet_ids
            __props__.__dict__["trace_spec"] = trace_spec
            __props__.__dict__["type"] = type
            __props__.__dict__["vpc_id"] = vpc_id
            __props__.__dict__["backend_spec"] = None
            __props__.__dict__["created_time"] = None
            __props__.__dict__["events"] = None
            __props__.__dict__["gateway_id"] = None
            __props__.__dict__["message"] = None
            __props__.__dict__["network_spec"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["version"] = None
        super(Gateway, __self__).__init__(
            'bytepluscc:apig/gateway:Gateway',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            backend_spec: Optional[pulumi.Input[Union['GatewayBackendSpecArgs', 'GatewayBackendSpecArgsDict']]] = None,
            comments: Optional[pulumi.Input[builtins.str]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            custom_log: Optional[pulumi.Input[Union['GatewayCustomLogArgs', 'GatewayCustomLogArgsDict']]] = None,
            events: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GatewayEventArgs', 'GatewayEventArgsDict']]]]] = None,
            gateway_id: Optional[pulumi.Input[builtins.str]] = None,
            log_spec: Optional[pulumi.Input[Union['GatewayLogSpecArgs', 'GatewayLogSpecArgsDict']]] = None,
            message: Optional[pulumi.Input[builtins.str]] = None,
            monitor_spec: Optional[pulumi.Input[Union['GatewayMonitorSpecArgs', 'GatewayMonitorSpecArgsDict']]] = None,
            name: Optional[pulumi.Input[builtins.str]] = None,
            network_spec: Optional[pulumi.Input[Union['GatewayNetworkSpecArgs', 'GatewayNetworkSpecArgsDict']]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            resource_spec: Optional[pulumi.Input[Union['GatewayResourceSpecArgs', 'GatewayResourceSpecArgsDict']]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            trace_spec: Optional[pulumi.Input[Union['GatewayTraceSpecArgs', 'GatewayTraceSpecArgsDict']]] = None,
            type: Optional[pulumi.Input[builtins.str]] = None,
            version: Optional[pulumi.Input[builtins.str]] = None,
            vpc_id: Optional[pulumi.Input[builtins.str]] = None) -> 'Gateway':
        """
        Get an existing Gateway 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[Union['GatewayBackendSpecArgs', 'GatewayBackendSpecArgsDict']] backend_spec: 后端服务配置信息。
        :param pulumi.Input[builtins.str] comments: 网关备注信息。长度限制为0~253个字符。
        :param pulumi.Input[builtins.str] created_time: 网关创建时间。
        :param pulumi.Input[Union['GatewayCustomLogArgs', 'GatewayCustomLogArgsDict']] custom_log: 自定义日志配置。
        :param pulumi.Input[builtins.str] gateway_id: 网关实例ID。
        :param pulumi.Input[Union['GatewayLogSpecArgs', 'GatewayLogSpecArgsDict']] log_spec: 日志配置。
        :param pulumi.Input[builtins.str] message: 网关创建失败、删除失败或异常时的错误信息。
        :param pulumi.Input[Union['GatewayMonitorSpecArgs', 'GatewayMonitorSpecArgsDict']] monitor_spec: 监控配置信息。
        :param pulumi.Input[builtins.str] name: 网关名称。
        :param pulumi.Input[Union['GatewayNetworkSpecArgs', 'GatewayNetworkSpecArgsDict']] network_spec: 网络配置信息。
        :param pulumi.Input[builtins.str] project_name: 项目名称。
        :param pulumi.Input[Union['GatewayResourceSpecArgs', 'GatewayResourceSpecArgsDict']] resource_spec: 资源规格配置信息。
        :param pulumi.Input[builtins.str] status: 网关状态，取值：Creating：创建中。CreatedFailed：创建失败。Updating：更新中。Running：运行中。Deleting：删除中。DeletedFailed：删除失败。Abnormal：异常。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] subnet_ids: 子网ID列表。长度限制为1~2个。
        :param pulumi.Input[Union['GatewayTraceSpecArgs', 'GatewayTraceSpecArgsDict']] trace_spec: 链路追踪配置信息。
        :param pulumi.Input[builtins.str] type: 网关类型，取值：standard：标准网关。serverless：Serverless网关（暂不支持）。
        :param pulumi.Input[builtins.str] version: 网关版本。
        :param pulumi.Input[builtins.str] vpc_id: VPC ID。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _GatewayState.__new__(_GatewayState)

        __props__.__dict__["backend_spec"] = backend_spec
        __props__.__dict__["comments"] = comments
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["custom_log"] = custom_log
        __props__.__dict__["events"] = events
        __props__.__dict__["gateway_id"] = gateway_id
        __props__.__dict__["log_spec"] = log_spec
        __props__.__dict__["message"] = message
        __props__.__dict__["monitor_spec"] = monitor_spec
        __props__.__dict__["name"] = name
        __props__.__dict__["network_spec"] = network_spec
        __props__.__dict__["project_name"] = project_name
        __props__.__dict__["resource_spec"] = resource_spec
        __props__.__dict__["status"] = status
        __props__.__dict__["subnet_ids"] = subnet_ids
        __props__.__dict__["trace_spec"] = trace_spec
        __props__.__dict__["type"] = type
        __props__.__dict__["version"] = version
        __props__.__dict__["vpc_id"] = vpc_id
        return Gateway(resource_name, opts=opts, __props__=__props__)

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

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

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

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

    @property
    @pulumi.getter
    def events(self) -> pulumi.Output[Sequence['outputs.GatewayEvent']]:
        return pulumi.get(self, "events")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

