com.pulumi.azurenative.servicebus.Topic 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.TopicArgs;
import com.pulumi.azurenative.servicebus.outputs.MessageCountDetailsResponse;
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 topic 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
* ### TopicCreate
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.servicebus.Topic;
* import com.pulumi.azurenative.servicebus.TopicArgs;
* 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 topic = new Topic("topic", TopicArgs.builder()
* .enableExpress(true)
* .namespaceName("sdk-Namespace-1617")
* .resourceGroupName("ArunMonocle")
* .topicName("sdk-Topics-5488")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:servicebus:Topic sdk-Topics-5488 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}
* ```
*
*/
@ResourceType(type="azure-native:servicebus:Topic")
public class Topic extends com.pulumi.resources.CustomResource {
/**
* Last time the message was sent, or a request was received, for this topic.
*
*/
@Export(name="accessedAt", refs={String.class}, tree="[0]")
private Output accessedAt;
/**
* @return Last time the message was sent, or a request was received, for this topic.
*
*/
public Output accessedAt() {
return this.accessedAt;
}
/**
* ISO 8601 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 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
*
*/
public Output> autoDeleteOnIdle() {
return Codegen.optional(this.autoDeleteOnIdle);
}
/**
* 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;
}
/**
* ISO 8601 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 8601 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);
}
/**
* ISO8601 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 ISO8601 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);
}
/**
* Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
*
*/
@Export(name="enableExpress", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableExpress;
/**
* @return Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
*
*/
public Output> enableExpress() {
return Codegen.optional(this.enableExpress);
}
/**
* Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.
*
*/
@Export(name="enablePartitioning", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enablePartitioning;
/**
* @return Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.
*
*/
public Output> enablePartitioning() {
return Codegen.optional(this.enablePartitioning);
}
/**
* 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;
}
/**
* Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.
*
*/
@Export(name="maxMessageSizeInKilobytes", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> maxMessageSizeInKilobytes;
/**
* @return Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.
*
*/
public Output> maxMessageSizeInKilobytes() {
return Codegen.optional(this.maxMessageSizeInKilobytes);
}
/**
* Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.
*
*/
@Export(name="maxSizeInMegabytes", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> maxSizeInMegabytes;
/**
* @return Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.
*
*/
public Output> maxSizeInMegabytes() {
return Codegen.optional(this.maxSizeInMegabytes);
}
/**
* 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 this topic requires duplicate detection.
*
*/
@Export(name="requiresDuplicateDetection", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> requiresDuplicateDetection;
/**
* @return Value indicating if this topic requires duplicate detection.
*
*/
public Output> requiresDuplicateDetection() {
return Codegen.optional(this.requiresDuplicateDetection);
}
/**
* Size of the topic, in bytes.
*
*/
@Export(name="sizeInBytes", refs={Double.class}, tree="[0]")
private Output sizeInBytes;
/**
* @return Size of the topic, in bytes.
*
*/
public Output sizeInBytes() {
return this.sizeInBytes;
}
/**
* 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);
}
/**
* Number of subscriptions.
*
*/
@Export(name="subscriptionCount", refs={Integer.class}, tree="[0]")
private Output subscriptionCount;
/**
* @return Number of subscriptions.
*
*/
public Output subscriptionCount() {
return this.subscriptionCount;
}
/**
* Value that indicates whether the topic supports ordering.
*
*/
@Export(name="supportOrdering", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> supportOrdering;
/**
* @return Value that indicates whether the topic supports ordering.
*
*/
public Output> supportOrdering() {
return Codegen.optional(this.supportOrdering);
}
/**
* 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 Topic(java.lang.String name) {
this(name, TopicArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Topic(java.lang.String name, TopicArgs 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 Topic(java.lang.String name, TopicArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:servicebus:Topic", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Topic(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:servicebus:Topic", name, null, makeResourceOptions(options, id), false);
}
private static TopicArgs makeArgs(TopicArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? TopicArgs.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:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20150801:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20170401:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20180101preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20210101preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20210601preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20211101:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20220101preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20221001preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20230101preview:Topic").build()),
Output.of(Alias.builder().type("azure-native:servicebus/v20240101:Topic").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 Topic get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Topic(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy