Skip to content

Instantly share code, notes, and snippets.

@dfrankel33
Created March 9, 2017 17:20
Show Gist options
  • Save dfrankel33/3286ab8129a9d6047552b1db89722295 to your computer and use it in GitHub Desktop.
Save dfrankel33/3286ab8129a9d6047552b1db89722295 to your computer and use it in GitHub Desktop.
#EXAMPLE params:
#$name = "CloudAppName"
#$options = [
# {
# "name": "param_name",
# "type": "string",
# "value": "param_value"
# },
# {
# "name": "param_name2",
# "type": "string",
# "value": "param_value2"
# }]
#$template_href = "/api/designer/collections/12345/templates/58846bf4b37002003e0000d0"
define launch_cloudapp($name,$options,$href,$type) return @execution do
if $type == "template"
$source = "template_href"
elsif $type == "application"
$source = "application_href"
end
$acct = split($href, "/")[4]
@execution = rs_ss.executions.create($source: $template_href, project_id: $acct, name: $name, options: $options )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment