{
  "name": "Stackdriver",
  "type": "datasource",
  "id": "stackdriver",
  "category": "cloud",

  "metrics": true,
  "alerting": true,
  "annotations": true,
  "queryOptions": {
    "maxDataPoints": true,
    "cacheTimeout": true
  },

  "info": {
    "description": "Data source for Google's monitoring service",
    "version": "1.0.0",
    "logos": {
      "small": "img/stackdriver_logo.svg",
      "large": "img/stackdriver_logo.svg"
    },
    "author": {
      "name": "Grafana Project",
      "url": "https://grafana.com"
    }
  },
  "routes": [
    {
      "path": "stackdriver",
      "method": "GET",
      "url": "https://content-monitoring.googleapis.com",
      "jwtTokenAuth": {
        "scopes": ["https://www.googleapis.com/auth/monitoring.read"],
        "params": {
          "token_uri": "{{.JsonData.tokenUri}}",
          "client_email": "{{.JsonData.clientEmail}}",
          "private_key": "{{.SecureJsonData.privateKey}}"
        }
      }
    },
    {
      "path": "cloudresourcemanager",
      "method": "GET",
      "url": "https://cloudresourcemanager.googleapis.com",
      "jwtTokenAuth": {
        "scopes": ["https://www.googleapis.com/auth/cloudplatformprojects.readonly"],
        "params": {
          "token_uri": "{{.JsonData.tokenUri}}",
          "client_email": "{{.JsonData.clientEmail}}",
          "private_key": "{{.SecureJsonData.privateKey}}"
        }
      }
    }
  ]
}
