Last updated August 20, 2009 23:13, by Tim Bray
Feedicon  

Cloud API Specification - Requests to VNet Resources

The requests documented in this section are directed to Virtual Network (VNet) resources, which represent a communication path between VMs in the same Cluster, or across Clusters.


Get VNet

Retrieve information about a VNet.

Synopsis: GET {URI of VNet}

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

Request Message Body: N/A.

Response Headers: Content-Length, Content-Type.

Response Message Body: VNet.

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

Example Request: Retrieve information about a VNet named "Front End"

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

Example Response:

 HTTP/1.1 200 OK
 Content-Type: application/vnd.com.sun.cloud.VNet+json
 Content-Length: nnn
 
 {
   "name" : "Front End",
   "uri" : "http://example.com/vnets/abcdefg",
   "netmask" : "255.255.0.0",
   "tags" : [ "webtier", "apptier" ]
 }

Update VNet Properties

Update the specified properties of a VNet. Only fields actually included in the request message body will be updated, and existing contents of those fields will be completely erased.

Synopsis: PUT { URI of VNet }

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

Request Parameters: N/A.

Request Message Body: VNet

Response Headers: Content-Length, Content-Type.

Response Message Body: Status for use in tracking update progress.

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

Status "op" Value: "update-VNet".

Status "target_uri" identifies: The VNet receiving the PUT.

Example Request: Add a tag to the VNet named "Front End"

 PUT /vnets/abcdefg
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.VNet+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.cloud.VNet+json
 X-Cloud-Client-Specification-Version: 0.1
 
 {
   "tags" : [ "webtier", "apptier", "monitored" ]
 }

Example Response:

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   "op": "update-VNet",
   "progress": 100,
   "target_uri": "/vnets/abcdefg",
   "status_uri": "/statuses?op=update-vnet&seq=82047292",
   "status" : 200
 }

Delete VNet

Delete this VNet, disconnecting any attached VMs.

Synopsis: DELETE { URI of VNet }

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

Request Parameters: N/A.

Request Message Body: N/A.

Response Headers: Content-Length, Content-Type.

Response Message Body: Status for use in tracking deletion progress.

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

Status "op" Value: "delete-VNet".

Status "target_uri" identifies: The VNet being deleted.

Example Request: Delete an existing VNet named "Front End"

 DELETE /vnets/abcdefg
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 X-Compute-Client-Specification-Version: 0.1

Example Response:

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   "op": "delete-VNet",
   "progress": 100,
   "target_uri": "/vnets/abcdefg",
   "status_uri": "/statuses?op=delete-vnet&cluster=abcdefg",
   "status" : 200
 }

Copyright © Sun Microsystems, 2009. This work is licensed under Creative Commons Attribution 3.0 Unported License

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close