Endpoints - Create Or Update

Create or update a Traffic Manager endpoint.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}?api-version=2022-04-01

URI Parameters

Name In Required Type Description
endpointName
path True

string

The name of the Traffic Manager endpoint to be created or updated.

endpointType
path True

EndpointType

The type of the Traffic Manager endpoint to be created or updated.

profileName
path True

string

The name of the Traffic Manager profile.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Request Body

Name Type Description
id

string

Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

The name of the resource

properties.alwaysServe

AlwaysServe

If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method.

properties.customHeaders

CustomHeaders[]

List of custom headers.

properties.endpointLocation

string

Specifies the location of the external or nested endpoints when using the 'Performance' traffic routing method.

properties.endpointMonitorStatus

EndpointMonitorStatus

The monitoring status of the endpoint.

properties.endpointStatus

EndpointStatus

The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method.

properties.geoMapping

string[]

The list of countries/regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values.

properties.minChildEndpoints

integer

The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.minChildEndpointsIPv4

integer

The minimum number of IPv4 (DNS record type A) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.minChildEndpointsIPv6

integer

The minimum number of IPv6 (DNS record type AAAA) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.priority

integer

The priority of this endpoint when using the 'Priority' traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value.

properties.subnets

Subnets[]

The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints.

properties.target

string

The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint.

properties.targetResourceId

string

The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'.

properties.weight

integer

The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000.

type

string

The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles.

Responses

Name Type Description
200 OK

Endpoint

The created or updated Endpoint.

201 Created

Endpoint

The created or updated Endpoint.

Other Status Codes

CloudError

Default response. It will be deserialized as per the Error definition.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Endpoint-PUT-External-WithAlwaysServe
Endpoint-PUT-External-WithCustomHeaders
Endpoint-PUT-External-WithGeoMapping
Endpoint-PUT-External-WithLocation
Endpoint-PUT-External-WithSubnetMapping

Endpoint-PUT-External-WithAlwaysServe

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficmanagerprofiles/azsmnet6386/ExternalEndpoints/azsmnet7187?api-version=2022-04-01

{
  "name": "azsmnet7187",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe",
    "alwaysServe": "Enabled"
  }
}

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe",
    "alwaysServe": "Enabled"
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe",
    "alwaysServe": "Enabled"
  }
}

Endpoint-PUT-External-WithCustomHeaders

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficmanagerprofiles/azsmnet6386/ExternalEndpoints/azsmnet7187?api-version=2022-04-01

{
  "name": "azsmnet7187",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe",
    "customHeaders": [
      {
        "name": "header-1",
        "value": "value-1"
      },
      {
        "name": "header-2",
        "value": "value-2"
      }
    ]
  }
}

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe",
    "customHeaders": [
      {
        "name": "header-1",
        "value": "value-1"
      },
      {
        "name": "header-2",
        "value": "value-2"
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe",
    "customHeaders": [
      {
        "name": "header-1",
        "value": "value-1"
      },
      {
        "name": "header-2",
        "value": "value-2"
      }
    ]
  }
}

Endpoint-PUT-External-WithGeoMapping

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager8224/ExternalEndpoints/My%20external%20endpoint?api-version=2022-04-01

{
  "name": "My external endpoint",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "geoMapping": [
      "GEO-AS",
      "GEO-AF"
    ]
  }
}

Endpoint-PUT-External-WithLocation

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficmanagerprofiles/azsmnet6386/ExternalEndpoints/azsmnet7187?api-version=2022-04-01

{
  "name": "azsmnet7187",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "endpointLocation": "North Europe"
  }
}

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe"
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187",
  "name": "azsmnet7187",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "endpointLocation": "North Europe"
  }
}

Endpoint-PUT-External-WithSubnetMapping

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager8224/ExternalEndpoints/My%20external%20endpoint?api-version=2022-04-01

{
  "name": "My external endpoint",
  "type": "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
  "properties": {
    "target": "foobar.contoso.com",
    "endpointStatus": "Enabled",
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager2191/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager8224/externalEndpoints/My external endpoint",
  "name": "My external endpoint",
  "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
  "properties": {
    "endpointStatus": "Enabled",
    "endpointMonitorStatus": "CheckingEndpoint",
    "target": "foobar.contoso.com",
    "weight": 1,
    "priority": 1,
    "subnets": [
      {
        "first": "1.2.3.0",
        "scope": 24
      },
      {
        "first": "25.26.27.28",
        "last": "29.30.31.32"
      }
    ]
  }
}

Definitions

Name Description
AlwaysServe

If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method.

CloudError

An error returned by the Azure Resource Manager

CloudErrorBody

The content of an error returned by the Azure Resource Manager

CustomHeaders

List of custom headers.

Endpoint

Class representing a Traffic Manager endpoint.

EndpointMonitorStatus

The monitoring status of the endpoint.

EndpointStatus

The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method.

EndpointType

The type of the Traffic Manager endpoint to be created or updated.

Subnets

The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints.

AlwaysServe

If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method.

Name Type Description
Disabled

string

Enabled

string

CloudError

An error returned by the Azure Resource Manager

Name Type Description
error

CloudErrorBody

The content of the error.

CloudErrorBody

The content of an error returned by the Azure Resource Manager

Name Type Description
code

string

Error code

details

CloudErrorBody[]

Error details

message

string

Error message

target

string

Error target

CustomHeaders

List of custom headers.

Name Type Description
name

string

Header name.

value

string

Header value.

Endpoint

Class representing a Traffic Manager endpoint.

Name Type Description
id

string

Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}

name

string

The name of the resource

properties.alwaysServe

AlwaysServe

If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method.

properties.customHeaders

CustomHeaders[]

List of custom headers.

properties.endpointLocation

string

Specifies the location of the external or nested endpoints when using the 'Performance' traffic routing method.

properties.endpointMonitorStatus

EndpointMonitorStatus

The monitoring status of the endpoint.

properties.endpointStatus

EndpointStatus

The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method.

properties.geoMapping

string[]

The list of countries/regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values.

properties.minChildEndpoints

integer

The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.minChildEndpointsIPv4

integer

The minimum number of IPv4 (DNS record type A) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.minChildEndpointsIPv6

integer

The minimum number of IPv6 (DNS record type AAAA) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

properties.priority

integer

The priority of this endpoint when using the 'Priority' traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value.

properties.subnets

Subnets[]

The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints.

properties.target

string

The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint.

properties.targetResourceId

string

The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'.

properties.weight

integer

The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000.

type

string

The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles.

EndpointMonitorStatus

The monitoring status of the endpoint.

Name Type Description
CheckingEndpoint

string

Degraded

string

Disabled

string

Inactive

string

Online

string

Stopped

string

Unmonitored

string

EndpointStatus

The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method.

Name Type Description
Disabled

string

Enabled

string

EndpointType

The type of the Traffic Manager endpoint to be created or updated.

Name Type Description
AzureEndpoints

string

ExternalEndpoints

string

NestedEndpoints

string

Subnets

The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints.

Name Type Description
first

string

First address in the subnet.

last

string

Last address in the subnet.

scope

integer

Block size (number of leading bits in the subnet mask).