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

com.pulumi.azure.eventhub.Queue Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.eventhub;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.eventhub.QueueArgs;
import com.pulumi.azure.eventhub.inputs.QueueState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a ServiceBus Queue.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.Queue;
 * import com.pulumi.azure.servicebus.QueueArgs;
 * 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("my-servicebus")
 *             .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 exampleQueue = new Queue("exampleQueue", QueueArgs.builder()
 *             .name("tfex_servicebus_queue")
 *             .namespaceId(exampleNamespace.id())
 *             .partitioningEnabled(true)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Service Bus Queue can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:eventhub/queue:Queue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/queues/snqueue1 * ``` * * @deprecated * azure.eventhub.Queue has been deprecated in favor of azure.servicebus.Queue * */ @Deprecated /* azure.eventhub.Queue has been deprecated in favor of azure.servicebus.Queue */ @ResourceType(type="azure:eventhub/queue:Queue") public class Queue extends com.pulumi.resources.CustomResource { /** * The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes. * */ @Export(name="autoDeleteOnIdle", refs={String.class}, tree="[0]") private Output autoDeleteOnIdle; /** * @return The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes. * */ public Output autoDeleteOnIdle() { return this.autoDeleteOnIdle; } /** * Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`. * */ @Export(name="batchedOperationsEnabled", refs={Boolean.class}, tree="[0]") private Output batchedOperationsEnabled; /** * @return Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`. * */ public Output> batchedOperationsEnabled() { return Codegen.optional(this.batchedOperationsEnabled); } /** * Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`. * */ @Export(name="deadLetteringOnMessageExpiration", refs={Boolean.class}, tree="[0]") private Output deadLetteringOnMessageExpiration; /** * @return Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`. * */ public Output> deadLetteringOnMessageExpiration() { return Codegen.optional(this.deadLetteringOnMessageExpiration); } /** * The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself. * */ @Export(name="defaultMessageTtl", refs={String.class}, tree="[0]") private Output defaultMessageTtl; /** * @return The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself. * */ public Output defaultMessageTtl() { return this.defaultMessageTtl; } /** * The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). * */ @Export(name="duplicateDetectionHistoryTimeWindow", refs={String.class}, tree="[0]") private Output duplicateDetectionHistoryTimeWindow; /** * @return The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). * */ public Output> duplicateDetectionHistoryTimeWindow() { return Codegen.optional(this.duplicateDetectionHistoryTimeWindow); } /** * Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`. * * > **NOTE:** Service Bus Premium namespaces do not support Express Entities, so `express_enabled` MUST be set to `false`. * */ @Export(name="expressEnabled", refs={Boolean.class}, tree="[0]") private Output expressEnabled; /** * @return Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`. * * > **NOTE:** Service Bus Premium namespaces do not support Express Entities, so `express_enabled` MUST be set to `false`. * */ public Output> expressEnabled() { return Codegen.optional(this.expressEnabled); } /** * The name of a Queue or Topic to automatically forward dead lettered messages to. * */ @Export(name="forwardDeadLetteredMessagesTo", refs={String.class}, tree="[0]") private Output forwardDeadLetteredMessagesTo; /** * @return The name of a Queue or Topic to automatically forward dead lettered messages to. * */ public Output> forwardDeadLetteredMessagesTo() { return Codegen.optional(this.forwardDeadLetteredMessagesTo); } /** * The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information. * */ @Export(name="forwardTo", refs={String.class}, tree="[0]") private Output forwardTo; /** * @return The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information. * */ public Output> forwardTo() { return Codegen.optional(this.forwardTo); } /** * The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute). * */ @Export(name="lockDuration", refs={String.class}, tree="[0]") private Output lockDuration; /** * @return The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute). * */ public Output> lockDuration() { return Codegen.optional(this.lockDuration); } /** * Integer value which controls when a message is automatically dead lettered. Defaults to `10`. * */ @Export(name="maxDeliveryCount", refs={Integer.class}, tree="[0]") private Output maxDeliveryCount; /** * @return Integer value which controls when a message is automatically dead lettered. Defaults to `10`. * */ public Output> maxDeliveryCount() { return Codegen.optional(this.maxDeliveryCount); } /** * Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). * */ @Export(name="maxMessageSizeInKilobytes", refs={Integer.class}, tree="[0]") private Output maxMessageSizeInKilobytes; /** * @return Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). * */ public Output maxMessageSizeInKilobytes() { return this.maxMessageSizeInKilobytes; } /** * Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). * */ @Export(name="maxSizeInMegabytes", refs={Integer.class}, tree="[0]") private Output maxSizeInMegabytes; /** * @return Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). * */ public Output maxSizeInMegabytes() { return this.maxSizeInMegabytes; } /** * Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created. * */ @Export(name="namespaceId", refs={String.class}, tree="[0]") private Output namespaceId; /** * @return The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created. * */ public Output namespaceId() { return this.namespaceId; } @Export(name="namespaceName", refs={String.class}, tree="[0]") private Output namespaceName; public Output namespaceName() { return this.namespaceName; } /** * Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard. * * > **NOTE:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premium_messaging_partitions` sets to `1`, the namespace is not partitioned. * */ @Export(name="partitioningEnabled", refs={Boolean.class}, tree="[0]") private Output partitioningEnabled; /** * @return Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard. * * > **NOTE:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premium_messaging_partitions` sets to `1`, the namespace is not partitioned. * */ public Output> partitioningEnabled() { return Codegen.optional(this.partitioningEnabled); } /** * Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`. * */ @Export(name="requiresDuplicateDetection", refs={Boolean.class}, tree="[0]") private Output requiresDuplicateDetection; /** * @return Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`. * */ public Output> requiresDuplicateDetection() { return Codegen.optional(this.requiresDuplicateDetection); } /** * Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. * */ @Export(name="requiresSession", refs={Boolean.class}, tree="[0]") private Output requiresSession; /** * @return Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. * */ public Output> requiresSession() { return Codegen.optional(this.requiresSession); } @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; public Output resourceGroupName() { return this.resourceGroupName; } /** * The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. * */ public Output> status() { return Codegen.optional(this.status); } /** * * @param name The _unique_ name of the resulting resource. */ public Queue(java.lang.String name) { this(name, QueueArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Queue(java.lang.String name, QueueArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Queue(java.lang.String name, QueueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:eventhub/queue:Queue", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Queue(java.lang.String name, Output id, @Nullable QueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:eventhub/queue:Queue", name, state, makeResourceOptions(options, id), false); } private static QueueArgs makeArgs(QueueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? QueueArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Queue get(java.lang.String name, Output id, @Nullable QueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Queue(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy