azure-native.sql.EncryptionProtector
Explore with Pulumi AI
The server encryption protector. API Version: 2020-11-01-preview.
Example Usage
Update the encryption protector to key vault
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var encryptionProtector = new AzureNative.Sql.EncryptionProtector("encryptionProtector", new()
{
AutoRotationEnabled = false,
EncryptionProtectorName = "current",
ResourceGroupName = "sqlcrudtest-7398",
ServerKeyName = "someVault_someKey_01234567890123456789012345678901",
ServerKeyType = "AzureKeyVault",
ServerName = "sqlcrudtest-4645",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewEncryptionProtector(ctx, "encryptionProtector", &sql.EncryptionProtectorArgs{
AutoRotationEnabled: pulumi.Bool(false),
EncryptionProtectorName: pulumi.String("current"),
ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
ServerKeyName: pulumi.String("someVault_someKey_01234567890123456789012345678901"),
ServerKeyType: pulumi.String("AzureKeyVault"),
ServerName: pulumi.String("sqlcrudtest-4645"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.EncryptionProtector;
import com.pulumi.azurenative.sql.EncryptionProtectorArgs;
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 encryptionProtector = new EncryptionProtector("encryptionProtector", EncryptionProtectorArgs.builder()
.autoRotationEnabled(false)
.encryptionProtectorName("current")
.resourceGroupName("sqlcrudtest-7398")
.serverKeyName("someVault_someKey_01234567890123456789012345678901")
.serverKeyType("AzureKeyVault")
.serverName("sqlcrudtest-4645")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
encryption_protector = azure_native.sql.EncryptionProtector("encryptionProtector",
auto_rotation_enabled=False,
encryption_protector_name="current",
resource_group_name="sqlcrudtest-7398",
server_key_name="someVault_someKey_01234567890123456789012345678901",
server_key_type="AzureKeyVault",
server_name="sqlcrudtest-4645")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const encryptionProtector = new azure_native.sql.EncryptionProtector("encryptionProtector", {
autoRotationEnabled: false,
encryptionProtectorName: "current",
resourceGroupName: "sqlcrudtest-7398",
serverKeyName: "someVault_someKey_01234567890123456789012345678901",
serverKeyType: "AzureKeyVault",
serverName: "sqlcrudtest-4645",
});
resources:
encryptionProtector:
type: azure-native:sql:EncryptionProtector
properties:
autoRotationEnabled: false
encryptionProtectorName: current
resourceGroupName: sqlcrudtest-7398
serverKeyName: someVault_someKey_01234567890123456789012345678901
serverKeyType: AzureKeyVault
serverName: sqlcrudtest-4645
Update the encryption protector to service managed
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var encryptionProtector = new AzureNative.Sql.EncryptionProtector("encryptionProtector", new()
{
EncryptionProtectorName = "current",
ResourceGroupName = "sqlcrudtest-7398",
ServerKeyName = "ServiceManaged",
ServerKeyType = "ServiceManaged",
ServerName = "sqlcrudtest-4645",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewEncryptionProtector(ctx, "encryptionProtector", &sql.EncryptionProtectorArgs{
EncryptionProtectorName: pulumi.String("current"),
ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
ServerKeyName: pulumi.String("ServiceManaged"),
ServerKeyType: pulumi.String("ServiceManaged"),
ServerName: pulumi.String("sqlcrudtest-4645"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.EncryptionProtector;
import com.pulumi.azurenative.sql.EncryptionProtectorArgs;
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 encryptionProtector = new EncryptionProtector("encryptionProtector", EncryptionProtectorArgs.builder()
.encryptionProtectorName("current")
.resourceGroupName("sqlcrudtest-7398")
.serverKeyName("ServiceManaged")
.serverKeyType("ServiceManaged")
.serverName("sqlcrudtest-4645")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
encryption_protector = azure_native.sql.EncryptionProtector("encryptionProtector",
encryption_protector_name="current",
resource_group_name="sqlcrudtest-7398",
server_key_name="ServiceManaged",
server_key_type="ServiceManaged",
server_name="sqlcrudtest-4645")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const encryptionProtector = new azure_native.sql.EncryptionProtector("encryptionProtector", {
encryptionProtectorName: "current",
resourceGroupName: "sqlcrudtest-7398",
serverKeyName: "ServiceManaged",
serverKeyType: "ServiceManaged",
serverName: "sqlcrudtest-4645",
});
resources:
encryptionProtector:
type: azure-native:sql:EncryptionProtector
properties:
encryptionProtectorName: current
resourceGroupName: sqlcrudtest-7398
serverKeyName: ServiceManaged
serverKeyType: ServiceManaged
serverName: sqlcrudtest-4645
Create EncryptionProtector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EncryptionProtector(name: string, args: EncryptionProtectorArgs, opts?: CustomResourceOptions);
@overload
def EncryptionProtector(resource_name: str,
args: EncryptionProtectorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EncryptionProtector(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_key_type: Optional[Union[str, ServerKeyType]] = None,
server_name: Optional[str] = None,
auto_rotation_enabled: Optional[bool] = None,
encryption_protector_name: Optional[str] = None,
server_key_name: Optional[str] = None)
func NewEncryptionProtector(ctx *Context, name string, args EncryptionProtectorArgs, opts ...ResourceOption) (*EncryptionProtector, error)
public EncryptionProtector(string name, EncryptionProtectorArgs args, CustomResourceOptions? opts = null)
public EncryptionProtector(String name, EncryptionProtectorArgs args)
public EncryptionProtector(String name, EncryptionProtectorArgs args, CustomResourceOptions options)
type: azure-native:sql:EncryptionProtector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EncryptionProtectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EncryptionProtectorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EncryptionProtectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EncryptionProtectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EncryptionProtectorArgs
- 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 encryptionProtectorResource = new AzureNative.Sql.EncryptionProtector("encryptionProtectorResource", new()
{
ResourceGroupName = "string",
ServerKeyType = "string",
ServerName = "string",
AutoRotationEnabled = false,
EncryptionProtectorName = "string",
ServerKeyName = "string",
});
example, err := sql.NewEncryptionProtector(ctx, "encryptionProtectorResource", &sql.EncryptionProtectorArgs{
ResourceGroupName: "string",
ServerKeyType: "string",
ServerName: "string",
AutoRotationEnabled: false,
EncryptionProtectorName: "string",
ServerKeyName: "string",
})
var encryptionProtectorResource = new EncryptionProtector("encryptionProtectorResource", EncryptionProtectorArgs.builder()
.resourceGroupName("string")
.serverKeyType("string")
.serverName("string")
.autoRotationEnabled(false)
.encryptionProtectorName("string")
.serverKeyName("string")
.build());
encryption_protector_resource = azure_native.sql.EncryptionProtector("encryptionProtectorResource",
resource_group_name=string,
server_key_type=string,
server_name=string,
auto_rotation_enabled=False,
encryption_protector_name=string,
server_key_name=string)
const encryptionProtectorResource = new azure_native.sql.EncryptionProtector("encryptionProtectorResource", {
resourceGroupName: "string",
serverKeyType: "string",
serverName: "string",
autoRotationEnabled: false,
encryptionProtectorName: "string",
serverKeyName: "string",
});
type: azure-native:sql:EncryptionProtector
properties:
autoRotationEnabled: false
encryptionProtectorName: string
resourceGroupName: string
serverKeyName: string
serverKeyType: string
serverName: string
EncryptionProtector 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 EncryptionProtector resource accepts the following input properties:
- Resource
Group stringName - 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 string | Pulumi.Type Azure Native. Sql. Server Key Type - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- Server
Name string - The name of the server.
- Auto
Rotation boolEnabled - Key auto rotation opt-in flag. Either true or false.
- Encryption
Protector stringName - The name of the encryption protector to be updated.
- Server
Key stringName - The name of the server key.
- Resource
Group stringName - 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 string | ServerType Key Type - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- Server
Name string - The name of the server.
- Auto
Rotation boolEnabled - Key auto rotation opt-in flag. Either true or false.
- Encryption
Protector stringName - The name of the encryption protector to be updated.
- Server
Key stringName - The name of the server key.
- resource
Group StringName - 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 String | ServerType Key Type - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- server
Name String - The name of the server.
- auto
Rotation BooleanEnabled - Key auto rotation opt-in flag. Either true or false.
- encryption
Protector StringName - The name of the encryption protector to be updated.
- server
Key StringName - The name of the server key.
- resource
Group stringName - 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 string | ServerType Key Type - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- server
Name string - The name of the server.
- auto
Rotation booleanEnabled - Key auto rotation opt-in flag. Either true or false.
- encryption
Protector stringName - The name of the encryption protector to be updated.
- server
Key stringName - The name of the server key.
- resource_
group_ strname - 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_ str | Servertype Key Type - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- server_
name str - The name of the server.
- auto_
rotation_ boolenabled - Key auto rotation opt-in flag. Either true or false.
- encryption_
protector_ strname - The name of the encryption protector to be updated.
- server_
key_ strname - The name of the server key.
- resource
Group StringName - 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 String | "ServiceType Managed" | "Azure Key Vault" - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
- server
Name String - The name of the server.
- auto
Rotation BooleanEnabled - Key auto rotation opt-in flag. Either true or false.
- encryption
Protector StringName - The name of the encryption protector to be updated.
- server
Key StringName - The name of the server key.
Outputs
All input properties are implicitly available as output properties. Additionally, the EncryptionProtector resource produces the following output properties:
- 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.
- Location string
- Resource location.
- Name string
- Resource name.
- Subregion string
- Subregion of the encryption protector.
- Thumbprint string
- Thumbprint of the server key.
- Type string
- Resource type.
- Uri string
- The URI of the server key.
- 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.
- Location string
- Resource location.
- Name string
- Resource name.
- Subregion string
- Subregion of the encryption protector.
- Thumbprint string
- Thumbprint of the server key.
- Type string
- Resource type.
- Uri string
- The URI of the server key.
- 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.
- location String
- Resource location.
- name String
- Resource name.
- subregion String
- Subregion of the encryption protector.
- thumbprint String
- Thumbprint of the server key.
- type String
- Resource type.
- uri String
- The URI of the server key.
- 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.
- location string
- Resource location.
- name string
- Resource name.
- subregion string
- Subregion of the encryption protector.
- thumbprint string
- Thumbprint of the server key.
- type string
- Resource type.
- uri string
- The URI of the server key.
- 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.
- location str
- Resource location.
- name str
- Resource name.
- subregion str
- Subregion of the encryption protector.
- thumbprint str
- Thumbprint of the server key.
- type str
- Resource type.
- uri str
- The URI of the server key.
- 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.
- location String
- Resource location.
- name String
- Resource name.
- subregion String
- Subregion of the encryption protector.
- thumbprint String
- Thumbprint of the server key.
- type String
- Resource type.
- uri String
- The URI of the server key.
Supporting Types
ServerKeyType, ServerKeyTypeArgs
- Service
Managed - ServiceManaged
- Azure
Key Vault - AzureKeyVault
- Server
Key Type Service Managed - ServiceManaged
- Server
Key Type Azure Key Vault - AzureKeyVault
- Service
Managed - ServiceManaged
- Azure
Key Vault - AzureKeyVault
- Service
Managed - ServiceManaged
- Azure
Key Vault - AzureKeyVault
- SERVICE_MANAGED
- ServiceManaged
- AZURE_KEY_VAULT
- AzureKeyVault
- "Service
Managed" - ServiceManaged
- "Azure
Key Vault" - AzureKeyVault
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:EncryptionProtector current /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0