serviceCall

Calls a command on a service. For component-based applications consider using commandCall instead.

Parameters

Name Type Constraints Default Definition
service string required   Alias name for service interface.
command string required   Command to call.
arguments map   {} Command arguments (see docs on particular service).
timeout int or string   30 Timeout to finish with optional time unit suffix. Supported time units are hour, minute and second (both singular and plural forms). If no time unit specified, seconds will be used.

Return Values

Name Type Definition
result map Result of command call.

If ignoreFail is set to false, the failure key of result map will contain an explanation (returned by a service).

Example Usage

header:
  services:
    resource-pool:
      allocate-resources: send-command(string type, int count => list<object> resources)

launch:
  steps:
    - allocate-resource:
        action: serviceCall
        parameters:
          service: resource-pool
          command: allocate-resources
          arguments:
            type: vm
            count: 2
        output:
          allocate-result: result