createReservation()

PoolReservationLink createReservation(string poolId, string start, string end, LinkType linkType, BackLink backLink)

This method reserves a range of resources from the pool specified, and creates an initial link to the range.

Parameters

poolId
Format: string
Purpose: Specifies the identifier of the pool from which to reserve.
start
Format: string
Purpose: Specifies the first resource of the range to reserve.
end
Format: string
Purpose: Specifies the last resource of the range to reserve (inclusive).
linkType
Format: LinkType XML
Purpose: Defines a LinkType XML document that specifies the link type for the initial link. LinkType has a value of Temporary, PreAllocation, Allocation or Quarantine.
backLink
Format: BackLink XML
Purpose: (Optional) Defines a BackLink XML document that specifies a backlink identifying the owner of the link.

Results

This method returns a PoolReservationLink XML document containing the a link to the new reservation.

There are no messages defined by this method.

Example: A returned PoolReservationLink XML document

This example shows PoolReservationLink XML document containing details of a new temporary reservation of 10,000 numbers starting at 039999.

<PoolReservationLink xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <LinkId>c71e5fb9-f467-41a7-aa6e-d82d4ce7f7c6</LinkId>
  <LinkType>Temporary</LinkType>
  <Reservation>
    <ReservationId>732b30ff-824b-4a0e-9eea-691e280f2d5e</ReservationId>
    <Start>0399990000</Start>
    <End>0399999999</End>
  </Reservation>
  <Expiry>2015-02-08T14:47:52.163+11:00</Expiry>
</PoolReservationLink>

Faults

InvalidRequestException

This fault is returned when a required field is not specified, linkType is invalid, or start and/or end are invalid.

NoSuchItemException

This fault is returned when one of the referenced objects does not exist

ReservationUnavailableException

This fault is returned when any of the desired resources are already reserved.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.CreateReservation poolId start
 end filename [backLinkType] [backLinkKey]
poolId
Purpose: Specifies the identifier of the pool from which to reserve.
start
Purpose: Specifies the first resource of the range to reserve.
end
Purpose: Specifies the last resource of the range to reserve (inclusive).
filename
Purpose: Defines the filename of the LinkType XML document.
backLinkType
Purpose: (Optional) Specifies a unique string representing the type of object that is holding the reference.
backLinkKey
Purpose: (Optional) Specifies a string uniquely identifying object that is holding the reference, within the scope of the backLinkType.
Note: For more information about the Java client and the options it accepts, see Java client syntax.