1. Packages
  2. Azure Native v2
  3. API Docs
  4. sql
  5. ManagedInstanceKey
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.sql.ManagedInstanceKey

Explore with Pulumi AI

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, 2024-05-01-preview.

Example Usage

Creates or updates a managed instance key

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",
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const managedInstanceKey = new azure_native.sql.ManagedInstanceKey("managedInstanceKey", {
    keyName: "someVault_someKey_01234567890123456789012345678901",
    managedInstanceName: "sqlcrudtest-4645",
    resourceGroupName: "sqlcrudtest-7398",
    serverKeyType: azure_native.sql.ServerKeyType.AzureKeyVault,
    uri: "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

managed_instance_key = azure_native.sql.ManagedInstanceKey("managedInstanceKey",
    key_name="someVault_someKey_01234567890123456789012345678901",
    managed_instance_name="sqlcrudtest-4645",
    resource_group_name="sqlcrudtest-7398",
    server_key_type=azure_native.sql.ServerKeyType.AZURE_KEY_VAULT,
    uri="https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901")
Copy
resources:
  managedInstanceKey:
    type: azure-native:sql:ManagedInstanceKey
    properties:
      keyName: someVault_someKey_01234567890123456789012345678901
      managedInstanceName: sqlcrudtest-4645
      resourceGroupName: sqlcrudtest-7398
      serverKeyType: AzureKeyVault
      uri: https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901
Copy

Create ManagedInstanceKey Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ManagedInstanceKey(name: string, args: ManagedInstanceKeyArgs, opts?: CustomResourceOptions);
@overload
def ManagedInstanceKey(resource_name: str,
                       args: ManagedInstanceKeyArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def ManagedInstanceKey(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       managed_instance_name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       server_key_type: Optional[Union[str, ServerKeyType]] = None,
                       key_name: Optional[str] = None,
                       uri: Optional[str] = None)
func NewManagedInstanceKey(ctx *Context, name string, args ManagedInstanceKeyArgs, opts ...ResourceOption) (*ManagedInstanceKey, error)
public ManagedInstanceKey(string name, ManagedInstanceKeyArgs args, CustomResourceOptions? opts = null)
public ManagedInstanceKey(String name, ManagedInstanceKeyArgs args)
public ManagedInstanceKey(String name, ManagedInstanceKeyArgs args, CustomResourceOptions options)
type: azure-native:sql:ManagedInstanceKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ManagedInstanceKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ManagedInstanceKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedInstanceKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedInstanceKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ManagedInstanceKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var managedInstanceKeyResource = new AzureNative.Sql.ManagedInstanceKey("managedInstanceKeyResource", new()
{
    ManagedInstanceName = "string",
    ResourceGroupName = "string",
    ServerKeyType = "string",
    KeyName = "string",
    Uri = "string",
});
Copy
example, err := sql.NewManagedInstanceKey(ctx, "managedInstanceKeyResource", &sql.ManagedInstanceKeyArgs{
	ManagedInstanceName: "string",
	ResourceGroupName:   "string",
	ServerKeyType:       "string",
	KeyName:             "string",
	Uri:                 "string",
})
Copy
var managedInstanceKeyResource = new ManagedInstanceKey("managedInstanceKeyResource", ManagedInstanceKeyArgs.builder()
    .managedInstanceName("string")
    .resourceGroupName("string")
    .serverKeyType("string")
    .keyName("string")
    .uri("string")
    .build());
Copy
managed_instance_key_resource = azure_native.sql.ManagedInstanceKey("managedInstanceKeyResource",
    managed_instance_name=string,
    resource_group_name=string,
    server_key_type=string,
    key_name=string,
    uri=string)
Copy
const managedInstanceKeyResource = new azure_native.sql.ManagedInstanceKey("managedInstanceKeyResource", {
    managedInstanceName: "string",
    resourceGroupName: "string",
    serverKeyType: "string",
    keyName: "string",
    uri: "string",
});
Copy
type: azure-native:sql:ManagedInstanceKey
properties:
    keyName: string
    managedInstanceName: string
    resourceGroupName: string
    serverKeyType: string
    uri: string
Copy

ManagedInstanceKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ManagedInstanceKey resource accepts the following input properties:

ManagedInstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed instance.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerKeyType
This property is required.
Changes to this property will trigger replacement.
string | Pulumi.AzureNative.Sql.ServerKeyType
The key type like 'ServiceManaged', 'AzureKeyVault'.
KeyName Changes to this property will trigger replacement. string
The name of the managed instance key to be operated on (updated or created).
Uri Changes to this property will trigger replacement. string
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
ManagedInstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed instance.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerKeyType
This property is required.
Changes to this property will trigger replacement.
string | ServerKeyType
The key type like 'ServiceManaged', 'AzureKeyVault'.
KeyName Changes to this property will trigger replacement. string
The name of the managed instance key to be operated on (updated or created).
Uri Changes to this property will trigger replacement. string
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
managedInstanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the managed instance.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverKeyType
This property is required.
Changes to this property will trigger replacement.
String | ServerKeyType
The key type like 'ServiceManaged', 'AzureKeyVault'.
keyName Changes to this property will trigger replacement. String
The name of the managed instance key to be operated on (updated or created).
uri Changes to this property will trigger replacement. String
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
managedInstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the managed instance.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverKeyType
This property is required.
Changes to this property will trigger replacement.
string | ServerKeyType
The key type like 'ServiceManaged', 'AzureKeyVault'.
keyName Changes to this property will trigger replacement. string
The name of the managed instance key to be operated on (updated or created).
uri Changes to this property will trigger replacement. string
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
managed_instance_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the managed instance.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
server_key_type
This property is required.
Changes to this property will trigger replacement.
str | ServerKeyType
The key type like 'ServiceManaged', 'AzureKeyVault'.
key_name Changes to this property will trigger replacement. str
The name of the managed instance key to be operated on (updated or created).
uri Changes to this property will trigger replacement. str
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.
managedInstanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the managed instance.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverKeyType
This property is required.
Changes to this property will trigger replacement.
String | "ServiceManaged" | "AzureKeyVault"
The key type like 'ServiceManaged', 'AzureKeyVault'.
keyName Changes to this property will trigger replacement. String
The name of the managed instance key to be operated on (updated or created).
uri Changes to this property will trigger replacement. String
The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.

Outputs

All input properties are implicitly available as output properties. Additionally, the ManagedInstanceKey resource produces the following output properties:

AutoRotationEnabled bool
Key auto rotation opt-in flag. Either true or false.
CreationDate string
The key creation date.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
Kind of encryption protector. This is metadata used for the Azure portal experience.
Name string
Resource name.
Thumbprint string
Thumbprint of the key.
Type string
Resource type.
AutoRotationEnabled bool
Key auto rotation opt-in flag. Either true or false.
CreationDate string
The key creation date.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
Kind of encryption protector. This is metadata used for the Azure portal experience.
Name string
Resource name.
Thumbprint string
Thumbprint of the key.
Type string
Resource type.
autoRotationEnabled Boolean
Key auto rotation opt-in flag. Either true or false.
creationDate String
The key creation date.
id String
The provider-assigned unique ID for this managed resource.
kind String
Kind of encryption protector. This is metadata used for the Azure portal experience.
name String
Resource name.
thumbprint String
Thumbprint of the key.
type String
Resource type.
autoRotationEnabled boolean
Key auto rotation opt-in flag. Either true or false.
creationDate string
The key creation date.
id string
The provider-assigned unique ID for this managed resource.
kind string
Kind of encryption protector. This is metadata used for the Azure portal experience.
name string
Resource name.
thumbprint string
Thumbprint of the key.
type string
Resource type.
auto_rotation_enabled bool
Key auto rotation opt-in flag. Either true or false.
creation_date str
The key creation date.
id str
The provider-assigned unique ID for this managed resource.
kind str
Kind of encryption protector. This is metadata used for the Azure portal experience.
name str
Resource name.
thumbprint str
Thumbprint of the key.
type str
Resource type.
autoRotationEnabled Boolean
Key auto rotation opt-in flag. Either true or false.
creationDate String
The key creation date.
id String
The provider-assigned unique ID for this managed resource.
kind String
Kind of encryption protector. This is metadata used for the Azure portal experience.
name String
Resource name.
thumbprint String
Thumbprint of the key.
type String
Resource type.

Supporting Types

ServerKeyType
, ServerKeyTypeArgs

ServiceManaged
ServiceManaged
AzureKeyVault
AzureKeyVault
ServerKeyTypeServiceManaged
ServiceManaged
ServerKeyTypeAzureKeyVault
AzureKeyVault
ServiceManaged
ServiceManaged
AzureKeyVault
AzureKeyVault
ServiceManaged
ServiceManaged
AzureKeyVault
AzureKeyVault
SERVICE_MANAGED
ServiceManaged
AZURE_KEY_VAULT
AzureKeyVault
"ServiceManaged"
ServiceManaged
"AzureKeyVault"
AzureKeyVault

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:ManagedInstanceKey sqlcrudtest-4645 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0