<?xml version="1.0" encoding="UTF-8"?>
<page>
  <created-at type="datetime">2009-03-11T05:40:41Z</created-at>
  <description>Rolled in async/status </description>
  <id type="integer">1049</id>
  <name>CloudAPIVDCRequests</name>
  <number type="integer">7</number>
  <person-id type="integer">139</person-id>
  <text>&lt;h1&gt;Cloud API Specification - Requests to VDC Resources&lt;/h1&gt;

The requests documented in this section are directed to ''VDC'' resources, which represent an entire Virtual Data Center.  The ''VDC URI'' used to retrieve a given VDC representation will be defined by the service implementor, not by this API specification.  From there on, the URIs for all resources related to this VDC can be discovered (directly or indirectly) from the VDC representation itself.

A VDC resource is read only from the perspective of this API, although its server side content is modified as a side effect of many other API requests.  You should plan on performing the Get VDC request periodically to update your client's view of the VDC resource model.

__TOC__

= Get VDC =

Retrieve information about a cloud service VDC.

'''Synopsis:''' GET {VDC URI}

'''Request Headers:''' Accept, Authorization, X-Cloud-Client-Specification-Version.

'''Request Parameters:''' N/A.

'''Request Message Body:''' N/A.

'''Response Headers:''' Content-Length, Content-Type.

'''Response Message Body:''' VDC.

'''Response Status:''' 200, 400, 401, 403.

'''Example Request:'''  Retrieve information about a VDC.

 GET /
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.VDC+json
 X-Cloud-Client-Specification-Version: 0.1

'''Example Response:'''

 HTTP/1.1 200 OK
 Content-Type: application/vnd.com.sun.cloud.VDC+json
 Content-Length: nnn
 
 {
   &quot;name&quot; : &quot;Example VDC&quot;,
   &quot;uri&quot; : &quot;http://example.com/vdc/123456&quot;, 
   &quot;addresses&quot; : [ ... ],
   &quot;cluster&quot; : { ... },
   &quot;tags&quot; : [ ... ],
   &quot;volumes&quot;: [ ... ],
   &quot;vm_templates&quot; : &quot;http://example.com/templates/catalog&quot;
 }

= Create Public Address =

Request the Allocation of a new Public Address for use in this VDC.  Most of the fields of a Public Address resource are automatically set in the course of its use; the only field specified at creation time is its logical name.  The request is a POST to the URI of the VDC; the Content-Type '''MUST''' be &quot;application/vnd.com.sun.cloud.PublicAddress+json&quot;

'''Synopsis:''' POST { URI of VDC }

'''Request Headers:''' Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

'''Request Parameters:''' N/A.

'''Request Message Body:''' Public Address.

'''Response Headers:''' Content-Length, Content-Type.

'''Response Message Body:''' Status for use in tracking Address allocaiton process.

'''Response Status:''' 202, 400, 401, 403, 404.

'''Status &quot;op&quot; Value:''' &quot;new-Address&quot;.

'''Status &quot;target_uri&quot; identifies:''' The new Public Address once it is allocated.

'''Example 1 Request:'''  Create a new Public Address named ''Load Balanced''. 

 POST /vdcs/vdc001
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.PublicAddress+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.cloud.PublicAddress+json
 X-Cloud-Specification-Version: 0.1
 
 {
  &quot;name&quot; : &quot;Load Balanced&quot;
 }

'''Example 1 Response:'''

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   &quot;op&quot;: &quot;new-Address&quot;,
   &quot;progress&quot;: 100,
   &quot;target_uri&quot;: &quot;/addresses/107.236.66.83&quot;,
   &quot;status_uri&quot;: &quot;/statuses?op=na&amp;r=0389.aa6&quot;,
   &quot;status&quot;: 201
 }

= Create Volume =

Request the creation of a WebDAV volume on the storage service for the owner of this VDC.  Most of the fields of a Volume resource are automatically set in the course of its use; the only field required at creation time is its logical name. The request is a POST to the URI of the VDC; the Content-Type '''MUST''' be &quot;application/vnd.com.sun.cloud.Volume+json&quot;

'''Synopsis:''' POST { URI of VDC }

'''Request Headers:''' Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

'''Request Parameters:''' N/A.

'''Request Message Body:''' Volume.

'''Response Headers:''' Content-Length, Content-Type.

'''Response Message Body:''' Status for use in tracking volume-creation progress.

'''Response Status:''' 202, 400, 401, 403, 404.

'''Status &quot;op&quot; Value:''' &quot;new-Volume&quot;.

'''Status &quot;target_uri&quot; identifies:''' The new Volume once it is created.

'''Example Request:'''  Create a new Volume named ''backups''. 

 POST /vdcs/vdc001
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.Volume+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.cloud.Volume+json
 X-Cloud-Client-Specification-Version: 0.1
 
 {
   &quot;name&quot; : &quot;backups&quot;,
   &quot;tags&quot; : [ &quot;default&quot; ]
 }

'''Example Response:'''

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   &quot;op&quot;: &quot;new-Volume&quot;,
   &quot;progress&quot;: 0,
   &quot;target_uri&quot;: &quot;/volumes/1234567890&quot;,
   &quot;status_uri&quot;: &quot;/statuses?op=nv&amp;name=backups&quot;
 }

Copyright &amp;copy; Sun Microsystems, 2009.  This work is licensed under [http://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0 Unported License]
</text>
  <text-as-html>&lt;p&gt;&lt;h1&gt;Cloud API Specification - Requests to VDC Resources&lt;/h1&gt;

&lt;/p&gt;&lt;p&gt;The requests documented in this section are directed to &lt;i&gt;VDC&lt;/i&gt; resources, which represent an entire Virtual Data Center.  The &lt;i&gt;VDC URI&lt;/i&gt; used to retrieve a given VDC representation will be defined by the service implementor, not by this API specification.  From there on, the URIs for all resources related to this VDC can be discovered (directly or indirectly) from the VDC representation itself.

&lt;/p&gt;&lt;p&gt;A VDC resource is read only from the perspective of this API, although its server side content is modified as a side effect of many other API requests.  You should plan on performing the Get VDC request periodically to update your client's view of the VDC resource model.

&lt;/p&gt;&lt;div id='toc' class='toc'&gt;
           &lt;div id='toctitle' class='toc-title'&gt;
             &lt;span&gt;Contents&lt;/span&gt;
           &lt;/div&gt;
           &lt;div id='toccontents' class='toc-contents'&gt;&lt;ul&gt;&lt;li&gt;1 &lt;a href='#Get_VDC'&gt; Get VDC &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2 &lt;a href='#Create_Public_Address'&gt; Create Public Address &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3 &lt;a href='#Create_Volume'&gt; Create Volume &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
         &lt;/div&gt;&lt;p&gt;&lt;br /&gt;

&lt;/p&gt;&lt;h1&gt;&lt;a name='Get_VDC'&gt;&lt;/a&gt; Get VDC &lt;/h1&gt;
&lt;p&gt;
Retrieve information about a cloud service VDC.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Synopsis:&lt;/b&gt; GET {VDC URI}

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Headers:&lt;/b&gt; Accept, Authorization, X-Cloud-Client-Specification-Version.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Parameters:&lt;/b&gt; N/A.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Message Body:&lt;/b&gt; N/A.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Headers:&lt;/b&gt; Content-Length, Content-Type.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Message Body:&lt;/b&gt; VDC.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Status:&lt;/b&gt; 200, 400, 401, 403.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Example Request:&lt;/b&gt;  Retrieve information about a VDC.

&lt;/p&gt;&lt;pre&gt; GET /
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.VDC+json
 X-Cloud-Client-Specification-Version: 0.1
&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Example Response:&lt;/b&gt;

&lt;/p&gt;&lt;pre&gt; HTTP/1.1 200 OK
 Content-Type: application/vnd.com.sun.cloud.VDC+json
 Content-Length: nnn
 
 {
   &amp;quot;name&amp;quot; : &amp;quot;Example VDC&amp;quot;,
   &amp;quot;uri&amp;quot; : &amp;quot;&lt;a class='external' href=&quot;http://example.com/vdc/123456&quot;&gt;http://example.com/vdc/123456&lt;/a&gt;&amp;quot;, 
   &amp;quot;addresses&amp;quot; : [ ... ],
   &amp;quot;cluster&amp;quot; : { ... },
   &amp;quot;tags&amp;quot; : [ ... ],
   &amp;quot;volumes&amp;quot;: [ ... ],
   &amp;quot;vm_templates&amp;quot; : &amp;quot;&lt;a class='external' href=&quot;http://example.com/templates/catalog&quot;&gt;http://example.com/templates/catalog&lt;/a&gt;&amp;quot;
 }
&lt;/pre&gt;&lt;h1&gt;&lt;a name='Create_Public_Address'&gt;&lt;/a&gt; Create Public Address &lt;/h1&gt;
&lt;p&gt;
Request the Allocation of a new Public Address for use in this VDC.  Most of the fields of a Public Address resource are automatically set in the course of its use; the only field specified at creation time is its logical name.  The request is a POST to the URI of the VDC; the Content-Type &lt;b&gt;MUST&lt;/b&gt; be &amp;quot;application/vnd.com.sun.cloud.PublicAddress+json&amp;quot;

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Synopsis:&lt;/b&gt; POST { URI of VDC }

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Headers:&lt;/b&gt; Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Parameters:&lt;/b&gt; N/A.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Message Body:&lt;/b&gt; Public Address.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Headers:&lt;/b&gt; Content-Length, Content-Type.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Message Body:&lt;/b&gt; Status for use in tracking Address allocaiton process.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Status:&lt;/b&gt; 202, 400, 401, 403, 404.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Status &amp;quot;op&amp;quot; Value:&lt;/b&gt; &amp;quot;new-Address&amp;quot;.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Status &amp;quot;target_uri&amp;quot; identifies:&lt;/b&gt; The new Public Address once it is allocated.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Example 1 Request:&lt;/b&gt;  Create a new Public Address named &lt;i&gt;Load Balanced&lt;/i&gt;. 

&lt;/p&gt;&lt;pre&gt; POST /vdcs/vdc001
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.PublicAddress+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.cloud.PublicAddress+json
 X-Cloud-Specification-Version: 0.1
 
 {
  &amp;quot;name&amp;quot; : &amp;quot;Load Balanced&amp;quot;
 }
&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Example 1 Response:&lt;/b&gt;

&lt;/p&gt;&lt;pre&gt; HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   &amp;quot;op&amp;quot;: &amp;quot;new-Address&amp;quot;,
   &amp;quot;progress&amp;quot;: 100,
   &amp;quot;target_uri&amp;quot;: &amp;quot;/addresses/107.236.66.83&amp;quot;,
   &amp;quot;status_uri&amp;quot;: &amp;quot;/statuses?op=na&amp;amp;r=0389.aa6&amp;quot;,
   &amp;quot;status&amp;quot;: 201
 }
&lt;/pre&gt;&lt;h1&gt;&lt;a name='Create_Volume'&gt;&lt;/a&gt; Create Volume &lt;/h1&gt;
&lt;p&gt;
Request the creation of a WebDAV volume on the storage service for the owner of this VDC.  Most of the fields of a Volume resource are automatically set in the course of its use; the only field required at creation time is its logical name. The request is a POST to the URI of the VDC; the Content-Type &lt;b&gt;MUST&lt;/b&gt; be &amp;quot;application/vnd.com.sun.cloud.Volume+json&amp;quot;

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Synopsis:&lt;/b&gt; POST { URI of VDC }

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Headers:&lt;/b&gt; Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Parameters:&lt;/b&gt; N/A.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Message Body:&lt;/b&gt; Volume.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Headers:&lt;/b&gt; Content-Length, Content-Type.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Message Body:&lt;/b&gt; Status for use in tracking volume-creation progress.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Response Status:&lt;/b&gt; 202, 400, 401, 403, 404.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Status &amp;quot;op&amp;quot; Value:&lt;/b&gt; &amp;quot;new-Volume&amp;quot;.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Status &amp;quot;target_uri&amp;quot; identifies:&lt;/b&gt; The new Volume once it is created.

&lt;/p&gt;&lt;p&gt;&lt;b&gt;Example Request:&lt;/b&gt;  Create a new Volume named &lt;i&gt;backups&lt;/i&gt;. 

&lt;/p&gt;&lt;pre&gt; POST /vdcs/vdc001
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.Volume+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.cloud.Volume+json
 X-Cloud-Client-Specification-Version: 0.1
 
 {
   &amp;quot;name&amp;quot; : &amp;quot;backups&amp;quot;,
   &amp;quot;tags&amp;quot; : [ &amp;quot;default&amp;quot; ]
 }
&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Example Response:&lt;/b&gt;

&lt;/p&gt;&lt;pre&gt; HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   &amp;quot;op&amp;quot;: &amp;quot;new-Volume&amp;quot;,
   &amp;quot;progress&amp;quot;: 0,
   &amp;quot;target_uri&amp;quot;: &amp;quot;/volumes/1234567890&amp;quot;,
   &amp;quot;status_uri&amp;quot;: &amp;quot;/statuses?op=nv&amp;amp;name=backups&amp;quot;
 }
&lt;/pre&gt;&lt;p&gt;
Copyright &amp;copy; Sun Microsystems, 2009.  This work is licensed under &lt;a class='external' href=&quot;http://creativecommons.org/licenses/by/3.0/&quot;&gt;Creative Commons Attribution 3.0 Unported License&lt;/a&gt;&lt;/p&gt;</text-as-html>
  <updated-at type="datetime">2010-01-11T18:56:00Z</updated-at>
  <wiki-id type="integer">3636</wiki-id>
</page>
