azure_clients_7.py 523 B

1234567891011
  1. def get_queue_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. queue_service_client = QueueServiceClient(
  9. account_url="https://%s.queue.core.windows.net" % account_name,
  10. credential=token_credential)
  11. return queue_service_client