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

com.pulumi.azure.siterecovery.kotlin.HyperVSiteArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.siterecovery.kotlin

import com.pulumi.azure.siterecovery.HyperVSiteArgs.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 in Recovery Service Vault.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "eastus",
 * });
 * const exampleVault = new azure.recoveryservices.Vault("example", {
 *     name: "example-vault",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     softDeleteEnabled: false,
 * });
 * const exampleHyperVSite = new azure.siterecovery.HyperVSite("example", {
 *     name: "example-site",
 *     recoveryVaultId: exampleVault.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="eastus")
 * example_vault = azure.recoveryservices.Vault("example",
 *     name="example-vault",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard",
 *     soft_delete_enabled=False)
 * example_hyper_v_site = azure.siterecovery.HyperVSite("example",
 *     name="example-site",
 *     recovery_vault_id=example_vault.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 = "example-rg",
 *         Location = "eastus",
 *     });
 *     var exampleVault = new Azure.RecoveryServices.Vault("example", new()
 *     {
 *         Name = "example-vault",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *         SoftDeleteEnabled = false,
 *     });
 *     var exampleHyperVSite = new Azure.SiteRecovery.HyperVSite("example", new()
 *     {
 *         Name = "example-site",
 *         RecoveryVaultId = exampleVault.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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 {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-rg"),
 * 			Location: pulumi.String("eastus"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{
 * 			Name:              pulumi.String("example-vault"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard"),
 * 			SoftDeleteEnabled: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = siterecovery.NewHyperVSite(ctx, "example", &siterecovery.HyperVSiteArgs{
 * 			Name:            pulumi.String("example-site"),
 * 			RecoveryVaultId: exampleVault.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.siterecovery.HyperVSite;
 * import com.pulumi.azure.siterecovery.HyperVSiteArgs;
 * 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-rg")
 *             .location("eastus")
 *             .build());
 *         var exampleVault = new Vault("exampleVault", VaultArgs.builder()
 *             .name("example-vault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .softDeleteEnabled(false)
 *             .build());
 *         var exampleHyperVSite = new HyperVSite("exampleHyperVSite", HyperVSiteArgs.builder()
 *             .name("example-site")
 *             .recoveryVaultId(exampleVault.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: eastus
 *   exampleVault:
 *     type: azure:recoveryservices:Vault
 *     name: example
 *     properties:
 *       name: example-vault
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *       softDeleteEnabled: false
 *   exampleHyperVSite:
 *     type: azure:siterecovery:HyperVSite
 *     name: example
 *     properties:
 *       name: example-site
 *       recoveryVaultId: ${exampleVault.id}
 * ```
 * 
 * ## Import
 * Recovery Services can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:siterecovery/hyperVSite:HyperVSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/fabric1
 * ```
 * @property name The name which should be used for this Recovery Service. Changing this forces a new Site to be created.
 * @property recoveryVaultId The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created.
 */
public data class HyperVSiteArgs(
    public val name: Output? = null,
    public val recoveryVaultId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.siterecovery.HyperVSiteArgs =
        com.pulumi.azure.siterecovery.HyperVSiteArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .recoveryVaultId(recoveryVaultId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HyperVSiteArgs].
 */
@PulumiTagMarker
public class HyperVSiteArgsBuilder internal constructor() {
    private var name: Output? = null

    private var recoveryVaultId: Output? = null

    /**
     * @param value The name which should be used for this Recovery Service. Changing this forces a new Site to be created.
     */
    @JvmName("cmoourxgihegjhmv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created.
     */
    @JvmName("heivexdudjaebmiw")
    public suspend fun recoveryVaultId(`value`: Output) {
        this.recoveryVaultId = value
    }

    /**
     * @param value The name which should be used for this Recovery Service. Changing this forces a new Site to be created.
     */
    @JvmName("egjywbtdbjithkki")
    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 Site created. Changing this forces a new Site to be created.
     */
    @JvmName("dgajccxhjyludjbm")
    public suspend fun recoveryVaultId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.recoveryVaultId = mapped
    }

    internal fun build(): HyperVSiteArgs = HyperVSiteArgs(
        name = name,
        recoveryVaultId = recoveryVaultId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy