RouteArgs

data class RouteArgs(val compressionSettings: Output<CompressionSettingsArgs>? = null, val customDomains: Output<List<ResourceReferenceArgs>>? = null, val enabledState: Output<Either<String, EnabledState>>? = null, val endpointName: Output<String>? = null, val forwardingProtocol: Output<Either<String, ForwardingProtocol>>? = null, val httpsRedirect: Output<Either<String, HttpsRedirect>>? = null, val linkToDefaultDomain: Output<Either<String, LinkToDefaultDomain>>? = null, val originGroup: Output<ResourceReferenceArgs>? = null, val originPath: Output<String>? = null, val patternsToMatch: Output<List<String>>? = null, val profileName: Output<String>? = null, val queryStringCachingBehavior: Output<AfdQueryStringCachingBehavior>? = null, val resourceGroupName: Output<String>? = null, val routeName: Output<String>? = null, val ruleSets: Output<List<ResourceReferenceArgs>>? = null, val supportedProtocols: Output<List<Either<String, AFDEndpointProtocols>>>? = null) : ConvertibleToJava<RouteArgs>

Friendly Routes name mapping to the any Routes or secret related information. API Version: 2020-09-01.

Example Usage

Routes_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var route = new AzureNative.Cdn.Route("route", new()
{
CompressionSettings = new AzureNative.Cdn.Inputs.CompressionSettingsArgs
{
ContentTypesToCompress = new[]
{
"text/html",
"application/octet-stream",
},
IsCompressionEnabled = true,
},
CustomDomains = new[]
{
new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1",
},
},
EnabledState = "Enabled",
EndpointName = "endpoint1",
ForwardingProtocol = "MatchRequest",
HttpsRedirect = "Enabled",
LinkToDefaultDomain = "Enabled",
OriginGroup = new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1",
},
PatternsToMatch = new[]
{
"/*",
},
ProfileName = "profile1",
QueryStringCachingBehavior = AzureNative.Cdn.AfdQueryStringCachingBehavior.IgnoreQueryString,
ResourceGroupName = "RG",
RouteName = "route1",
RuleSets = new[]
{
new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1",
},
},
SupportedProtocols = new[]
{
"Https",
"Http",
},
});
});
package main
import (
cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cdn.NewRoute(ctx, "route", &cdn.RouteArgs{
CompressionSettings: &cdn.CompressionSettingsArgs{
ContentTypesToCompress: pulumi.StringArray{
pulumi.String("text/html"),
pulumi.String("application/octet-stream"),
},
IsCompressionEnabled: pulumi.Bool(true),
},
CustomDomains: []cdn.ResourceReferenceArgs{
{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
},
},
EnabledState: pulumi.String("Enabled"),
EndpointName: pulumi.String("endpoint1"),
ForwardingProtocol: pulumi.String("MatchRequest"),
HttpsRedirect: pulumi.String("Enabled"),
LinkToDefaultDomain: pulumi.String("Enabled"),
OriginGroup: &cdn.ResourceReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
},
PatternsToMatch: pulumi.StringArray{
pulumi.String("/*"),
},
ProfileName: pulumi.String("profile1"),
QueryStringCachingBehavior: cdn.AfdQueryStringCachingBehaviorIgnoreQueryString,
ResourceGroupName: pulumi.String("RG"),
RouteName: pulumi.String("route1"),
RuleSets: []cdn.ResourceReferenceArgs{
{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
},
},
SupportedProtocols: pulumi.StringArray{
pulumi.String("Https"),
pulumi.String("Http"),
},
})
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.cdn.Route;
import com.pulumi.azurenative.cdn.RouteArgs;
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 route = new Route("route", RouteArgs.builder()
.compressionSettings(Map.ofEntries(
Map.entry("contentTypesToCompress",
"text/html",
"application/octet-stream"),
Map.entry("isCompressionEnabled", true)
))
.customDomains(Map.of("id", "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"))
.enabledState("Enabled")
.endpointName("endpoint1")
.forwardingProtocol("MatchRequest")
.httpsRedirect("Enabled")
.linkToDefaultDomain("Enabled")
.originGroup(Map.of("id", "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"))
.patternsToMatch("/*")
.profileName("profile1")
.queryStringCachingBehavior("IgnoreQueryString")
.resourceGroupName("RG")
.routeName("route1")
.ruleSets(Map.of("id", "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"))
.supportedProtocols(
"Https",
"Http")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cdn:Route route1 /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1

Constructors

Link copied to clipboard
constructor(compressionSettings: Output<CompressionSettingsArgs>? = null, customDomains: Output<List<ResourceReferenceArgs>>? = null, enabledState: Output<Either<String, EnabledState>>? = null, endpointName: Output<String>? = null, forwardingProtocol: Output<Either<String, ForwardingProtocol>>? = null, httpsRedirect: Output<Either<String, HttpsRedirect>>? = null, linkToDefaultDomain: Output<Either<String, LinkToDefaultDomain>>? = null, originGroup: Output<ResourceReferenceArgs>? = null, originPath: Output<String>? = null, patternsToMatch: Output<List<String>>? = null, profileName: Output<String>? = null, queryStringCachingBehavior: Output<AfdQueryStringCachingBehavior>? = null, resourceGroupName: Output<String>? = null, routeName: Output<String>? = null, ruleSets: Output<List<ResourceReferenceArgs>>? = null, supportedProtocols: Output<List<Either<String, AFDEndpointProtocols>>>? = null)

Properties

Link copied to clipboard

compression settings.

Link copied to clipboard

Domains referenced by this endpoint.

Link copied to clipboard
val enabledState: Output<Either<String, EnabledState>>? = null

Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

Link copied to clipboard
val endpointName: Output<String>? = null

Name of the endpoint under the profile which is unique globally.

Link copied to clipboard
val forwardingProtocol: Output<Either<String, ForwardingProtocol>>? = null

Protocol this rule will use when forwarding traffic to backends.

Link copied to clipboard
val httpsRedirect: Output<Either<String, HttpsRedirect>>? = null

Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

Link copied to clipboard
val linkToDefaultDomain: Output<Either<String, LinkToDefaultDomain>>? = null

whether this route will be linked to the default endpoint domain.

Link copied to clipboard
val originGroup: Output<ResourceReferenceArgs>? = null

A reference to the origin group.

Link copied to clipboard
val originPath: Output<String>? = null

A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.

Link copied to clipboard
val patternsToMatch: Output<List<String>>? = null

The route patterns of the rule.

Link copied to clipboard
val profileName: Output<String>? = null

Name of the CDN profile which is unique within the resource group.

Link copied to clipboard

Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the Resource group within the Azure subscription.

Link copied to clipboard
val routeName: Output<String>? = null

Name of the routing rule.

Link copied to clipboard
val ruleSets: Output<List<ResourceReferenceArgs>>? = null

rule sets referenced by this endpoint.

Link copied to clipboard
val supportedProtocols: Output<List<Either<String, AFDEndpointProtocols>>>? = null

List of supported protocols for this route. //*/

Functions

Link copied to clipboard
open override fun toJava(): RouteArgs