Skip to content

Commit

Permalink
Merge pull request Azure#94 from zubairabid/migrate-dataprotection-aaz
Browse files Browse the repository at this point in the history
Migrate dataprotection backup-vault to AAZ-dev-tools and add support for immutable vaults and soft delete
  • Loading branch information
kairu-ms authored Feb 10, 2023
2 parents 271f213 + 0977e84 commit f106c33
Show file tree
Hide file tree
Showing 20 changed files with 9,583 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Commands/dataprotection/backup-vault/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# [Command] _dataprotection backup-vault create_

Create a BackupVault resource belonging to a resource group.

## Versions

### [2022-12-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXRhcHJvdGVjdGlvbi9iYWNrdXB2YXVsdHMve30=/2022-12-01.xml) **Experimental**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{} 2022-12-01 -->

#### examples

- Create BackupVault
```bash
dataprotection backup-vault create --type "None" --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 MSI
```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"
```
16 changes: 16 additions & 0 deletions Commands/dataprotection/backup-vault/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _dataprotection backup-vault delete_

Delete a BackupVault resource from the resource group.

## Versions

### [2022-12-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXRhcHJvdGVjdGlvbi9iYWNrdXB2YXVsdHMve30=/2022-12-01.xml) **Experimental**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{} 2022-12-01 -->

#### examples

- Delete BackupVault
```bash
dataprotection backup-vault delete --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
```
22 changes: 22 additions & 0 deletions Commands/dataprotection/backup-vault/_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# [Command] _dataprotection backup-vault list_

Gets list of backup vault in a subscription or in a resource group.

## Versions

### [2022-12-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXRhcHJvdGVjdGlvbi9iYWNrdXB2YXVsdHM=/2022-12-01.xml) **Experimental**

<!-- mgmt-plane /subscriptions/{}/providers/microsoft.dataprotection/backupvaults 2022-12-01 -->
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults 2022-12-01 -->

#### examples

- List backup vault in a subscription
```bash
dataprotection backup-vault list
```

- List backup vault in a resource group
```bash
dataprotection backup-vault list -g sarath-rg
```
21 changes: 21 additions & 0 deletions Commands/dataprotection/backup-vault/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# [Command] _dataprotection backup-vault show_

Get a resource belonging to a resource group.

## Versions

### [2022-12-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXRhcHJvdGVjdGlvbi9iYWNrdXB2YXVsdHMve30=/2022-12-01.xml) **Experimental**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{} 2022-12-01 -->

#### examples

- Get BackupVault
```bash
dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
```

- Get BackupVault With MSI
```bash
dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
```
16 changes: 16 additions & 0 deletions Commands/dataprotection/backup-vault/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _dataprotection backup-vault update_

Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.

## Versions

### [2022-12-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXRhcHJvdGVjdGlvbi9iYWNrdXB2YXVsdHMve30=/2022-12-01.xml) **Experimental**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{} 2022-12-01 -->

#### examples

- Patch BackupVault
```bash
dataprotection backup-vault update --azure-monitor-alerts-for-job-failures "Enabled" --tags newKey="newVal" --resource-group "SampleResourceGroup" --vault-name "swaggerExample"
```
20 changes: 20 additions & 0 deletions Commands/dataprotection/backup-vault/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# [Group] _dataprotection backup-vault_

Manage backup vault with dataprotection.

## Commands

- [create](/Commands/dataprotection/backup-vault/_create.md)
: Create a BackupVault resource belonging to a resource group.

- [delete](/Commands/dataprotection/backup-vault/_delete.md)
: Delete a BackupVault resource from the resource group.

- [list](/Commands/dataprotection/backup-vault/_list.md)
: Gets list of backup vault in a subscription or in a resource group.

- [show](/Commands/dataprotection/backup-vault/_show.md)
: Get a resource belonging to a resource group.

- [update](/Commands/dataprotection/backup-vault/_update.md)
: Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
8 changes: 8 additions & 0 deletions Commands/dataprotection/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# [Group] _dataprotection_

Manage Data Protection.

## Subgroups

- [backup-vault](/Commands/dataprotection/backup-vault/readme.md)
: Manage backup vault with dataprotection.
3 changes: 3 additions & 0 deletions Commands/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
- [change-analysis](/Commands/change-analysis/readme.md)
: List changes for resources

- [dataprotection](/Commands/dataprotection/readme.md)
: Manage Data Protection.

- [databricks](/Commands/databricks/readme.md)
: Manage databricks workspaces.

Expand Down
199 changes: 199 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,205 @@
"change-analysis"
]
},
"dataprotection": {
"commandGroups": {
"backup-vault": {
"commands": {
"create": {
"help": {
"short": "Create a BackupVault resource belonging to a resource group."
},
"names": [
"dataprotection",
"backup-vault",
"create"
],
"versions": [
{
"examples": [
{
"commands": [
"dataprotection backup-vault create --type \"None\" --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\""
],
"name": "Create BackupVault"
},
{
"commands": [
"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\""
],
"name": "Create BackupVault With MSI"
}
],
"name": "2022-12-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{}",
"plane": "mgmt-plane",
"version": "2022-12-01"
}
],
"stage": "Experimental"
}
]
},
"delete": {
"help": {
"short": "Delete a BackupVault resource from the resource group."
},
"names": [
"dataprotection",
"backup-vault",
"delete"
],
"versions": [
{
"examples": [
{
"commands": [
"dataprotection backup-vault delete --resource-group \"SampleResourceGroup\" --vault-name \"swaggerExample\""
],
"name": "Delete BackupVault"
}
],
"name": "2022-12-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{}",
"plane": "mgmt-plane",
"version": "2022-12-01"
}
],
"stage": "Experimental"
}
]
},
"list": {
"help": {
"short": "Gets list of backup vault in a subscription or in a resource group."
},
"names": [
"dataprotection",
"backup-vault",
"list"
],
"versions": [
{
"examples": [
{
"commands": [
"dataprotection backup-vault list"
],
"name": "List backup vault in a subscription"
},
{
"commands": [
"dataprotection backup-vault list -g sarath-rg"
],
"name": "List backup vault in a resource group"
}
],
"name": "2022-12-01",
"resources": [
{
"id": "/subscriptions/{}/providers/microsoft.dataprotection/backupvaults",
"plane": "mgmt-plane",
"version": "2022-12-01"
},
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults",
"plane": "mgmt-plane",
"version": "2022-12-01"
}
],
"stage": "Experimental"
}
]
},
"show": {
"help": {
"short": "Get a resource belonging to a resource group."
},
"names": [
"dataprotection",
"backup-vault",
"show"
],
"versions": [
{
"examples": [
{
"commands": [
"dataprotection backup-vault show --resource-group \"SampleResourceGroup\" --vault-name \"swaggerExample\""
],
"name": "Get BackupVault"
},
{
"commands": [
"dataprotection backup-vault show --resource-group \"SampleResourceGroup\" --vault-name \"swaggerExample\""
],
"name": "Get BackupVault With MSI"
}
],
"name": "2022-12-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{}",
"plane": "mgmt-plane",
"version": "2022-12-01"
}
],
"stage": "Experimental"
}
]
},
"update": {
"help": {
"short": "Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource."
},
"names": [
"dataprotection",
"backup-vault",
"update"
],
"versions": [
{
"examples": [
{
"commands": [
"dataprotection backup-vault update --azure-monitor-alerts-for-job-failures \"Enabled\" --tags newKey=\"newVal\" --resource-group \"SampleResourceGroup\" --vault-name \"swaggerExample\""
],
"name": "Patch BackupVault"
}
],
"name": "2022-12-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dataprotection/backupvaults/{}",
"plane": "mgmt-plane",
"version": "2022-12-01"
}
],
"stage": "Experimental"
}
]
}
},
"help": {
"short": "Manage backup vault with dataprotection."
},
"names": [
"dataprotection",
"backup-vault"
]
}
},
"help": {
"short": "Manage Data Protection."
},
"names": [
"dataprotection"
]
},
"databricks": {
"commandGroups": {
"access-connector": {
Expand Down
Loading

0 comments on commit f106c33

Please sign in to comment.