All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.cdn.FrontdoorFirewallPolicyArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.cdn;
import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyCustomRuleArgs;
import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class FrontdoorFirewallPolicyArgs extends com.pulumi.resources.ResourceArgs {
public static final FrontdoorFirewallPolicyArgs Empty = new FrontdoorFirewallPolicyArgs();
/**
* If a `custom_rule` block's action type is `block`, this is the response body. The body must be specified in base64 encoding.
*
*/
@Import(name="customBlockResponseBody")
private @Nullable Output customBlockResponseBody;
/**
* @return If a `custom_rule` block's action type is `block`, this is the response body. The body must be specified in base64 encoding.
*
*/
public Optional> customBlockResponseBody() {
return Optional.ofNullable(this.customBlockResponseBody);
}
/**
* If a `custom_rule` block's action type is `block`, this is the response status code. Possible values are `200`, `403`, `405`, `406`, or `429`.
*
*/
@Import(name="customBlockResponseStatusCode")
private @Nullable Output customBlockResponseStatusCode;
/**
* @return If a `custom_rule` block's action type is `block`, this is the response status code. Possible values are `200`, `403`, `405`, `406`, or `429`.
*
*/
public Optional> customBlockResponseStatusCode() {
return Optional.ofNullable(this.customBlockResponseStatusCode);
}
/**
* One or more `custom_rule` blocks as defined below.
*
*/
@Import(name="customRules")
private @Nullable Output> customRules;
/**
* @return One or more `custom_rule` blocks as defined below.
*
*/
public Optional>> customRules() {
return Optional.ofNullable(this.customRules);
}
/**
* Is the Front Door Firewall Policy enabled? Defaults to `true`.
*
*/
@Import(name="enabled")
private @Nullable Output enabled;
/**
* @return Is the Front Door Firewall Policy enabled? Defaults to `true`.
*
*/
public Optional> enabled() {
return Optional.ofNullable(this.enabled);
}
/**
* One or more `managed_rule` blocks as defined below.
*
*/
@Import(name="managedRules")
private @Nullable Output> managedRules;
/**
* @return One or more `managed_rule` blocks as defined below.
*
*/
public Optional>> managedRules() {
return Optional.ofNullable(this.managedRules);
}
/**
* The Front Door Firewall Policy mode. Possible values are `Detection`, `Prevention`.
*
*/
@Import(name="mode", required=true)
private Output mode;
/**
* @return The Front Door Firewall Policy mode. Possible values are `Detection`, `Prevention`.
*
*/
public Output mode() {
return this.mode;
}
/**
* The name of the policy. Changing this forces a new resource to be created.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the policy. Changing this forces a new resource to be created.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* If action type is redirect, this field represents redirect URL for the client.
*
*/
@Import(name="redirectUrl")
private @Nullable Output redirectUrl;
/**
* @return If action type is redirect, this field represents redirect URL for the client.
*
*/
public Optional> redirectUrl() {
return Optional.ofNullable(this.redirectUrl);
}
/**
* Should policy managed rules inspect the request body content? Defaults to `true`.
*
* > **NOTE:** When run in `Detection` mode, the Front Door Firewall Policy doesn't take any other actions other than monitoring and logging the request and its matched Front Door Rule to the Web Application Firewall logs.
*
*/
@Import(name="requestBodyCheckEnabled")
private @Nullable Output requestBodyCheckEnabled;
/**
* @return Should policy managed rules inspect the request body content? Defaults to `true`.
*
* > **NOTE:** When run in `Detection` mode, the Front Door Firewall Policy doesn't take any other actions other than monitoring and logging the request and its matched Front Door Rule to the Web Application Firewall logs.
*
*/
public Optional> requestBodyCheckEnabled() {
return Optional.ofNullable(this.requestBodyCheckEnabled);
}
/**
* The name of the resource group. Changing this forces a new resource to be created.
*
*/
@Import(name="resourceGroupName", required=true)
private Output resourceGroupName;
/**
* @return The name of the resource group. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* The sku's pricing tier for this Front Door Firewall Policy. Possible values include `Standard_AzureFrontDoor` or `Premium_AzureFrontDoor`. Changing this forces a new resource to be created.
*
* > **NOTE:** The `Standard_AzureFrontDoor` Front Door Firewall Policy sku may contain `custom` rules only. The `Premium_AzureFrontDoor` Front Door Firewall Policy skus may contain both `custom` and `managed` rules.
*
*/
@Import(name="skuName", required=true)
private Output skuName;
/**
* @return The sku's pricing tier for this Front Door Firewall Policy. Possible values include `Standard_AzureFrontDoor` or `Premium_AzureFrontDoor`. Changing this forces a new resource to be created.
*
* > **NOTE:** The `Standard_AzureFrontDoor` Front Door Firewall Policy sku may contain `custom` rules only. The `Premium_AzureFrontDoor` Front Door Firewall Policy skus may contain both `custom` and `managed` rules.
*
*/
public Output skuName() {
return this.skuName;
}
/**
* A mapping of tags to assign to the Front Door Firewall Policy.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return A mapping of tags to assign to the Front Door Firewall Policy.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
private FrontdoorFirewallPolicyArgs() {}
private FrontdoorFirewallPolicyArgs(FrontdoorFirewallPolicyArgs $) {
this.customBlockResponseBody = $.customBlockResponseBody;
this.customBlockResponseStatusCode = $.customBlockResponseStatusCode;
this.customRules = $.customRules;
this.enabled = $.enabled;
this.managedRules = $.managedRules;
this.mode = $.mode;
this.name = $.name;
this.redirectUrl = $.redirectUrl;
this.requestBodyCheckEnabled = $.requestBodyCheckEnabled;
this.resourceGroupName = $.resourceGroupName;
this.skuName = $.skuName;
this.tags = $.tags;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(FrontdoorFirewallPolicyArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private FrontdoorFirewallPolicyArgs $;
public Builder() {
$ = new FrontdoorFirewallPolicyArgs();
}
public Builder(FrontdoorFirewallPolicyArgs defaults) {
$ = new FrontdoorFirewallPolicyArgs(Objects.requireNonNull(defaults));
}
/**
* @param customBlockResponseBody If a `custom_rule` block's action type is `block`, this is the response body. The body must be specified in base64 encoding.
*
* @return builder
*
*/
public Builder customBlockResponseBody(@Nullable Output customBlockResponseBody) {
$.customBlockResponseBody = customBlockResponseBody;
return this;
}
/**
* @param customBlockResponseBody If a `custom_rule` block's action type is `block`, this is the response body. The body must be specified in base64 encoding.
*
* @return builder
*
*/
public Builder customBlockResponseBody(String customBlockResponseBody) {
return customBlockResponseBody(Output.of(customBlockResponseBody));
}
/**
* @param customBlockResponseStatusCode If a `custom_rule` block's action type is `block`, this is the response status code. Possible values are `200`, `403`, `405`, `406`, or `429`.
*
* @return builder
*
*/
public Builder customBlockResponseStatusCode(@Nullable Output customBlockResponseStatusCode) {
$.customBlockResponseStatusCode = customBlockResponseStatusCode;
return this;
}
/**
* @param customBlockResponseStatusCode If a `custom_rule` block's action type is `block`, this is the response status code. Possible values are `200`, `403`, `405`, `406`, or `429`.
*
* @return builder
*
*/
public Builder customBlockResponseStatusCode(Integer customBlockResponseStatusCode) {
return customBlockResponseStatusCode(Output.of(customBlockResponseStatusCode));
}
/**
* @param customRules One or more `custom_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder customRules(@Nullable Output> customRules) {
$.customRules = customRules;
return this;
}
/**
* @param customRules One or more `custom_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder customRules(List customRules) {
return customRules(Output.of(customRules));
}
/**
* @param customRules One or more `custom_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder customRules(FrontdoorFirewallPolicyCustomRuleArgs... customRules) {
return customRules(List.of(customRules));
}
/**
* @param enabled Is the Front Door Firewall Policy enabled? Defaults to `true`.
*
* @return builder
*
*/
public Builder enabled(@Nullable Output enabled) {
$.enabled = enabled;
return this;
}
/**
* @param enabled Is the Front Door Firewall Policy enabled? Defaults to `true`.
*
* @return builder
*
*/
public Builder enabled(Boolean enabled) {
return enabled(Output.of(enabled));
}
/**
* @param managedRules One or more `managed_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder managedRules(@Nullable Output> managedRules) {
$.managedRules = managedRules;
return this;
}
/**
* @param managedRules One or more `managed_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder managedRules(List managedRules) {
return managedRules(Output.of(managedRules));
}
/**
* @param managedRules One or more `managed_rule` blocks as defined below.
*
* @return builder
*
*/
public Builder managedRules(FrontdoorFirewallPolicyManagedRuleArgs... managedRules) {
return managedRules(List.of(managedRules));
}
/**
* @param mode The Front Door Firewall Policy mode. Possible values are `Detection`, `Prevention`.
*
* @return builder
*
*/
public Builder mode(Output mode) {
$.mode = mode;
return this;
}
/**
* @param mode The Front Door Firewall Policy mode. Possible values are `Detection`, `Prevention`.
*
* @return builder
*
*/
public Builder mode(String mode) {
return mode(Output.of(mode));
}
/**
* @param name The name of the policy. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the policy. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param redirectUrl If action type is redirect, this field represents redirect URL for the client.
*
* @return builder
*
*/
public Builder redirectUrl(@Nullable Output redirectUrl) {
$.redirectUrl = redirectUrl;
return this;
}
/**
* @param redirectUrl If action type is redirect, this field represents redirect URL for the client.
*
* @return builder
*
*/
public Builder redirectUrl(String redirectUrl) {
return redirectUrl(Output.of(redirectUrl));
}
/**
* @param requestBodyCheckEnabled Should policy managed rules inspect the request body content? Defaults to `true`.
*
* > **NOTE:** When run in `Detection` mode, the Front Door Firewall Policy doesn't take any other actions other than monitoring and logging the request and its matched Front Door Rule to the Web Application Firewall logs.
*
* @return builder
*
*/
public Builder requestBodyCheckEnabled(@Nullable Output requestBodyCheckEnabled) {
$.requestBodyCheckEnabled = requestBodyCheckEnabled;
return this;
}
/**
* @param requestBodyCheckEnabled Should policy managed rules inspect the request body content? Defaults to `true`.
*
* > **NOTE:** When run in `Detection` mode, the Front Door Firewall Policy doesn't take any other actions other than monitoring and logging the request and its matched Front Door Rule to the Web Application Firewall logs.
*
* @return builder
*
*/
public Builder requestBodyCheckEnabled(Boolean requestBodyCheckEnabled) {
return requestBodyCheckEnabled(Output.of(requestBodyCheckEnabled));
}
/**
* @param resourceGroupName The name of the resource group. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(Output resourceGroupName) {
$.resourceGroupName = resourceGroupName;
return this;
}
/**
* @param resourceGroupName The name of the resource group. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(String resourceGroupName) {
return resourceGroupName(Output.of(resourceGroupName));
}
/**
* @param skuName The sku's pricing tier for this Front Door Firewall Policy. Possible values include `Standard_AzureFrontDoor` or `Premium_AzureFrontDoor`. Changing this forces a new resource to be created.
*
* > **NOTE:** The `Standard_AzureFrontDoor` Front Door Firewall Policy sku may contain `custom` rules only. The `Premium_AzureFrontDoor` Front Door Firewall Policy skus may contain both `custom` and `managed` rules.
*
* @return builder
*
*/
public Builder skuName(Output skuName) {
$.skuName = skuName;
return this;
}
/**
* @param skuName The sku's pricing tier for this Front Door Firewall Policy. Possible values include `Standard_AzureFrontDoor` or `Premium_AzureFrontDoor`. Changing this forces a new resource to be created.
*
* > **NOTE:** The `Standard_AzureFrontDoor` Front Door Firewall Policy sku may contain `custom` rules only. The `Premium_AzureFrontDoor` Front Door Firewall Policy skus may contain both `custom` and `managed` rules.
*
* @return builder
*
*/
public Builder skuName(String skuName) {
return skuName(Output.of(skuName));
}
/**
* @param tags A mapping of tags to assign to the Front Door Firewall Policy.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags A mapping of tags to assign to the Front Door Firewall Policy.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
public FrontdoorFirewallPolicyArgs build() {
if ($.mode == null) {
throw new MissingRequiredPropertyException("FrontdoorFirewallPolicyArgs", "mode");
}
if ($.resourceGroupName == null) {
throw new MissingRequiredPropertyException("FrontdoorFirewallPolicyArgs", "resourceGroupName");
}
if ($.skuName == null) {
throw new MissingRequiredPropertyException("FrontdoorFirewallPolicyArgs", "skuName");
}
return $;
}
}
}