![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.cloudngfw.kotlin.PreRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.cloudngfw.kotlin
import com.pulumi.azurenative.cloudngfw.PreRuleArgs.builder
import com.pulumi.azurenative.cloudngfw.kotlin.enums.ActionEnum
import com.pulumi.azurenative.cloudngfw.kotlin.enums.BooleanEnum
import com.pulumi.azurenative.cloudngfw.kotlin.enums.DecryptionRuleTypeEnum
import com.pulumi.azurenative.cloudngfw.kotlin.enums.StateEnum
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.CategoryArgs
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.CategoryArgsBuilder
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.DestinationAddrArgs
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.DestinationAddrArgsBuilder
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.SourceAddrArgs
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.SourceAddrArgsBuilder
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.TagInfoArgs
import com.pulumi.azurenative.cloudngfw.kotlin.inputs.TagInfoArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* PreRulestack rule list
* Azure REST API version: 2023-09-01.
* Other available API versions: 2022-08-29, 2022-08-29-preview, 2023-09-01-preview, 2023-10-10-preview, 2024-01-19-preview, 2024-02-07-preview.
* ## Example Usage
* ### PreRules_CreateOrUpdate_MaximumSet_Gen
* ```csharp
* 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",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* cloudngfw "github.com/pulumi/pulumi-azure-native-sdk/cloudngfw/v2"
* "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
* })
* }
* ```
* ```java
* 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
* ```csharp
* 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",
* });
* });
* ```
* ```go
* package main
* import (
* cloudngfw "github.com/pulumi/pulumi-azure-native-sdk/cloudngfw/v2"
* "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
* })
* }
* ```
* ```java
* 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.
* ```sh
* $ pulumi import azure-native:cloudngfw:PreRule aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}
* ```
* @property actionType rule action
* @property applications array of rule applications
* @property auditComment rule comment
* @property category rule category
* @property decryptionRuleType enable or disable decryption
* @property description rule description
* @property destination destination address
* @property enableLogging enable or disable logging
* @property globalRulestackName GlobalRulestack resource name
* @property inboundInspectionCertificate inbound Inspection Certificate
* @property negateDestination cidr should not be 'any'
* @property negateSource cidr should not be 'any'
* @property priority Pre Rule priority
* @property protocol any, application-default, TCP:number, UDP:number
* @property protocolPortList prot port list
* @property ruleName rule name
* @property ruleState state of this rule
* @property source source address
* @property tags tag for rule
*/
public data class PreRuleArgs(
public val actionType: Output>? = null,
public val applications: Output>? = null,
public val auditComment: Output? = null,
public val category: Output? = null,
public val decryptionRuleType: Output>? = null,
public val description: Output? = null,
public val destination: Output? = null,
public val enableLogging: Output>? = null,
public val globalRulestackName: Output? = null,
public val inboundInspectionCertificate: Output? = null,
public val negateDestination: Output>? = null,
public val negateSource: Output>? = null,
public val priority: Output? = null,
public val protocol: Output? = null,
public val protocolPortList: Output>? = null,
public val ruleName: Output? = null,
public val ruleState: Output>? = null,
public val source: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.cloudngfw.PreRuleArgs =
com.pulumi.azurenative.cloudngfw.PreRuleArgs.builder()
.actionType(
actionType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.applications(applications?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.auditComment(auditComment?.applyValue({ args0 -> args0 }))
.category(category?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.decryptionRuleType(
decryptionRuleType?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.description(description?.applyValue({ args0 -> args0 }))
.destination(destination?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.enableLogging(
enableLogging?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.globalRulestackName(globalRulestackName?.applyValue({ args0 -> args0 }))
.inboundInspectionCertificate(inboundInspectionCertificate?.applyValue({ args0 -> args0 }))
.negateDestination(
negateDestination?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.negateSource(
negateSource?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.priority(priority?.applyValue({ args0 -> args0 }))
.protocol(protocol?.applyValue({ args0 -> args0 }))
.protocolPortList(protocolPortList?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.ruleName(ruleName?.applyValue({ args0 -> args0 }))
.ruleState(
ruleState?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [PreRuleArgs].
*/
@PulumiTagMarker
public class PreRuleArgsBuilder internal constructor() {
private var actionType: Output>? = null
private var applications: Output>? = null
private var auditComment: Output? = null
private var category: Output? = null
private var decryptionRuleType: Output>? = null
private var description: Output? = null
private var destination: Output? = null
private var enableLogging: Output>? = null
private var globalRulestackName: Output? = null
private var inboundInspectionCertificate: Output? = null
private var negateDestination: Output>? = null
private var negateSource: Output>? = null
private var priority: Output? = null
private var protocol: Output? = null
private var protocolPortList: Output>? = null
private var ruleName: Output? = null
private var ruleState: Output>? = null
private var source: Output? = null
private var tags: Output>? = null
/**
* @param value rule action
*/
@JvmName("nqrodbhtmfjptorr")
public suspend fun actionType(`value`: Output>) {
this.actionType = value
}
/**
* @param value array of rule applications
*/
@JvmName("intavolplhownblm")
public suspend fun applications(`value`: Output>) {
this.applications = value
}
@JvmName("dteytheqrbegkogq")
public suspend fun applications(vararg values: Output) {
this.applications = Output.all(values.asList())
}
/**
* @param values array of rule applications
*/
@JvmName("scokgrnpqowoulpy")
public suspend fun applications(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy