package
1.33.0-rc3
Repository: https://github.com/ovh/utask.git
Documentation: pkg.go.dev

# README

apiovh Plugin

This plugin makes calls to the Public API of OVHCloud: https://api.ovh.com.

Configuration

FieldDescription
pathhttp route + query params
methodhttp method (GET/POST/PUT/DELETE)
bodya string representing the payload to be sent with the request
credentialsa key to retrieve credentials from configstore

Example

An action of type apiovh requires the following kind of configuration. The body field is optional:

action:
  type: apiovh
  configuration:
    method: POST
    path: /dbaas/logs/{{.input.serviceName}}/output/graylog/stream
    credendials: ovh-api-credentials
    # body is optional, not used for method GET
    body: |
      {
        "title": "{{.input.applicationName}}",
        "description": "{{.input.applicationDescription}}",
        "autoSelectOption": true
      }

Requirements

The apiovh plugin requires a config item to be found under the key given in the credentials config field. It's content should match the following schema (see go-ovh for more details):

{
  "endpoint": "ovh-eu",
  "appKey": "XXXX",
  "appSecret": "YYYY",
  "consumerKey": "ZZZZ"
}

Resources

The apiovh plugin declares automatically resources for its steps:

  • socket to rate-limit concurrent execution on the number of open outgoing sockets
  • url:api.ovh.com or url:ca.api.ovh.com, ... (depending on the region) to rate-limit concurrent executions on an endpoint of the OVH API

# Functions

ExecutorMetadata generates json schema for the metadata returned by the executor.

# Variables

the apiovh plugin performs signed http calls on the OVH public API.

# Structs

APIOVHConfig holds the configuration needed to run the apiovh plugin credentials: key to retrieve credentials from configstore method: http method path: http path body: http body (optional).