# 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 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__ = ['TrafficManagerExternalEndpointArgs', 'TrafficManagerExternalEndpoint']

@pulumi.input_type
class TrafficManagerExternalEndpointArgs:
    def __init__(__self__, *,
                 profile_id: pulumi.Input[str],
                 target: pulumi.Input[str],
                 always_serve_enabled: Optional[pulumi.Input[bool]] = None,
                 custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 endpoint_location: Optional[pulumi.Input[str]] = None,
                 geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]] = None,
                 weight: Optional[pulumi.Input[int]] = None):
        """
        The set of arguments for constructing a TrafficManagerExternalEndpoint resource.
        :param pulumi.Input[str] profile_id: The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        :param pulumi.Input[str] target: The FQDN DNS name of the target.
        :param pulumi.Input[bool] always_serve_enabled: If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]] custom_headers: One or more `custom_header` blocks as defined below.
        :param pulumi.Input[bool] enabled: Is the endpoint enabled? Defaults to `true`.
        :param pulumi.Input[str] endpoint_location: Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] geo_mappings: A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        :param pulumi.Input[str] name: The name of the External Endpoint. Changing this forces a new resource to be created.
        :param pulumi.Input[int] priority: Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        pulumi.set(__self__, "profile_id", profile_id)
        pulumi.set(__self__, "target", target)
        if always_serve_enabled is not None:
            pulumi.set(__self__, "always_serve_enabled", always_serve_enabled)
        if custom_headers is not None:
            pulumi.set(__self__, "custom_headers", custom_headers)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if endpoint_location is not None:
            pulumi.set(__self__, "endpoint_location", endpoint_location)
        if geo_mappings is not None:
            pulumi.set(__self__, "geo_mappings", geo_mappings)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if subnets is not None:
            pulumi.set(__self__, "subnets", subnets)
        if weight is not None:
            pulumi.set(__self__, "weight", weight)

    @property
    @pulumi.getter(name="profileId")
    def profile_id(self) -> pulumi.Input[str]:
        """
        The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "profile_id")

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

    @property
    @pulumi.getter
    def target(self) -> pulumi.Input[str]:
        """
        The FQDN DNS name of the target.
        """
        return pulumi.get(self, "target")

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

    @property
    @pulumi.getter(name="alwaysServeEnabled")
    def always_serve_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        """
        return pulumi.get(self, "always_serve_enabled")

    @always_serve_enabled.setter
    def always_serve_enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "always_serve_enabled", value)

    @property
    @pulumi.getter(name="customHeaders")
    def custom_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]]:
        """
        One or more `custom_header` blocks as defined below.
        """
        return pulumi.get(self, "custom_headers")

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Is the endpoint enabled? Defaults to `true`.
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enabled", value)

    @property
    @pulumi.getter(name="endpointLocation")
    def endpoint_location(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        """
        return pulumi.get(self, "endpoint_location")

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

    @property
    @pulumi.getter(name="geoMappings")
    def geo_mappings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        """
        return pulumi.get(self, "geo_mappings")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the External Endpoint. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[int]]:
        """
        Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter
    def subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]]:
        """
        One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "subnets")

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

    @property
    @pulumi.getter
    def weight(self) -> Optional[pulumi.Input[int]]:
        """
        Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        return pulumi.get(self, "weight")

    @weight.setter
    def weight(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "weight", value)


@pulumi.input_type
class _TrafficManagerExternalEndpointState:
    def __init__(__self__, *,
                 always_serve_enabled: Optional[pulumi.Input[bool]] = None,
                 custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 endpoint_location: Optional[pulumi.Input[str]] = None,
                 geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 profile_id: Optional[pulumi.Input[str]] = None,
                 subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]] = None,
                 target: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering TrafficManagerExternalEndpoint resources.
        :param pulumi.Input[bool] always_serve_enabled: If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]] custom_headers: One or more `custom_header` blocks as defined below.
        :param pulumi.Input[bool] enabled: Is the endpoint enabled? Defaults to `true`.
        :param pulumi.Input[str] endpoint_location: Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] geo_mappings: A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        :param pulumi.Input[str] name: The name of the External Endpoint. Changing this forces a new resource to be created.
        :param pulumi.Input[int] priority: Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        :param pulumi.Input[str] profile_id: The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] target: The FQDN DNS name of the target.
        :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        if always_serve_enabled is not None:
            pulumi.set(__self__, "always_serve_enabled", always_serve_enabled)
        if custom_headers is not None:
            pulumi.set(__self__, "custom_headers", custom_headers)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if endpoint_location is not None:
            pulumi.set(__self__, "endpoint_location", endpoint_location)
        if geo_mappings is not None:
            pulumi.set(__self__, "geo_mappings", geo_mappings)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if profile_id is not None:
            pulumi.set(__self__, "profile_id", profile_id)
        if subnets is not None:
            pulumi.set(__self__, "subnets", subnets)
        if target is not None:
            pulumi.set(__self__, "target", target)
        if weight is not None:
            pulumi.set(__self__, "weight", weight)

    @property
    @pulumi.getter(name="alwaysServeEnabled")
    def always_serve_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        """
        return pulumi.get(self, "always_serve_enabled")

    @always_serve_enabled.setter
    def always_serve_enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "always_serve_enabled", value)

    @property
    @pulumi.getter(name="customHeaders")
    def custom_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]]:
        """
        One or more `custom_header` blocks as defined below.
        """
        return pulumi.get(self, "custom_headers")

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Is the endpoint enabled? Defaults to `true`.
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enabled", value)

    @property
    @pulumi.getter(name="endpointLocation")
    def endpoint_location(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        """
        return pulumi.get(self, "endpoint_location")

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

    @property
    @pulumi.getter(name="geoMappings")
    def geo_mappings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        """
        return pulumi.get(self, "geo_mappings")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the External Endpoint. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[int]]:
        """
        Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="profileId")
    def profile_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "profile_id")

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

    @property
    @pulumi.getter
    def subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]]:
        """
        One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "subnets")

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

    @property
    @pulumi.getter
    def target(self) -> Optional[pulumi.Input[str]]:
        """
        The FQDN DNS name of the target.
        """
        return pulumi.get(self, "target")

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

    @property
    @pulumi.getter
    def weight(self) -> Optional[pulumi.Input[int]]:
        """
        Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        return pulumi.get(self, "weight")

    @weight.setter
    def weight(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "weight", value)


class TrafficManagerExternalEndpoint(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 always_serve_enabled: Optional[pulumi.Input[bool]] = None,
                 custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointCustomHeaderArgs', 'TrafficManagerExternalEndpointCustomHeaderArgsDict']]]]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 endpoint_location: Optional[pulumi.Input[str]] = None,
                 geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 profile_id: Optional[pulumi.Input[str]] = None,
                 subnets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointSubnetArgs', 'TrafficManagerExternalEndpointSubnetArgsDict']]]]] = None,
                 target: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        Manages an External Endpoint within a Traffic Manager Profile.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.core.ResourceGroup("example",
            name="example-resources",
            location="West Europe")
        example_traffic_manager_profile = azure.network.TrafficManagerProfile("example",
            name="example-profile",
            resource_group_name=example.name,
            traffic_routing_method="Weighted",
            dns_config={
                "relative_name": "example-profile",
                "ttl": 100,
            },
            monitor_config={
                "protocol": "HTTP",
                "port": 80,
                "path": "/",
                "interval_in_seconds": 30,
                "timeout_in_seconds": 9,
                "tolerated_number_of_failures": 3,
            },
            tags={
                "environment": "Production",
            })
        example_traffic_manager_external_endpoint = azure.network.TrafficManagerExternalEndpoint("example",
            name="example-endpoint",
            profile_id=example_traffic_manager_profile.id,
            always_serve_enabled=True,
            weight=100,
            target="www.example.com")
        ```

        ## Import

        External Endpoints can be imported using the `resource id`, e.g.

        ```sh
        $ pulumi import azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-group/providers/Microsoft.Network/trafficManagerProfiles/example-profile/ExternalEndpoints/example-endpoint
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] always_serve_enabled: If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        :param pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointCustomHeaderArgs', 'TrafficManagerExternalEndpointCustomHeaderArgsDict']]]] custom_headers: One or more `custom_header` blocks as defined below.
        :param pulumi.Input[bool] enabled: Is the endpoint enabled? Defaults to `true`.
        :param pulumi.Input[str] endpoint_location: Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] geo_mappings: A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        :param pulumi.Input[str] name: The name of the External Endpoint. Changing this forces a new resource to be created.
        :param pulumi.Input[int] priority: Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        :param pulumi.Input[str] profile_id: The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        :param pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointSubnetArgs', 'TrafficManagerExternalEndpointSubnetArgsDict']]]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] target: The FQDN DNS name of the target.
        :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: TrafficManagerExternalEndpointArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages an External Endpoint within a Traffic Manager Profile.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.core.ResourceGroup("example",
            name="example-resources",
            location="West Europe")
        example_traffic_manager_profile = azure.network.TrafficManagerProfile("example",
            name="example-profile",
            resource_group_name=example.name,
            traffic_routing_method="Weighted",
            dns_config={
                "relative_name": "example-profile",
                "ttl": 100,
            },
            monitor_config={
                "protocol": "HTTP",
                "port": 80,
                "path": "/",
                "interval_in_seconds": 30,
                "timeout_in_seconds": 9,
                "tolerated_number_of_failures": 3,
            },
            tags={
                "environment": "Production",
            })
        example_traffic_manager_external_endpoint = azure.network.TrafficManagerExternalEndpoint("example",
            name="example-endpoint",
            profile_id=example_traffic_manager_profile.id,
            always_serve_enabled=True,
            weight=100,
            target="www.example.com")
        ```

        ## Import

        External Endpoints can be imported using the `resource id`, e.g.

        ```sh
        $ pulumi import azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-group/providers/Microsoft.Network/trafficManagerProfiles/example-profile/ExternalEndpoints/example-endpoint
        ```

        :param str resource_name: The name of the resource.
        :param TrafficManagerExternalEndpointArgs 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(TrafficManagerExternalEndpointArgs, 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,
                 always_serve_enabled: Optional[pulumi.Input[bool]] = None,
                 custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointCustomHeaderArgs', 'TrafficManagerExternalEndpointCustomHeaderArgsDict']]]]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 endpoint_location: Optional[pulumi.Input[str]] = None,
                 geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 profile_id: Optional[pulumi.Input[str]] = None,
                 subnets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointSubnetArgs', 'TrafficManagerExternalEndpointSubnetArgsDict']]]]] = None,
                 target: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = 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__ = TrafficManagerExternalEndpointArgs.__new__(TrafficManagerExternalEndpointArgs)

            __props__.__dict__["always_serve_enabled"] = always_serve_enabled
            __props__.__dict__["custom_headers"] = custom_headers
            __props__.__dict__["enabled"] = enabled
            __props__.__dict__["endpoint_location"] = endpoint_location
            __props__.__dict__["geo_mappings"] = geo_mappings
            __props__.__dict__["name"] = name
            __props__.__dict__["priority"] = priority
            if profile_id is None and not opts.urn:
                raise TypeError("Missing required property 'profile_id'")
            __props__.__dict__["profile_id"] = profile_id
            __props__.__dict__["subnets"] = subnets
            if target is None and not opts.urn:
                raise TypeError("Missing required property 'target'")
            __props__.__dict__["target"] = target
            __props__.__dict__["weight"] = weight
        super(TrafficManagerExternalEndpoint, __self__).__init__(
            'azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            always_serve_enabled: Optional[pulumi.Input[bool]] = None,
            custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointCustomHeaderArgs', 'TrafficManagerExternalEndpointCustomHeaderArgsDict']]]]] = None,
            enabled: Optional[pulumi.Input[bool]] = None,
            endpoint_location: Optional[pulumi.Input[str]] = None,
            geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            priority: Optional[pulumi.Input[int]] = None,
            profile_id: Optional[pulumi.Input[str]] = None,
            subnets: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointSubnetArgs', 'TrafficManagerExternalEndpointSubnetArgsDict']]]]] = None,
            target: Optional[pulumi.Input[str]] = None,
            weight: Optional[pulumi.Input[int]] = None) -> 'TrafficManagerExternalEndpoint':
        """
        Get an existing TrafficManagerExternalEndpoint 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[bool] always_serve_enabled: If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        :param pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointCustomHeaderArgs', 'TrafficManagerExternalEndpointCustomHeaderArgsDict']]]] custom_headers: One or more `custom_header` blocks as defined below.
        :param pulumi.Input[bool] enabled: Is the endpoint enabled? Defaults to `true`.
        :param pulumi.Input[str] endpoint_location: Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] geo_mappings: A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        :param pulumi.Input[str] name: The name of the External Endpoint. Changing this forces a new resource to be created.
        :param pulumi.Input[int] priority: Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        :param pulumi.Input[str] profile_id: The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        :param pulumi.Input[Sequence[pulumi.Input[Union['TrafficManagerExternalEndpointSubnetArgs', 'TrafficManagerExternalEndpointSubnetArgsDict']]]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] target: The FQDN DNS name of the target.
        :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _TrafficManagerExternalEndpointState.__new__(_TrafficManagerExternalEndpointState)

        __props__.__dict__["always_serve_enabled"] = always_serve_enabled
        __props__.__dict__["custom_headers"] = custom_headers
        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["endpoint_location"] = endpoint_location
        __props__.__dict__["geo_mappings"] = geo_mappings
        __props__.__dict__["name"] = name
        __props__.__dict__["priority"] = priority
        __props__.__dict__["profile_id"] = profile_id
        __props__.__dict__["subnets"] = subnets
        __props__.__dict__["target"] = target
        __props__.__dict__["weight"] = weight
        return TrafficManagerExternalEndpoint(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="alwaysServeEnabled")
    def always_serve_enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
        """
        return pulumi.get(self, "always_serve_enabled")

    @property
    @pulumi.getter(name="customHeaders")
    def custom_headers(self) -> pulumi.Output[Optional[Sequence['outputs.TrafficManagerExternalEndpointCustomHeader']]]:
        """
        One or more `custom_header` blocks as defined below.
        """
        return pulumi.get(self, "custom_headers")

    @property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Is the endpoint enabled? Defaults to `true`.
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="endpointLocation")
    def endpoint_location(self) -> pulumi.Output[str]:
        """
        Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method.
        """
        return pulumi.get(self, "endpoint_location")

    @property
    @pulumi.getter(name="geoMappings")
    def geo_mappings(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
        """
        return pulumi.get(self, "geo_mappings")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the External Endpoint. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Output[int]:
        """
        Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
        """
        return pulumi.get(self, "priority")

    @property
    @pulumi.getter(name="profileId")
    def profile_id(self) -> pulumi.Output[str]:
        """
        The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "profile_id")

    @property
    @pulumi.getter
    def subnets(self) -> pulumi.Output[Optional[Sequence['outputs.TrafficManagerExternalEndpointSubnet']]]:
        """
        One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "subnets")

    @property
    @pulumi.getter
    def target(self) -> pulumi.Output[str]:
        """
        The FQDN DNS name of the target.
        """
        return pulumi.get(self, "target")

    @property
    @pulumi.getter
    def weight(self) -> pulumi.Output[Optional[int]]:
        """
        Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`.
        """
        return pulumi.get(self, "weight")

