All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.cdn.Rule Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.RuleArgs;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleCacheExpirationActionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleCacheKeyQueryStringActionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleClientPortConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleCookiesConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleHostNameConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleHttpVersionConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleIsDeviceConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRulePostArgsConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleQueryStringConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRemoteAddressConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestBodyConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestHeaderActionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestHeaderConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestMethodConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestSchemeConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRequestUriConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleResponseHeaderActionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleRouteConfigurationOverrideActionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleServerPortConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleSocketAddrConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleSslProtocolConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleUrlFileExtensionConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleUrlFileNameConditionResponse;
import com.pulumi.azurenative.cdn.outputs.DeliveryRuleUrlPathConditionResponse;
import com.pulumi.azurenative.cdn.outputs.OriginGroupOverrideActionResponse;
import com.pulumi.azurenative.cdn.outputs.SystemDataResponse;
import com.pulumi.azurenative.cdn.outputs.UrlRedirectActionResponse;
import com.pulumi.azurenative.cdn.outputs.UrlRewriteActionResponse;
import com.pulumi.azurenative.cdn.outputs.UrlSigningActionResponse;
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.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Friendly Rules name mapping to the any Rules 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: 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-09-01.
 * 
 * ## Example Usage
 * ### Rules_Create
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.cdn.Rule;
 * import com.pulumi.azurenative.cdn.RuleArgs;
 * 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 rule = new Rule("rule", RuleArgs.builder()
 *             .actions(DeliveryRuleCacheExpirationActionArgs.builder()
 *                 .name("ModifyResponseHeader")
 *                 .parameters(CacheExpirationActionParametersArgs.builder()
 *                     .headerAction("Overwrite")
 *                     .headerName("X-CDN")
 *                     .typeName("DeliveryRuleHeaderActionParameters")
 *                     .value("MSFT")
 *                     .build())
 *                 .build())
 *             .conditions(DeliveryRuleRequestMethodConditionArgs.builder()
 *                 .name("RequestMethod")
 *                 .parameters(RequestMethodMatchConditionParametersArgs.builder()
 *                     .matchValues("GET")
 *                     .negateCondition(false)
 *                     .operator("Equal")
 *                     .typeName("DeliveryRuleRequestMethodConditionParameters")
 *                     .build())
 *                 .build())
 *             .order(1)
 *             .profileName("profile1")
 *             .resourceGroupName("RG")
 *             .ruleName("rule1")
 *             .ruleSetName("ruleSet1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:cdn:Rule rule1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName} * ``` * */ @ResourceType(type="azure-native:cdn:Rule") public class Rule extends com.pulumi.resources.CustomResource { /** * A list of actions that are executed when all the conditions of a rule are satisfied. * */ @Export(name="actions", refs={List.class,Object.class}, tree="[0,1]") private Output> actions; /** * @return A list of actions that are executed when all the conditions of a rule are satisfied. * */ public Output> actions() { return this.actions; } /** * A list of conditions that must be matched for the actions to be executed * */ @Export(name="conditions", refs={List.class,Object.class}, tree="[0,1]") private Output> conditions; /** * @return A list of conditions that must be matched for the actions to be executed * */ public Output>> conditions() { return Codegen.optional(this.conditions); } @Export(name="deploymentStatus", refs={String.class}, tree="[0]") private Output deploymentStatus; public Output deploymentStatus() { return this.deploymentStatus; } /** * If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. * */ @Export(name="matchProcessingBehavior", refs={String.class}, tree="[0]") private Output matchProcessingBehavior; /** * @return If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. * */ public Output> matchProcessingBehavior() { return Codegen.optional(this.matchProcessingBehavior); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. * */ @Export(name="order", refs={Integer.class}, tree="[0]") private Output order; /** * @return The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. * */ public Output order() { return this.order; } /** * Provisioning status * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning status * */ public Output provisioningState() { return this.provisioningState; } /** * The name of the rule set containing the rule. * */ @Export(name="ruleSetName", refs={String.class}, tree="[0]") private Output ruleSetName; /** * @return The name of the rule set containing the rule. * */ public Output ruleSetName() { return this.ruleSetName; } /** * 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 Rule(java.lang.String name) { this(name, RuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Rule(java.lang.String name, RuleArgs 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 Rule(java.lang.String name, RuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:cdn:Rule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Rule(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:cdn:Rule", name, null, makeResourceOptions(options, id), false); } private static RuleArgs makeArgs(RuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? RuleArgs.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:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20210601:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20220501preview:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20221101preview:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20230501:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20230701preview:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240201:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240501preview:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240601preview:Rule").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240901:Rule").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 Rule get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Rule(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy