Cloud Management API 1.5

CookbookAttachments

Cookbook Attachment is used to associate a particular cookbook with a ServerTemplate. A Cookbook Attachment must be in place before a recipe can be bound to a runlist using RunnableBinding.

Actions

index

Lists Cookbook Attachments.

URLs
GET /api/cookbook_attachments
GET /api/cookbooks/:cookbook_id/cookbook_attachments
GET /api/server_templates/:server_template_id/cookbook_attachments
HTTP response code
200 OK
Content-type
application/vnd.rightscale.cookbook_attachment;type=collection

Required roles

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": "1",
  "links": [
    {"rel":"self","href":"/api/cookbook_attachments/1"},
    {"rel":"cookbook","href":"/api/cookbooks/1"},
    {"rel":"server_template","href":"/api/server_templates/1"}
  ],
  "dependency": false,
  "actions": [

  ]
},{
  "id": "2",
  "links": [
    {"rel":"self","href":"/api/cookbook_attachments/2"},
    {"rel":"cookbook","href":"/api/cookbooks/2"},
    {"rel":"server_template","href":"/api/server_templates/5"}
  ],
  "dependency": false,
  "actions": [

  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<cookbook_attachments>
  <cookbook_attachment>
    <id>1</id>
    <links>
      <link rel="self" href="/api/cookbook_attachments/1"/>
      <link rel="cookbook" href="/api/cookbooks/1"/>
      <link rel="server_template" href="/api/server_templates/1"/>
    </links>
    <dependency>false</dependency>
    <actions/>
  </cookbook_attachment>
  <cookbook_attachment>
    <id>2</id>
    <links>
      <link rel="self" href="/api/cookbook_attachments/2"/>
      <link rel="cookbook" href="/api/cookbooks/2"/>
      <link rel="server_template" href="/api/server_templates/5"/>
    </links>
    <dependency>false</dependency>
    <actions/>
  </cookbook_attachment>
</cookbook_attachments>

show

Displays information about a single cookbook attachment to a ServerTemplate.

URLs
GET /api/cookbook_attachments/:id
GET /api/cookbooks/:cookbook_id/cookbook_attachments/:id
GET /api/server_templates/:server_template_id/cookbook_attachments/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.cookbook_attachment

Required roles

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": "1",
  "links": [
    {"rel":"self","href":"/api/cookbook_attachments/1"},
    {"rel":"cookbook","href":"/api/cookbooks/1"},
    {"rel":"server_template","href":"/api/server_templates/1"}
  ],
  "dependency": false,
  "actions": [

  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<cookbook_attachment>
  <id>1</id>
  <links>
    <link rel="self" href="/api/cookbook_attachments/1"/>
    <link rel="cookbook" href="/api/cookbooks/1"/>
    <link rel="server_template" href="/api/server_templates/1"/>
  </links>
  <dependency>false</dependency>
  <actions/>
</cookbook_attachment>

create

Attach a cookbook to a given resource.

URLs
POST /api/cookbook_attachments
POST /api/cookbooks/:cookbook_id/cookbook_attachments
POST /api/server_templates/:server_template_id/cookbook_attachments
HTTP response code
201 Created
Location
Href of the created Cookbook Attachment

Required roles

Parameters

name required type values regexp blank? description
cookbook_attachment no Hash * * no
cookbook_attachment[cookbook_href] no String * * no The href of the cookbook to attach.
cookbook_attachment[server_template_href] no String * * no The href of the server template to attach the cookbook to.

destroy

Detach a cookbook from a given resource.

URLs
DELETE /api/cookbook_attachments/:id
DELETE /api/cookbooks/:cookbook_id/cookbook_attachments/:id
DELETE /api/server_templates/:server_template_id/cookbook_attachments/:id
HTTP response code
204 No Content

Required roles

multi_attach

Attach multiple cookbooks to a given resource.

URLs
POST /api/cookbook_attachments/multi_attach
POST /api/server_templates/:server_template_id/cookbook_attachments/multi_attach
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
cookbook_attachments yes Hash * * no
cookbook_attachments[cookbook_hrefs] no Array * * no The hrefs of the cookbooks to be attached
cookbook_attachments[server_template_href] no String * * no The href of the server template to attach the cookbooks to.

multi_detach

Detach multiple cookbooks from a given resource.

URLs
POST /api/cookbook_attachments/multi_detach
POST /api/server_templates/:server_template_id/cookbook_attachments/multi_detach
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
cookbook_attachments yes Hash * * no
cookbook_attachments[cookbook_attachment_hrefs] no Array * * no The hrefs of the cookbook attachments to be detached