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

com.pulumi.azurenative.servicebus.kotlin.SubscriptionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.servicebus.kotlin

import com.pulumi.azurenative.servicebus.SubscriptionArgs.builder
import com.pulumi.azurenative.servicebus.kotlin.enums.EntityStatus
import com.pulumi.azurenative.servicebus.kotlin.inputs.SBClientAffinePropertiesArgs
import com.pulumi.azurenative.servicebus.kotlin.inputs.SBClientAffinePropertiesArgsBuilder
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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Description of subscription resource.
 * Azure REST API version: 2022-01-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
 * Other available API versions: 2015-08-01, 2022-10-01-preview, 2023-01-01-preview.
 * ## Example Usage
 * ### SubscriptionCreate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var subscription = new AzureNative.ServiceBus.Subscription("subscription", new()
 *     {
 *         EnableBatchedOperations = true,
 *         NamespaceName = "sdk-Namespace-1349",
 *         ResourceGroupName = "ResourceGroup",
 *         SubscriptionName = "sdk-Subscriptions-2178",
 *         TopicName = "sdk-Topics-8740",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	servicebus "github.com/pulumi/pulumi-azure-native-sdk/servicebus/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := servicebus.NewSubscription(ctx, "subscription", &servicebus.SubscriptionArgs{
 * 			EnableBatchedOperations: pulumi.Bool(true),
 * 			NamespaceName:           pulumi.String("sdk-Namespace-1349"),
 * 			ResourceGroupName:       pulumi.String("ResourceGroup"),
 * 			SubscriptionName:        pulumi.String("sdk-Subscriptions-2178"),
 * 			TopicName:               pulumi.String("sdk-Topics-8740"),
 * 		})
 * 		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.servicebus.Subscription;
 * import com.pulumi.azurenative.servicebus.SubscriptionArgs;
 * 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 subscription = new Subscription("subscription", SubscriptionArgs.builder()
 *             .enableBatchedOperations(true)
 *             .namespaceName("sdk-Namespace-1349")
 *             .resourceGroupName("ResourceGroup")
 *             .subscriptionName("sdk-Subscriptions-2178")
 *             .topicName("sdk-Topics-8740")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:servicebus:Subscription sdk-Subscriptions-2178 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}
 * ```
 * @property autoDeleteOnIdle ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
 * @property clientAffineProperties Properties specific to client affine subscriptions.
 * @property deadLetteringOnFilterEvaluationExceptions Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
 * @property deadLetteringOnMessageExpiration Value that indicates whether a subscription has dead letter support when a message expires.
 * @property defaultMessageTimeToLive ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
 * @property duplicateDetectionHistoryTimeWindow ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
 * @property enableBatchedOperations Value that indicates whether server-side batched operations are enabled.
 * @property forwardDeadLetteredMessagesTo Queue/Topic name to forward the Dead Letter message
 * @property forwardTo Queue/Topic name to forward the messages
 * @property isClientAffine Value that indicates whether the subscription has an affinity to the client id.
 * @property lockDuration ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
 * @property maxDeliveryCount Number of maximum deliveries.
 * @property namespaceName The namespace name
 * @property requiresSession Value indicating if a subscription supports the concept of sessions.
 * @property resourceGroupName Name of the Resource group within the Azure subscription.
 * @property status Enumerates the possible values for the status of a messaging entity.
 * @property subscriptionName The subscription name.
 * @property topicName The topic name.
 */
public data class SubscriptionArgs(
    public val autoDeleteOnIdle: Output? = null,
    public val clientAffineProperties: Output? = null,
    public val deadLetteringOnFilterEvaluationExceptions: Output? = null,
    public val deadLetteringOnMessageExpiration: Output? = null,
    public val defaultMessageTimeToLive: Output? = null,
    public val duplicateDetectionHistoryTimeWindow: Output? = null,
    public val enableBatchedOperations: Output? = null,
    public val forwardDeadLetteredMessagesTo: Output? = null,
    public val forwardTo: Output? = null,
    public val isClientAffine: Output? = null,
    public val lockDuration: Output? = null,
    public val maxDeliveryCount: Output? = null,
    public val namespaceName: Output? = null,
    public val requiresSession: Output? = null,
    public val resourceGroupName: Output? = null,
    public val status: Output? = null,
    public val subscriptionName: Output? = null,
    public val topicName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.servicebus.SubscriptionArgs =
        com.pulumi.azurenative.servicebus.SubscriptionArgs.builder()
            .autoDeleteOnIdle(autoDeleteOnIdle?.applyValue({ args0 -> args0 }))
            .clientAffineProperties(
                clientAffineProperties?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .deadLetteringOnFilterEvaluationExceptions(
                deadLetteringOnFilterEvaluationExceptions?.applyValue({ args0 ->
                    args0
                }),
            )
            .deadLetteringOnMessageExpiration(deadLetteringOnMessageExpiration?.applyValue({ args0 -> args0 }))
            .defaultMessageTimeToLive(defaultMessageTimeToLive?.applyValue({ args0 -> args0 }))
            .duplicateDetectionHistoryTimeWindow(
                duplicateDetectionHistoryTimeWindow?.applyValue({ args0 ->
                    args0
                }),
            )
            .enableBatchedOperations(enableBatchedOperations?.applyValue({ args0 -> args0 }))
            .forwardDeadLetteredMessagesTo(forwardDeadLetteredMessagesTo?.applyValue({ args0 -> args0 }))
            .forwardTo(forwardTo?.applyValue({ args0 -> args0 }))
            .isClientAffine(isClientAffine?.applyValue({ args0 -> args0 }))
            .lockDuration(lockDuration?.applyValue({ args0 -> args0 }))
            .maxDeliveryCount(maxDeliveryCount?.applyValue({ args0 -> args0 }))
            .namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
            .requiresSession(requiresSession?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .status(status?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .subscriptionName(subscriptionName?.applyValue({ args0 -> args0 }))
            .topicName(topicName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubscriptionArgs].
 */
@PulumiTagMarker
public class SubscriptionArgsBuilder internal constructor() {
    private var autoDeleteOnIdle: Output? = null

    private var clientAffineProperties: Output? = null

    private var deadLetteringOnFilterEvaluationExceptions: Output? = null

    private var deadLetteringOnMessageExpiration: Output? = null

    private var defaultMessageTimeToLive: Output? = null

    private var duplicateDetectionHistoryTimeWindow: Output? = null

    private var enableBatchedOperations: Output? = null

    private var forwardDeadLetteredMessagesTo: Output? = null

    private var forwardTo: Output? = null

    private var isClientAffine: Output? = null

    private var lockDuration: Output? = null

    private var maxDeliveryCount: Output? = null

    private var namespaceName: Output? = null

    private var requiresSession: Output? = null

    private var resourceGroupName: Output? = null

    private var status: Output? = null

    private var subscriptionName: Output? = null

    private var topicName: Output? = null

    /**
     * @param value ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
     */
    @JvmName("vjhgntllyinwptec")
    public suspend fun autoDeleteOnIdle(`value`: Output) {
        this.autoDeleteOnIdle = value
    }

    /**
     * @param value Properties specific to client affine subscriptions.
     */
    @JvmName("sedfooshstwjqnhi")
    public suspend fun clientAffineProperties(`value`: Output) {
        this.clientAffineProperties = value
    }

    /**
     * @param value Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
     */
    @JvmName("csgocaxojgyjdhhw")
    public suspend fun deadLetteringOnFilterEvaluationExceptions(`value`: Output) {
        this.deadLetteringOnFilterEvaluationExceptions = value
    }

    /**
     * @param value Value that indicates whether a subscription has dead letter support when a message expires.
     */
    @JvmName("iysdtxslnbgahcmd")
    public suspend fun deadLetteringOnMessageExpiration(`value`: Output) {
        this.deadLetteringOnMessageExpiration = value
    }

    /**
     * @param value ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
     */
    @JvmName("rjpjxmsjixbxbhlv")
    public suspend fun defaultMessageTimeToLive(`value`: Output) {
        this.defaultMessageTimeToLive = value
    }

    /**
     * @param value ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
     */
    @JvmName("ffvqliijwilnqfrm")
    public suspend fun duplicateDetectionHistoryTimeWindow(`value`: Output) {
        this.duplicateDetectionHistoryTimeWindow = value
    }

    /**
     * @param value Value that indicates whether server-side batched operations are enabled.
     */
    @JvmName("gnftxxyrkftyhbjs")
    public suspend fun enableBatchedOperations(`value`: Output) {
        this.enableBatchedOperations = value
    }

    /**
     * @param value Queue/Topic name to forward the Dead Letter message
     */
    @JvmName("cwsvuhollinyfclk")
    public suspend fun forwardDeadLetteredMessagesTo(`value`: Output) {
        this.forwardDeadLetteredMessagesTo = value
    }

    /**
     * @param value Queue/Topic name to forward the messages
     */
    @JvmName("smndaivikgmpxilr")
    public suspend fun forwardTo(`value`: Output) {
        this.forwardTo = value
    }

    /**
     * @param value Value that indicates whether the subscription has an affinity to the client id.
     */
    @JvmName("ghkccjeqsmoweeoo")
    public suspend fun isClientAffine(`value`: Output) {
        this.isClientAffine = value
    }

    /**
     * @param value ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
     */
    @JvmName("gpaawslvktbiybwo")
    public suspend fun lockDuration(`value`: Output) {
        this.lockDuration = value
    }

    /**
     * @param value Number of maximum deliveries.
     */
    @JvmName("fhkfqbbpfwtaqorh")
    public suspend fun maxDeliveryCount(`value`: Output) {
        this.maxDeliveryCount = value
    }

    /**
     * @param value The namespace name
     */
    @JvmName("vrcvjmuuiwwiawit")
    public suspend fun namespaceName(`value`: Output) {
        this.namespaceName = value
    }

    /**
     * @param value Value indicating if a subscription supports the concept of sessions.
     */
    @JvmName("qcvvvdtbxmlrmvsn")
    public suspend fun requiresSession(`value`: Output) {
        this.requiresSession = value
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("wxlumcevwsevupov")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Enumerates the possible values for the status of a messaging entity.
     */
    @JvmName("vsueabpvxmuhxrbo")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value The subscription name.
     */
    @JvmName("rrywmchugxqbjsfd")
    public suspend fun subscriptionName(`value`: Output) {
        this.subscriptionName = value
    }

    /**
     * @param value The topic name.
     */
    @JvmName("sbnjbiifcrspncxr")
    public suspend fun topicName(`value`: Output) {
        this.topicName = value
    }

    /**
     * @param value ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
     */
    @JvmName("mijvegrmrleewjff")
    public suspend fun autoDeleteOnIdle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoDeleteOnIdle = mapped
    }

    /**
     * @param value Properties specific to client affine subscriptions.
     */
    @JvmName("lulvswyxguobcjeg")
    public suspend fun clientAffineProperties(`value`: SBClientAffinePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientAffineProperties = mapped
    }

    /**
     * @param argument Properties specific to client affine subscriptions.
     */
    @JvmName("qciamvrgayxooyis")
    public suspend fun clientAffineProperties(argument: suspend SBClientAffinePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = SBClientAffinePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.clientAffineProperties = mapped
    }

    /**
     * @param value Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
     */
    @JvmName("wubrwktnkagypscc")
    public suspend fun deadLetteringOnFilterEvaluationExceptions(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deadLetteringOnFilterEvaluationExceptions = mapped
    }

    /**
     * @param value Value that indicates whether a subscription has dead letter support when a message expires.
     */
    @JvmName("xbysnbgpcqxnnlbw")
    public suspend fun deadLetteringOnMessageExpiration(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deadLetteringOnMessageExpiration = mapped
    }

    /**
     * @param value ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
     */
    @JvmName("fuqwicleiswsvfmn")
    public suspend fun defaultMessageTimeToLive(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultMessageTimeToLive = mapped
    }

    /**
     * @param value ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
     */
    @JvmName("kortalbblujcbpmn")
    public suspend fun duplicateDetectionHistoryTimeWindow(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.duplicateDetectionHistoryTimeWindow = mapped
    }

    /**
     * @param value Value that indicates whether server-side batched operations are enabled.
     */
    @JvmName("abxvpgktfadkslgm")
    public suspend fun enableBatchedOperations(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableBatchedOperations = mapped
    }

    /**
     * @param value Queue/Topic name to forward the Dead Letter message
     */
    @JvmName("efpsgwvoorksbsix")
    public suspend fun forwardDeadLetteredMessagesTo(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forwardDeadLetteredMessagesTo = mapped
    }

    /**
     * @param value Queue/Topic name to forward the messages
     */
    @JvmName("mngamfxgtfemgykc")
    public suspend fun forwardTo(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forwardTo = mapped
    }

    /**
     * @param value Value that indicates whether the subscription has an affinity to the client id.
     */
    @JvmName("pqdegbsojcemiabd")
    public suspend fun isClientAffine(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isClientAffine = mapped
    }

    /**
     * @param value ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
     */
    @JvmName("rtoimfnfycaxladh")
    public suspend fun lockDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lockDuration = mapped
    }

    /**
     * @param value Number of maximum deliveries.
     */
    @JvmName("adbufglldaglraqp")
    public suspend fun maxDeliveryCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxDeliveryCount = mapped
    }

    /**
     * @param value The namespace name
     */
    @JvmName("abdytiqxedsexndd")
    public suspend fun namespaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespaceName = mapped
    }

    /**
     * @param value Value indicating if a subscription supports the concept of sessions.
     */
    @JvmName("vilmmequspsakxnt")
    public suspend fun requiresSession(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requiresSession = mapped
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("dpebejacvxyxrmcb")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Enumerates the possible values for the status of a messaging entity.
     */
    @JvmName("jwcbiophiojedbkl")
    public suspend fun status(`value`: EntityStatus?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value The subscription name.
     */
    @JvmName("nsovgpbmruxctjfu")
    public suspend fun subscriptionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionName = mapped
    }

    /**
     * @param value The topic name.
     */
    @JvmName("ajjmexymlulerbdx")
    public suspend fun topicName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topicName = mapped
    }

    internal fun build(): SubscriptionArgs = SubscriptionArgs(
        autoDeleteOnIdle = autoDeleteOnIdle,
        clientAffineProperties = clientAffineProperties,
        deadLetteringOnFilterEvaluationExceptions = deadLetteringOnFilterEvaluationExceptions,
        deadLetteringOnMessageExpiration = deadLetteringOnMessageExpiration,
        defaultMessageTimeToLive = defaultMessageTimeToLive,
        duplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow,
        enableBatchedOperations = enableBatchedOperations,
        forwardDeadLetteredMessagesTo = forwardDeadLetteredMessagesTo,
        forwardTo = forwardTo,
        isClientAffine = isClientAffine,
        lockDuration = lockDuration,
        maxDeliveryCount = maxDeliveryCount,
        namespaceName = namespaceName,
        requiresSession = requiresSession,
        resourceGroupName = resourceGroupName,
        status = status,
        subscriptionName = subscriptionName,
        topicName = topicName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy