Subscription Args
data class SubscriptionArgs(val autoDeleteOnIdle: Output<String>? = null, val clientScopedSubscription: Output<SubscriptionClientScopedSubscriptionArgs>? = null, val clientScopedSubscriptionEnabled: Output<Boolean>? = null, val deadLetteringOnFilterEvaluationError: Output<Boolean>? = null, val deadLetteringOnMessageExpiration: Output<Boolean>? = null, val defaultMessageTtl: Output<String>? = null, val enableBatchedOperations: Output<Boolean>? = null, val forwardDeadLetteredMessagesTo: Output<String>? = null, val forwardTo: Output<String>? = null, val lockDuration: Output<String>? = null, val maxDeliveryCount: Output<Int>? = null, val name: Output<String>? = null, val requiresSession: Output<Boolean>? = null, val status: Output<String>? = null, val topicId: Output<String>? = null) : ConvertibleToJava<SubscriptionArgs>
Manages a ServiceBus Subscription.
Example Usage
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 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.tags(Map.of("source", "example"))
.build());
var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
.namespaceId(exampleNamespace.id())
.enablePartitioning(true)
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.topicId(exampleTopic.id())
.maxDeliveryCount(1)
.build());
}
}
Content copied to clipboard
Import
Service Bus Subscriptions can be imported using the resource id
, e.g.
$ pulumi import azure:servicebus/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1
Content copied to clipboard
Constructors
Link copied to clipboard
fun SubscriptionArgs(autoDeleteOnIdle: Output<String>? = null, clientScopedSubscription: Output<SubscriptionClientScopedSubscriptionArgs>? = null, clientScopedSubscriptionEnabled: Output<Boolean>? = null, deadLetteringOnFilterEvaluationError: Output<Boolean>? = null, deadLetteringOnMessageExpiration: Output<Boolean>? = null, defaultMessageTtl: Output<String>? = null, enableBatchedOperations: Output<Boolean>? = null, forwardDeadLetteredMessagesTo: Output<String>? = null, forwardTo: Output<String>? = null, lockDuration: Output<String>? = null, maxDeliveryCount: Output<Int>? = null, name: Output<String>? = null, requiresSession: Output<Boolean>? = null, status: Output<String>? = null, topicId: Output<String>? = null)
Functions
Properties
Link copied to clipboard
The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5
minutes or PT5M
.
Link copied to clipboard
The Default message timespan to live as an ISO 8601 duration. 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.
Link copied to clipboard
The lock duration for the subscription as an ISO 8601 duration. The default value is 1
minute or P0DT0H1M0S
. The maximum value is 5
minutes or P0DT0H5M0S
.
Link copied to clipboard