PreRule

class PreRule : KotlinCustomResource

PreRulestack rule list Uses Azure REST API version 2025-02-06-preview. In version 2.x of the Azure Native provider, it used API version 2023-09-01. Other available API versions: 2023-09-01, 2023-10-10-preview, 2024-01-19-preview, 2024-02-07-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cloudngfw [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

PreRules_CreateOrUpdate_MaximumSet_Gen

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var preRule = new AzureNative.Cloudngfw.PreRule("preRule", new()
{
ActionType = AzureNative.Cloudngfw.ActionEnum.Allow,
Applications = new[]
{
"app1",
},
AuditComment = "example comment",
Category = new AzureNative.Cloudngfw.Inputs.CategoryArgs
{
Feeds = new[]
{
"feed",
},
UrlCustom = new[]
{
"https://microsoft.com",
},
},
DecryptionRuleType = AzureNative.Cloudngfw.DecryptionRuleTypeEnum.SSLOutboundInspection,
Description = "description of pre rule",
Destination = new AzureNative.Cloudngfw.Inputs.DestinationAddrArgs
{
Cidrs = new[]
{
"1.0.0.1/10",
},
Countries = new[]
{
"India",
},
Feeds = new[]
{
"feed",
},
FqdnLists = new[]
{
"FQDN1",
},
PrefixLists = new[]
{
"PL1",
},
},
EnableLogging = AzureNative.Cloudngfw.StateEnum.DISABLED,
GlobalRulestackName = "lrs1",
InboundInspectionCertificate = "cert1",
NegateDestination = AzureNative.Cloudngfw.BooleanEnum.TRUE,
NegateSource = AzureNative.Cloudngfw.BooleanEnum.TRUE,
Priority = "1",
Protocol = "HTTP",
ProtocolPortList = new[]
{
"80",
},
RuleName = "preRule1",
RuleState = AzureNative.Cloudngfw.StateEnum.DISABLED,
Source = new AzureNative.Cloudngfw.Inputs.SourceAddrArgs
{
Cidrs = new[]
{
"1.0.0.1/10",
},
Countries = new[]
{
"India",
},
Feeds = new[]
{
"feed",
},
PrefixLists = new[]
{
"PL1",
},
},
Tags = new[]
{
new AzureNative.Cloudngfw.Inputs.TagInfoArgs
{
Key = "keyName",
Value = "value",
},
},
});
});
package main
import (
cloudngfw "github.com/pulumi/pulumi-azure-native-sdk/cloudngfw/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudngfw.NewPreRule(ctx, "preRule", &cloudngfw.PreRuleArgs{
ActionType: pulumi.String(cloudngfw.ActionEnumAllow),
Applications: pulumi.StringArray{
pulumi.String("app1"),
},
AuditComment: pulumi.String("example comment"),
Category: &cloudngfw.CategoryArgs{
Feeds: pulumi.StringArray{
pulumi.String("feed"),
},
UrlCustom: pulumi.StringArray{
pulumi.String("https://microsoft.com"),
},
},
DecryptionRuleType: pulumi.String(cloudngfw.DecryptionRuleTypeEnumSSLOutboundInspection),
Description: pulumi.String("description of pre rule"),
Destination: &cloudngfw.DestinationAddrArgs{
Cidrs: pulumi.StringArray{
pulumi.String("1.0.0.1/10"),
},
Countries: pulumi.StringArray{
pulumi.String("India"),
},
Feeds: pulumi.StringArray{
pulumi.String("feed"),
},
FqdnLists: pulumi.StringArray{
pulumi.String("FQDN1"),
},
PrefixLists: pulumi.StringArray{
pulumi.String("PL1"),
},
},
EnableLogging: pulumi.String(cloudngfw.StateEnumDISABLED),
GlobalRulestackName: pulumi.String("lrs1"),
InboundInspectionCertificate: pulumi.String("cert1"),
NegateDestination: pulumi.String(cloudngfw.BooleanEnumTRUE),
NegateSource: pulumi.String(cloudngfw.BooleanEnumTRUE),
Priority: pulumi.String("1"),
Protocol: pulumi.String("HTTP"),
ProtocolPortList: pulumi.StringArray{
pulumi.String("80"),
},
RuleName: pulumi.String("preRule1"),
RuleState: pulumi.String(cloudngfw.StateEnumDISABLED),
Source: &cloudngfw.SourceAddrArgs{
Cidrs: pulumi.StringArray{
pulumi.String("1.0.0.1/10"),
},
Countries: pulumi.StringArray{
pulumi.String("India"),
},
Feeds: pulumi.StringArray{
pulumi.String("feed"),
},
PrefixLists: pulumi.StringArray{
pulumi.String("PL1"),
},
},
Tags: cloudngfw.TagInfoArray{
&cloudngfw.TagInfoArgs{
Key: pulumi.String("keyName"),
Value: pulumi.String("value"),
},
},
})
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.cloudngfw.PreRule;
import com.pulumi.azurenative.cloudngfw.PreRuleArgs;
import com.pulumi.azurenative.cloudngfw.inputs.CategoryArgs;
import com.pulumi.azurenative.cloudngfw.inputs.DestinationAddrArgs;
import com.pulumi.azurenative.cloudngfw.inputs.SourceAddrArgs;
import com.pulumi.azurenative.cloudngfw.inputs.TagInfoArgs;
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 preRule = new PreRule("preRule", PreRuleArgs.builder()
.actionType("Allow")
.applications("app1")
.auditComment("example comment")
.category(CategoryArgs.builder()
.feeds("feed")
.urlCustom("https://microsoft.com")
.build())
.decryptionRuleType("SSLOutboundInspection")
.description("description of pre rule")
.destination(DestinationAddrArgs.builder()
.cidrs("1.0.0.1/10")
.countries("India")
.feeds("feed")
.fqdnLists("FQDN1")
.prefixLists("PL1")
.build())
.enableLogging("DISABLED")
.globalRulestackName("lrs1")
.inboundInspectionCertificate("cert1")
.negateDestination("TRUE")
.negateSource("TRUE")
.priority("1")
.protocol("HTTP")
.protocolPortList("80")
.ruleName("preRule1")
.ruleState("DISABLED")
.source(SourceAddrArgs.builder()
.cidrs("1.0.0.1/10")
.countries("India")
.feeds("feed")
.prefixLists("PL1")
.build())
.tags(TagInfoArgs.builder()
.key("keyName")
.value("value")
.build())
.build());
}
}

PreRules_CreateOrUpdate_MinimumSet_Gen

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var preRule = new AzureNative.Cloudngfw.PreRule("preRule", new()
{
GlobalRulestackName = "lrs1",
Priority = "1",
RuleName = "preRule1",
});
});
package main
import (
cloudngfw "github.com/pulumi/pulumi-azure-native-sdk/cloudngfw/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudngfw.NewPreRule(ctx, "preRule", &cloudngfw.PreRuleArgs{
GlobalRulestackName: pulumi.String("lrs1"),
Priority: pulumi.String("1"),
RuleName: pulumi.String("preRule1"),
})
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.cloudngfw.PreRule;
import com.pulumi.azurenative.cloudngfw.PreRuleArgs;
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 preRule = new PreRule("preRule", PreRuleArgs.builder()
.globalRulestackName("lrs1")
.priority("1")
.ruleName("preRule1")
.build());
}
}

Import

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

$ pulumi import azure-native:cloudngfw:PreRule aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}

Properties

Link copied to clipboard
val actionType: Output<String>?

rule action

Link copied to clipboard
val applications: Output<List<String>>?

array of rule applications

Link copied to clipboard
val auditComment: Output<String>?

rule comment

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

rule category

Link copied to clipboard

enable or disable decryption

Link copied to clipboard
val description: Output<String>?

rule description

Link copied to clipboard

destination address

Link copied to clipboard
val enableLogging: Output<String>?

enable or disable logging

Link copied to clipboard
val etag: Output<String>?

etag info

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

inbound Inspection Certificate

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

cidr should not be 'any'

Link copied to clipboard
val negateSource: Output<String>?

cidr should not be 'any'

Link copied to clipboard
val priority: Output<Int>
Link copied to clipboard
val protocol: Output<String>?

any, application-default, TCP:number, UDP:number

Link copied to clipboard

prot port list

Link copied to clipboard

Provisioning state of the resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ruleName: Output<String>

rule name

Link copied to clipboard
val ruleState: Output<String>?

state of this rule

Link copied to clipboard

source address

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val tags: Output<List<TagInfoResponse>>?

tag for rule

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>