blob: 1d37c07e6faedde482240167b709583b187ec7e6 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Addresses</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le JavaScript -->
<script src="/assets/js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="/assets/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="/assets/js/jquery.tweet.js" type="text/javascript"></script>
<script src="/assets/js/application.js" type="text/javascript"></script>
<script src="/assets/js/bootstrap-transition.js"></script>
<script src="/assets/js/bootstrap-alert.js"></script>
<script src="/assets/js/bootstrap-modal.js"></script>
<script src="/assets/js/bootstrap-scrollspy.js"></script>
<script src="/assets/js/bootstrap-tab.js"></script>
<script src="/assets/js/bootstrap-tooltip.js"></script>
<script src="/assets/js/bootstrap-popover.js"></script>
<script src="/assets/js/bootstrap-button.js"></script>
<script src="/assets/js/bootstrap-collapse.js"></script>
<script src="/assets/js/bootstrap-carousel.js"></script>
<script src="/assets/js/bootstrap-typeahead.js"></script>
<!-- Le styles -->
<link href="/assets/css/bootstrap.css" rel="stylesheet">
<link href="/assets/css/application.css" rel="stylesheet">
<link rel="shortcut icon" href="/assets/img/favicon.ico">
</head>
<body><div style="background: red"><h1>2015/07/20 - Apache Deltacloud has been retired. </h1><h2>For more information, please explore the <a href="http://attic.apache.org/">Attic</a>. </h2></div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="/"><img src="/assets/img/logo.png" width="152"
alt="Deltacloud API"/></a>
<ul class="nav top-nav">
<li><a href="/">Home</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/about.html">What is Deltacloud?</a></li>
<li><a href="/drivers.html#drivers">Supported Providers</a></li>
</ul>
</li>
<li><a href="/download.html">Download</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Installation<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/install-deltacloud.html">Install Deltacloud</a></li>
<li><a href="/run-deltacloud-server.html">Run the Deltacloud Server</a></li>
</ul>
</li>
<li class="dropdown">
<a href="/usage.html" class="dropdown-toggle" data-toggle="dropdown">Usage<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/usage.html#usingapi">Using API</a></li>
<li><a href="/usage.html#clients">Client Libraries</a></li>
<li><a href="/command-tools.html">Command Line Tools</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contribute<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/getting-sources.html">Getting Sources</a></li>
<li><a href="/how-to-contribute.html">How Can I Contribute?</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/rest-api.html">Deltacloud REST API</a></li>
<li><a href="/curl-examples.html">Deltacloud API cURL examples</a></li>
<li><a href="/drivers.html">Drivers API</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">CIMI<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/cimi-rest.html">CIMI REST API</a></li>
<li><a href="/cimi-curl.html">CIMI cURL Examples</a></li>
</ul>
</li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div>
</div>
</div>
<div class="container content">
<p><br></p>
<div class="row">
<div class="span9">
<h3 id="addresses">Addresses</h3>
<p>
The addresses collection represents IP addresses and allows <strong>IP address management</strong>.
</p>
<p>
This collection is currently implemented for Amazon EC2 and Fujitsu GCP drivers. For EC2, IP address management corresponds to Amazon's 'Elastic IP' feature.
</p>
<br>
<p>
The addresses collection supports these operations:
</p>
<ul>
<li>creating an address</li>
<li>destroying an address</li>
<li>association an address with a running instance</li>
<li>dissociating an address from a running instance</li>
</ul>
<br>
<br>
<ul class="nav nav-pills">
<li class="active"><a href="#tab1" data-toggle="tab">Get a list of all addresses</a></li>
<li><a href="#tab2" data-toggle="tab">Get the details of an address</a></li>
<li><a href="#tab3" data-toggle="tab">Create/delete an address</a></li>
<li><a href="#tab4" data-toggle="tab">Associate/disassociate an address</a></li>
</ul>
<hr>
</div>
<div class="span3">
<ul class="nav nav-list well">
<li class="nav-header">
REST API
</li>
<li><a href="rest-api.html">Introduction</a></li>
<li><a href="api-entry-point.html">API entry point</a></li>
<li><a href="compute-resources.html">Compute resources</a></li>
<ul class="nav nav-list">
<li><a href="compute-resources.html">Realms</a></li>
<li><a href="hardware-profiles.html">Hardware profiles</a></li>
<li><a href="images.html">Images</a></li>
<li><a href="instance-states.html">Instance states</a></li>
<li><a href="instances.html">Instances</a></li>
<li><a href="keys.html">Keys</a></li>
<li><a href="firewalls.html">Firewalls</a></li>
<li class="active"><a href="#addresses">Addresses</a></li>
<li><a href="load-balancers.html">Load balancers</a></li>
</ul>
<li><a href="storage-resources.html">Storage resources</a></li>
</ul>
</div>
</div>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<h4>Get a list of all addresses</h4>
<p>
To retrieve a list of all addresses use call <strong>GET /api/addresses</strong>.
</p>
<p>
Example request:
</p>
<pre>
GET /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
</pre>
<p>
Server response:
</p>
<pre style="margin-top:0px">
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:55:16 GMT
Content-Length: 817
&lt;?xml version='1.0' encoding='utf-8' ?&gt;
&lt;addresses&gt;
&lt;address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'&gt;
&lt;ip&gt;107.20.232.251&lt;/ip&gt;
&lt;actions&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' /&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' /&gt;
&lt;/actions&gt;
&lt;/address&gt;
&lt;address href='http://localhost:3001/api/addresses/107.20.234.161' id='107.20.234.161'&gt;
&lt;ip&gt;107.20.234.161&lt;/ip&gt;
&lt;actions&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.234.161' method='delete' rel='destroy' /&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.234.161/associate' method='post' rel='associate' /&gt;
&lt;/actions&gt;
&lt;/address&gt;
&lt;/addresses&gt;
</pre>
</div>
<div class="tab-pane" id="tab2">
<h4>Get the details of an address</h4>
<p>
To retrieve details for a specific address use call <strong>GET /api/addresses/:id</strong>.
</p>
<p>Example request:</p>
<pre>
GET /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 27 Jul 2011 12:57:27 GMT
Content-Length: 402
&lt;?xml version='1.0' encoding='utf-8' ?&gt;
&lt;address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'&gt;
&lt;ip&gt;107.20.232.251&lt;/ip&gt;
&lt;actions&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' /&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' /&gt;
&lt;/actions&gt;
&lt;/address&gt;
</pre>
</div>
<div class="tab-pane" id="tab3">
<h4>Create an address</h4>
<p>
To create a new address use call <strong>POST /api/addresses</strong>. The Deltacloud server will respond with <strong>HTTP 201 Created</strong> and provide the details of the new address after a succesful operation:
</p>
<p>Example request:</p>
<pre>
POST /api/addresses?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 201 Created
Content-Type: application/xml
Content-Length: 388
&lt;?xml version='1.0' encoding='utf-8' ?&gt;
&lt;address href='http://localhost:3001/api/addresses/107.20.232.251' id='107.20.232.251'&gt;
&lt;ip&gt;107.20.232.251&lt;/ip&gt;
&lt;actions&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251' method='delete' rel='destroy' /&gt;
&lt;link href='http://localhost:3001/api/addresses/107.20.232.251/associate' method='post' rel='associate' /&gt;
&lt;/actions&gt;
&lt;/address&gt;
</pre>
<h4>Delete an address</h4>
<p>
To delete a specified address use call <strong>DELETE /api/addresses/:id</strong>. The Deltacloud server responds with a <strong>HTTP 204 No Content</strong> after a succesful operation.
</p>
<p>Example request:</p>
<pre>
DELETE /api/addresses/107.20.232.251?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 204 No Content
Date: Wed, 27 Jul 2011 13:29:00 GMT
</pre>
</div>
<div class="tab-pane" id="tab4">
<h4>Associate an address with an instance</h4>
<p>
To associate a given address with a running instance use call <strong>POST /api/addresses/:id/associate</strong>. The client must specify the <strong>instance_id</strong> as a parameter to this call. For Amazon EC2, the specified address will replace the currently assigned public_address of the instance, while for the Fujitsu GCP it is added. A succesful operation results in a <strong>HTTP 202 Accepted</strong> response. The example client request below specifies the required instance_id parameter using the application/x-www-form-urlencoded content-type, however client can also use multipart/form-data.
</p>
<p>Example request:</p>
<pre>
POST /api/addresses/107.20.232.251/associate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded
instance_id=i-9d8a3dfc
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:01:11 GMT
Content-Length: 0
</pre>
<h4>Disassociate an address from an instance</h4>
<p>
To disassociate a given address from the instance to which it is currently assigned use call <strong>POST /api/addresses/:id/disassociate</strong>.
</p>
<p>Example request:</p>
<pre>
POST /api/addresses/107.20.232.251/disassociate?format=xml HTTP/1.1
Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa==
User-Agent: curl/7.20.1 (i386-redhat-linux-gnu)
Host: localhost:3001
Accept: */*
</pre>
<p>Server response:</p>
<pre>
HTTP/1.1 202 Accepted
Content-Type: application/xml
Date: Wed, 27 Jul 2011 13:05:38 GMT
Content-Length: 0
</pre>
</div>
</div>
<p><a class="btn btn-inverse btn-large" style="float: right" href="load-balancers.html">Load Balancers <i class="icon-arrow-right icon-white" style="vertical-align:baseline"> </i></a></p>
<p><br></p>
<footer class="footer">
<p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>
<div class='row'>
<div class='span3'>
<img src="/assets/img/asf.png" alt="Apache Software Foundation"/>
</div>
<div class='span9'>
<strong>Apache Deltacloud</strong> is a top-level project at the <a
href="http://www.apache.org">Apache Software Foundation</a>,
having graduated from the ASF Incubator in October
2011. Through a collaborative and meritocratic development process, Apache
projects deliver enterprise-grade, freely available software products that
attract large communities of users.
</div>
</div>
</footer>
</div> <!-- /container -->
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.salasaga.org/aeolus/piwik/" : "http://stats.salasaga.org/aeolus/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://stats.salasaga.org/aeolus/piwik/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>