This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.
trafficmanager¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.
- class
pulumi_azure.trafficmanager.AwaitableGetGeographicalLocationResult(id=None, name=None)¶
- class
pulumi_azure.trafficmanager.Endpoint(resource_name, opts=None, custom_headers=None, endpoint_location=None, endpoint_status=None, geo_mappings=None, min_child_endpoints=None, name=None, priority=None, profile_name=None, resource_group_name=None, subnets=None, target=None, target_resource_id=None, type=None, weight=None, __props__=None, __name__=None, __opts__=None)¶ Manages a Traffic Manager Endpoint.
import pulumi import pulumi_azure as azure import pulumi_random as random server = random.RandomId("server", keepers={ "azi_id": 1, }, byte_length=8) example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_traffic_manager_profile = azure.network.TrafficManagerProfile("exampleTrafficManagerProfile", resource_group_name=example_resource_group.name, traffic_routing_method="Weighted", dns_config={ "relativeName": server.hex, "ttl": 100, }, monitor_config={ "protocol": "http", "port": 80, "path": "/", "interval_in_seconds": 30, "timeoutInSeconds": 9, "toleratedNumberOfFailures": 3, }, tags={ "environment": "Production", }) example_traffic_manager_endpoint = azure.network.TrafficManagerEndpoint("exampleTrafficManagerEndpoint", resource_group_name=example_resource_group.name, profile_name=example_traffic_manager_profile.name, type="externalEndpoints", weight=100)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
custom_headers (pulumi.Input[list]) – One or more
custom_headerblocks as defined belowendpoint_location (pulumi.Input[str]) – Specifies the Azure location of the Endpoint, this must be specified for Profiles using the
Performancerouting method if the Endpoint is of either typenestedEndpointsorexternalEndpoints. For Endpoints of typeazureEndpointsthe value will be taken from the location of the Azure target resource.endpoint_status (pulumi.Input[str]) – The status of the Endpoint, can be set to either
EnabledorDisabled. Defaults toEnabled.geo_mappings (pulumi.Input[list]) – A list of Geographic Regions used to distribute traffic, such as
WORLD,UKorDE. The same location can’t be specified in two endpoints. See the Geographic Hierarchies documentation for more information.min_child_endpoints (pulumi.Input[float]) – This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type
nestedEndpointsand defaults to1.name (pulumi.Input[str]) – The name of the Traffic Manager endpoint. Changing this forces a new resource to be created.
priority (pulumi.Input[float]) – Specifies the priority of this Endpoint, this must be specified for Profiles using the
Prioritytraffic 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.profile_name (pulumi.Input[str]) – The name of the Traffic Manager Profile to attach create the Traffic Manager endpoint.
resource_group_name (pulumi.Input[str]) – The name of the resource group where the Traffic Manager Profile exists.
subnets (pulumi.Input[list]) – One or more
subnetblocks as defined belowtarget (pulumi.Input[str]) – The FQDN DNS name of the target. This argument must be provided for an endpoint of type
externalEndpoints, for other types it will be computed.target_resource_id (pulumi.Input[str]) – The resource id of an Azure resource to target. This argument must be provided for an endpoint of type
azureEndpointsornestedEndpoints.type (pulumi.Input[str]) – The Endpoint type, must be one of:
- `azureEndpoints` - `externalEndpoints` - `nestedEndpoints`
- Parameters
weight (pulumi.Input[float]) – Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the
Weightedtraffic routing method. Supports values between 1 and 1000.
The custom_headers object supports the following:
name(pulumi.Input[str]) - The name of the custom header.value(pulumi.Input[str]) - The value of custom header. Applicable for Http and Https protocol.
The subnets object supports the following:
first(pulumi.Input[str]) - The First IP….last(pulumi.Input[str]) - The Last IP…scope(pulumi.Input[float]) - The Scope…
custom_headers: pulumi.Output[list] = None¶One or more
custom_headerblocks as defined belowname(str) - The name of the custom header.value(str) - The value of custom header. Applicable for Http and Https protocol.
endpoint_location: pulumi.Output[str] = None¶Specifies the Azure location of the Endpoint, this must be specified for Profiles using the
Performancerouting method if the Endpoint is of either typenestedEndpointsorexternalEndpoints. For Endpoints of typeazureEndpointsthe value will be taken from the location of the Azure target resource.
endpoint_status: pulumi.Output[str] = None¶The status of the Endpoint, can be set to either
EnabledorDisabled. Defaults toEnabled.
geo_mappings: pulumi.Output[list] = None¶A list of Geographic Regions used to distribute traffic, such as
WORLD,UKorDE. The same location can’t be specified in two endpoints. See the Geographic Hierarchies documentation for more information.
min_child_endpoints: pulumi.Output[float] = None¶This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type
nestedEndpointsand defaults to1.
name: pulumi.Output[str] = None¶The name of the Traffic Manager endpoint. Changing this forces a new resource to be created.
priority: pulumi.Output[float] = None¶Specifies the priority of this Endpoint, this must be specified for Profiles using the
Prioritytraffic 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.
profile_name: pulumi.Output[str] = None¶The name of the Traffic Manager Profile to attach create the Traffic Manager endpoint.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group where the Traffic Manager Profile exists.
subnets: pulumi.Output[list] = None¶One or more
subnetblocks as defined belowfirst(str) - The First IP….last(str) - The Last IP…scope(float) - The Scope…
target: pulumi.Output[str] = None¶The FQDN DNS name of the target. This argument must be provided for an endpoint of type
externalEndpoints, for other types it will be computed.
target_resource_id: pulumi.Output[str] = None¶The resource id of an Azure resource to target. This argument must be provided for an endpoint of type
azureEndpointsornestedEndpoints.
type: pulumi.Output[str] = None¶The Endpoint type, must be one of:
azureEndpointsexternalEndpointsnestedEndpoints
weight: pulumi.Output[float] = None¶Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the
Weightedtraffic routing method. Supports values between 1 and 1000.
- static
get(resource_name, id, opts=None, custom_headers=None, endpoint_location=None, endpoint_monitor_status=None, endpoint_status=None, geo_mappings=None, min_child_endpoints=None, name=None, priority=None, profile_name=None, resource_group_name=None, subnets=None, target=None, target_resource_id=None, type=None, weight=None)¶ Get an existing Endpoint resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
custom_headers (pulumi.Input[list]) – One or more
custom_headerblocks as defined belowendpoint_location (pulumi.Input[str]) – Specifies the Azure location of the Endpoint, this must be specified for Profiles using the
Performancerouting method if the Endpoint is of either typenestedEndpointsorexternalEndpoints. For Endpoints of typeazureEndpointsthe value will be taken from the location of the Azure target resource.endpoint_status (pulumi.Input[str]) – The status of the Endpoint, can be set to either
EnabledorDisabled. Defaults toEnabled.geo_mappings (pulumi.Input[list]) –
A list of Geographic Regions used to distribute traffic, such as
WORLD,UKorDE. The same location can’t be specified in two endpoints. See the Geographic Hierarchies documentation for more information.min_child_endpoints (pulumi.Input[float]) – This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type
nestedEndpointsand defaults to1.name (pulumi.Input[str]) – The name of the Traffic Manager endpoint. Changing this forces a new resource to be created.
priority (pulumi.Input[float]) – Specifies the priority of this Endpoint, this must be specified for Profiles using the
Prioritytraffic 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.profile_name (pulumi.Input[str]) – The name of the Traffic Manager Profile to attach create the Traffic Manager endpoint.
resource_group_name (pulumi.Input[str]) – The name of the resource group where the Traffic Manager Profile exists.
subnets (pulumi.Input[list]) – One or more
subnetblocks as defined belowtarget (pulumi.Input[str]) – The FQDN DNS name of the target. This argument must be provided for an endpoint of type
externalEndpoints, for other types it will be computed.target_resource_id (pulumi.Input[str]) – The resource id of an Azure resource to target. This argument must be provided for an endpoint of type
azureEndpointsornestedEndpoints.type (pulumi.Input[str]) – The Endpoint type, must be one of:
- `azureEndpoints` - `externalEndpoints` - `nestedEndpoints`
- Parameters
weight (pulumi.Input[float]) – Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the
Weightedtraffic routing method. Supports values between 1 and 1000.
The custom_headers object supports the following:
name(pulumi.Input[str]) - The name of the custom header.value(pulumi.Input[str]) - The value of custom header. Applicable for Http and Https protocol.
The subnets object supports the following:
first(pulumi.Input[str]) - The First IP….last(pulumi.Input[str]) - The Last IP…scope(pulumi.Input[float]) - The Scope…
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_azure.trafficmanager.GetGeographicalLocationResult(id=None, name=None)¶ A collection of values returned by getGeographicalLocation.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_azure.trafficmanager.Profile(resource_name, opts=None, dns_config=None, monitor_config=None, name=None, profile_status=None, resource_group_name=None, tags=None, traffic_routing_method=None, __props__=None, __name__=None, __opts__=None)¶ Manages a Traffic Manager Profile to which multiple endpoints can be attached.
import pulumi import pulumi_azure as azure import pulumi_random as random server = random.RandomId("server", keepers={ "azi_id": 1, }, byte_length=8) example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_traffic_manager_profile = azure.network.TrafficManagerProfile("exampleTrafficManagerProfile", resource_group_name=example_resource_group.name, traffic_routing_method="Weighted", dns_config={ "relativeName": server.hex, "ttl": 100, }, monitor_config={ "protocol": "http", "port": 80, "path": "/", "interval_in_seconds": 30, "timeoutInSeconds": 9, "toleratedNumberOfFailures": 3, }, tags={ "environment": "Production", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
dns_config (pulumi.Input[dict]) – This block specifies the DNS configuration of the Profile, it supports the fields documented below.
monitor_config (pulumi.Input[dict]) – This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.
name (pulumi.Input[str]) – The name of the Traffic Manager profile. Changing this forces a new resource to be created.
profile_status (pulumi.Input[str]) – The status of the profile, can be set to either
EnabledorDisabled. Defaults toEnabled.resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Traffic Manager profile.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
traffic_routing_method (pulumi.Input[str]) – Specifies the algorithm used to route traffic, possible values are:
The dns_config object supports the following:
relativeName(pulumi.Input[str]) - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.ttl(pulumi.Input[float]) - The TTL value of the Profile used by Local DNS resolvers and clients.
The monitor_config object supports the following:
custom_headers(pulumi.Input[list]) - One or morecustom_headerblocks as defined below.name(pulumi.Input[str]) - The name of the custom header.value(pulumi.Input[str]) - The value of custom header. Applicable for Http and Https protocol.
expectedStatusCodeRanges(pulumi.Input[list]) - A list of status code ranges in the format of100-101.interval_in_seconds(pulumi.Input[float]) - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:30(normal probing) and10(fast probing). The default value is30.path(pulumi.Input[str]) - The path used by the monitoring checks. Required whenprotocolis set toHTTPorHTTPS- cannot be set whenprotocolis set toTCP.port(pulumi.Input[float]) - The port number used by the monitoring checks.protocol(pulumi.Input[str]) - The protocol used by the monitoring checks, supported values areHTTP,HTTPSandTCP.timeoutInSeconds(pulumi.Input[float]) - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. Ifinterval_in_secondsis set to30, thentimeout_in_secondscan be between5and10. The default value is10. Ifinterval_in_secondsis set to10, then valid values are between5and9andtimeout_in_secondsis required.toleratedNumberOfFailures(pulumi.Input[float]) - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between0and9. The default value is3
dns_config: pulumi.Output[dict] = None¶This block specifies the DNS configuration of the Profile, it supports the fields documented below.
relativeName(str) - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.ttl(float) - The TTL value of the Profile used by Local DNS resolvers and clients.
fqdn: pulumi.Output[str] = None¶The FQDN of the created Profile.
monitor_config: pulumi.Output[dict] = None¶This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.
custom_headers(list) - One or morecustom_headerblocks as defined below.name(str) - The name of the custom header.value(str) - The value of custom header. Applicable for Http and Https protocol.
expectedStatusCodeRanges(list) - A list of status code ranges in the format of100-101.interval_in_seconds(float) - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:30(normal probing) and10(fast probing). The default value is30.path(str) - The path used by the monitoring checks. Required whenprotocolis set toHTTPorHTTPS- cannot be set whenprotocolis set toTCP.port(float) - The port number used by the monitoring checks.protocol(str) - The protocol used by the monitoring checks, supported values areHTTP,HTTPSandTCP.timeoutInSeconds(float) - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. Ifinterval_in_secondsis set to30, thentimeout_in_secondscan be between5and10. The default value is10. Ifinterval_in_secondsis set to10, then valid values are between5and9andtimeout_in_secondsis required.toleratedNumberOfFailures(float) - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between0and9. The default value is3
name: pulumi.Output[str] = None¶The name of the Traffic Manager profile. Changing this forces a new resource to be created.
profile_status: pulumi.Output[str] = None¶The status of the profile, can be set to either
EnabledorDisabled. Defaults toEnabled.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which to create the Traffic Manager profile.
A mapping of tags to assign to the resource.
traffic_routing_method: pulumi.Output[str] = None¶Specifies the algorithm used to route traffic, possible values are:
- static
get(resource_name, id, opts=None, dns_config=None, fqdn=None, monitor_config=None, name=None, profile_status=None, resource_group_name=None, tags=None, traffic_routing_method=None)¶ Get an existing Profile resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
dns_config (pulumi.Input[dict]) – This block specifies the DNS configuration of the Profile, it supports the fields documented below.
fqdn (pulumi.Input[str]) – The FQDN of the created Profile.
monitor_config (pulumi.Input[dict]) – This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.
name (pulumi.Input[str]) – The name of the Traffic Manager profile. Changing this forces a new resource to be created.
profile_status (pulumi.Input[str]) – The status of the profile, can be set to either
EnabledorDisabled. Defaults toEnabled.resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Traffic Manager profile.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
traffic_routing_method (pulumi.Input[str]) – Specifies the algorithm used to route traffic, possible values are:
The dns_config object supports the following:
relativeName(pulumi.Input[str]) - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.ttl(pulumi.Input[float]) - The TTL value of the Profile used by Local DNS resolvers and clients.
The monitor_config object supports the following:
custom_headers(pulumi.Input[list]) - One or morecustom_headerblocks as defined below.name(pulumi.Input[str]) - The name of the custom header.value(pulumi.Input[str]) - The value of custom header. Applicable for Http and Https protocol.
expectedStatusCodeRanges(pulumi.Input[list]) - A list of status code ranges in the format of100-101.interval_in_seconds(pulumi.Input[float]) - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:30(normal probing) and10(fast probing). The default value is30.path(pulumi.Input[str]) - The path used by the monitoring checks. Required whenprotocolis set toHTTPorHTTPS- cannot be set whenprotocolis set toTCP.port(pulumi.Input[float]) - The port number used by the monitoring checks.protocol(pulumi.Input[str]) - The protocol used by the monitoring checks, supported values areHTTP,HTTPSandTCP.timeoutInSeconds(pulumi.Input[float]) - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. Ifinterval_in_secondsis set to30, thentimeout_in_secondscan be between5and10. The default value is10. Ifinterval_in_secondsis set to10, then valid values are between5and9andtimeout_in_secondsis required.toleratedNumberOfFailures(pulumi.Input[float]) - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between0and9. The default value is3
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_azure.trafficmanager.get_geographical_location(name=None, opts=None)¶Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy.
import pulumi import pulumi_azure as azure example = azure.network.get_traffic_manager(name="World") pulumi.export("locationCode", example.id)
- Parameters
name (str) – Specifies the name of the Location, for example
World,EuropeorGermany.