Cloud Management API 1.5

IpAddressBindings

An IpAddressBinding represents an abstraction for binding an IpAddress to an instance. The IpAddress is bound immediately for a current instance, or on launch for a next instance. It also allows specifying port forwarding rules for that particular IpAddress and Instance pair.

Actions

index

Lists the ip address bindings available to this account.

URLs
GET /api/clouds/:cloud_id/ip_address_bindings
GET /api/clouds/:cloud_id/ip_addresses/:ip_address_id/ip_address_bindings
HTTP response code
200 OK
Content-type
application/vnd.rightscale.ip_address_binding;type=collection

Required roles

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.

Filters

name partial_match? description
instance_href no The href of the Instance to filter on.
ip_address_href no The href of the IpAddress to filter on.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "created_at": "2017/03/02 17:42:06 +0000",
  "links": [
    {"rel":"self","href":"/api/clouds/526028165/ip_address_bindings/RESOURCE_2720278813;RAND"},
    {"rel":"instance","href":"/api/clouds/526028165/instances/RESOURCE_469561217;RAND"},
    {"rel":"ip_address","href":"/api/clouds/888/ip_addresses/RESOURCE_3101389444;RAND"}
  ],
  "recurring": false
},{
  "created_at": "2017/03/02 17:42:08 +0000",
  "links": [
    {"rel":"self","href":"/api/clouds/528235579/ip_address_bindings/RESOURCE_2191694953;RAND"},
    {"rel":"instance","href":"/api/clouds/528235579/instances/RESOURCE_521840097;RAND"},
    {"rel":"ip_address","href":"/api/clouds/888/ip_addresses/RESOURCE_75921301;RAND"}
  ],
  "recurring": false
}]
<?xml version="1.0" encoding="UTF-8"?>
<ip_address_bindings>
  <ip_address_binding>
    <created_at>2017/03/02 17:42:06 +0000</created_at>
    <links>
      <link rel="self" href="/api/clouds/526028165/ip_address_bindings/RESOURCE_2720278813;RAND"/>
      <link rel="instance" href="/api/clouds/526028165/instances/RESOURCE_469561217;RAND"/>
      <link rel="ip_address" href="/api/clouds/888/ip_addresses/RESOURCE_3101389444;RAND"/>
    </links>
    <recurring>false</recurring>
  </ip_address_binding>
  <ip_address_binding>
    <created_at>2017/03/02 17:42:08 +0000</created_at>
    <links>
      <link rel="self" href="/api/clouds/528235579/ip_address_bindings/RESOURCE_2191694953;RAND"/>
      <link rel="instance" href="/api/clouds/528235579/instances/RESOURCE_521840097;RAND"/>
      <link rel="ip_address" href="/api/clouds/888/ip_addresses/RESOURCE_75921301;RAND"/>
    </links>
    <recurring>false</recurring>
  </ip_address_binding>
</ip_address_bindings>

show

Show information about a single ip address binding.

URLs
GET /api/clouds/:cloud_id/ip_address_bindings/:id
GET /api/clouds/:cloud_id/ip_addresses/:ip_address_id/ip_address_bindings/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.ip_address_binding

Required roles

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "created_at": "2017/03/02 17:42:06 +0000",
  "links": [
    {"rel":"self","href":"/api/clouds/526028165/ip_address_bindings/RESOURCE_2720278813;RAND"},
    {"rel":"instance","href":"/api/clouds/526028165/instances/RESOURCE_469561217;RAND"},
    {"rel":"ip_address","href":"/api/clouds/888/ip_addresses/RESOURCE_3101389444;RAND"}
  ],
  "recurring": false
}
<?xml version="1.0" encoding="UTF-8"?>
<ip_address_binding>
  <created_at>2017/03/02 17:42:06 +0000</created_at>
  <links>
    <link rel="self" href="/api/clouds/526028165/ip_address_bindings/RESOURCE_2720278813;RAND"/>
    <link rel="instance" href="/api/clouds/526028165/instances/RESOURCE_469561217;RAND"/>
    <link rel="ip_address" href="/api/clouds/888/ip_addresses/RESOURCE_3101389444;RAND"/>
  </links>
  <recurring>false</recurring>
</ip_address_binding>

create

Creates an ip address binding which attaches a specified IpAddress resource to a specified instance, and also allows for configuration of port forwarding rules. If the instance specified is a current (running) instance, a one-time IpAddressBinding will be created. If the instance is a next instance, then a recurring IpAddressBinding is created, which will cause the IpAddress to be bound each time the incarnator boots.

URLs
POST /api/clouds/:cloud_id/ip_address_bindings
POST /api/clouds/:cloud_id/ip_addresses/:ip_address_id/ip_address_bindings
HTTP response code
201 Created

Required roles

Parameters

name required type values regexp blank? description
ip_address_binding yes Hash * * no
ip_address_binding[instance_href] no String * * no The Instance to which this IpAddress should be bound. Mutually exclusive with server_href.
ip_address_binding[private_port] no String * * no Incoming network traffic will get forwarded to this port number on the specified Instance. If not specified, will use public port. Required unless public_ip_address_href is passed.
ip_address_binding[protocol] no String UDP, TCP * no Transport layer protocol of traffic that may be forwarded from public port to private port on the Instance. Required unless public_ip_address_href is passed.
ip_address_binding[public_ip_address_href] no String * * no The IpAddress to bind to the specified instance. Required unless port forwarding rule params are passed.
ip_address_binding[public_port] no String * * no The incoming port for port forwarding. Incoming network traffic on this port will get forwarded (to the IP:Private Port of the specified Instance). Required unless public_ip_address_href is passed.
ip_address_binding[server_href] no String * * no The Server to which this IpAddress should be bound. Mutually exclusive with instance_href.Note: the Server must have a current_instance.

destroy

URLs
DELETE /api/clouds/:cloud_id/ip_address_bindings/:id
DELETE /api/clouds/:cloud_id/ip_addresses/:ip_address_id/ip_address_bindings/:id
HTTP response code
204 No Content

Required roles