
com.pulumi.azurenative.cdn.Route Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.cdn;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.cdn.RouteArgs;
import com.pulumi.azurenative.cdn.outputs.ActivatedResourceReferenceResponse;
import com.pulumi.azurenative.cdn.outputs.AfdRouteCacheConfigurationResponse;
import com.pulumi.azurenative.cdn.outputs.ResourceReferenceResponse;
import com.pulumi.azurenative.cdn.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Friendly Routes name mapping to the any Routes or secret related information.
* Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-09-01.
*
* Other available API versions: 2020-09-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-09-01.
*
* ## Example Usage
* ### Routes_Create
*
*
* {@code
* 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.
*
* ```sh
* $ pulumi import azure-native:cdn:Route route1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}
* ```
*
*/
@ResourceType(type="azure-native:cdn:Route")
public class Route extends com.pulumi.resources.CustomResource {
/**
* The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.
*
*/
@Export(name="cacheConfiguration", refs={AfdRouteCacheConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ AfdRouteCacheConfigurationResponse> cacheConfiguration;
/**
* @return The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.
*
*/
public Output> cacheConfiguration() {
return Codegen.optional(this.cacheConfiguration);
}
/**
* Domains referenced by this endpoint.
*
*/
@Export(name="customDomains", refs={List.class,ActivatedResourceReferenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> customDomains;
/**
* @return Domains referenced by this endpoint.
*
*/
public Output>> customDomains() {
return Codegen.optional(this.customDomains);
}
@Export(name="deploymentStatus", refs={String.class}, tree="[0]")
private Output deploymentStatus;
public Output deploymentStatus() {
return this.deploymentStatus;
}
/**
* Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
*
*/
@Export(name="enabledState", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> enabledState;
/**
* @return Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
*
*/
public Output> enabledState() {
return Codegen.optional(this.enabledState);
}
/**
* The name of the endpoint which holds the route.
*
*/
@Export(name="endpointName", refs={String.class}, tree="[0]")
private Output endpointName;
/**
* @return The name of the endpoint which holds the route.
*
*/
public Output endpointName() {
return this.endpointName;
}
/**
* Protocol this rule will use when forwarding traffic to backends.
*
*/
@Export(name="forwardingProtocol", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> forwardingProtocol;
/**
* @return Protocol this rule will use when forwarding traffic to backends.
*
*/
public Output> forwardingProtocol() {
return Codegen.optional(this.forwardingProtocol);
}
/**
* 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.
*
*/
@Export(name="httpsRedirect", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> httpsRedirect;
/**
* @return 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.
*
*/
public Output> httpsRedirect() {
return Codegen.optional(this.httpsRedirect);
}
/**
* whether this route will be linked to the default endpoint domain.
*
*/
@Export(name="linkToDefaultDomain", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> linkToDefaultDomain;
/**
* @return whether this route will be linked to the default endpoint domain.
*
*/
public Output> linkToDefaultDomain() {
return Codegen.optional(this.linkToDefaultDomain);
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* A reference to the origin group.
*
*/
@Export(name="originGroup", refs={ResourceReferenceResponse.class}, tree="[0]")
private Output originGroup;
/**
* @return A reference to the origin group.
*
*/
public Output originGroup() {
return this.originGroup;
}
/**
* A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
*
*/
@Export(name="originPath", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> originPath;
/**
* @return A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
*
*/
public Output> originPath() {
return Codegen.optional(this.originPath);
}
/**
* The route patterns of the rule.
*
*/
@Export(name="patternsToMatch", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> patternsToMatch;
/**
* @return The route patterns of the rule.
*
*/
public Output>> patternsToMatch() {
return Codegen.optional(this.patternsToMatch);
}
/**
* Provisioning status
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Provisioning status
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* rule sets referenced by this endpoint.
*
*/
@Export(name="ruleSets", refs={List.class,ResourceReferenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> ruleSets;
/**
* @return rule sets referenced by this endpoint.
*
*/
public Output>> ruleSets() {
return Codegen.optional(this.ruleSets);
}
/**
* List of supported protocols for this route.
*
*/
@Export(name="supportedProtocols", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> supportedProtocols;
/**
* @return List of supported protocols for this route.
*
*/
public Output>> supportedProtocols() {
return Codegen.optional(this.supportedProtocols);
}
/**
* Read only system data
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Read only system data
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Route(java.lang.String name) {
this(name, RouteArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Route(java.lang.String name, RouteArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Route(java.lang.String name, RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:cdn:Route", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Route(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:cdn:Route", name, null, makeResourceOptions(options, id), false);
}
private static RouteArgs makeArgs(RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? RouteArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:cdn/v20200901:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20210601:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20220501preview:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20221101preview:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20230501:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20230701preview:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240201:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240501preview:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240601preview:Route").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240901:Route").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Route get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Route(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy