82.17. 예
계정 정보 가져오기
from("direct:getAccountInfo") .setHeader(DigitalOceanConstants.OPERATION, constant(DigitalOceanOperations.get)) .to("digitalocean:account?oAuthToken=XXXXXX")
드롭릿 생성
from("direct:createDroplet") .setHeader(DigitalOceanConstants.OPERATION, constant("create")) .setHeader(DigitalOceanHeaders.NAME, constant("myDroplet")) .setHeader(DigitalOceanHeaders.REGION, constant("fra1")) .setHeader(DigitalOceanHeaders.DROPLET_IMAGE, constant("ubuntu-14-04-x64")) .setHeader(DigitalOceanHeaders.DROPLET_SIZE, constant("512mb")) .to("digitalocean:droplet?oAuthToken=XXXXXX")
모든 droplets 나열
from("direct:getDroplets") .setHeader(DigitalOceanConstants.OPERATION, constant("list")) .to("digitalocean:droplets?oAuthToken=XXXXXX")
드롭릿(dropletId = 34772987)에 대한 정보 검색
from("direct:getDroplet") .setHeader(DigitalOceanConstants.OPERATION, constant("get")) .setHeader(DigitalOceanConstants.ID, 34772987) .to("digitalocean:droplet?oAuthToken=XXXXXX")
드롭릿에 대한 종료 정보(dropletId = 34772987)
from("direct:shutdown") .setHeader(DigitalOceanConstants.ID, 34772987) .to("digitalocean:droplet?operation=shutdown&oAuthToken=XXXXXX")