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

com.pulumi.azure.servicebus.Namespace Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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.servicebus;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.servicebus.NamespaceArgs;
import com.pulumi.azure.servicebus.inputs.NamespaceState;
import com.pulumi.azure.servicebus.outputs.NamespaceCustomerManagedKey;
import com.pulumi.azure.servicebus.outputs.NamespaceIdentity;
import com.pulumi.azure.servicebus.outputs.NamespaceNetworkRuleSet;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a ServiceBus Namespace.
 * 
 * ## 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 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Service Bus Namespace can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:servicebus/namespace:Namespace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1 * ``` * */ @ResourceType(type="azure:servicebus/namespace:Namespace") public class Namespace extends com.pulumi.resources.CustomResource { /** * Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only. * */ @Export(name="capacity", refs={Integer.class}, tree="[0]") private Output capacity; /** * @return Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only. * */ public Output> capacity() { return Codegen.optional(this.capacity); } /** * An `customer_managed_key` block as defined below. * */ @Export(name="customerManagedKey", refs={NamespaceCustomerManagedKey.class}, tree="[0]") private Output customerManagedKey; /** * @return An `customer_managed_key` block as defined below. * */ public Output> customerManagedKey() { return Codegen.optional(this.customerManagedKey); } /** * The primary connection string for the authorization rule `RootManageSharedAccessKey`. * */ @Export(name="defaultPrimaryConnectionString", refs={String.class}, tree="[0]") private Output defaultPrimaryConnectionString; /** * @return The primary connection string for the authorization rule `RootManageSharedAccessKey`. * */ public Output defaultPrimaryConnectionString() { return this.defaultPrimaryConnectionString; } /** * The primary access key for the authorization rule `RootManageSharedAccessKey`. * */ @Export(name="defaultPrimaryKey", refs={String.class}, tree="[0]") private Output defaultPrimaryKey; /** * @return The primary access key for the authorization rule `RootManageSharedAccessKey`. * */ public Output defaultPrimaryKey() { return this.defaultPrimaryKey; } /** * The secondary connection string for the authorization rule `RootManageSharedAccessKey`. * */ @Export(name="defaultSecondaryConnectionString", refs={String.class}, tree="[0]") private Output defaultSecondaryConnectionString; /** * @return The secondary connection string for the authorization rule `RootManageSharedAccessKey`. * */ public Output defaultSecondaryConnectionString() { return this.defaultSecondaryConnectionString; } /** * The secondary access key for the authorization rule `RootManageSharedAccessKey`. * */ @Export(name="defaultSecondaryKey", refs={String.class}, tree="[0]") private Output defaultSecondaryKey; /** * @return The secondary access key for the authorization rule `RootManageSharedAccessKey`. * */ public Output defaultSecondaryKey() { return this.defaultSecondaryKey; } /** * The URL to access the ServiceBus Namespace. * */ @Export(name="endpoint", refs={String.class}, tree="[0]") private Output endpoint; /** * @return The URL to access the ServiceBus Namespace. * */ public Output endpoint() { return this.endpoint; } /** * An `identity` block as defined below. * */ @Export(name="identity", refs={NamespaceIdentity.class}, tree="[0]") private Output identity; /** * @return An `identity` block as defined below. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`. * */ @Export(name="localAuthEnabled", refs={Boolean.class}, tree="[0]") private Output localAuthEnabled; /** * @return Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`. * */ public Output> localAuthEnabled() { return Codegen.optional(this.localAuthEnabled); } /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`. * */ @Export(name="minimumTlsVersion", refs={String.class}, tree="[0]") private Output minimumTlsVersion; /** * @return The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`. * */ public Output> minimumTlsVersion() { return Codegen.optional(this.minimumTlsVersion); } /** * Specifies the name of the ServiceBus Namespace 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 Namespace resource . Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * An `network_rule_set` block as defined below. * */ @Export(name="networkRuleSet", refs={NamespaceNetworkRuleSet.class}, tree="[0]") private Output networkRuleSet; /** * @return An `network_rule_set` block as defined below. * */ public Output networkRuleSet() { return this.networkRuleSet; } /** * Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created. * * > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions. * */ @Export(name="premiumMessagingPartitions", refs={Integer.class}, tree="[0]") private Output premiumMessagingPartitions; /** * @return Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created. * * > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions. * */ public Output> premiumMessagingPartitions() { return Codegen.optional(this.premiumMessagingPartitions); } /** * Is public network access enabled for the Service Bus Namespace? Defaults to `true`. * */ @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]") private Output publicNetworkAccessEnabled; /** * @return Is public network access enabled for the Service Bus Namespace? Defaults to `true`. * */ public Output> publicNetworkAccessEnabled() { return Codegen.optional(this.publicNetworkAccessEnabled); } /** * The name of the resource group in which to Changing this forces a new resource to be created. * create the namespace. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the resource group in which to Changing this forces a new resource to be created. * create the namespace. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource. * */ @Export(name="sku", refs={String.class}, tree="[0]") private Output sku; /** * @return Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource. * */ public Output sku() { return this.sku; } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * * @param name The _unique_ name of the resulting resource. */ public Namespace(java.lang.String name) { this(name, NamespaceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Namespace(java.lang.String name, NamespaceArgs 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 Namespace(java.lang.String name, NamespaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:servicebus/namespace:Namespace", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Namespace(java.lang.String name, Output id, @Nullable NamespaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:servicebus/namespace:Namespace", name, state, makeResourceOptions(options, id), false); } private static NamespaceArgs makeArgs(NamespaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NamespaceArgs.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:eventhub/namespace:Namespace").build()) )) .additionalSecretOutputs(List.of( "defaultPrimaryConnectionString", "defaultPrimaryKey", "defaultSecondaryConnectionString", "defaultSecondaryKey" )) .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 Namespace get(java.lang.String name, Output id, @Nullable NamespaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Namespace(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy