azure_clients_3.py 485 B

1234567891011
  1. def get_network_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. subscription_id = parameters.get('azure_subscription_id')
  6. token_credential = ClientSecretCredential(
  7. tenant_id, client_id, secret)
  8. network_client = NetworkManagementClient(token_credential,
  9. subscription_id)
  10. return network_client