Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
138 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
Azure Data Lake Management Analytics | ||
==================================== | ||
|
||
For general information on resource management, see :doc:`Resource Management<resourcemanagement>`. | ||
|
||
Create the management client | ||
---------------------------- | ||
|
||
The following code creates an instance of the management client. | ||
|
||
You will need to provide your ``subscription_id`` which can be retrieved | ||
from `your subscription list <https://manage.windowsazure.com/#Workspaces/AdminTasks/SubscriptionMapping>`__. | ||
|
||
See :doc:`Resource Management Authentication <quickstart_authentication>` | ||
for details on handling Azure Active Directory authentication with the Python SDK, and creating a ``Credentials`` instance. | ||
|
||
.. code:: python | ||
from azure.mgmt.datalake.analytics import ( | ||
DataLakeAnalyticsAccountManagementClient, | ||
DataLakeAnalyticsCatalogManagementClient, | ||
DataLakeAnalyticsJobManagementClient | ||
) | ||
from azure.common.credentials import UserPassCredentials | ||
# Replace this with your subscription id | ||
subscription_id = '33333333-3333-3333-3333-333333333333' | ||
# See above for details on creating different types of AAD credentials | ||
credentials = UserPassCredentials( | ||
'user@domain.com', # Your user | ||
'my_password', # Your password | ||
) | ||
account_client = DataLakeAnalyticsAccountManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
catalog_client = DataLakeAnalyticsCatalogManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
job_client = DataLakeAnalyticsJobManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
Registration | ||
------------ | ||
|
||
Some operations in the ARM APIs require a one-time registration of the | ||
provider with your subscription. | ||
|
||
Use the following code to do the registration. You can use the same | ||
credentials you created in the previous section. | ||
|
||
.. code:: python | ||
from azure.mgmt.resource.resources import ResourceManagementClient | ||
resource_client = ResourceManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
resource_client.providers.register('Microsoft.DataLakeAnalytics') | ||
Samples | ||
------- | ||
|
||
Samples writing in progress! In the meantime, you should look at the unit tests of this package: | ||
|
||
https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt/tests/test_mgmt_datalake_analytics.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Azure Data Lake Management Store | ||
================================ | ||
|
||
For general information on resource management, see :doc:`Resource Management<resourcemanagement>`. | ||
|
||
Create the management client | ||
---------------------------- | ||
|
||
The following code creates an instance of the management client. | ||
|
||
You will need to provide your ``subscription_id`` which can be retrieved | ||
from `your subscription list <https://manage.windowsazure.com/#Workspaces/AdminTasks/SubscriptionMapping>`__. | ||
|
||
See :doc:`Resource Management Authentication <quickstart_authentication>` | ||
for details on handling Azure Active Directory authentication with the Python SDK, and creating a ``Credentials`` instance. | ||
|
||
.. code:: python | ||
from azure.mgmt.datalake.store import DataLakeStoreAccountManagementClient | ||
from azure.common.credentials import UserPassCredentials | ||
# Replace this with your subscription id | ||
subscription_id = '33333333-3333-3333-3333-333333333333' | ||
# See above for details on creating different types of AAD credentials | ||
credentials = UserPassCredentials( | ||
'user@domain.com', # Your user | ||
'my_password', # Your password | ||
) | ||
client = DataLakeStoreAccountManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
Registration | ||
------------ | ||
|
||
Some operations in the ARM APIs require a one-time registration of the | ||
provider with your subscription. | ||
|
||
Use the following code to do the registration. You can use the same | ||
credentials you created in the previous section. | ||
|
||
.. code:: python | ||
from azure.mgmt.resource.resources import ResourceManagementClient | ||
resource_client = ResourceManagementClient( | ||
credentials, | ||
subscription_id | ||
) | ||
resource_client.providers.register('Microsoft.DataLakeStore') | ||
Samples | ||
------- | ||
|
||
Samples writing in progress! In the meantime, you should look at the unit tests of this package: | ||
|
||
https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt/tests/test_mgmt_datalake_store.py | ||
|