RunnableBindings
A RunnableBinding represents an item in a runlist of a ServerTemplate. These items could be RightScript or Chef recipes, and could be associated with any one of the three runlists of a ServerTemplate (boot, operational, decommission).
Actions
index
Lists the executables bound to the ServerTemplate.
An excutable may be either a RightScript or Chef Recipe.
- URLs
- GET /api/server_templates/:server_template_id/runnable_bindings
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.runnable_binding;type=collection
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
view | no | String | default | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Example Responses
Click on a format below to see an example response:
JSON XML[{
"id": "2",
"sequence": "boot",
"position": 2,
"links": [
{"rel":"self","href":"/api/server_templates/1/runnable_bindings/2"},
{"rel":"server_template","href":"/api/server_templates/1"},
{"rel":"right_script","href":"/api/right_scripts/2"}
],
"actions": [
],
"right_script": {
"id": "2",
"name": "NAME_2608224321",
"revision": 0,
"lineage": "https://testscale_1/api/acct/560182816/right_scripts/2"
}
},{
"id": "4",
"sequence": "boot",
"position": 2,
"links": [
{"rel":"self","href":"/api/server_templates/5/runnable_bindings/4"},
{"rel":"server_template","href":"/api/server_templates/5"},
{"rel":"right_script","href":"/api/right_scripts/4"}
],
"actions": [
],
"right_script": {
"id": "4",
"name": "NAME_3674629575",
"revision": 0,
"lineage": "https://testscale_1/api/acct/560182816/right_scripts/4"
}
}]
<?xml version="1.0" encoding="UTF-8"?>
<runnable_bindings>
<runnable_binding>
<id>2</id>
<sequence>boot</sequence>
<position>2</position>
<links>
<link rel="self" href="/api/server_templates/1/runnable_bindings/2"/>
<link rel="server_template" href="/api/server_templates/1"/>
<link rel="right_script" href="/api/right_scripts/2"/>
</links>
<actions/>
<right_script>
<id>2</id>
<name>NAME_2608224321</name>
<revision>0</revision>
<lineage>https://testscale_1/api/acct/560182816/right_scripts/2</lineage>
</right_script>
</runnable_binding>
<runnable_binding>
<id>4</id>
<sequence>boot</sequence>
<position>2</position>
<links>
<link rel="self" href="/api/server_templates/5/runnable_bindings/4"/>
<link rel="server_template" href="/api/server_templates/5"/>
<link rel="right_script" href="/api/right_scripts/4"/>
</links>
<actions/>
<right_script>
<id>4</id>
<name>NAME_3674629575</name>
<revision>0</revision>
<lineage>https://testscale_1/api/acct/560182816/right_scripts/4</lineage>
</right_script>
</runnable_binding>
</runnable_bindings>
show
Show information about a single executable binding.
An excutable may be either a RightScript or Chef Recipe.
- URLs
- GET /api/server_templates/:server_template_id/runnable_bindings/:id
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.runnable_binding
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
view | no | String | default | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Example Responses
Click on a format below to see an example response:
JSON XML{
"id": "2",
"sequence": "boot",
"position": 2,
"links": [
{"rel":"self","href":"/api/server_templates/1/runnable_bindings/2"},
{"rel":"server_template","href":"/api/server_templates/1"},
{"rel":"right_script","href":"/api/right_scripts/2"}
],
"actions": [
],
"right_script": {
"id": "2",
"name": "NAME_2608224321",
"revision": 0,
"lineage": "https://testscale_1/api/acct/560182816/right_scripts/2"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<runnable_binding>
<id>2</id>
<sequence>boot</sequence>
<position>2</position>
<links>
<link rel="self" href="/api/server_templates/1/runnable_bindings/2"/>
<link rel="server_template" href="/api/server_templates/1"/>
<link rel="right_script" href="/api/right_scripts/2"/>
</links>
<actions/>
<right_script>
<id>2</id>
<name>NAME_2608224321</name>
<revision>0</revision>
<lineage>https://testscale_1/api/acct/560182816/right_scripts/2</lineage>
</right_script>
</runnable_binding>
create
Bind an executable to the given ServerTemplate.
An executable may be either a RightScript or Chef Recipe.
The resource must be editable.
- URLs
- POST /api/server_templates/:server_template_id/runnable_bindings
- HTTP response code
- 201 Created
- Location
- Href of the created RunnableBinding.
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
runnable_binding | yes | Hash | * | * | no | |
runnable_binding[position] | no | String | * | * | no | The position of the executable in the execution order. If not specified, will be added to the end. If specified, will be inserted in that location and cause all others to move down. |
runnable_binding[recipe] | no | String | * | * | no | The Chef recipe name. Note: right_script_href cannot be specified when this param is given. |
runnable_binding[right_script_href] | no | String | * | * | no | The RightScript href. Note: recipe cannot be specified when this param is given. |
runnable_binding[sequence] | no | String | boot, decommission, operational | * | no | The sequence at which this executable should be run. Default is 'operational'. |
destroy
Unbind an executable from the given resource.
The resource must be editable.
- URLs
- DELETE /api/server_templates/:server_template_id/runnable_bindings/:id
- HTTP response code
- 204 No Content
Required roles
- designer
multi_update
Update attributes for multiple bound executables.
The resource must be editable.
- URLs
- PUT /api/server_templates/:server_template_id/runnable_bindings/multi_update
- HTTP response code
- 204 No Content
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
runnable_bindings | yes | Array | * | * | no | |
runnable_bindings[][id] | yes | String | * | ^\d*$ | no | The ID of the RunnableBinding to update. |
runnable_bindings[][position] | no | String | * | * | no | The updated position of the RunnableBinding in the execution order. If specified, will be inserted in that location and cause all others to move down. |
runnable_bindings[][recipe] | no | String | * | * | no | The updated Chef recipe name. Note: right_script_href cannot be specified when this param is given. |
runnable_bindings[][right_script_href] | no | String | * | * | no | The updated RightScript href. Note: recipe cannot be specified when this param is given. |
runnable_bindings[][sequence] | no | String | boot, decommission, operational | * | no | The sequence at which this executable should be run. Default is 'operational'. |