Skip to content

Commit b2262ad

Browse files
authored
Merge pull request #697 from calvinhzy/storage-file-provisioned-v2
2 parents 59c4c5a + 1fcb41d commit b2262ad

File tree

16 files changed

+1601
-0
lines changed

16 files changed

+1601
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _storage account file-service-usage_
2+
3+
Get the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.
4+
5+
## Versions
6+
7+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMve30vdXNhZ2VzL3t9/2024-01-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/{}/usages/{} 2024-01-01 -->
10+
11+
#### examples
12+
13+
- Get file service usage for the storage account, only works for provisioned v2
14+
```bash
15+
storage account file-service-usage --account-name sa1 -g rg1
16+
```

Commands/storage/account/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ Manage storage accounts.
66

77
- [migration](/Commands/storage/account/migration/readme.md)
88
: Manage Storage Account Migration
9+
10+
## Commands
11+
12+
- [file-service-usage](/Commands/storage/account/_file-service-usage.md)
13+
: Get the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.

Commands/storage/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ Manage Azure Cloud Storage resources.
66

77
- [account](/Commands/storage/account/readme.md)
88
: Manage storage accounts.
9+
10+
- [share-rm](/Commands/storage/share-rm/readme.md)
11+
: Manage Azure file shares using the Microsoft.Storage resource provider.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# [Command] _storage share-rm create_
2+
3+
Create a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
4+
5+
## Versions
6+
7+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMvZGVmYXVsdC9zaGFyZXMve30=/2024-01-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/default/shares/{} 2024-01-01 -->
10+
11+
#### examples
12+
13+
- Create a new Azure file share 'myfileshare' with metadata and quota as 10 GB under the storage account 'mystorageaccount'(account name) in resource group 'MyResourceGroup'.
14+
```bash
15+
storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2
16+
```
17+
18+
- Create a new Azure file share 'myfileshare' with metadata and quota as 6000 GB under the storage account 'mystorageaccount'(account name) which enables large file share in resource group 'MyResourceGroup'.
19+
```bash
20+
storage account update -g MyResourceGroup --name mystorageaccount --enable-large-file-share
21+
storage share-rm create -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 6000 --metadata key1=value1 key2=value2
22+
```
23+
24+
- Create a new Azure file share 'myfileshare' with metadata and quota as 10 GB under the storage account 'mystorageaccount' (account id).
25+
```bash
26+
storage share-rm create --storage-account mystorageaccount --name myfileshare --quota 10 --metadata key1=value1 key2=value2
27+
```
28+
29+
- Create a new Azure file share 'myfileshare' under the storage account 'mystorageaccount' which enables provisionedv2 in resource group 'MyResourceGroup'.
30+
```bash
31+
storage account create -g res3376 --name sto328 --sku StandardV2_LRS --kind FileStorage
32+
storage share-rm create --storage-account sto328 -g res3376 -n share1 --provisioned-bandwidth-mibps 60 --provisioned-iops 500
33+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# [Command] _storage share-rm delete_
2+
3+
Delete the specified Azure file share or share snapshot.
4+
5+
Delete the specified Azure file share or share snapshot. \
6+
BREAKING CHANGE: Snapshot can not be deleted by default and we have added a new parameter to use if you want to include sanpshots for delete operation.
7+
8+
## Versions
9+
10+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMvZGVmYXVsdC9zaGFyZXMve30=/2024-01-01.xml) **Stable**
11+
12+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/default/shares/{} 2024-01-01 -->
13+
14+
#### examples
15+
16+
- Delete an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.
17+
```bash
18+
storage share-rm delete -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
19+
```
20+
21+
- Delete an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).
22+
```bash
23+
storage share-rm delete --storage-account mystorageaccount --name myfileshare
24+
```
25+
26+
- Delete an Azure file share by resource id.
27+
```bash
28+
storage share-rm delete --ids file-share-id
29+
```
30+
31+
- Delete an Azure file share snapshot.
32+
```bash
33+
storage share-rm delete --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"
34+
```
35+
36+
- Delete an Azure file share and all its snapshots.
37+
```bash
38+
storage share-rm delete --include snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
39+
```
40+
41+
- Delete an Azure file share and all its snapshots (leased/unleased).
42+
```bash
43+
storage share-rm delete --include leased-snapshots -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
44+
```

Commands/storage/share-rm/_list.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# [Command] _storage share-rm list_
2+
3+
List all shares.
4+
5+
## Versions
6+
7+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMvZGVmYXVsdC9zaGFyZXM=/2024-01-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/default/shares 2024-01-01 -->
10+
11+
#### examples
12+
13+
- List the Azure file shares under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.
14+
```bash
15+
storage share-rm list -g MyResourceGroup --storage-account mystorageaccount
16+
```
17+
18+
- List the Azure file shares under the storage account 'mystorageaccount' (account id).
19+
```bash
20+
storage share-rm list --storage-account mystorageaccount
21+
```
22+
23+
- List all file shares include deleted under the storage account 'mystorageaccount' .
24+
```bash
25+
storage share-rm list --storage-account mystorageaccount --include-deleted
26+
```
27+
28+
- List all file shares include its all snapshots under the storage account 'mystorageaccount'
29+
```bash
30+
storage share-rm list --storage-account mystorageaccount --include-snapshot
31+
```
32+
33+
- List all file shares include its all snapshots and deleted file shares under the storage account 'mystorageaccount'
34+
```bash
35+
storage share-rm list --storage-account mystorageaccount --include-deleted --include-snapshot
36+
```

Commands/storage/share-rm/_show.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# [Command] _storage share-rm show_
2+
3+
Show the properties for a specified Azure file share or share snapshot.
4+
5+
## Versions
6+
7+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMvZGVmYXVsdC9zaGFyZXMve30=/2024-01-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/default/shares/{} 2024-01-01 -->
10+
11+
#### examples
12+
13+
- Show the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.
14+
```bash
15+
storage share-rm show -g MyResourceGroup --storage-account mystorageaccount --name myfileshare
16+
```
17+
18+
- Show the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).
19+
```bash
20+
storage share-rm show --storage-account mystorageaccount --name myfileshare
21+
```
22+
23+
- Show the properties of an Azure file share by resource id.
24+
```bash
25+
storage share-rm show --ids file-share-id
26+
```
27+
28+
- Show the properties of an Azure file share snapshot
29+
```bash
30+
storage share-rm show --ids file-share-id --snapshot "2021-03-25T05:29:56.0000000Z"
31+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [Command] _storage share-rm update_
2+
3+
Update a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
4+
5+
## Versions
6+
7+
### [2024-01-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdG9yYWdlL3N0b3JhZ2VhY2NvdW50cy97fS9maWxlc2VydmljZXMvZGVmYXVsdC9zaGFyZXMve30=/2024-01-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/fileservices/default/shares/{} 2024-01-01 -->
10+
11+
#### examples
12+
13+
- Update the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account name) in resource group 'MyResourceGroup'.
14+
```bash
15+
storage share-rm update -g MyResourceGroup --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2
16+
```
17+
18+
- Update the properties for an Azure file share 'myfileshare' under the storage account 'mystorageaccount' (account id).
19+
```bash
20+
storage share-rm update --storage-account mystorageaccount --name myfileshare --quota 3 --metadata key1=value1 key2=value2
21+
```
22+
23+
- Update the properties for an Azure file shares by resource id.
24+
```bash
25+
storage share-rm update --ids file-share-id --quota 3 --metadata key1=value1 key2=value2
26+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# [Group] _storage share-rm_
2+
3+
Manage Azure file shares using the Microsoft.Storage resource provider.
4+
5+
## Commands
6+
7+
- [create](/Commands/storage/share-rm/_create.md)
8+
: Create a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
9+
10+
- [delete](/Commands/storage/share-rm/_delete.md)
11+
: Delete the specified Azure file share or share snapshot.
12+
13+
- [list](/Commands/storage/share-rm/_list.md)
14+
: List all shares.
15+
16+
- [show](/Commands/storage/share-rm/_show.md)
17+
: Show the properties for a specified Azure file share or share snapshot.
18+
19+
- [update](/Commands/storage/share-rm/_update.md)
20+
: Update a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.

0 commit comments

Comments
 (0)