Profile Args
Class representing a Traffic Manager profile. Uses Azure REST API version 2022-04-01. In version 1.x of the Azure Native provider, it used API version 2018-08-01. Other available API versions: 2022-04-01-preview.
Example Usage
Profile-PUT-MultiValue
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "azsmnet6386",
Ttl = 35,
},
Location = "global",
MaxReturn = 2,
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
},
ProfileName = "azsmnet6386",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "azuresdkfornetautoresttrafficmanager1421",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.MultiValue,
TrafficViewEnrollmentStatus = AzureNative.Network.TrafficViewEnrollmentStatus.Disabled,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("azsmnet6386"),
Ttl: pulumi.Float64(35),
},
Location: pulumi.String("global"),
MaxReturn: pulumi.Float64(2),
MonitorConfig: &network.MonitorConfigArgs{
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
},
ProfileName: pulumi.String("azsmnet6386"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager1421"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodMultiValue),
TrafficViewEnrollmentStatus: pulumi.String(network.TrafficViewEnrollmentStatusDisabled),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.dnsConfig(DnsConfigArgs.builder()
.relativeName("azsmnet6386")
.ttl(35)
.build())
.location("global")
.maxReturn(2)
.monitorConfig(MonitorConfigArgs.builder()
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.build())
.profileName("azsmnet6386")
.profileStatus("Enabled")
.resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
.trafficRoutingMethod("MultiValue")
.trafficViewEnrollmentStatus("Disabled")
.build());
}
}
Profile-PUT-NoEndpoints
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "azsmnet6386",
Ttl = 35,
},
Location = "global",
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
},
ProfileName = "azsmnet6386",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "azuresdkfornetautoresttrafficmanager1421",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.Performance,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("azsmnet6386"),
Ttl: pulumi.Float64(35),
},
Location: pulumi.String("global"),
MonitorConfig: &network.MonitorConfigArgs{
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
},
ProfileName: pulumi.String("azsmnet6386"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager1421"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodPerformance),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.dnsConfig(DnsConfigArgs.builder()
.relativeName("azsmnet6386")
.ttl(35)
.build())
.location("global")
.monitorConfig(MonitorConfigArgs.builder()
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.build())
.profileName("azsmnet6386")
.profileStatus("Enabled")
.resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
.trafficRoutingMethod("Performance")
.build());
}
}
Profile-PUT-WithAliasing
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
AllowedEndpointRecordTypes = new[]
{
AzureNative.Network.AllowedEndpointRecordType.DomainName,
},
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "azuresdkfornetautoresttrafficmanager6192",
Ttl = 35,
},
Endpoints = new[]
{
new AzureNative.Network.Inputs.EndpointArgs
{
EndpointLocation = "North Europe",
EndpointStatus = AzureNative.Network.EndpointStatus.Enabled,
Name = "My external endpoint",
Target = "foobar.contoso.com",
Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
},
},
Location = "global",
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
IntervalInSeconds = 10,
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
TimeoutInSeconds = 5,
ToleratedNumberOfFailures = 2,
},
ProfileName = "azuresdkfornetautoresttrafficmanager6192",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "azuresdkfornetautoresttrafficmanager2583",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.Performance,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
AllowedEndpointRecordTypes: pulumi.StringArray{
pulumi.String(network.AllowedEndpointRecordTypeDomainName),
},
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
Ttl: pulumi.Float64(35),
},
Endpoints: network.EndpointTypeArray{
&network.EndpointTypeArgs{
EndpointLocation: pulumi.String("North Europe"),
EndpointStatus: pulumi.String(network.EndpointStatusEnabled),
Name: pulumi.String("My external endpoint"),
Target: pulumi.String("foobar.contoso.com"),
Type: pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
},
},
Location: pulumi.String("global"),
MonitorConfig: &network.MonitorConfigArgs{
IntervalInSeconds: pulumi.Float64(10),
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
TimeoutInSeconds: pulumi.Float64(5),
ToleratedNumberOfFailures: pulumi.Float64(2),
},
ProfileName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager2583"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodPerformance),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.EndpointArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.allowedEndpointRecordTypes("DomainName")
.dnsConfig(DnsConfigArgs.builder()
.relativeName("azuresdkfornetautoresttrafficmanager6192")
.ttl(35)
.build())
.endpoints(EndpointArgs.builder()
.endpointLocation("North Europe")
.endpointStatus("Enabled")
.name("My external endpoint")
.target("foobar.contoso.com")
.type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
.build())
.location("global")
.monitorConfig(MonitorConfigArgs.builder()
.intervalInSeconds(10)
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.timeoutInSeconds(5)
.toleratedNumberOfFailures(2)
.build())
.profileName("azuresdkfornetautoresttrafficmanager6192")
.profileStatus("Enabled")
.resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
.trafficRoutingMethod("Performance")
.build());
}
}
Profile-PUT-WithCustomHeaders
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "azuresdkfornetautoresttrafficmanager6192",
Ttl = 35,
},
Endpoints = new[]
{
new AzureNative.Network.Inputs.EndpointArgs
{
CustomHeaders = new[]
{
new AzureNative.Network.Inputs.EndpointPropertiesCustomHeadersArgs
{
Name = "header-2",
Value = "value-2-overridden",
},
},
EndpointLocation = "North Europe",
EndpointStatus = AzureNative.Network.EndpointStatus.Enabled,
Name = "My external endpoint",
Target = "foobar.contoso.com",
Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
},
},
Location = "global",
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
CustomHeaders = new[]
{
new AzureNative.Network.Inputs.MonitorConfigCustomHeadersArgs
{
Name = "header-1",
Value = "value-1",
},
new AzureNative.Network.Inputs.MonitorConfigCustomHeadersArgs
{
Name = "header-2",
Value = "value-2",
},
},
ExpectedStatusCodeRanges = new[]
{
new AzureNative.Network.Inputs.MonitorConfigExpectedStatusCodeRangesArgs
{
Max = 205,
Min = 200,
},
new AzureNative.Network.Inputs.MonitorConfigExpectedStatusCodeRangesArgs
{
Max = 410,
Min = 400,
},
},
IntervalInSeconds = 10,
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
TimeoutInSeconds = 5,
ToleratedNumberOfFailures = 2,
},
ProfileName = "azuresdkfornetautoresttrafficmanager6192",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "azuresdkfornetautoresttrafficmanager2583",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.Performance,
TrafficViewEnrollmentStatus = AzureNative.Network.TrafficViewEnrollmentStatus.Disabled,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
Ttl: pulumi.Float64(35),
},
Endpoints: network.EndpointTypeArray{
&network.EndpointTypeArgs{
CustomHeaders: network.EndpointPropertiesCustomHeadersArray{
&network.EndpointPropertiesCustomHeadersArgs{
Name: pulumi.String("header-2"),
Value: pulumi.String("value-2-overridden"),
},
},
EndpointLocation: pulumi.String("North Europe"),
EndpointStatus: pulumi.String(network.EndpointStatusEnabled),
Name: pulumi.String("My external endpoint"),
Target: pulumi.String("foobar.contoso.com"),
Type: pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
},
},
Location: pulumi.String("global"),
MonitorConfig: &network.MonitorConfigArgs{
CustomHeaders: network.MonitorConfigCustomHeadersArray{
&network.MonitorConfigCustomHeadersArgs{
Name: pulumi.String("header-1"),
Value: pulumi.String("value-1"),
},
&network.MonitorConfigCustomHeadersArgs{
Name: pulumi.String("header-2"),
Value: pulumi.String("value-2"),
},
},
ExpectedStatusCodeRanges: network.MonitorConfigExpectedStatusCodeRangesArray{
&network.MonitorConfigExpectedStatusCodeRangesArgs{
Max: pulumi.Int(205),
Min: pulumi.Int(200),
},
&network.MonitorConfigExpectedStatusCodeRangesArgs{
Max: pulumi.Int(410),
Min: pulumi.Int(400),
},
},
IntervalInSeconds: pulumi.Float64(10),
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
TimeoutInSeconds: pulumi.Float64(5),
ToleratedNumberOfFailures: pulumi.Float64(2),
},
ProfileName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager2583"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodPerformance),
TrafficViewEnrollmentStatus: pulumi.String(network.TrafficViewEnrollmentStatusDisabled),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.EndpointArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.dnsConfig(DnsConfigArgs.builder()
.relativeName("azuresdkfornetautoresttrafficmanager6192")
.ttl(35)
.build())
.endpoints(EndpointArgs.builder()
.customHeaders(EndpointPropertiesCustomHeadersArgs.builder()
.name("header-2")
.value("value-2-overridden")
.build())
.endpointLocation("North Europe")
.endpointStatus("Enabled")
.name("My external endpoint")
.target("foobar.contoso.com")
.type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
.build())
.location("global")
.monitorConfig(MonitorConfigArgs.builder()
.customHeaders(
MonitorConfigCustomHeadersArgs.builder()
.name("header-1")
.value("value-1")
.build(),
MonitorConfigCustomHeadersArgs.builder()
.name("header-2")
.value("value-2")
.build())
.expectedStatusCodeRanges(
MonitorConfigExpectedStatusCodeRangesArgs.builder()
.max(205)
.min(200)
.build(),
MonitorConfigExpectedStatusCodeRangesArgs.builder()
.max(410)
.min(400)
.build())
.intervalInSeconds(10)
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.timeoutInSeconds(5)
.toleratedNumberOfFailures(2)
.build())
.profileName("azuresdkfornetautoresttrafficmanager6192")
.profileStatus("Enabled")
.resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
.trafficRoutingMethod("Performance")
.trafficViewEnrollmentStatus("Disabled")
.build());
}
}
Profile-PUT-WithEndpoints
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "azuresdkfornetautoresttrafficmanager6192",
Ttl = 35,
},
Endpoints = new[]
{
new AzureNative.Network.Inputs.EndpointArgs
{
EndpointLocation = "North Europe",
EndpointStatus = AzureNative.Network.EndpointStatus.Enabled,
Name = "My external endpoint",
Target = "foobar.contoso.com",
Type = "Microsoft.network/TrafficManagerProfiles/ExternalEndpoints",
},
},
Location = "global",
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
IntervalInSeconds = 10,
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
TimeoutInSeconds = 5,
ToleratedNumberOfFailures = 2,
},
ProfileName = "azuresdkfornetautoresttrafficmanager6192",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "azuresdkfornetautoresttrafficmanager2583",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.Performance,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
Ttl: pulumi.Float64(35),
},
Endpoints: network.EndpointTypeArray{
&network.EndpointTypeArgs{
EndpointLocation: pulumi.String("North Europe"),
EndpointStatus: pulumi.String(network.EndpointStatusEnabled),
Name: pulumi.String("My external endpoint"),
Target: pulumi.String("foobar.contoso.com"),
Type: pulumi.String("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"),
},
},
Location: pulumi.String("global"),
MonitorConfig: &network.MonitorConfigArgs{
IntervalInSeconds: pulumi.Float64(10),
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
TimeoutInSeconds: pulumi.Float64(5),
ToleratedNumberOfFailures: pulumi.Float64(2),
},
ProfileName: pulumi.String("azuresdkfornetautoresttrafficmanager6192"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("azuresdkfornetautoresttrafficmanager2583"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodPerformance),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.EndpointArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.dnsConfig(DnsConfigArgs.builder()
.relativeName("azuresdkfornetautoresttrafficmanager6192")
.ttl(35)
.build())
.endpoints(EndpointArgs.builder()
.endpointLocation("North Europe")
.endpointStatus("Enabled")
.name("My external endpoint")
.target("foobar.contoso.com")
.type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
.build())
.location("global")
.monitorConfig(MonitorConfigArgs.builder()
.intervalInSeconds(10)
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.timeoutInSeconds(5)
.toleratedNumberOfFailures(2)
.build())
.profileName("azuresdkfornetautoresttrafficmanager6192")
.profileStatus("Enabled")
.resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
.trafficRoutingMethod("Performance")
.build());
}
}
Profile-PUT-WithNestedEndpoints
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var profile = new AzureNative.Network.Profile("profile", new()
{
DnsConfig = new AzureNative.Network.Inputs.DnsConfigArgs
{
RelativeName = "parentprofile",
Ttl = 35,
},
Endpoints = new[]
{
new AzureNative.Network.Inputs.EndpointArgs
{
EndpointStatus = AzureNative.Network.EndpointStatus.Enabled,
MinChildEndpoints = 2,
MinChildEndpointsIPv4 = 1,
MinChildEndpointsIPv6 = 2,
Name = "MyFirstNestedEndpoint",
Priority = 1,
Target = "firstnestedprofile.tmpreview.watmtest.azure-test.net",
Type = "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
Weight = 1,
},
new AzureNative.Network.Inputs.EndpointArgs
{
EndpointStatus = AzureNative.Network.EndpointStatus.Enabled,
MinChildEndpoints = 2,
MinChildEndpointsIPv4 = 2,
MinChildEndpointsIPv6 = 1,
Name = "MySecondNestedEndpoint",
Priority = 2,
Target = "secondnestedprofile.tmpreview.watmtest.azure-test.net",
Type = "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
Weight = 1,
},
},
Location = "global",
MonitorConfig = new AzureNative.Network.Inputs.MonitorConfigArgs
{
IntervalInSeconds = 10,
Path = "/testpath.aspx",
Port = 80,
Protocol = AzureNative.Network.MonitorProtocol.HTTP,
TimeoutInSeconds = 5,
ToleratedNumberOfFailures = 2,
},
ProfileName = "parentprofile",
ProfileStatus = AzureNative.Network.ProfileStatus.Enabled,
ResourceGroupName = "myresourcegroup",
TrafficRoutingMethod = AzureNative.Network.TrafficRoutingMethod.Priority,
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewProfile(ctx, "profile", &network.ProfileArgs{
DnsConfig: &network.DnsConfigArgs{
RelativeName: pulumi.String("parentprofile"),
Ttl: pulumi.Float64(35),
},
Endpoints: network.EndpointTypeArray{
&network.EndpointTypeArgs{
EndpointStatus: pulumi.String(network.EndpointStatusEnabled),
MinChildEndpoints: pulumi.Float64(2),
MinChildEndpointsIPv4: pulumi.Float64(1),
MinChildEndpointsIPv6: pulumi.Float64(2),
Name: pulumi.String("MyFirstNestedEndpoint"),
Priority: pulumi.Float64(1),
Target: pulumi.String("firstnestedprofile.tmpreview.watmtest.azure-test.net"),
Type: pulumi.String("Microsoft.Network/trafficManagerProfiles/nestedEndpoints"),
Weight: pulumi.Float64(1),
},
&network.EndpointTypeArgs{
EndpointStatus: pulumi.String(network.EndpointStatusEnabled),
MinChildEndpoints: pulumi.Float64(2),
MinChildEndpointsIPv4: pulumi.Float64(2),
MinChildEndpointsIPv6: pulumi.Float64(1),
Name: pulumi.String("MySecondNestedEndpoint"),
Priority: pulumi.Float64(2),
Target: pulumi.String("secondnestedprofile.tmpreview.watmtest.azure-test.net"),
Type: pulumi.String("Microsoft.Network/trafficManagerProfiles/nestedEndpoints"),
Weight: pulumi.Float64(1),
},
},
Location: pulumi.String("global"),
MonitorConfig: &network.MonitorConfigArgs{
IntervalInSeconds: pulumi.Float64(10),
Path: pulumi.String("/testpath.aspx"),
Port: pulumi.Float64(80),
Protocol: pulumi.String(network.MonitorProtocolHTTP),
TimeoutInSeconds: pulumi.Float64(5),
ToleratedNumberOfFailures: pulumi.Float64(2),
},
ProfileName: pulumi.String("parentprofile"),
ProfileStatus: pulumi.String(network.ProfileStatusEnabled),
ResourceGroupName: pulumi.String("myresourcegroup"),
TrafficRoutingMethod: pulumi.String(network.TrafficRoutingMethodPriority),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Profile;
import com.pulumi.azurenative.network.ProfileArgs;
import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
import com.pulumi.azurenative.network.inputs.EndpointArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var profile = new Profile("profile", ProfileArgs.builder()
.dnsConfig(DnsConfigArgs.builder()
.relativeName("parentprofile")
.ttl(35)
.build())
.endpoints(
EndpointArgs.builder()
.endpointStatus("Enabled")
.minChildEndpoints(2)
.minChildEndpointsIPv4(1)
.minChildEndpointsIPv6(2)
.name("MyFirstNestedEndpoint")
.priority(1)
.target("firstnestedprofile.tmpreview.watmtest.azure-test.net")
.type("Microsoft.Network/trafficManagerProfiles/nestedEndpoints")
.weight(1)
.build(),
EndpointArgs.builder()
.endpointStatus("Enabled")
.minChildEndpoints(2)
.minChildEndpointsIPv4(2)
.minChildEndpointsIPv6(1)
.name("MySecondNestedEndpoint")
.priority(2)
.target("secondnestedprofile.tmpreview.watmtest.azure-test.net")
.type("Microsoft.Network/trafficManagerProfiles/nestedEndpoints")
.weight(1)
.build())
.location("global")
.monitorConfig(MonitorConfigArgs.builder()
.intervalInSeconds(10)
.path("/testpath.aspx")
.port(80)
.protocol("HTTP")
.timeoutInSeconds(5)
.toleratedNumberOfFailures(2)
.build())
.profileName("parentprofile")
.profileStatus("Enabled")
.resourceGroupName("myresourcegroup")
.trafficRoutingMethod("Priority")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:Profile parentprofile /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}
Constructors
Properties
The list of allowed endpoint record types.
The DNS settings of the Traffic Manager profile.
The list of endpoints in the Traffic Manager profile. These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
The endpoint monitoring settings of the Traffic Manager profile.
The name of the Traffic Manager profile.
The status of the Traffic Manager profile.
The name of the resource group. The name is case insensitive.
The traffic routing method of the Traffic Manager profile.
Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile.