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

Support added for CMK encryption #478

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions Commands/dataprotection/backup-vault/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ Create a BackupVault resource belonging to a resource group.
```bash
dataprotection backup-vault create --type "systemAssigned" --location "WestUS" --azure-monitor-alerts-for-job-failures "Enabled" --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" --tags key1="val1" --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
```

- Create BackupVault With CMK Encryption
```bash
dataprotection backup-vault create -g resourceGroupName -v vaultName --location eastasia --storage-setting "[{type:'LocallyRedundant',datastore-type:'VaultStore'}]" --type UserAssigned --user-assigned-identities path_to_uami.json --cmk-encryption-key-uri "https://samplekvazbckp.vault.azure.net/keys/testkey/3cd5235ad6ac4c11b40a6f35444bcbe1" --cmk-encryption-state Enabled --cmk-identity-type UserAssigned --cmk-infrastructure-encryption Enabled --cmk-user-assigned-identity-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami"
```
348,376 changes: 174,188 additions & 174,188 deletions Commands/tree.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/providers/microsoft.dataprotection/backupvaults", "version": "2024-02-01-preview", "swagger": "mgmt-plane/dataprotection/ResourceProviders/Microsoft.DataProtection/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFQcm90ZWN0aW9uL2JhY2t1cFZhdWx0cw==/V/MjAyNC0wMi0wMS1wcmV2aWV3"}, {"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults", "version": "2024-02-01-preview", "swagger": "mgmt-plane/dataprotection/ResourceProviders/Microsoft.DataProtection/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YVByb3RlY3Rpb24vYmFja3VwVmF1bHRz/V/MjAyNC0wMi0wMS1wcmV2aWV3"}], "commandGroups": [{"name": "dataprotection backup-vault", "commands": [{"name": "list", "version": "2024-02-01-preview", "resources": [{"id": "/subscriptions/{}/providers/microsoft.dataprotection/backupvaults", "version": "2024-02-01-preview", "swagger": "mgmt-plane/dataprotection/ResourceProviders/Microsoft.DataProtection/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFQcm90ZWN0aW9uL2JhY2t1cFZhdWx0cw==/V/MjAyNC0wMi0wMS1wcmV2aWV3"}, {"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults", "version": "2024-02-01-preview", "swagger": "mgmt-plane/dataprotection/ResourceProviders/Microsoft.DataProtection/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YVByb3RlY3Rpb24vYmFja3VwVmF1bHRz/V/MjAyNC0wMi0wMS1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}]}], "conditions": [{"var": "$Condition_BackupVaults_GetInResourceGroup", "operator": {"type": "and", "operators": [{"type": "hasValue", "arg": "$Path.resourceGroupName"}, {"type": "hasValue", "arg": "$Path.subscriptionId"}]}}, {"var": "$Condition_BackupVaults_GetInSubscription", "operator": {"type": "and", "operators": [{"type": "hasValue", "arg": "$Path.subscriptionId"}, {"type": "not", "operator": {"type": "hasValue", "arg": "$Path.resourceGroupName"}}]}}], "operations": [{"when": ["$Condition_BackupVaults_GetInResourceGroup"], "operationId": "BackupVaults_GetInResourceGroup", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "uuid", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-02-01-preview"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "item": {"type": "object", "props": [{"type": "string", "name": "eTag"}, {"readOnly": true, "type": "ResourceId", "name": "id"}, {"type": "IdentityObject", "name": "identity", "props": [{"readOnly": true, "type": "string", "name": "principalId"}, {"readOnly": true, "type": "string", "name": "tenantId"}, {"type": "string", "name": "type"}, {"type": "object", "name": "userAssignedIdentities", "additionalProps": {"item": {"type": "object", "props": [{"readOnly": true, "type": "uuid", "name": "clientId"}, {"readOnly": true, "type": "uuid", "name": "principalId"}]}}}]}, {"type": "ResourceLocation", "name": "location", "required": true}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "required": true, "props": [{"type": "object", "name": "featureSettings", "props": [{"type": "object", "name": "crossRegionRestoreSettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}]}, {"type": "object", "name": "crossSubscriptionRestoreSettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}, {"value": "PermanentlyDisabled"}]}}]}]}, {"readOnly": true, "type": "boolean", "name": "isVaultProtectedByResourceGuard"}, {"type": "object", "name": "monitoringSettings", "props": [{"type": "object", "name": "azureMonitorAlertSettings", "props": [{"type": "string", "name": "alertsForAllJobFailures", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}]}]}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Failed"}, {"value": "Provisioning"}, {"value": "Succeeded"}, {"value": "Unknown"}, {"value": "Updating"}]}}, {"type": "array<string>", "name": "replicatedRegions", "item": {"type": "string"}}, {"type": "object", "name": "resourceMoveDetails", "props": [{"type": "string", "name": "completionTimeUtc"}, {"type": "string", "name": "operationId"}, {"type": "string", "name": "sourceResourcePath"}, {"type": "string", "name": "startTimeUtc"}, {"type": "string", "name": "targetResourcePath"}]}, {"readOnly": true, "type": "string", "name": "resourceMoveState", "enum": {"items": [{"value": "CommitFailed"}, {"value": "CommitTimedout"}, {"value": "CriticalFailure"}, {"value": "Failed"}, {"value": "InProgress"}, {"value": "MoveSucceeded"}, {"value": "PartialSuccess"}, {"value": "PrepareFailed"}, {"value": "PrepareTimedout"}, {"value": "Unknown"}]}}, {"readOnly": true, "type": "string", "name": "secureScore", "enum": {"items": [{"value": "Adequate"}, {"value": "Maximum"}, {"value": "Minimum"}, {"value": "None"}, {"value": "NotSupported"}]}}, {"type": "object", "name": "securitySettings", "props": [{"type": "object", "name": "encryptionSettings", "props": [{"type": "string", "name": "infrastructureEncryption", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}, {"type": "object", "name": "kekIdentity", "props": [{"type": "string", "name": "identityId"}, {"type": "string", "name": "identityType", "enum": {"items": [{"value": "SystemAssigned"}, {"value": "UserAssigned"}]}}]}, {"type": "object", "name": "keyVaultProperties", "props": [{"type": "string", "name": "keyUri"}]}, {"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}, {"value": "Inconsistent"}]}}]}, {"type": "object", "name": "immutabilitySettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Locked"}, {"value": "Unlocked"}]}}]}, {"type": "object", "name": "softDeleteSettings", "props": [{"type": "float64", "name": "retentionDurationInDays"}, {"type": "string", "name": "state", "enum": {"items": [{"value": "AlwaysOn"}, {"value": "Off"}, {"value": "On"}]}}]}]}, {"type": "array<object>", "name": "storageSettings", "required": true, "item": {"type": "object", "props": [{"type": "string", "name": "datastoreType", "enum": {"items": [{"value": "ArchiveStore"}, {"value": "OperationalStore"}, {"value": "VaultStore"}]}}, {"type": "string", "name": "type", "enum": {"items": [{"value": "GeoRedundant"}, {"value": "LocallyRedundant"}, {"value": "ZoneRedundant"}]}}]}}]}, {"readOnly": true, "type": "object", "name": "systemData", "props": [{"type": "dateTime", "name": "createdAt"}, {"type": "string", "name": "createdBy"}, {"type": "string", "name": "createdByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}, {"type": "dateTime", "name": "lastModifiedAt"}, {"type": "string", "name": "lastModifiedBy"}, {"type": "string", "name": "lastModifiedByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}]}, {"type": "object", "name": "tags", "additionalProps": {"item": {"type": "string"}}}, {"readOnly": true, "type": "string", "name": "type"}]}}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}, {"when": ["$Condition_BackupVaults_GetInSubscription"], "operationId": "BackupVaults_GetInSubscription", "http": {"path": "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults", "request": {"method": "get", "path": {"params": [{"type": "uuid", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-02-01-preview"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "item": {"type": "object", "props": [{"type": "string", "name": "eTag"}, {"readOnly": true, "type": "ResourceId", "name": "id"}, {"type": "IdentityObject", "name": "identity", "props": [{"readOnly": true, "type": "string", "name": "principalId"}, {"readOnly": true, "type": "string", "name": "tenantId"}, {"type": "string", "name": "type"}, {"type": "object", "name": "userAssignedIdentities", "additionalProps": {"item": {"type": "object", "props": [{"readOnly": true, "type": "uuid", "name": "clientId"}, {"readOnly": true, "type": "uuid", "name": "principalId"}]}}}]}, {"type": "ResourceLocation", "name": "location", "required": true}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "required": true, "props": [{"type": "object", "name": "featureSettings", "props": [{"type": "object", "name": "crossRegionRestoreSettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}]}, {"type": "object", "name": "crossSubscriptionRestoreSettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}, {"value": "PermanentlyDisabled"}]}}]}]}, {"readOnly": true, "type": "boolean", "name": "isVaultProtectedByResourceGuard"}, {"type": "object", "name": "monitoringSettings", "props": [{"type": "object", "name": "azureMonitorAlertSettings", "props": [{"type": "string", "name": "alertsForAllJobFailures", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}]}]}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Failed"}, {"value": "Provisioning"}, {"value": "Succeeded"}, {"value": "Unknown"}, {"value": "Updating"}]}}, {"type": "array<string>", "name": "replicatedRegions", "item": {"type": "string"}}, {"type": "object", "name": "resourceMoveDetails", "props": [{"type": "string", "name": "completionTimeUtc"}, {"type": "string", "name": "operationId"}, {"type": "string", "name": "sourceResourcePath"}, {"type": "string", "name": "startTimeUtc"}, {"type": "string", "name": "targetResourcePath"}]}, {"readOnly": true, "type": "string", "name": "resourceMoveState", "enum": {"items": [{"value": "CommitFailed"}, {"value": "CommitTimedout"}, {"value": "CriticalFailure"}, {"value": "Failed"}, {"value": "InProgress"}, {"value": "MoveSucceeded"}, {"value": "PartialSuccess"}, {"value": "PrepareFailed"}, {"value": "PrepareTimedout"}, {"value": "Unknown"}]}}, {"readOnly": true, "type": "string", "name": "secureScore", "enum": {"items": [{"value": "Adequate"}, {"value": "Maximum"}, {"value": "Minimum"}, {"value": "None"}, {"value": "NotSupported"}]}}, {"type": "object", "name": "securitySettings", "props": [{"type": "object", "name": "encryptionSettings", "props": [{"type": "string", "name": "infrastructureEncryption", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}, {"type": "object", "name": "kekIdentity", "props": [{"type": "string", "name": "identityId"}, {"type": "string", "name": "identityType", "enum": {"items": [{"value": "SystemAssigned"}, {"value": "UserAssigned"}]}}]}, {"type": "object", "name": "keyVaultProperties", "props": [{"type": "string", "name": "keyUri"}]}, {"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}, {"value": "Inconsistent"}]}}]}, {"type": "object", "name": "immutabilitySettings", "props": [{"type": "string", "name": "state", "enum": {"items": [{"value": "Disabled"}, {"value": "Locked"}, {"value": "Unlocked"}]}}]}, {"type": "object", "name": "softDeleteSettings", "props": [{"type": "float64", "name": "retentionDurationInDays"}, {"type": "string", "name": "state", "enum": {"items": [{"value": "AlwaysOn"}, {"value": "Off"}, {"value": "On"}]}}]}]}, {"type": "array<object>", "name": "storageSettings", "required": true, "item": {"type": "object", "props": [{"type": "string", "name": "datastoreType", "enum": {"items": [{"value": "ArchiveStore"}, {"value": "OperationalStore"}, {"value": "VaultStore"}]}}, {"type": "string", "name": "type", "enum": {"items": [{"value": "GeoRedundant"}, {"value": "LocallyRedundant"}, {"value": "ZoneRedundant"}]}}]}}]}, {"readOnly": true, "type": "object", "name": "systemData", "props": [{"type": "dateTime", "name": "createdAt"}, {"type": "string", "name": "createdBy"}, {"type": "string", "name": "createdByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}, {"type": "dateTime", "name": "lastModifiedAt"}, {"type": "string", "name": "lastModifiedBy"}, {"type": "string", "name": "lastModifiedByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}]}, {"type": "object", "name": "tags", "additionalProps": {"item": {"type": "string"}}}, {"readOnly": true, "type": "string", "name": "type"}]}}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "array", "ref": "$Instance.value", "clientFlatten": true, "nextLink": "$Instance.nextLink"}], "confirmation": ""}]}]}
Loading
Loading