page_type | languages | products | description | |||
---|---|---|---|---|---|---|
sample |
|
|
This project demonstrates how to perform a pool change on a Volume for Microsoft.NetApp resource provider using PowerShell SDK. |
This project demonstrates how to use PowerShell sample application to perform a pool change on a Volume for the Microsoft.NetApp resource provider.
In this sample application we perform the following operations:
- Creations
- Azure NetApp Files Account
- Primary Capacity Pool in service level Premium
- Secondary Capacity Pool in service level Standard
- Volume in the Primary pool
- Updates
- Perform pool change, moving Volume from Primary capacity pool to Secondary capacity pool
- Deletions
- Volume
- Primary Capacity Pool
- Secondary Capacity Pool
- Azure NetApp Files Account
Note: The cleanup execution is disabled by default. If you want to run this end to end with the cleanup, please change value of boolean variable 'CleanupResources' in ANFPoolChange.ps1
If you don't already have a Microsoft Azure subscription, you can get a FREE trial account here.
- Azure Subscription.
- Subscription needs to have Azure NetApp Files resource provider registered. For more information, see Register for NetApp Resource Provider.
- (Valid only while Pool Change feature is in preview state) Request preview access for Azure NetApp Files Pool Change. For more information, please refer to this document.
- Resource Group created
- Virtual Network with a delegated subnet to Microsoft.Netapp/volumes resource. For more information, please refer to Guidelines for Azure NetApp Files network planning
This sample is dedicated to demonstrating how to perform a pool change on a Volume in Azure NetApp Files. This project will first create an ANF Account and then two Capacity Pools, one at a Premium service level tier, and another at a Standard service level tier. Then it will create a single Volume in the Premium tier Capacity Pool. Finally, the sample will perform the pool change operation on the Volume by moving it to the Standard tier Capacity Pool.
There is a section in the code dedicated to remove created resources. By default this sample will not remove all created resources; this behavior is controlled by a boolean variable called 'CleanupResources' in the ANFPoolChange.ps1 class. If you want to erase all resources right after the creation operations, set this variable to 'true'.
The following table describes all files within this solution:
Folder | FileName | Description |
---|---|---|
Root | ANFPoolChange.ps1 | Authenticates and executes all operations |
- Clone it locally
git clone https://github.com/Azure-Samples/netappfiles-powershell-pool-change-script-sample.git
- Change folder to netappfiles-powershell-Pool-Change-script-sample\src
- Open ANFPoolChange.ps1 and edit all the parameters
- Save and close
- Run the following command
ANFPoolChange.ps1