Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.sql.kotlin
import com.pulumi.azurenative.sql.ManagedInstanceKeyArgs.builder
import com.pulumi.azurenative.sql.kotlin.enums.ServerKeyType
import com.pulumi.core.Either
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
/**
* A managed instance key.
* Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
* Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview.
* ## Example Usage
* ### Creates or updates a managed instance key
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var managedInstanceKey = new AzureNative.Sql.ManagedInstanceKey("managedInstanceKey", new()
* {
* KeyName = "someVault_someKey_01234567890123456789012345678901",
* ManagedInstanceName = "sqlcrudtest-4645",
* ResourceGroupName = "sqlcrudtest-7398",
* ServerKeyType = AzureNative.Sql.ServerKeyType.AzureKeyVault,
* Uri = "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
* });
* });
* ```
* ```go
* package main
* import (
* sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := sql.NewManagedInstanceKey(ctx, "managedInstanceKey", &sql.ManagedInstanceKeyArgs{
* KeyName: pulumi.String("someVault_someKey_01234567890123456789012345678901"),
* ManagedInstanceName: pulumi.String("sqlcrudtest-4645"),
* ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
* ServerKeyType: pulumi.String(sql.ServerKeyTypeAzureKeyVault),
* Uri: pulumi.String("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"),
* })
* 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.sql.ManagedInstanceKey;
* import com.pulumi.azurenative.sql.ManagedInstanceKeyArgs;
* 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 managedInstanceKey = new ManagedInstanceKey("managedInstanceKey", ManagedInstanceKeyArgs.builder()
* .keyName("someVault_someKey_01234567890123456789012345678901")
* .managedInstanceName("sqlcrudtest-4645")
* .resourceGroupName("sqlcrudtest-7398")
* .serverKeyType("AzureKeyVault")
* .uri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:sql:ManagedInstanceKey sqlcrudtest-4645 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}
* ```
* @property keyName The name of the managed instance key to be operated on (updated or created).
* @property managedInstanceName The name of the managed instance.
* @property resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @property serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'.
* @property uri The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
*/
public data class ManagedInstanceKeyArgs(
public val keyName: Output? = null,
public val managedInstanceName: Output? = null,
public val resourceGroupName: Output? = null,
public val serverKeyType: Output>? = null,
public val uri: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.sql.ManagedInstanceKeyArgs =
com.pulumi.azurenative.sql.ManagedInstanceKeyArgs.builder()
.keyName(keyName?.applyValue({ args0 -> args0 }))
.managedInstanceName(managedInstanceName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.serverKeyType(
serverKeyType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.uri(uri?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ManagedInstanceKeyArgs].
*/
@PulumiTagMarker
public class ManagedInstanceKeyArgsBuilder internal constructor() {
private var keyName: Output? = null
private var managedInstanceName: Output? = null
private var resourceGroupName: Output? = null
private var serverKeyType: Output>? = null
private var uri: Output? = null
/**
* @param value The name of the managed instance key to be operated on (updated or created).
*/
@JvmName("tkvjpnwqpptvqolx")
public suspend fun keyName(`value`: Output) {
this.keyName = value
}
/**
* @param value The name of the managed instance.
*/
@JvmName("okbvbjwbqllcarlr")
public suspend fun managedInstanceName(`value`: Output) {
this.managedInstanceName = value
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("yqqpufisxejjimcy")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The key type like 'ServiceManaged', 'AzureKeyVault'.
*/
@JvmName("aruorpmnmheymsqw")
public suspend fun serverKeyType(`value`: Output>) {
this.serverKeyType = value
}
/**
* @param value The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
*/
@JvmName("okjvnbepqvppppxf")
public suspend fun uri(`value`: Output) {
this.uri = value
}
/**
* @param value The name of the managed instance key to be operated on (updated or created).
*/
@JvmName("iwgphlyyrrrlwnnf")
public suspend fun keyName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyName = mapped
}
/**
* @param value The name of the managed instance.
*/
@JvmName("xcgujwlxsdyegogt")
public suspend fun managedInstanceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedInstanceName = mapped
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("hjtumqqqaunkbguc")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The key type like 'ServiceManaged', 'AzureKeyVault'.
*/
@JvmName("qicgnxepuxovavdm")
public suspend fun serverKeyType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serverKeyType = mapped
}
/**
* @param value The key type like 'ServiceManaged', 'AzureKeyVault'.
*/
@JvmName("bnojqyexvocistle")
public fun serverKeyType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.serverKeyType = mapped
}
/**
* @param value The key type like 'ServiceManaged', 'AzureKeyVault'.
*/
@JvmName("fqxfburhptrqatke")
public fun serverKeyType(`value`: ServerKeyType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.serverKeyType = mapped
}
/**
* @param value The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
*/
@JvmName("yhyferlyolhcfibc")
public suspend fun uri(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.uri = mapped
}
internal fun build(): ManagedInstanceKeyArgs = ManagedInstanceKeyArgs(
keyName = keyName,
managedInstanceName = managedInstanceName,
resourceGroupName = resourceGroupName,
serverKeyType = serverKeyType,
uri = uri,
)
}