Managing LUNs by using APIs
You can use the /storage-provider/luns
API to view, add, modify, and delete the LUNs in your data center environment.
Before provisioning the LUNs, ensure that the SVM has been created and provisioned with the supported protocols. If you are assigning Performance Service Levels (PSLs) or Storage Efficiency Policies (SEPs), while provisioning, the PSLs or SEPs should be created before creating the LUN.
View LUNs
You can use the following method to view the LUNs in your Unified Manager environment. When you have added an ONTAP cluster as a datasource on Active IQ Unified Manager, the storage workloads for those clusters are automatically added to your Unified Manager instance. This API retrieves all the LUNs automatically and manually added to your Unified Manager instance. You can view the details of a specific LUN by running this API with the LUN key.
Category | HTTP verb | Path |
---|---|---|
storage-provider |
GET |
|
Add LUNs
You can use the following method to add LUNs to your SVMs.
Category | HTTP verb | Path |
---|---|---|
storage-provider |
POST |
|
In your cURL request, if you provide a value for the optional parameter volume_name_tag in the input, then that value is used while naming the volume during the LUN creation. This tag enables searching the volume easily. If you provide the volume key in the request, the tagging is skipped. |
Delete LUNs
You can use the following method to delete a specific LUN. You need to provide the LUN key to delete a particular LUN.
If you have created a volume in ONTAP and then provisioned LUNs through Unified Manager on that volume, when you delete all of the LUNs by using this API, the volume also gets deleted from the ONTAP cluster. |
Category | HTTP verb | Path |
---|---|---|
storage-provider |
DELETE |
|
Modify LUNs
You can use the following method to modify a LUN and update its properties. You need to provide the LUN key to modify a particular LUN. You also need to enter the LUN property that you want to update, along with its value. For updating LUN arrays by using this API, you should review the recommendations in “Recommendations for using the APIs”.
You can update only one property at a single invocation of this API. For multiple updates, you need to run this API as many times. |
Category |
HTTP verb |
Path |
storage-provider |
PATCH |
|