com.pulumi.azure.eventhub.EventHubNamespace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.
// *** 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.EventHubNamespaceArgs;
import com.pulumi.azure.eventhub.inputs.EventHubNamespaceState;
import com.pulumi.azure.eventhub.outputs.EventHubNamespaceIdentity;
import com.pulumi.azure.eventhub.outputs.EventHubNamespaceNetworkRulesets;
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 an EventHub 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.eventhub.EventHubNamespace;
* import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
* 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("example-resources")
* .location("West Europe")
* .build());
*
* var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
* .name("example-namespace")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("Standard")
* .capacity(2)
* .tags(Map.of("environment", "Production"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* EventHub Namespaces can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:eventhub/eventHubNamespace:EventHubNamespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
* ```
*
*/
@ResourceType(type="azure:eventhub/eventHubNamespace:EventHubNamespace")
public class EventHubNamespace extends com.pulumi.resources.CustomResource {
/**
* Is Auto Inflate enabled for the EventHub Namespace?
*
*/
@Export(name="autoInflateEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> autoInflateEnabled;
/**
* @return Is Auto Inflate enabled for the EventHub Namespace?
*
*/
public Output> autoInflateEnabled() {
return Codegen.optional(this.autoInflateEnabled);
}
/**
* Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
*
*/
@Export(name="capacity", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> capacity;
/**
* @return Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
*
*/
public Output> capacity() {
return Codegen.optional(this.capacity);
}
/**
* Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
*
*/
@Export(name="dedicatedClusterId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> dedicatedClusterId;
/**
* @return Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
*
*/
public Output> dedicatedClusterId() {
return Codegen.optional(this.dedicatedClusterId);
}
/**
* 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 alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
*
*/
@Export(name="defaultPrimaryConnectionStringAlias", refs={String.class}, tree="[0]")
private Output defaultPrimaryConnectionStringAlias;
/**
* @return The alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
*
*/
public Output defaultPrimaryConnectionStringAlias() {
return this.defaultPrimaryConnectionStringAlias;
}
/**
* 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 alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
*
*/
@Export(name="defaultSecondaryConnectionStringAlias", refs={String.class}, tree="[0]")
private Output defaultSecondaryConnectionStringAlias;
/**
* @return The alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
*
*/
public Output defaultSecondaryConnectionStringAlias() {
return this.defaultSecondaryConnectionStringAlias;
}
/**
* 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;
}
/**
* An `identity` block as defined below.
*
*/
@Export(name="identity", refs={EventHubNamespaceIdentity.class}, tree="[0]")
private Output* @Nullable */ EventHubNamespaceIdentity> identity;
/**
* @return An `identity` block as defined below.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
*
*/
@Export(name="localAuthenticationEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> localAuthenticationEnabled;
/**
* @return Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
*
*/
public Output> localAuthenticationEnabled() {
return Codegen.optional(this.localAuthenticationEnabled);
}
/**
* 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;
}
/**
* Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `20`.
*
*/
@Export(name="maximumThroughputUnits", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> maximumThroughputUnits;
/**
* @return Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `20`.
*
*/
public Output> maximumThroughputUnits() {
return Codegen.optional(this.maximumThroughputUnits);
}
/**
* The minimum supported TLS version for this EventHub 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* @Nullable */ String> minimumTlsVersion;
/**
* @return The minimum supported TLS version for this EventHub 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 EventHub 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 EventHub Namespace resource. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* A `network_rulesets` block as defined below.
*
*/
@Export(name="networkRulesets", refs={EventHubNamespaceNetworkRulesets.class}, tree="[0]")
private Output networkRulesets;
/**
* @return A `network_rulesets` block as defined below.
*
*/
public Output networkRulesets() {
return this.networkRulesets;
}
/**
* Is public network access enabled for the EventHub Namespace? Defaults to `true`.
*
*/
@Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> publicNetworkAccessEnabled;
/**
* @return Is public network access enabled for the EventHub Namespace? Defaults to `true`.
*
*/
public Output> publicNetworkAccessEnabled() {
return Codegen.optional(this.publicNetworkAccessEnabled);
}
/**
* The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* Defines which tier to use. Valid options are `Basic`, `Standard`, and `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. Valid options are `Basic`, `Standard`, and `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* @Nullable */ Map> 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 EventHubNamespace(java.lang.String name) {
this(name, EventHubNamespaceArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public EventHubNamespace(java.lang.String name, EventHubNamespaceArgs 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 EventHubNamespace(java.lang.String name, EventHubNamespaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:eventhub/eventHubNamespace:EventHubNamespace", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private EventHubNamespace(java.lang.String name, Output id, @Nullable EventHubNamespaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:eventhub/eventHubNamespace:EventHubNamespace", name, state, makeResourceOptions(options, id), false);
}
private static EventHubNamespaceArgs makeArgs(EventHubNamespaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? EventHubNamespaceArgs.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())
.additionalSecretOutputs(List.of(
"defaultPrimaryConnectionString",
"defaultPrimaryConnectionStringAlias",
"defaultPrimaryKey",
"defaultSecondaryConnectionString",
"defaultSecondaryConnectionStringAlias",
"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 EventHubNamespace get(java.lang.String name, Output id, @Nullable EventHubNamespaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new EventHubNamespace(name, id, state, options);
}
}