![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.eventhub.kotlin.EventHubArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.eventhub.kotlin
import com.pulumi.azure.eventhub.EventHubArgs.builder
import com.pulumi.azure.eventhub.kotlin.inputs.EventHubCaptureDescriptionArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventHubCaptureDescriptionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Manages a Event Hubs as a nested resource within a Event Hubs namespace.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", {
* name: "acceptanceTestEventHubNamespace",
* location: example.location,
* resourceGroupName: example.name,
* sku: "Standard",
* capacity: 1,
* tags: {
* environment: "Production",
* },
* });
* const exampleEventHub = new azure.eventhub.EventHub("example", {
* name: "acceptanceTestEventHub",
* namespaceName: exampleEventHubNamespace.name,
* resourceGroupName: example.name,
* partitionCount: 2,
* messageRetention: 1,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_event_hub_namespace = azure.eventhub.EventHubNamespace("example",
* name="acceptanceTestEventHubNamespace",
* location=example.location,
* resource_group_name=example.name,
* sku="Standard",
* capacity=1,
* tags={
* "environment": "Production",
* })
* example_event_hub = azure.eventhub.EventHub("example",
* name="acceptanceTestEventHub",
* namespace_name=example_event_hub_namespace.name,
* resource_group_name=example.name,
* partition_count=2,
* message_retention=1)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("example", new()
* {
* Name = "acceptanceTestEventHubNamespace",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "Standard",
* Capacity = 1,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* var exampleEventHub = new Azure.EventHub.EventHub("example", new()
* {
* Name = "acceptanceTestEventHub",
* NamespaceName = exampleEventHubNamespace.Name,
* ResourceGroupName = example.Name,
* PartitionCount = 2,
* MessageRetention = 1,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
* Name: pulumi.String("acceptanceTestEventHubNamespace"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("Standard"),
* Capacity: pulumi.Int(1),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* if err != nil {
* return err
* }
* _, err = eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
* Name: pulumi.String("acceptanceTestEventHub"),
* NamespaceName: exampleEventHubNamespace.Name,
* ResourceGroupName: example.Name,
* PartitionCount: pulumi.Int(2),
* MessageRetention: pulumi.Int(1),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 com.pulumi.azure.eventhub.EventHub;
* import com.pulumi.azure.eventhub.EventHubArgs;
* 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("acceptanceTestEventHubNamespace")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("Standard")
* .capacity(1)
* .tags(Map.of("environment", "Production"))
* .build());
* var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
* .name("acceptanceTestEventHub")
* .namespaceName(exampleEventHubNamespace.name())
* .resourceGroupName(example.name())
* .partitionCount(2)
* .messageRetention(1)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleEventHubNamespace:
* type: azure:eventhub:EventHubNamespace
* name: example
* properties:
* name: acceptanceTestEventHubNamespace
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: Standard
* capacity: 1
* tags:
* environment: Production
* exampleEventHub:
* type: azure:eventhub:EventHub
* name: example
* properties:
* name: acceptanceTestEventHub
* namespaceName: ${exampleEventHubNamespace.name}
* resourceGroupName: ${example.name}
* partitionCount: 2
* messageRetention: 1
* ```
*
* ## Import
* EventHubs can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:eventhub/eventHub:EventHub eventhub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1
* ```
* @property captureDescription A `capture_description` block as defined below.
* @property messageRetention Specifies the number of days to retain the events for this Event Hub.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `message_retention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
* @property name Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
* @property namespaceName Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
* @property partitionCount Specifies the current number of shards on the Event Hub.
* > **Note:** `partition_count` cannot be changed unless Eventhub Namespace SKU is `Premium` and cannot be decreased.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partition_count` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
* @property resourceGroupName The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created.
* @property status Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
*/
public data class EventHubArgs(
public val captureDescription: Output? = null,
public val messageRetention: Output? = null,
public val name: Output? = null,
public val namespaceName: Output? = null,
public val partitionCount: Output? = null,
public val resourceGroupName: Output? = null,
public val status: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.eventhub.EventHubArgs =
com.pulumi.azure.eventhub.EventHubArgs.builder()
.captureDescription(
captureDescription?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.messageRetention(messageRetention?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
.partitionCount(partitionCount?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.status(status?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EventHubArgs].
*/
@PulumiTagMarker
public class EventHubArgsBuilder internal constructor() {
private var captureDescription: Output? = null
private var messageRetention: Output? = null
private var name: Output? = null
private var namespaceName: Output? = null
private var partitionCount: Output? = null
private var resourceGroupName: Output? = null
private var status: Output? = null
/**
* @param value A `capture_description` block as defined below.
*/
@JvmName("vanhmsthqhtnlvpp")
public suspend fun captureDescription(`value`: Output) {
this.captureDescription = value
}
/**
* @param value Specifies the number of days to retain the events for this Event Hub.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `message_retention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
*/
@JvmName("xrcwgkxxqifpenpq")
public suspend fun messageRetention(`value`: Output) {
this.messageRetention = value
}
/**
* @param value Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
*/
@JvmName("etbknwvpictjrwhb")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
*/
@JvmName("wklxqkevcggdhnga")
public suspend fun namespaceName(`value`: Output) {
this.namespaceName = value
}
/**
* @param value Specifies the current number of shards on the Event Hub.
* > **Note:** `partition_count` cannot be changed unless Eventhub Namespace SKU is `Premium` and cannot be decreased.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partition_count` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
*/
@JvmName("iukgyiyjainfyaya")
public suspend fun partitionCount(`value`: Output) {
this.partitionCount = value
}
/**
* @param value The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created.
*/
@JvmName("cimrybstwnbsoacr")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
*/
@JvmName("yvhwhvgveifvtgro")
public suspend fun status(`value`: Output) {
this.status = value
}
/**
* @param value A `capture_description` block as defined below.
*/
@JvmName("faklmtsgfxbviccg")
public suspend fun captureDescription(`value`: EventHubCaptureDescriptionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.captureDescription = mapped
}
/**
* @param argument A `capture_description` block as defined below.
*/
@JvmName("obpfpkdldnsmfpmj")
public suspend fun captureDescription(argument: suspend EventHubCaptureDescriptionArgsBuilder.() -> Unit) {
val toBeMapped = EventHubCaptureDescriptionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.captureDescription = mapped
}
/**
* @param value Specifies the number of days to retain the events for this Event Hub.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `message_retention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
*/
@JvmName("dfhdnhvuaybbovom")
public suspend fun messageRetention(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.messageRetention = mapped
}
/**
* @param value Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
*/
@JvmName("mnyirjylgircuiht")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
*/
@JvmName("paqpkmuyanhurwle")
public suspend fun namespaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespaceName = mapped
}
/**
* @param value Specifies the current number of shards on the Event Hub.
* > **Note:** `partition_count` cannot be changed unless Eventhub Namespace SKU is `Premium` and cannot be decreased.
* > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partition_count` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
*/
@JvmName("ovoawbcikibwxikg")
public suspend fun partitionCount(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.partitionCount = mapped
}
/**
* @param value The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created.
*/
@JvmName("mbsopwlhboccempi")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
*/
@JvmName("gefteogkcotcewks")
public suspend fun status(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.status = mapped
}
internal fun build(): EventHubArgs = EventHubArgs(
captureDescription = captureDescription,
messageRetention = messageRetention,
name = name,
namespaceName = namespaceName,
partitionCount = partitionCount,
resourceGroupName = resourceGroupName,
status = status,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy