Skip to main content

Config for googledrive

Jobs that use the googledrive adaptor may require authentication. A "credential" for the googledrive adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsI",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEow...",
"client_email": "my-app@project-id.iam.gserviceaccount.com"
}

Full Schema

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$comment": "OAuth2",
"properties": {
"access_token": {
"title": "Access Token",
"type": "string",
"description": "OAuth2 access token for Google Drive",
"writeOnly": true,
"minLength": 1,
"examples": [
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsI"
]
},
"private_key": {
"title": "Private Key",
"type": "string",
"description": "RSA private key from the Google service account JSON key file. Required for service accounts",
"writeOnly": true,
"minLength": 1,
"examples": [
"-----BEGIN RSA PRIVATE KEY-----\nMIIEow..."
]
},
"client_email": {
"title": "Client Email",
"type": "string",
"description": "Service account email address (e.g. my-app@project-id.iam.gserviceaccount.com). Required for service accounts",
"minLength": 1,
"examples": [
"my-app@project-id.iam.gserviceaccount.com"
]
}
},
"type": "object",
"additionalProperties": true
}