azure_clients_6.py 518 B

1234567891011
  1. def get_blob_service_client(parameters):
  2. tenant_id = parameters.get('azure_tenant_id')
  3. client_id = parameters.get('azure_client_id')
  4. secret = parameters.get('azure_client_secret')
  5. account_name = parameters.get('storage_account_name')
  6. token_credential = ClientSecretCredential(
  7. tenant_id, client_id, secret)
  8. blob_service_client = BlobServiceClient(
  9. account_url="https://%s.blob.core.windows.net" % account_name,
  10. credential=token_credential)
  11. return blob_service_client