# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetNetworkResult',
    'AwaitableGetNetworkResult',
    'get_network',
    'get_network_output',
]

@pulumi.output_type
class GetNetworkResult:
    """
    A collection of values returned by getNetwork.
    """
    def __init__(__self__, aws=None, azures=None, cidr=None, cloud=None, connection_types=None, display_name=None, dns_domain=None, environment=None, gcps=None, id=None, region=None, resource_name=None, zonal_subdomains=None, zones=None):
        if aws and not isinstance(aws, list):
            raise TypeError("Expected argument 'aws' to be a list")
        pulumi.set(__self__, "aws", aws)
        if azures and not isinstance(azures, list):
            raise TypeError("Expected argument 'azures' to be a list")
        pulumi.set(__self__, "azures", azures)
        if cidr and not isinstance(cidr, str):
            raise TypeError("Expected argument 'cidr' to be a str")
        pulumi.set(__self__, "cidr", cidr)
        if cloud and not isinstance(cloud, str):
            raise TypeError("Expected argument 'cloud' to be a str")
        pulumi.set(__self__, "cloud", cloud)
        if connection_types and not isinstance(connection_types, list):
            raise TypeError("Expected argument 'connection_types' to be a list")
        pulumi.set(__self__, "connection_types", connection_types)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if dns_domain and not isinstance(dns_domain, str):
            raise TypeError("Expected argument 'dns_domain' to be a str")
        pulumi.set(__self__, "dns_domain", dns_domain)
        if environment and not isinstance(environment, dict):
            raise TypeError("Expected argument 'environment' to be a dict")
        pulumi.set(__self__, "environment", environment)
        if gcps and not isinstance(gcps, list):
            raise TypeError("Expected argument 'gcps' to be a list")
        pulumi.set(__self__, "gcps", gcps)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if resource_name and not isinstance(resource_name, str):
            raise TypeError("Expected argument 'resource_name' to be a str")
        pulumi.set(__self__, "resource_name", resource_name)
        if zonal_subdomains and not isinstance(zonal_subdomains, dict):
            raise TypeError("Expected argument 'zonal_subdomains' to be a dict")
        pulumi.set(__self__, "zonal_subdomains", zonal_subdomains)
        if zones and not isinstance(zones, list):
            raise TypeError("Expected argument 'zones' to be a list")
        pulumi.set(__self__, "zones", zones)

    @property
    @pulumi.getter
    def aws(self) -> Sequence['outputs.GetNetworkAwResult']:
        """
        (Optional Configuration Block) The AWS-specific network details if available. It supports the following:
        """
        return pulumi.get(self, "aws")

    @property
    @pulumi.getter
    def azures(self) -> Sequence['outputs.GetNetworkAzureResult']:
        """
        (Optional Configuration Block) The Azure-specific network details if available. It supports the following:
        """
        return pulumi.get(self, "azures")

    @property
    @pulumi.getter
    def cidr(self) -> str:
        """
        (Required String) The IPv4 CIDR block to used for the network. Must be `/16`. Required for VPC peering and AWS TransitGateway.
        """
        return pulumi.get(self, "cidr")

    @property
    @pulumi.getter
    def cloud(self) -> str:
        """
        (Required String) The cloud service provider in which the network exists. Accepted values are: `AWS`, `AZURE`, and `GCP`.
        """
        return pulumi.get(self, "cloud")

    @property
    @pulumi.getter(name="connectionTypes")
    def connection_types(self) -> Sequence[str]:
        """
        (Required List of String) The list of connection types that may be used with the network. Accepted connection types are: `PEERING`, `TRANSITGATEWAY`, and `PRIVATELINK`.
        """
        return pulumi.get(self, "connection_types")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        """
        (Required String) The name of the Network.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="dnsDomain")
    def dns_domain(self) -> str:
        return pulumi.get(self, "dns_domain")

    @property
    @pulumi.getter
    def environment(self) -> 'outputs.GetNetworkEnvironmentResult':
        return pulumi.get(self, "environment")

    @property
    @pulumi.getter
    def gcps(self) -> Sequence['outputs.GetNetworkGcpResult']:
        """
        (Optional Configuration Block) The GCP-specific network details if available. It supports the following:
        """
        return pulumi.get(self, "gcps")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        (Required String) The ID of the Network, for example, `n-abc123`.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def region(self) -> str:
        """
        (Required String) The cloud provider region where the network exists.
        """
        return pulumi.get(self, "region")

    @property
    @pulumi.getter(name="resourceName")
    def resource_name(self) -> str:
        """
        (Required String) The Confluent Resource Name of the Network.
        """
        return pulumi.get(self, "resource_name")

    @property
    @pulumi.getter(name="zonalSubdomains")
    def zonal_subdomains(self) -> Mapping[str, str]:
        return pulumi.get(self, "zonal_subdomains")

    @property
    @pulumi.getter
    def zones(self) -> Sequence[str]:
        """
        (Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks
        used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud.
        On AWS, zones are AWS [AZ IDs](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html), for example, `use1-az3`.
        On GCP, zones are GCP [zones](https://cloud.google.com/compute/docs/regions-zones), for example, `us-central1-c`.
        On Azure, zones are Confluent-chosen names (for example, `1`, `2`, `3`) since Azure does not have universal zone identifiers.
        """
        return pulumi.get(self, "zones")


class AwaitableGetNetworkResult(GetNetworkResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNetworkResult(
            aws=self.aws,
            azures=self.azures,
            cidr=self.cidr,
            cloud=self.cloud,
            connection_types=self.connection_types,
            display_name=self.display_name,
            dns_domain=self.dns_domain,
            environment=self.environment,
            gcps=self.gcps,
            id=self.id,
            region=self.region,
            resource_name=self.resource_name,
            zonal_subdomains=self.zonal_subdomains,
            zones=self.zones)


def get_network(aws: Optional[Sequence[pulumi.InputType['GetNetworkAwArgs']]] = None,
                azures: Optional[Sequence[pulumi.InputType['GetNetworkAzureArgs']]] = None,
                display_name: Optional[str] = None,
                environment: Optional[pulumi.InputType['GetNetworkEnvironmentArgs']] = None,
                gcps: Optional[Sequence[pulumi.InputType['GetNetworkGcpArgs']]] = None,
                id: Optional[str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNetworkResult:
    """
    [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    `Network` describes a Network data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    example_using_id = confluentcloud.get_network(id="n-abc123",
        environment=confluentcloud.GetNetworkEnvironmentArgs(
            id="env-xyz456",
        ))
    test_sa = confluentcloud.ServiceAccount("test-sa", description=f"test_sa for {example_using_id.display_name}")
    example_using_name_network = confluentcloud.get_network(display_name="my_network",
        environment=confluentcloud.GetNetworkEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingName", example_using_name_network)
    ```


    :param Sequence[pulumi.InputType['GetNetworkAwArgs']] aws: (Optional Configuration Block) The AWS-specific network details if available. It supports the following:
    :param Sequence[pulumi.InputType['GetNetworkAzureArgs']] azures: (Optional Configuration Block) The Azure-specific network details if available. It supports the following:
    :param str display_name: A human-readable name for the Network.
    :param Sequence[pulumi.InputType['GetNetworkGcpArgs']] gcps: (Optional Configuration Block) The GCP-specific network details if available. It supports the following:
    :param str id: The ID of the Environment that the Network belongs to, for example, `env-xyz456`.
    """
    __args__ = dict()
    __args__['aws'] = aws
    __args__['azures'] = azures
    __args__['displayName'] = display_name
    __args__['environment'] = environment
    __args__['gcps'] = gcps
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('confluentcloud:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult).value

    return AwaitableGetNetworkResult(
        aws=__ret__.aws,
        azures=__ret__.azures,
        cidr=__ret__.cidr,
        cloud=__ret__.cloud,
        connection_types=__ret__.connection_types,
        display_name=__ret__.display_name,
        dns_domain=__ret__.dns_domain,
        environment=__ret__.environment,
        gcps=__ret__.gcps,
        id=__ret__.id,
        region=__ret__.region,
        resource_name=__ret__.resource_name,
        zonal_subdomains=__ret__.zonal_subdomains,
        zones=__ret__.zones)


@_utilities.lift_output_func(get_network)
def get_network_output(aws: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNetworkAwArgs']]]]] = None,
                       azures: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNetworkAzureArgs']]]]] = None,
                       display_name: Optional[pulumi.Input[Optional[str]]] = None,
                       environment: Optional[pulumi.Input[pulumi.InputType['GetNetworkEnvironmentArgs']]] = None,
                       gcps: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNetworkGcpArgs']]]]] = None,
                       id: Optional[pulumi.Input[Optional[str]]] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkResult]:
    """
    [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    `Network` describes a Network data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    example_using_id = confluentcloud.get_network(id="n-abc123",
        environment=confluentcloud.GetNetworkEnvironmentArgs(
            id="env-xyz456",
        ))
    test_sa = confluentcloud.ServiceAccount("test-sa", description=f"test_sa for {example_using_id.display_name}")
    example_using_name_network = confluentcloud.get_network(display_name="my_network",
        environment=confluentcloud.GetNetworkEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingName", example_using_name_network)
    ```


    :param Sequence[pulumi.InputType['GetNetworkAwArgs']] aws: (Optional Configuration Block) The AWS-specific network details if available. It supports the following:
    :param Sequence[pulumi.InputType['GetNetworkAzureArgs']] azures: (Optional Configuration Block) The Azure-specific network details if available. It supports the following:
    :param str display_name: A human-readable name for the Network.
    :param Sequence[pulumi.InputType['GetNetworkGcpArgs']] gcps: (Optional Configuration Block) The GCP-specific network details if available. It supports the following:
    :param str id: The ID of the Environment that the Network belongs to, for example, `env-xyz456`.
    """
    ...
