com.pulumi.azurenative.servicebus.Subscription Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.azurenative.servicebus;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.servicebus.SubscriptionArgs;
import com.pulumi.azurenative.servicebus.outputs.MessageCountDetailsResponse;
import com.pulumi.azurenative.servicebus.outputs.SBClientAffinePropertiesResponse;
import com.pulumi.azurenative.servicebus.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* 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, 2024-01-01.
*
* ## Example Usage
* ### SubscriptionCreate
*
*
* {@code
* 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}
* ```
*
*/
@ResourceType(type="azure-native:servicebus:Subscription")
public class Subscription extends com.pulumi.resources.CustomResource {
/**
* Last time there was a receive request to this subscription.
*
*/
@Export(name="accessedAt", refs={String.class}, tree="[0]")
private Output accessedAt;
/**
* @return Last time there was a receive request to this subscription.
*
*/
public Output accessedAt() {
return this.accessedAt;
}
/**
* ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
*
*/
@Export(name="autoDeleteOnIdle", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> autoDeleteOnIdle;
/**
* @return ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
*
*/
public Output> autoDeleteOnIdle() {
return Codegen.optional(this.autoDeleteOnIdle);
}
/**
* Properties specific to client affine subscriptions.
*
*/
@Export(name="clientAffineProperties", refs={SBClientAffinePropertiesResponse.class}, tree="[0]")
private Output* @Nullable */ SBClientAffinePropertiesResponse> clientAffineProperties;
/**
* @return Properties specific to client affine subscriptions.
*
*/
public Output> clientAffineProperties() {
return Codegen.optional(this.clientAffineProperties);
}
/**
* Message count details
*
*/
@Export(name="countDetails", refs={MessageCountDetailsResponse.class}, tree="[0]")
private Output countDetails;
/**
* @return Message count details
*
*/
public Output countDetails() {
return this.countDetails;
}
/**
* Exact time the message was created.
*
*/
@Export(name="createdAt", refs={String.class}, tree="[0]")
private Output createdAt;
/**
* @return Exact time the message was created.
*
*/
public Output createdAt() {
return this.createdAt;
}
/**
* Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
*
*/
@Export(name="deadLetteringOnFilterEvaluationExceptions", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> deadLetteringOnFilterEvaluationExceptions;
/**
* @return Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
*
*/
public Output> deadLetteringOnFilterEvaluationExceptions() {
return Codegen.optional(this.deadLetteringOnFilterEvaluationExceptions);
}
/**
* Value that indicates whether a subscription has dead letter support when a message expires.
*
*/
@Export(name="deadLetteringOnMessageExpiration", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> deadLetteringOnMessageExpiration;
/**
* @return Value that indicates whether a subscription has dead letter support when a message expires.
*
*/
public Output> deadLetteringOnMessageExpiration() {
return Codegen.optional(this.deadLetteringOnMessageExpiration);
}
/**
* 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.
*
*/
@Export(name="defaultMessageTimeToLive", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> defaultMessageTimeToLive;
/**
* @return 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.
*
*/
public Output> defaultMessageTimeToLive() {
return Codegen.optional(this.defaultMessageTimeToLive);
}
/**
* ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
*
*/
@Export(name="duplicateDetectionHistoryTimeWindow", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> duplicateDetectionHistoryTimeWindow;
/**
* @return ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
*
*/
public Output> duplicateDetectionHistoryTimeWindow() {
return Codegen.optional(this.duplicateDetectionHistoryTimeWindow);
}
/**
* Value that indicates whether server-side batched operations are enabled.
*
*/
@Export(name="enableBatchedOperations", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableBatchedOperations;
/**
* @return Value that indicates whether server-side batched operations are enabled.
*
*/
public Output> enableBatchedOperations() {
return Codegen.optional(this.enableBatchedOperations);
}
/**
* Queue/Topic name to forward the Dead Letter message
*
*/
@Export(name="forwardDeadLetteredMessagesTo", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> forwardDeadLetteredMessagesTo;
/**
* @return Queue/Topic name to forward the Dead Letter message
*
*/
public Output> forwardDeadLetteredMessagesTo() {
return Codegen.optional(this.forwardDeadLetteredMessagesTo);
}
/**
* Queue/Topic name to forward the messages
*
*/
@Export(name="forwardTo", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> forwardTo;
/**
* @return Queue/Topic name to forward the messages
*
*/
public Output> forwardTo() {
return Codegen.optional(this.forwardTo);
}
/**
* Value that indicates whether the subscription has an affinity to the client id.
*
*/
@Export(name="isClientAffine", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> isClientAffine;
/**
* @return Value that indicates whether the subscription has an affinity to the client id.
*
*/
public Output> isClientAffine() {
return Codegen.optional(this.isClientAffine);
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The geo-location where the resource lives
*
*/
public Output location() {
return this.location;
}
/**
* ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
*
*/
@Export(name="lockDuration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> lockDuration;
/**
* @return ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
*
*/
public Output> lockDuration() {
return Codegen.optional(this.lockDuration);
}
/**
* Number of maximum deliveries.
*
*/
@Export(name="maxDeliveryCount", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> maxDeliveryCount;
/**
* @return Number of maximum deliveries.
*
*/
public Output> maxDeliveryCount() {
return Codegen.optional(this.maxDeliveryCount);
}
/**
* Number of messages.
*
*/
@Export(name="messageCount", refs={Double.class}, tree="[0]")
private Output messageCount;
/**
* @return Number of messages.
*
*/
public Output messageCount() {
return this.messageCount;
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* Value indicating if a subscription supports the concept of sessions.
*
*/
@Export(name="requiresSession", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> requiresSession;
/**
* @return Value indicating if a subscription supports the concept of sessions.
*
*/
public Output> requiresSession() {
return Codegen.optional(this.requiresSession);
}
/**
* Enumerates the possible values for the status of a messaging entity.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> status;
/**
* @return Enumerates the possible values for the status of a messaging entity.
*
*/
public Output> status() {
return Codegen.optional(this.status);
}
/**
* The system meta data relating to this resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return The system meta data relating to this resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
*
*/
public Output type() {
return this.type;
}
/**
* The exact time the message was updated.
*
*/
@Export(name="updatedAt", refs={String.class}, tree="[0]")
private Output updatedAt;
/**
* @return The exact time the message was updated.
*
*/
public Output updatedAt() {
return this.updatedAt;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Subscription(java.lang.String name) {
this(name, SubscriptionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Subscription(java.lang.String name, SubscriptionArgs 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 Subscription(java.lang.String name, SubscriptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:servicebus:Subscription", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Subscription(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:servicebus:Subscription", name, null, makeResourceOptions(options, id), false);
}
private static SubscriptionArgs makeArgs(SubscriptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SubscriptionArgs.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())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:servicebus/v20140901:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20150801:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20170401:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20180101preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20210101preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20210601preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20211101:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20220101preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20221001preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20230101preview:Subscription").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20240101:Subscription").build())
))
.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 options Optional settings to control the behavior of the CustomResource.
*/
public static Subscription get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Subscription(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy