# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__, asn=None, created_at=None, gateway_type=None, id=None, ipam_private_ipv4_id=None, ipam_private_ipv6_id=None, name=None, organization_id=None, private_network_id=None, project_id=None, public_configs=None, region=None, status=None, tags=None, updated_at=None, vpn_gateway_id=None, zone=None):
        if asn and not isinstance(asn, int):
            raise TypeError("Expected argument 'asn' to be a int")
        pulumi.set(__self__, "asn", asn)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if gateway_type and not isinstance(gateway_type, str):
            raise TypeError("Expected argument 'gateway_type' to be a str")
        pulumi.set(__self__, "gateway_type", gateway_type)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ipam_private_ipv4_id and not isinstance(ipam_private_ipv4_id, str):
            raise TypeError("Expected argument 'ipam_private_ipv4_id' to be a str")
        pulumi.set(__self__, "ipam_private_ipv4_id", ipam_private_ipv4_id)
        if ipam_private_ipv6_id and not isinstance(ipam_private_ipv6_id, str):
            raise TypeError("Expected argument 'ipam_private_ipv6_id' to be a str")
        pulumi.set(__self__, "ipam_private_ipv6_id", ipam_private_ipv6_id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if private_network_id and not isinstance(private_network_id, str):
            raise TypeError("Expected argument 'private_network_id' to be a str")
        pulumi.set(__self__, "private_network_id", private_network_id)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if public_configs and not isinstance(public_configs, list):
            raise TypeError("Expected argument 'public_configs' to be a list")
        pulumi.set(__self__, "public_configs", public_configs)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        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 updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if vpn_gateway_id and not isinstance(vpn_gateway_id, str):
            raise TypeError("Expected argument 'vpn_gateway_id' to be a str")
        pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id)
        if zone and not isinstance(zone, str):
            raise TypeError("Expected argument 'zone' to be a str")
        pulumi.set(__self__, "zone", zone)

    @_builtins.property
    @pulumi.getter
    def asn(self) -> _builtins.int:
        """
        The AS Number of the VPN gateway.
        """
        return pulumi.get(self, "asn")

    @_builtins.property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> _builtins.str:
        """
        The date and time of creation of the VPN gateway.
        """
        return pulumi.get(self, "created_at")

    @_builtins.property
    @pulumi.getter(name="gatewayType")
    def gateway_type(self) -> _builtins.str:
        """
        The VPN gateway type (commercial offer type).
        """
        return pulumi.get(self, "gateway_type")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="ipamPrivateIpv4Id")
    def ipam_private_ipv4_id(self) -> _builtins.str:
        """
        The ID of the IPAM private IPv4 address attached to the VPN gateway.
        """
        return pulumi.get(self, "ipam_private_ipv4_id")

    @_builtins.property
    @pulumi.getter(name="ipamPrivateIpv6Id")
    def ipam_private_ipv6_id(self) -> _builtins.str:
        """
        The ID of the IPAM private IPv6 address attached to the VPN gateway.
        """
        return pulumi.get(self, "ipam_private_ipv6_id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> _builtins.str:
        """
        The Organization ID the VPN gateway is associated with.
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter(name="privateNetworkId")
    def private_network_id(self) -> _builtins.str:
        """
        The ID of the Private Network attached to the VPN gateway.
        """
        return pulumi.get(self, "private_network_id")

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter(name="publicConfigs")
    def public_configs(self) -> Sequence['outputs.GetGatewayPublicConfigResult']:
        """
        The public endpoint configuration of the VPN gateway.
        """
        return pulumi.get(self, "public_configs")

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "region")

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.str:
        """
        The status of the VPN gateway.
        """
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Sequence[_builtins.str]:
        """
        The tags associated with the VPN gateway.
        """
        return pulumi.get(self, "tags")

    @_builtins.property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> _builtins.str:
        """
        The date and time of the last update of the VPN gateway.
        """
        return pulumi.get(self, "updated_at")

    @_builtins.property
    @pulumi.getter(name="vpnGatewayId")
    def vpn_gateway_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "vpn_gateway_id")

    @_builtins.property
    @pulumi.getter
    def zone(self) -> _builtins.str:
        """
        The zone in which the VPN gateway is deployed.
        """
        return pulumi.get(self, "zone")


class AwaitableGetGatewayResult(GetGatewayResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGatewayResult(
            asn=self.asn,
            created_at=self.created_at,
            gateway_type=self.gateway_type,
            id=self.id,
            ipam_private_ipv4_id=self.ipam_private_ipv4_id,
            ipam_private_ipv6_id=self.ipam_private_ipv6_id,
            name=self.name,
            organization_id=self.organization_id,
            private_network_id=self.private_network_id,
            project_id=self.project_id,
            public_configs=self.public_configs,
            region=self.region,
            status=self.status,
            tags=self.tags,
            updated_at=self.updated_at,
            vpn_gateway_id=self.vpn_gateway_id,
            zone=self.zone)


def get_gateway(name: Optional[_builtins.str] = None,
                project_id: Optional[_builtins.str] = None,
                region: Optional[_builtins.str] = None,
                vpn_gateway_id: Optional[_builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGatewayResult:
    """
    For further information refer to the Site-to-Site VPN [API documentation](https://www.scaleway.com/en/developers/api/site-to-site-vpn/).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by gateway ID
    my_gateway = scaleway.s2svpn.get_gateway(vpn_gateway_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    my_gateway = scaleway.s2svpn.get_gateway(name="foobar")
    ```


    :param _builtins.str name: The name of the VPN gateway.
    :param _builtins.str project_id: The ID of the project the VPN gateway is associated with.
    :param _builtins.str region: `region`) The region in which the VPN gateway exists.
    :param _builtins.str vpn_gateway_id: The VPN gateway ID.
           
           > **Note** You must specify at least one: `name` and/or `vpn_gateway_id`.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['region'] = region
    __args__['vpnGatewayId'] = vpn_gateway_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:s2svpn/getGateway:getGateway', __args__, opts=opts, typ=GetGatewayResult).value

    return AwaitableGetGatewayResult(
        asn=pulumi.get(__ret__, 'asn'),
        created_at=pulumi.get(__ret__, 'created_at'),
        gateway_type=pulumi.get(__ret__, 'gateway_type'),
        id=pulumi.get(__ret__, 'id'),
        ipam_private_ipv4_id=pulumi.get(__ret__, 'ipam_private_ipv4_id'),
        ipam_private_ipv6_id=pulumi.get(__ret__, 'ipam_private_ipv6_id'),
        name=pulumi.get(__ret__, 'name'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        private_network_id=pulumi.get(__ret__, 'private_network_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        public_configs=pulumi.get(__ret__, 'public_configs'),
        region=pulumi.get(__ret__, 'region'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        vpn_gateway_id=pulumi.get(__ret__, 'vpn_gateway_id'),
        zone=pulumi.get(__ret__, 'zone'))
def get_gateway_output(name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                       project_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                       region: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                       vpn_gateway_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGatewayResult]:
    """
    For further information refer to the Site-to-Site VPN [API documentation](https://www.scaleway.com/en/developers/api/site-to-site-vpn/).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by gateway ID
    my_gateway = scaleway.s2svpn.get_gateway(vpn_gateway_id="11111111-1111-1111-1111-111111111111")
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    my_gateway = scaleway.s2svpn.get_gateway(name="foobar")
    ```


    :param _builtins.str name: The name of the VPN gateway.
    :param _builtins.str project_id: The ID of the project the VPN gateway is associated with.
    :param _builtins.str region: `region`) The region in which the VPN gateway exists.
    :param _builtins.str vpn_gateway_id: The VPN gateway ID.
           
           > **Note** You must specify at least one: `name` and/or `vpn_gateway_id`.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['region'] = region
    __args__['vpnGatewayId'] = vpn_gateway_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:s2svpn/getGateway:getGateway', __args__, opts=opts, typ=GetGatewayResult)
    return __ret__.apply(lambda __response__: GetGatewayResult(
        asn=pulumi.get(__response__, 'asn'),
        created_at=pulumi.get(__response__, 'created_at'),
        gateway_type=pulumi.get(__response__, 'gateway_type'),
        id=pulumi.get(__response__, 'id'),
        ipam_private_ipv4_id=pulumi.get(__response__, 'ipam_private_ipv4_id'),
        ipam_private_ipv6_id=pulumi.get(__response__, 'ipam_private_ipv6_id'),
        name=pulumi.get(__response__, 'name'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        private_network_id=pulumi.get(__response__, 'private_network_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        public_configs=pulumi.get(__response__, 'public_configs'),
        region=pulumi.get(__response__, 'region'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        vpn_gateway_id=pulumi.get(__response__, 'vpn_gateway_id'),
        zone=pulumi.get(__response__, 'zone')))
