com.pulumi.azure.eventhub.kotlin.EventhubNamespaceDisasterRecoveryConfigArgs.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.EventhubNamespaceDisasterRecoveryConfigArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an Disaster Recovery Config for an Event Hub Namespace.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "eventhub-replication",
* location: "West Europe",
* });
* const primary = new azure.eventhub.EventHubNamespace("primary", {
* name: "eventhub-primary",
* location: example.location,
* resourceGroupName: example.name,
* sku: "Standard",
* });
* const secondary = new azure.eventhub.EventHubNamespace("secondary", {
* name: "eventhub-secondary",
* location: example.location,
* resourceGroupName: example.name,
* sku: "Standard",
* });
* const exampleEventhubNamespaceDisasterRecoveryConfig = new azure.eventhub.EventhubNamespaceDisasterRecoveryConfig("example", {
* name: "replicate-eventhub",
* resourceGroupName: example.name,
* namespaceName: primary.name,
* partnerNamespaceId: secondary.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="eventhub-replication",
* location="West Europe")
* primary = azure.eventhub.EventHubNamespace("primary",
* name="eventhub-primary",
* location=example.location,
* resource_group_name=example.name,
* sku="Standard")
* secondary = azure.eventhub.EventHubNamespace("secondary",
* name="eventhub-secondary",
* location=example.location,
* resource_group_name=example.name,
* sku="Standard")
* example_eventhub_namespace_disaster_recovery_config = azure.eventhub.EventhubNamespaceDisasterRecoveryConfig("example",
* name="replicate-eventhub",
* resource_group_name=example.name,
* namespace_name=primary.name,
* partner_namespace_id=secondary.id)
* ```
* ```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 = "eventhub-replication",
* Location = "West Europe",
* });
* var primary = new Azure.EventHub.EventHubNamespace("primary", new()
* {
* Name = "eventhub-primary",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "Standard",
* });
* var secondary = new Azure.EventHub.EventHubNamespace("secondary", new()
* {
* Name = "eventhub-secondary",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "Standard",
* });
* var exampleEventhubNamespaceDisasterRecoveryConfig = new Azure.EventHub.EventhubNamespaceDisasterRecoveryConfig("example", new()
* {
* Name = "replicate-eventhub",
* ResourceGroupName = example.Name,
* NamespaceName = primary.Name,
* PartnerNamespaceId = secondary.Id,
* });
* });
* ```
* ```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("eventhub-replication"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* primary, err := eventhub.NewEventHubNamespace(ctx, "primary", &eventhub.EventHubNamespaceArgs{
* Name: pulumi.String("eventhub-primary"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* secondary, err := eventhub.NewEventHubNamespace(ctx, "secondary", &eventhub.EventHubNamespaceArgs{
* Name: pulumi.String("eventhub-secondary"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* _, err = eventhub.NewEventhubNamespaceDisasterRecoveryConfig(ctx, "example", &eventhub.EventhubNamespaceDisasterRecoveryConfigArgs{
* Name: pulumi.String("replicate-eventhub"),
* ResourceGroupName: example.Name,
* NamespaceName: primary.Name,
* PartnerNamespaceId: secondary.ID(),
* })
* 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.EventhubNamespaceDisasterRecoveryConfig;
* import com.pulumi.azure.eventhub.EventhubNamespaceDisasterRecoveryConfigArgs;
* 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("eventhub-replication")
* .location("West Europe")
* .build());
* var primary = new EventHubNamespace("primary", EventHubNamespaceArgs.builder()
* .name("eventhub-primary")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("Standard")
* .build());
* var secondary = new EventHubNamespace("secondary", EventHubNamespaceArgs.builder()
* .name("eventhub-secondary")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("Standard")
* .build());
* var exampleEventhubNamespaceDisasterRecoveryConfig = new EventhubNamespaceDisasterRecoveryConfig("exampleEventhubNamespaceDisasterRecoveryConfig", EventhubNamespaceDisasterRecoveryConfigArgs.builder()
* .name("replicate-eventhub")
* .resourceGroupName(example.name())
* .namespaceName(primary.name())
* .partnerNamespaceId(secondary.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: eventhub-replication
* location: West Europe
* primary:
* type: azure:eventhub:EventHubNamespace
* properties:
* name: eventhub-primary
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: Standard
* secondary:
* type: azure:eventhub:EventHubNamespace
* properties:
* name: eventhub-secondary
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: Standard
* exampleEventhubNamespaceDisasterRecoveryConfig:
* type: azure:eventhub:EventhubNamespaceDisasterRecoveryConfig
* name: example
* properties:
* name: replicate-eventhub
* resourceGroupName: ${example.name}
* namespaceName: ${primary.name}
* partnerNamespaceId: ${secondary.id}
* ```
*
* ## Import
* EventHubs can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/disasterRecoveryConfigs/config1
* ```
* @property name Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
* @property namespaceName Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
* @property partnerNamespaceId The ID of the EventHub Namespace to replicate to.
* @property resourceGroupName The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
*/
public data class EventhubNamespaceDisasterRecoveryConfigArgs(
public val name: Output? = null,
public val namespaceName: Output? = null,
public val partnerNamespaceId: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.eventhub.EventhubNamespaceDisasterRecoveryConfigArgs =
com.pulumi.azure.eventhub.EventhubNamespaceDisasterRecoveryConfigArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
.partnerNamespaceId(partnerNamespaceId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EventhubNamespaceDisasterRecoveryConfigArgs].
*/
@PulumiTagMarker
public class EventhubNamespaceDisasterRecoveryConfigArgsBuilder internal constructor() {
private var name: Output? = null
private var namespaceName: Output? = null
private var partnerNamespaceId: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
*/
@JvmName("cbsyqtbapjevjcvk")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
*/
@JvmName("hojkwreuejjwispd")
public suspend fun namespaceName(`value`: Output) {
this.namespaceName = value
}
/**
* @param value The ID of the EventHub Namespace to replicate to.
*/
@JvmName("pkfbhrlkuknpnmnl")
public suspend fun partnerNamespaceId(`value`: Output) {
this.partnerNamespaceId = value
}
/**
* @param value The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
*/
@JvmName("rqiefvqeregkrrdb")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
*/
@JvmName("gtbibsswptlnoaqe")
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 primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
*/
@JvmName("jfabqrwphxmtectt")
public suspend fun namespaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespaceName = mapped
}
/**
* @param value The ID of the EventHub Namespace to replicate to.
*/
@JvmName("poeuilbgkfdsmbop")
public suspend fun partnerNamespaceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.partnerNamespaceId = mapped
}
/**
* @param value The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
*/
@JvmName("mtkanxahxbctfwry")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): EventhubNamespaceDisasterRecoveryConfigArgs =
EventhubNamespaceDisasterRecoveryConfigArgs(
name = name,
namespaceName = namespaceName,
partnerNamespaceId = partnerNamespaceId,
resourceGroupName = resourceGroupName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy