This file contains hidden or 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
$creds = Get-AutomationPSCredential -Name "ServPpalName" | |
# AAS Server to query | |
$server = "asazure://*.asazure.windows.net/*" | |
# Create xml object to parse response | |
[xml] $xmlDoc = New-Object system.Xml.XmlDocument | |
# Query definition | |
$AAS_db = "AAS_MODEL_NAME" |
This file contains hidden or 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
import os | |
# set repo location and ADF name | |
repo_path = "D:/Work/Python/Azure" | |
dataFactory_name = "Highwayman-ADFv2" | |
full_path = "/".join([repo_path, dataFactory_name]) | |
# get list of dataset and pipeline files | |
datasets = os.listdir("{}/dataset".format(full_path)) | |
pipelines = os.listdir("{}/pipeline".format(full_path)) |
This file contains hidden or 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
from azure.mgmt.datafactory import DataFactoryManagementClient | |
from azure.common.credentials import UserPassCredentials #To login with user and pass, use this. | |
from azure.common.credentials import ServicePrincipalCredentials #To login with service principal (appid and client secret) use this | |
subscription_id = "subsID" | |
#Use only one of these, depending on how you want to login. | |
credentials = UserPassCredentials(username="[email protected]", password="yourpass") #To login with user and pass | |
credentials = ServicePrincipalCredentials(client_id='appid', secret='client secret', tenant='tenantid') #To login with serv ppal |
This file contains hidden or 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
from azure.mgmt.resource import ResourceManagementClient | |
from azure.mgmt.datafactory import DataFactoryManagementClient as adf | |
from azure.mgmt.keyvault import KeyVaultManagementClient as keyvault | |
from azure.mgmt.storage import StorageManagementClient as blobacc | |
from azure.mgmt.datafactory.models import Factory as adf_model | |
from azure.mgmt.storage.models import StorageAccountCreateParameters as blob_model | |
from azure.mgmt.storage.models import (Sku, SkuName, Kind) | |
from azure.mgmt.sql import SqlManagementClient | |
import azure.mgmt.subscription as subs | |
import azure.common.credentials as cred |