Skip to content

Commit

Permalink
{Compute} az snapshot: Migrate commands (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanzhudd authored Dec 10, 2024
2 parents 1ee44f1 + 58f8369 commit 9806054
Show file tree
Hide file tree
Showing 19 changed files with 2,238 additions and 74 deletions.
4 changes: 4 additions & 0 deletions Commands/snapshot/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ Create a snapshot.
### [2022-03-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2022-03-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2022-03-02 -->

### [2023-10-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2023-10-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2023-10-02 -->
4 changes: 4 additions & 0 deletions Commands/snapshot/_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ Delete a snapshot.
### [2022-03-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2022-03-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2022-03-02 -->

### [2023-10-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2023-10-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2023-10-02 -->
53 changes: 53 additions & 0 deletions Commands/snapshot/_grant-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# [Command] _snapshot grant-access_

Grant read access to a snapshot.

## Versions

### [2017-03-30](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fS9iZWdpbmdldGFjY2Vzcw==/2017-03-30.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess 2017-03-30 -->

#### examples

- Grant read access to a snapshot.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup
```

- Grant read access to a snapshot with specifying the file format.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX
```

### [2019-07-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fS9iZWdpbmdldGFjY2Vzcw==/2019-07-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess 2019-07-01 -->

#### examples

- Grant read access to a snapshot.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup
```

- Grant read access to a snapshot with specifying the file format.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX
```

### [2023-10-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fS9iZWdpbmdldGFjY2Vzcw==/2023-10-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess 2023-10-02 -->

#### examples

- Grant read access to a snapshot.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup
```

- Grant read access to a snapshot with specifying the file format.
```bash
snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX
```
4 changes: 4 additions & 0 deletions Commands/snapshot/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ Get information about a snapshot.
### [2022-03-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2022-03-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2022-03-02 -->

### [2023-10-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2023-10-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2023-10-02 -->
40 changes: 40 additions & 0 deletions Commands/snapshot/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,50 @@ Update a snapshot.

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2017-03-30 -->

#### examples

- Update a snapshot and associate it with a disk access resource.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID
```

- Update a snapshot.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription
```

### [2019-07-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2019-07-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2019-07-01 -->

#### examples

- Update a snapshot and associate it with a disk access resource.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID
```

- Update a snapshot.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription
```

### [2022-03-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2022-03-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2022-03-02 -->

### [2023-10-02](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3NuYXBzaG90cy97fQ==/2023-10-02.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{} 2023-10-02 -->

#### examples

- Update a snapshot and associate it with a disk access resource.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID
```

- Update a snapshot.
```bash
snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription
```
3 changes: 3 additions & 0 deletions Commands/snapshot/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Manage point-in-time copies of managed disks, native blobs, or other snapshots.
- [delete](/Commands/snapshot/_delete.md)
: Delete a snapshot.

- [grant-access](/Commands/snapshot/_grant-access.md)
: Grant read access to a snapshot.

- [list](/Commands/snapshot/_list.md)
: List snapshots under a resource group.

Expand Down
165 changes: 165 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -211159,6 +211159,16 @@
}
]
},
{
"name": "2023-10-02",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}",
"plane": "mgmt-plane",
"version": "2023-10-02"
}
]
},
{
"name": "2019-07-01",
"resources": [
Expand Down Expand Up @@ -211200,6 +211210,16 @@
}
]
},
{
"name": "2023-10-02",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}",
"plane": "mgmt-plane",
"version": "2023-10-02"
}
]
},
{
"name": "2019-07-01",
"resources": [
Expand All @@ -211222,6 +211242,89 @@
}
]
},
"grant-access": {
"help": {
"short": "Grant read access to a snapshot."
},
"names": [
"snapshot",
"grant-access"
],
"versions": [
{
"examples": [
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup"
],
"name": "Grant read access to a snapshot."
},
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX"
],
"name": "Grant read access to a snapshot with specifying the file format."
}
],
"name": "2019-07-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess",
"plane": "mgmt-plane",
"version": "2019-07-01"
}
]
},
{
"examples": [
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup"
],
"name": "Grant read access to a snapshot."
},
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX"
],
"name": "Grant read access to a snapshot with specifying the file format."
}
],
"name": "2023-10-02",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess",
"plane": "mgmt-plane",
"version": "2023-10-02"
}
]
},
{
"examples": [
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup"
],
"name": "Grant read access to a snapshot."
},
{
"commands": [
"snapshot grant-access --duration-in-seconds 3600 --name MySnapshot --resource-group MyResourceGroup --file-format VHDX"
],
"name": "Grant read access to a snapshot with specifying the file format."
}
],
"name": "2017-03-30",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}/begingetaccess",
"plane": "mgmt-plane",
"version": "2017-03-30"
}
]
}
]
},
"list": {
"help": {
"short": "List snapshots under a resource group."
Expand Down Expand Up @@ -211380,6 +211483,16 @@
}
]
},
{
"name": "2023-10-02",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}",
"plane": "mgmt-plane",
"version": "2023-10-02"
}
]
},
{
"name": "2019-07-01",
"resources": [
Expand Down Expand Up @@ -211422,6 +211535,44 @@
]
},
{
"examples": [
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID"
],
"name": "Update a snapshot and associate it with a disk access resource."
},
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription"
],
"name": "Update a snapshot."
}
],
"name": "2023-10-02",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/snapshots/{}",
"plane": "mgmt-plane",
"version": "2023-10-02"
}
]
},
{
"examples": [
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID"
],
"name": "Update a snapshot and associate it with a disk access resource."
},
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription"
],
"name": "Update a snapshot."
}
],
"name": "2019-07-01",
"resources": [
{
Expand All @@ -211432,6 +211583,20 @@
]
},
{
"examples": [
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --network-access-policy AllowPrivate --disk-access MyDiskAccessID"
],
"name": "Update a snapshot and associate it with a disk access resource."
},
{
"commands": [
"snapshot update --name MySnapshot --resource-group MyResourceGroup --subscription MySubscription"
],
"name": "Update a snapshot."
}
],
"name": "2017-03-30",
"resources": [
{
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 9806054

Please sign in to comment.