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

com.pulumi.azurenative.datamigration.kotlin.ServiceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.datamigration.kotlin

import com.pulumi.azurenative.datamigration.ServiceArgs.builder
import com.pulumi.azurenative.datamigration.kotlin.inputs.ServiceSkuArgs
import com.pulumi.azurenative.datamigration.kotlin.inputs.ServiceSkuArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A Database Migration Service resource
 * Azure REST API version: 2021-06-30. Prior API version in Azure Native 1.x: 2018-04-19.
 * Other available API versions: 2022-03-30-preview, 2023-07-15-preview.
 * ## Example Usage
 * ### Services_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var service = new AzureNative.DataMigration.Service("service", new()
 *     {
 *         GroupName = "DmsSdkRg",
 *         Location = "southcentralus",
 *         ServiceName = "DmsSdkService",
 *         Sku = new AzureNative.DataMigration.Inputs.ServiceSkuArgs
 *         {
 *             Name = "Basic_1vCore",
 *         },
 *         VirtualSubnetId = "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	datamigration "github.com/pulumi/pulumi-azure-native-sdk/datamigration/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := datamigration.NewService(ctx, "service", &datamigration.ServiceArgs{
 * 			GroupName:   pulumi.String("DmsSdkRg"),
 * 			Location:    pulumi.String("southcentralus"),
 * 			ServiceName: pulumi.String("DmsSdkService"),
 * 			Sku: &datamigration.ServiceSkuArgs{
 * 				Name: pulumi.String("Basic_1vCore"),
 * 			},
 * 			VirtualSubnetId: pulumi.String("/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default"),
 * 		})
 * 		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.azurenative.datamigration.Service;
 * import com.pulumi.azurenative.datamigration.ServiceArgs;
 * import com.pulumi.azurenative.datamigration.inputs.ServiceSkuArgs;
 * 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 service = new Service("service", ServiceArgs.builder()
 *             .groupName("DmsSdkRg")
 *             .location("southcentralus")
 *             .serviceName("DmsSdkService")
 *             .sku(ServiceSkuArgs.builder()
 *                 .name("Basic_1vCore")
 *                 .build())
 *             .virtualSubnetId("/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:datamigration:Service DmsSdkService /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}
 * ```
 * @property groupName Name of the resource group
 * @property kind The resource kind. Only 'vm' (the default) is supported.
 * @property location Resource location.
 * @property publicKey The public key of the service, used to encrypt secrets sent to the service
 * @property serviceName Name of the service
 * @property sku Service SKU
 * @property tags Resource tags.
 * @property virtualNicId The ID of the Microsoft.Network/networkInterfaces resource which the service have
 * @property virtualSubnetId The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined
 */
public data class ServiceArgs(
    public val groupName: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val publicKey: Output? = null,
    public val serviceName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
    public val virtualNicId: Output? = null,
    public val virtualSubnetId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datamigration.ServiceArgs =
        com.pulumi.azurenative.datamigration.ServiceArgs.builder()
            .groupName(groupName?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .publicKey(publicKey?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualNicId(virtualNicId?.applyValue({ args0 -> args0 }))
            .virtualSubnetId(virtualSubnetId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceArgs].
 */
@PulumiTagMarker
public class ServiceArgsBuilder internal constructor() {
    private var groupName: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var publicKey: Output? = null

    private var serviceName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    private var virtualNicId: Output? = null

    private var virtualSubnetId: Output? = null

    /**
     * @param value Name of the resource group
     */
    @JvmName("vxycqejfyfasohyw")
    public suspend fun groupName(`value`: Output) {
        this.groupName = value
    }

    /**
     * @param value The resource kind. Only 'vm' (the default) is supported.
     */
    @JvmName("plfdjcxuwekpxvwh")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Resource location.
     */
    @JvmName("rjbtivovjwfuygfm")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The public key of the service, used to encrypt secrets sent to the service
     */
    @JvmName("dplabtcwwoqfxeoh")
    public suspend fun publicKey(`value`: Output) {
        this.publicKey = value
    }

    /**
     * @param value Name of the service
     */
    @JvmName("hhqqjqisruykxkkw")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value Service SKU
     */
    @JvmName("attlklfimukqvawf")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("lppjxngycucugyux")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the Microsoft.Network/networkInterfaces resource which the service have
     */
    @JvmName("fntlelsttccdoswy")
    public suspend fun virtualNicId(`value`: Output) {
        this.virtualNicId = value
    }

    /**
     * @param value The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined
     */
    @JvmName("qbpdfynkuooepgde")
    public suspend fun virtualSubnetId(`value`: Output) {
        this.virtualSubnetId = value
    }

    /**
     * @param value Name of the resource group
     */
    @JvmName("douoiedxehnibtst")
    public suspend fun groupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupName = mapped
    }

    /**
     * @param value The resource kind. Only 'vm' (the default) is supported.
     */
    @JvmName("afbsvgfokqolvcqk")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Resource location.
     */
    @JvmName("umunvhjalublvimu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The public key of the service, used to encrypt secrets sent to the service
     */
    @JvmName("dnogodtmodvnylnw")
    public suspend fun publicKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicKey = mapped
    }

    /**
     * @param value Name of the service
     */
    @JvmName("hpymgmjryqnmthvr")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value Service SKU
     */
    @JvmName("ytlpsgjafvgxndvo")
    public suspend fun sku(`value`: ServiceSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument Service SKU
     */
    @JvmName("rxkcrdorhirvyswl")
    public suspend fun sku(argument: suspend ServiceSkuArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("mygojmpxhexfmlfe")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("buganoyrdppuqjxl")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the Microsoft.Network/networkInterfaces resource which the service have
     */
    @JvmName("cpatebycxoodemkk")
    public suspend fun virtualNicId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNicId = mapped
    }

    /**
     * @param value The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined
     */
    @JvmName("awgonqtbqetsifal")
    public suspend fun virtualSubnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualSubnetId = mapped
    }

    internal fun build(): ServiceArgs = ServiceArgs(
        groupName = groupName,
        kind = kind,
        location = location,
        publicKey = publicKey,
        serviceName = serviceName,
        sku = sku,
        tags = tags,
        virtualNicId = virtualNicId,
        virtualSubnetId = virtualSubnetId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy