I am trying to create an SQL Server Linked Service for Azure Data Factory from within Python. All the dependencies are imported and the data factory gets created successfully. It is failing on creating the Linked Service.
Here is my pseudo-code running from Python:
ls_name = 'Blah'
properties = SqlServerLinkedService(
connection_string="blahblah.database.windows.net",
connect_via={"referenceName": "AutoResolveIntegrationRuntime", "type": "IntegrationRuntimeReference"},
user_name="my-user-name",
password=SecureString("my-plaintext-password")
)
ls = adf_client.linked_services.create_or_update( resource_group_name=rg_name, factory_name=df_name, linked_service_name=ls_name, linked_service=properties)
For one, if I keep the format of the SecureString the way it is above, I get error about 2 positional arguments where only 1 is required, if i take out the password line altogether, I get "Bad Request" when create_or_update function runs at the bottom. They Microsoft Python SDK documentation is terribly lacking. Can someone help me figure out how to code this correctly?
File "/usr/local/lib/python3.8/dist-packages/azure/mgmt/datafactory/operations/_linked_services_operations.py", line 190, in create_or_update
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Bad Request'
question from:
https://stackoverflow.com/questions/65948103/bad-request-when-creating-an-sqlserverlinkedservice 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…