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

com.pulumi.azure.eventhub.kotlin.SubscriptionRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.eventhub.kotlin

import com.pulumi.azure.eventhub.SubscriptionRuleArgs.builder
import com.pulumi.azure.eventhub.kotlin.inputs.SubscriptionRuleCorrelationFilterArgs
import com.pulumi.azure.eventhub.kotlin.inputs.SubscriptionRuleCorrelationFilterArgsBuilder
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Manages a ServiceBus Subscription Rule.
 * ## Example Usage
 * ### SQL Filter)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "tfex-servicebus-subscription-rule-sql",
 *     location: "West Europe",
 * });
 * const exampleNamespace = new azure.servicebus.Namespace("example", {
 *     name: "tfex-servicebus-namespace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     tags: {
 *         source: "example",
 *     },
 * });
 * const exampleTopic = new azure.servicebus.Topic("example", {
 *     name: "tfex_servicebus_topic",
 *     namespaceId: exampleNamespace.id,
 *     enablePartitioning: true,
 * });
 * const exampleSubscription = new azure.servicebus.Subscription("example", {
 *     name: "tfex_servicebus_subscription",
 *     topicId: exampleTopic.id,
 *     maxDeliveryCount: 1,
 * });
 * const exampleSubscriptionRule = new azure.servicebus.SubscriptionRule("example", {
 *     name: "tfex_servicebus_rule",
 *     subscriptionId: exampleSubscription.id,
 *     filterType: "SqlFilter",
 *     sqlFilter: "colour = 'red'",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="tfex-servicebus-subscription-rule-sql",
 *     location="West Europe")
 * example_namespace = azure.servicebus.Namespace("example",
 *     name="tfex-servicebus-namespace",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard",
 *     tags={
 *         "source": "example",
 *     })
 * example_topic = azure.servicebus.Topic("example",
 *     name="tfex_servicebus_topic",
 *     namespace_id=example_namespace.id,
 *     enable_partitioning=True)
 * example_subscription = azure.servicebus.Subscription("example",
 *     name="tfex_servicebus_subscription",
 *     topic_id=example_topic.id,
 *     max_delivery_count=1)
 * example_subscription_rule = azure.servicebus.SubscriptionRule("example",
 *     name="tfex_servicebus_rule",
 *     subscription_id=example_subscription.id,
 *     filter_type="SqlFilter",
 *     sql_filter="colour = 'red'")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "tfex-servicebus-subscription-rule-sql",
 *         Location = "West Europe",
 *     });
 *     var exampleNamespace = new Azure.ServiceBus.Namespace("example", new()
 *     {
 *         Name = "tfex-servicebus-namespace",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *         Tags =
 *         {
 *             { "source", "example" },
 *         },
 *     });
 *     var exampleTopic = new Azure.ServiceBus.Topic("example", new()
 *     {
 *         Name = "tfex_servicebus_topic",
 *         NamespaceId = exampleNamespace.Id,
 *         EnablePartitioning = true,
 *     });
 *     var exampleSubscription = new Azure.ServiceBus.Subscription("example", new()
 *     {
 *         Name = "tfex_servicebus_subscription",
 *         TopicId = exampleTopic.Id,
 *         MaxDeliveryCount = 1,
 *     });
 *     var exampleSubscriptionRule = new Azure.ServiceBus.SubscriptionRule("example", new()
 *     {
 *         Name = "tfex_servicebus_rule",
 *         SubscriptionId = exampleSubscription.Id,
 *         FilterType = "SqlFilter",
 *         SqlFilter = "colour = 'red'",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("tfex-servicebus-subscription-rule-sql"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
 * 			Name:              pulumi.String("tfex-servicebus-namespace"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard"),
 * 			Tags: pulumi.StringMap{
 * 				"source": pulumi.String("example"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
 * 			Name:               pulumi.String("tfex_servicebus_topic"),
 * 			NamespaceId:        exampleNamespace.ID(),
 * 			EnablePartitioning: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
 * 			Name:             pulumi.String("tfex_servicebus_subscription"),
 * 			TopicId:          exampleTopic.ID(),
 * 			MaxDeliveryCount: pulumi.Int(1),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
 * 			Name:           pulumi.String("tfex_servicebus_rule"),
 * 			SubscriptionId: exampleSubscription.ID(),
 * 			FilterType:     pulumi.String("SqlFilter"),
 * 			SqlFilter:      pulumi.String("colour = 'red'"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.servicebus.Namespace;
 * import com.pulumi.azure.servicebus.NamespaceArgs;
 * import com.pulumi.azure.servicebus.Topic;
 * import com.pulumi.azure.servicebus.TopicArgs;
 * import com.pulumi.azure.servicebus.Subscription;
 * import com.pulumi.azure.servicebus.SubscriptionArgs;
 * import com.pulumi.azure.servicebus.SubscriptionRule;
 * import com.pulumi.azure.servicebus.SubscriptionRuleArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("tfex-servicebus-subscription-rule-sql")
 *             .location("West Europe")
 *             .build());
 *         var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("tfex-servicebus-namespace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .tags(Map.of("source", "example"))
 *             .build());
 *         var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
 *             .name("tfex_servicebus_topic")
 *             .namespaceId(exampleNamespace.id())
 *             .enablePartitioning(true)
 *             .build());
 *         var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
 *             .name("tfex_servicebus_subscription")
 *             .topicId(exampleTopic.id())
 *             .maxDeliveryCount(1)
 *             .build());
 *         var exampleSubscriptionRule = new SubscriptionRule("exampleSubscriptionRule", SubscriptionRuleArgs.builder()
 *             .name("tfex_servicebus_rule")
 *             .subscriptionId(exampleSubscription.id())
 *             .filterType("SqlFilter")
 *             .sqlFilter("colour = 'red'")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: tfex-servicebus-subscription-rule-sql
 *       location: West Europe
 *   exampleNamespace:
 *     type: azure:servicebus:Namespace
 *     name: example
 *     properties:
 *       name: tfex-servicebus-namespace
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *       tags:
 *         source: example
 *   exampleTopic:
 *     type: azure:servicebus:Topic
 *     name: example
 *     properties:
 *       name: tfex_servicebus_topic
 *       namespaceId: ${exampleNamespace.id}
 *       enablePartitioning: true
 *   exampleSubscription:
 *     type: azure:servicebus:Subscription
 *     name: example
 *     properties:
 *       name: tfex_servicebus_subscription
 *       topicId: ${exampleTopic.id}
 *       maxDeliveryCount: 1
 *   exampleSubscriptionRule:
 *     type: azure:servicebus:SubscriptionRule
 *     name: example
 *     properties:
 *       name: tfex_servicebus_rule
 *       subscriptionId: ${exampleSubscription.id}
 *       filterType: SqlFilter
 *       sqlFilter: colour = 'red'
 * ```
 * 
 * ### Correlation Filter)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "tfex-servicebus-subscription-rule-cor",
 *     location: "West Europe",
 * });
 * const exampleNamespace = new azure.servicebus.Namespace("example", {
 *     name: "tfex-servicebus-namespace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     tags: {
 *         source: "example",
 *     },
 * });
 * const exampleTopic = new azure.servicebus.Topic("example", {
 *     name: "tfex_servicebus_topic",
 *     namespaceId: exampleNamespace.id,
 *     enablePartitioning: true,
 * });
 * const exampleSubscription = new azure.servicebus.Subscription("example", {
 *     name: "tfex_servicebus_subscription",
 *     topicId: exampleTopic.id,
 *     maxDeliveryCount: 1,
 * });
 * const exampleSubscriptionRule = new azure.servicebus.SubscriptionRule("example", {
 *     name: "tfex_servicebus_rule",
 *     subscriptionId: exampleSubscription.id,
 *     filterType: "CorrelationFilter",
 *     correlationFilter: {
 *         correlationId: "high",
 *         label: "red",
 *         properties: {
 *             customProperty: "value",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="tfex-servicebus-subscription-rule-cor",
 *     location="West Europe")
 * example_namespace = azure.servicebus.Namespace("example",
 *     name="tfex-servicebus-namespace",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard",
 *     tags={
 *         "source": "example",
 *     })
 * example_topic = azure.servicebus.Topic("example",
 *     name="tfex_servicebus_topic",
 *     namespace_id=example_namespace.id,
 *     enable_partitioning=True)
 * example_subscription = azure.servicebus.Subscription("example",
 *     name="tfex_servicebus_subscription",
 *     topic_id=example_topic.id,
 *     max_delivery_count=1)
 * example_subscription_rule = azure.servicebus.SubscriptionRule("example",
 *     name="tfex_servicebus_rule",
 *     subscription_id=example_subscription.id,
 *     filter_type="CorrelationFilter",
 *     correlation_filter={
 *         "correlation_id": "high",
 *         "label": "red",
 *         "properties": {
 *             "custom_property": "value",
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "tfex-servicebus-subscription-rule-cor",
 *         Location = "West Europe",
 *     });
 *     var exampleNamespace = new Azure.ServiceBus.Namespace("example", new()
 *     {
 *         Name = "tfex-servicebus-namespace",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *         Tags =
 *         {
 *             { "source", "example" },
 *         },
 *     });
 *     var exampleTopic = new Azure.ServiceBus.Topic("example", new()
 *     {
 *         Name = "tfex_servicebus_topic",
 *         NamespaceId = exampleNamespace.Id,
 *         EnablePartitioning = true,
 *     });
 *     var exampleSubscription = new Azure.ServiceBus.Subscription("example", new()
 *     {
 *         Name = "tfex_servicebus_subscription",
 *         TopicId = exampleTopic.Id,
 *         MaxDeliveryCount = 1,
 *     });
 *     var exampleSubscriptionRule = new Azure.ServiceBus.SubscriptionRule("example", new()
 *     {
 *         Name = "tfex_servicebus_rule",
 *         SubscriptionId = exampleSubscription.Id,
 *         FilterType = "CorrelationFilter",
 *         CorrelationFilter = new Azure.ServiceBus.Inputs.SubscriptionRuleCorrelationFilterArgs
 *         {
 *             CorrelationId = "high",
 *             Label = "red",
 *             Properties =
 *             {
 *                 { "customProperty", "value" },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("tfex-servicebus-subscription-rule-cor"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
 * 			Name:              pulumi.String("tfex-servicebus-namespace"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard"),
 * 			Tags: pulumi.StringMap{
 * 				"source": pulumi.String("example"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
 * 			Name:               pulumi.String("tfex_servicebus_topic"),
 * 			NamespaceId:        exampleNamespace.ID(),
 * 			EnablePartitioning: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
 * 			Name:             pulumi.String("tfex_servicebus_subscription"),
 * 			TopicId:          exampleTopic.ID(),
 * 			MaxDeliveryCount: pulumi.Int(1),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
 * 			Name:           pulumi.String("tfex_servicebus_rule"),
 * 			SubscriptionId: exampleSubscription.ID(),
 * 			FilterType:     pulumi.String("CorrelationFilter"),
 * 			CorrelationFilter: &servicebus.SubscriptionRuleCorrelationFilterArgs{
 * 				CorrelationId: pulumi.String("high"),
 * 				Label:         pulumi.String("red"),
 * 				Properties: pulumi.StringMap{
 * 					"customProperty": 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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.servicebus.Namespace;
 * import com.pulumi.azure.servicebus.NamespaceArgs;
 * import com.pulumi.azure.servicebus.Topic;
 * import com.pulumi.azure.servicebus.TopicArgs;
 * import com.pulumi.azure.servicebus.Subscription;
 * import com.pulumi.azure.servicebus.SubscriptionArgs;
 * import com.pulumi.azure.servicebus.SubscriptionRule;
 * import com.pulumi.azure.servicebus.SubscriptionRuleArgs;
 * import com.pulumi.azure.servicebus.inputs.SubscriptionRuleCorrelationFilterArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("tfex-servicebus-subscription-rule-cor")
 *             .location("West Europe")
 *             .build());
 *         var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("tfex-servicebus-namespace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .tags(Map.of("source", "example"))
 *             .build());
 *         var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
 *             .name("tfex_servicebus_topic")
 *             .namespaceId(exampleNamespace.id())
 *             .enablePartitioning(true)
 *             .build());
 *         var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
 *             .name("tfex_servicebus_subscription")
 *             .topicId(exampleTopic.id())
 *             .maxDeliveryCount(1)
 *             .build());
 *         var exampleSubscriptionRule = new SubscriptionRule("exampleSubscriptionRule", SubscriptionRuleArgs.builder()
 *             .name("tfex_servicebus_rule")
 *             .subscriptionId(exampleSubscription.id())
 *             .filterType("CorrelationFilter")
 *             .correlationFilter(SubscriptionRuleCorrelationFilterArgs.builder()
 *                 .correlationId("high")
 *                 .label("red")
 *                 .properties(Map.of("customProperty", "value"))
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: tfex-servicebus-subscription-rule-cor
 *       location: West Europe
 *   exampleNamespace:
 *     type: azure:servicebus:Namespace
 *     name: example
 *     properties:
 *       name: tfex-servicebus-namespace
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *       tags:
 *         source: example
 *   exampleTopic:
 *     type: azure:servicebus:Topic
 *     name: example
 *     properties:
 *       name: tfex_servicebus_topic
 *       namespaceId: ${exampleNamespace.id}
 *       enablePartitioning: true
 *   exampleSubscription:
 *     type: azure:servicebus:Subscription
 *     name: example
 *     properties:
 *       name: tfex_servicebus_subscription
 *       topicId: ${exampleTopic.id}
 *       maxDeliveryCount: 1
 *   exampleSubscriptionRule:
 *     type: azure:servicebus:SubscriptionRule
 *     name: example
 *     properties:
 *       name: tfex_servicebus_rule
 *       subscriptionId: ${exampleSubscription.id}
 *       filterType: CorrelationFilter
 *       correlationFilter:
 *         correlationId: high
 *         label: red
 *         properties:
 *           customProperty: value
 * ```
 * 
 * ## Import
 * Service Bus Subscription Rule can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:eventhub/subscriptionRule:SubscriptionRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1/rules/sbrule1
 * ```
 * @property action Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
 * @property correlationFilter A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
 * @property filterType Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
 * @property name Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
 * @property sqlFilter Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
 * @property subscriptionId The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
 */
public data class SubscriptionRuleArgs
@Deprecated(
    message = """
azure.eventhub.SubscriptionRule has been deprecated in favor of azure.servicebus.SubscriptionRule
""",
)
constructor(
    public val action: Output? = null,
    public val correlationFilter: Output? = null,
    public val filterType: Output? = null,
    public val name: Output? = null,
    public val sqlFilter: Output? = null,
    public val subscriptionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.eventhub.SubscriptionRuleArgs =
        com.pulumi.azure.eventhub.SubscriptionRuleArgs.builder()
            .action(action?.applyValue({ args0 -> args0 }))
            .correlationFilter(correlationFilter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .filterType(filterType?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .sqlFilter(sqlFilter?.applyValue({ args0 -> args0 }))
            .subscriptionId(subscriptionId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubscriptionRuleArgs].
 */
@PulumiTagMarker
@Deprecated(
    message = """
azure.eventhub.SubscriptionRule has been deprecated in favor of azure.servicebus.SubscriptionRule
""",
)
public class SubscriptionRuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var correlationFilter: Output? = null

    private var filterType: Output? = null

    private var name: Output? = null

    private var sqlFilter: Output? = null

    private var subscriptionId: Output? = null

    /**
     * @param value Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
     */
    @JvmName("jpqoxkmfxdlaytfv")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
     */
    @JvmName("mewvyaatlgbmihjx")
    public suspend fun correlationFilter(`value`: Output) {
        this.correlationFilter = value
    }

    /**
     * @param value Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
     */
    @JvmName("grdafvivwhfojkca")
    public suspend fun filterType(`value`: Output) {
        this.filterType = value
    }

    /**
     * @param value Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
     */
    @JvmName("xxwbcamdbutofitx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
     */
    @JvmName("wvfnicjtuqptiucp")
    public suspend fun sqlFilter(`value`: Output) {
        this.sqlFilter = value
    }

    /**
     * @param value The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
     */
    @JvmName("pbvmfgbtijmpojgm")
    public suspend fun subscriptionId(`value`: Output) {
        this.subscriptionId = value
    }

    /**
     * @param value Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
     */
    @JvmName("uocgxtqrmxmenycm")
    public suspend fun action(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
     */
    @JvmName("hjpelmsojrvffusp")
    public suspend fun correlationFilter(`value`: SubscriptionRuleCorrelationFilterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.correlationFilter = mapped
    }

    /**
     * @param argument A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
     */
    @JvmName("vtwcmtdwlgnijsxj")
    public suspend fun correlationFilter(argument: suspend SubscriptionRuleCorrelationFilterArgsBuilder.() -> Unit) {
        val toBeMapped = SubscriptionRuleCorrelationFilterArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.correlationFilter = mapped
    }

    /**
     * @param value Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
     */
    @JvmName("tvfmgqrerauifdlm")
    public suspend fun filterType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filterType = mapped
    }

    /**
     * @param value Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
     */
    @JvmName("aowgorcdymhvwvkl")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
     */
    @JvmName("urnearkfoytlhonm")
    public suspend fun sqlFilter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlFilter = mapped
    }

    /**
     * @param value The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
     */
    @JvmName("gonauajndmrlbrbt")
    public suspend fun subscriptionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionId = mapped
    }

    internal fun build(): SubscriptionRuleArgs = SubscriptionRuleArgs(
        action = action,
        correlationFilter = correlationFilter,
        filterType = filterType,
        name = name,
        sqlFilter = sqlFilter,
        subscriptionId = subscriptionId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy