Skip to content

Commit 88a9272

Browse files
author
huguesv
committed
Add registration example.
1 parent 1f2ed4e commit 88a9272

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

azure-mgmt-storage/README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,22 @@ section and create an instance of the management client.
106106
107107
storage_client = StorageManagementClient(creds)
108108
109+
Registration
110+
------------
111+
112+
Some operations in the storage ARM APIs require a one-time registration of the
113+
storage provider with your subscription.
114+
115+
Use the following code with the `azure-mgmt-resource <https://pypi.python.org/pypi/azure-mgmt-resource>`__ package to do the registration.
116+
You can use the same credentials you created in the previous section.
117+
118+
.. code:: python
119+
120+
from azure.mgmt.resource import ResourceManagementClient
121+
122+
resource_client = ResourceManagementClient(creds)
123+
resource_client.providers.register('Microsoft.Storage')
124+
109125
Create storage account
110126
----------------------
111127

0 commit comments

Comments
 (0)