Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Cmdlets for Management.Sql to allow customers to add TDE keys and set TDE protector for managed instances #3762

Merged
merged 6 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"encryptionProtectorName": "current",
"api-version": "2017-10-01-preview",
"parameters": {
"properties": {
"serverKeyType": "AzureKeyVault",
"serverKeyName": "someVault_someKey_01234567890123456789012345678901"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/encryptionProtector",
"kind": "azurekeyvault",
"properties": {
"serverKeyName": "someVault_someKey_01234567890123456789012345678901",
"serverKeyType": "AzureKeyVault"
}
}
},
"202": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"encryptionProtectorName": "current",
"api-version": "2017-10-01-preview",
"parameters": {
"properties": {
"serverKeyType": "ServiceManaged",
"serverKeyName": "ServiceManaged"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/encryptionProtector",
"kind": "servicemanaged",
"properties": {
"serverKeyName": "ServiceManaged",
"serverKeyType": "ServiceManaged"
}
}
},
"202": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"encryptionProtectorName": "current",
"api-version": "2017-10-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/encryptionProtector",
"kind": "azurekeyvault",
"properties": {
"serverKeyName": "someVault_someKey_01234567890123456789012345678901",
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"api-version": "2017-10-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/encryptionProtector",
"kind": "azurekeyvault",
"properties": {
"serverKeyName": "someVault_someKey_01234567890123456789012345678901",
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"keyName": "someVault_someKey_01234567890123456789012345678901",
"api-version": "2017-10-01-preview",
"parameters": {
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
"name": "sqlcrudtest-4645",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "azurekeyvault",
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
"thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
"creationDate": "2017-05-01T00:00:00.0Z"
}
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
"name": "sqlcrudtest-4645",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "azurekeyvault",
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
"thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
"creationDate": "2017-05-01T00:00:00.0Z"
}
}
},
"202": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"keyName": "someVault_someKey_01234567890123456789012345678901",
"api-version": "2017-10-01-preview"
},
"responses": {
"200": {
"body": ""
},
"202": {},
"204": {
"body": ""
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"keyName": "someVault_someKey_01234567890123456789012345678901",
"api-version": "2017-10-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
"name": "sqlcrudtest-4645",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "azurekeyvault",
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
"thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
"creationDate": "2017-05-01T00:00:00.0Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-7398",
"managedInstanceName": "sqlcrudtest-4645",
"api-version": "2017-10-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
"name": "someVault_someKey_01234567890123456789012345678901",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "azurekeyvault",
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901",
"thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
"creationDate": "2017-05-01T00:00:00.0Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111",
"name": "myVault_myKey_11111111111111111111111111111111",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "azurekeyvault",
"properties": {
"serverKeyType": "AzureKeyVault",
"uri": "https://myVault.vault.azure.net/keys/myKey/11111111111111111111111111111111",
"thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB",
"creationDate": "2017-05-01T00:00:00.0Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/ServiceManaged",
"name": "ServiceManaged",
"type": "Microsoft.Sql/managedInstances/keys",
"kind": "servicemanaged",
"properties": {
"serverKeyType": "ServiceManaged"
}
}
]
}
}
}
}
8 changes: 8 additions & 0 deletions specification/sql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ input-file:
- Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json
- Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json


# Needed when there is more than one input file
Expand Down Expand Up @@ -177,6 +179,8 @@ input-file:
- Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json
- Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json

# Needed when there is more than one input file
override-info:
Expand Down Expand Up @@ -244,6 +248,8 @@ input-file:
- Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json
- Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json
- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json

# Needed when there is more than one input file
override-info:
Expand Down Expand Up @@ -409,6 +415,8 @@ input-file:
- ./Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json
- ./Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json
- ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json
- ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json
- ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json

# Needed when there is more than one input file
override-info:
Expand Down