RouteArgs

data class RouteArgs(val cacheConfiguration: Output<AfdRouteCacheConfigurationArgs>? = null, val customDomains: Output<List<ActivatedResourceReferenceArgs>>? = 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 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. Uses Azure REST API version 2024-09-01. In version 2.x of the Azure Native provider, it used API version 2023-05-01. Other available API versions: 2023-05-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cdn [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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()
{
CacheConfiguration = new AzureNative.Cdn.Inputs.AfdRouteCacheConfigurationArgs
{
CompressionSettings = new AzureNative.Cdn.Inputs.CompressionSettingsArgs
{
ContentTypesToCompress = new[]
{
"text/html",
"application/octet-stream",
},
IsCompressionEnabled = true,
},
QueryParameters = "querystring=test",
QueryStringCachingBehavior = AzureNative.Cdn.AfdQueryStringCachingBehavior.IgnoreSpecifiedQueryStrings,
},
CustomDomains = new[]
{
new AzureNative.Cdn.Inputs.ActivatedResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1",
},
},
EnabledState = AzureNative.Cdn.EnabledState.Enabled,
EndpointName = "endpoint1",
ForwardingProtocol = AzureNative.Cdn.ForwardingProtocol.MatchRequest,
HttpsRedirect = AzureNative.Cdn.HttpsRedirect.Enabled,
LinkToDefaultDomain = AzureNative.Cdn.LinkToDefaultDomain.Enabled,
OriginGroup = new AzureNative.Cdn.Inputs.ResourceReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1",
},
PatternsToMatch = new[]
{
"/*",
},
ProfileName = "profile1",
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[]
{
AzureNative.Cdn.AFDEndpointProtocols.Https,
AzureNative.Cdn.AFDEndpointProtocols.Http,
},
});
});
package main
import (
cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cdn.NewRoute(ctx, "route", &cdn.RouteArgs{
CacheConfiguration: &cdn.AfdRouteCacheConfigurationArgs{
CompressionSettings: &cdn.CompressionSettingsArgs{
ContentTypesToCompress: pulumi.StringArray{
pulumi.String("text/html"),
pulumi.String("application/octet-stream"),
},
IsCompressionEnabled: pulumi.Bool(true),
},
QueryParameters: pulumi.String("querystring=test"),
QueryStringCachingBehavior: pulumi.String(cdn.AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings),
},
CustomDomains: cdn.ActivatedResourceReferenceArray{
&cdn.ActivatedResourceReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
},
},
EnabledState: pulumi.String(cdn.EnabledStateEnabled),
EndpointName: pulumi.String("endpoint1"),
ForwardingProtocol: pulumi.String(cdn.ForwardingProtocolMatchRequest),
HttpsRedirect: pulumi.String(cdn.HttpsRedirectEnabled),
LinkToDefaultDomain: pulumi.String(cdn.LinkToDefaultDomainEnabled),
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"),
ResourceGroupName: pulumi.String("RG"),
RouteName: pulumi.String("route1"),
RuleSets: cdn.ResourceReferenceArray{
&cdn.ResourceReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
},
},
SupportedProtocols: pulumi.StringArray{
pulumi.String(cdn.AFDEndpointProtocolsHttps),
pulumi.String(cdn.AFDEndpointProtocolsHttp),
},
})
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 com.pulumi.azurenative.cdn.inputs.AfdRouteCacheConfigurationArgs;
import com.pulumi.azurenative.cdn.inputs.CompressionSettingsArgs;
import com.pulumi.azurenative.cdn.inputs.ActivatedResourceReferenceArgs;
import com.pulumi.azurenative.cdn.inputs.ResourceReferenceArgs;
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()
.cacheConfiguration(AfdRouteCacheConfigurationArgs.builder()
.compressionSettings(CompressionSettingsArgs.builder()
.contentTypesToCompress(
"text/html",
"application/octet-stream")
.isCompressionEnabled(true)
.build())
.queryParameters("querystring=test")
.queryStringCachingBehavior("IgnoreSpecifiedQueryStrings")
.build())
.customDomains(ActivatedResourceReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1")
.build())
.enabledState("Enabled")
.endpointName("endpoint1")
.forwardingProtocol("MatchRequest")
.httpsRedirect("Enabled")
.linkToDefaultDomain("Enabled")
.originGroup(ResourceReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1")
.build())
.patternsToMatch("/*")
.profileName("profile1")
.resourceGroupName("RG")
.routeName("route1")
.ruleSets(ResourceReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1")
.build())
.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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}

Constructors

Link copied to clipboard
constructor(cacheConfiguration: Output<AfdRouteCacheConfigurationArgs>? = null, customDomains: Output<List<ActivatedResourceReferenceArgs>>? = 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, 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

The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.

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 Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

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