com.pulumi.azure.siterecovery.kotlin.HypervNetworkMappingArgs.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.siterecovery.kotlin
import com.pulumi.azure.siterecovery.HypervNetworkMappingArgs.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 a HyperV site recovery network mapping on Azure. A HyperV network mapping decides how to translate connected networks when a VM is migrated from HyperV VMM Center to Azure.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const target = new azure.core.ResourceGroup("target", {
* name: "tfex-network-mapping",
* location: "East US",
* });
* const vault = new azure.recoveryservices.Vault("vault", {
* name: "example-recovery-vault",
* location: target.location,
* resourceGroupName: target.name,
* sku: "Standard",
* });
* const targetVirtualNetwork = new azure.network.VirtualNetwork("target", {
* name: "network",
* resourceGroupName: target.name,
* addressSpaces: ["192.168.2.0/24"],
* location: target.location,
* });
* const recovery_mapping = new azure.siterecovery.HypervNetworkMapping("recovery-mapping", {
* name: "recovery-network-mapping",
* recoveryVaultId: vault.id,
* sourceSystemCenterVirtualMachineManagerName: "my-vmm-server",
* sourceNetworkName: "my-vmm-network",
* targetNetworkId: targetVirtualNetwork.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* target = azure.core.ResourceGroup("target",
* name="tfex-network-mapping",
* location="East US")
* vault = azure.recoveryservices.Vault("vault",
* name="example-recovery-vault",
* location=target.location,
* resource_group_name=target.name,
* sku="Standard")
* target_virtual_network = azure.network.VirtualNetwork("target",
* name="network",
* resource_group_name=target.name,
* address_spaces=["192.168.2.0/24"],
* location=target.location)
* recovery_mapping = azure.siterecovery.HypervNetworkMapping("recovery-mapping",
* name="recovery-network-mapping",
* recovery_vault_id=vault.id,
* source_system_center_virtual_machine_manager_name="my-vmm-server",
* source_network_name="my-vmm-network",
* target_network_id=target_virtual_network.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var target = new Azure.Core.ResourceGroup("target", new()
* {
* Name = "tfex-network-mapping",
* Location = "East US",
* });
* var vault = new Azure.RecoveryServices.Vault("vault", new()
* {
* Name = "example-recovery-vault",
* Location = target.Location,
* ResourceGroupName = target.Name,
* Sku = "Standard",
* });
* var targetVirtualNetwork = new Azure.Network.VirtualNetwork("target", new()
* {
* Name = "network",
* ResourceGroupName = target.Name,
* AddressSpaces = new[]
* {
* "192.168.2.0/24",
* },
* Location = target.Location,
* });
* var recovery_mapping = new Azure.SiteRecovery.HypervNetworkMapping("recovery-mapping", new()
* {
* Name = "recovery-network-mapping",
* RecoveryVaultId = vault.Id,
* SourceSystemCenterVirtualMachineManagerName = "my-vmm-server",
* SourceNetworkName = "my-vmm-network",
* TargetNetworkId = targetVirtualNetwork.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/siterecovery"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* target, err := core.NewResourceGroup(ctx, "target", &core.ResourceGroupArgs{
* Name: pulumi.String("tfex-network-mapping"),
* Location: pulumi.String("East US"),
* })
* if err != nil {
* return err
* }
* vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
* Name: pulumi.String("example-recovery-vault"),
* Location: target.Location,
* ResourceGroupName: target.Name,
* Sku: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* targetVirtualNetwork, err := network.NewVirtualNetwork(ctx, "target", &network.VirtualNetworkArgs{
* Name: pulumi.String("network"),
* ResourceGroupName: target.Name,
* AddressSpaces: pulumi.StringArray{
* pulumi.String("192.168.2.0/24"),
* },
* Location: target.Location,
* })
* if err != nil {
* return err
* }
* _, err = siterecovery.NewHypervNetworkMapping(ctx, "recovery-mapping", &siterecovery.HypervNetworkMappingArgs{
* Name: pulumi.String("recovery-network-mapping"),
* RecoveryVaultId: vault.ID(),
* SourceSystemCenterVirtualMachineManagerName: pulumi.String("my-vmm-server"),
* SourceNetworkName: pulumi.String("my-vmm-network"),
* TargetNetworkId: targetVirtualNetwork.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.recoveryservices.Vault;
* import com.pulumi.azure.recoveryservices.VaultArgs;
* import com.pulumi.azure.network.VirtualNetwork;
* import com.pulumi.azure.network.VirtualNetworkArgs;
* import com.pulumi.azure.siterecovery.HypervNetworkMapping;
* import com.pulumi.azure.siterecovery.HypervNetworkMappingArgs;
* 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 target = new ResourceGroup("target", ResourceGroupArgs.builder()
* .name("tfex-network-mapping")
* .location("East US")
* .build());
* var vault = new Vault("vault", VaultArgs.builder()
* .name("example-recovery-vault")
* .location(target.location())
* .resourceGroupName(target.name())
* .sku("Standard")
* .build());
* var targetVirtualNetwork = new VirtualNetwork("targetVirtualNetwork", VirtualNetworkArgs.builder()
* .name("network")
* .resourceGroupName(target.name())
* .addressSpaces("192.168.2.0/24")
* .location(target.location())
* .build());
* var recovery_mapping = new HypervNetworkMapping("recovery-mapping", HypervNetworkMappingArgs.builder()
* .name("recovery-network-mapping")
* .recoveryVaultId(vault.id())
* .sourceSystemCenterVirtualMachineManagerName("my-vmm-server")
* .sourceNetworkName("my-vmm-network")
* .targetNetworkId(targetVirtualNetwork.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* target:
* type: azure:core:ResourceGroup
* properties:
* name: tfex-network-mapping
* location: East US
* vault:
* type: azure:recoveryservices:Vault
* properties:
* name: example-recovery-vault
* location: ${target.location}
* resourceGroupName: ${target.name}
* sku: Standard
* targetVirtualNetwork:
* type: azure:network:VirtualNetwork
* name: target
* properties:
* name: network
* resourceGroupName: ${target.name}
* addressSpaces:
* - 192.168.2.0/24
* location: ${target.location}
* recovery-mapping:
* type: azure:siterecovery:HypervNetworkMapping
* properties:
* name: recovery-network-mapping
* recoveryVaultId: ${vault.id}
* sourceSystemCenterVirtualMachineManagerName: my-vmm-server
* sourceNetworkName: my-vmm-network
* targetNetworkId: ${targetVirtualNetwork.id}
* ```
*
* ## Import
* Site Recovery Network Mapping can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping azurerm_site_recovery_hyperv_network_mapping.mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/primary-fabric-name/replicationNetworks/azureNetwork/replicationNetworkMappings/mapping-name
* ```
* @property name The name of the HyperV network mapping. Changing this forces a new resource to be created.
* @property recoveryVaultId The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created.
* @property sourceNetworkName The Name of the primary network. Changing this forces a new resource to be created.
* @property sourceSystemCenterVirtualMachineManagerName Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created.
* @property targetNetworkId The id of the recovery network. Changing this forces a new resource to be created.
*/
public data class HypervNetworkMappingArgs(
public val name: Output? = null,
public val recoveryVaultId: Output? = null,
public val sourceNetworkName: Output? = null,
public val sourceSystemCenterVirtualMachineManagerName: Output? = null,
public val targetNetworkId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.siterecovery.HypervNetworkMappingArgs =
com.pulumi.azure.siterecovery.HypervNetworkMappingArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.recoveryVaultId(recoveryVaultId?.applyValue({ args0 -> args0 }))
.sourceNetworkName(sourceNetworkName?.applyValue({ args0 -> args0 }))
.sourceSystemCenterVirtualMachineManagerName(
sourceSystemCenterVirtualMachineManagerName?.applyValue({ args0 ->
args0
}),
)
.targetNetworkId(targetNetworkId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [HypervNetworkMappingArgs].
*/
@PulumiTagMarker
public class HypervNetworkMappingArgsBuilder internal constructor() {
private var name: Output? = null
private var recoveryVaultId: Output? = null
private var sourceNetworkName: Output? = null
private var sourceSystemCenterVirtualMachineManagerName: Output? = null
private var targetNetworkId: Output? = null
/**
* @param value The name of the HyperV network mapping. Changing this forces a new resource to be created.
*/
@JvmName("tesxbwftnjhulyoe")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created.
*/
@JvmName("mwjjcdyyfstbcpvc")
public suspend fun recoveryVaultId(`value`: Output) {
this.recoveryVaultId = value
}
/**
* @param value The Name of the primary network. Changing this forces a new resource to be created.
*/
@JvmName("lvkwlsunckxlfktj")
public suspend fun sourceNetworkName(`value`: Output) {
this.sourceNetworkName = value
}
/**
* @param value Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created.
*/
@JvmName("xjtfbqjotxlqjvfg")
public suspend fun sourceSystemCenterVirtualMachineManagerName(`value`: Output) {
this.sourceSystemCenterVirtualMachineManagerName = value
}
/**
* @param value The id of the recovery network. Changing this forces a new resource to be created.
*/
@JvmName("yogvwvyiwthsqarr")
public suspend fun targetNetworkId(`value`: Output) {
this.targetNetworkId = value
}
/**
* @param value The name of the HyperV network mapping. Changing this forces a new resource to be created.
*/
@JvmName("eulvrfewydqnqtjb")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created.
*/
@JvmName("cschoaonijrtqevv")
public suspend fun recoveryVaultId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.recoveryVaultId = mapped
}
/**
* @param value The Name of the primary network. Changing this forces a new resource to be created.
*/
@JvmName("eivqxsjpnjwujucx")
public suspend fun sourceNetworkName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceNetworkName = mapped
}
/**
* @param value Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created.
*/
@JvmName("xhuagafleexvirwg")
public suspend fun sourceSystemCenterVirtualMachineManagerName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceSystemCenterVirtualMachineManagerName = mapped
}
/**
* @param value The id of the recovery network. Changing this forces a new resource to be created.
*/
@JvmName("rskmywnrwqkyxxcm")
public suspend fun targetNetworkId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetNetworkId = mapped
}
internal fun build(): HypervNetworkMappingArgs = HypervNetworkMappingArgs(
name = name,
recoveryVaultId = recoveryVaultId,
sourceNetworkName = sourceNetworkName,
sourceSystemCenterVirtualMachineManagerName = sourceSystemCenterVirtualMachineManagerName,
targetNetworkId = targetNetworkId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy