set-input-parameters

command
v3.0.0-milestone.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

Set input properties and input artifacts

This example shows how the Alien4Cloud go client can be used to set an application input property or input artifact.

Prerequisites

An application has been deployed as described in Create an deploy an application example.

Running this example

Build this example:

cd examples/set-input-parameters/
go build -o setinput.test

Now, to set an application input property, run this example providing in arguments:

  • the Alien4Cloud URL
  • credentials of the user who has deployed the application
  • the name of the application
  • the input property name
  • the input property value or a path to a file containing this value (usefull for json values)
  • the type of value: string (default), map of strings or array of strings.

For example :

./setinput.test -url https://1.2.3.4:8088 \
                -user myuser \
                -password mypasswd \
                -app MyApp \
                -property myprop \
                -value myval

or for property value being a map of strings provided in a file:

./setinput.test -url https://1.2.3.4:8088 \
                -user myuser \
                -password mypasswd \
                -app MyApp \
                -property myprop \
                -value_type map \
                -value_file test.json

To set an application input artifact, run this example, providing in arguments:

  • the Alien4Cloud URL
  • credentials of the user who has deployed the application
  • the name of the application
  • the input artifact name
  • the path to input artifact file.

For example :

./setinput.test -url https://1.2.3.4:8088 \
                -user myuser \
                -password mypasswd \
                -app MyApp \
                -artifact myartifact \
                -file /home/user/myfile.txt

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL