本文整理了Java中org.jclouds.rest.annotations.Payload.<init>()
方法的一些代码示例,展示了Payload.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.<init>()
方法的具体详情如下:
包路径:org.jclouds.rest.annotations.Payload
类名称:Payload
方法名:<init>
暂无
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#start
*/
@Named("server:start")
@POST
@Path("/servers/{id}/action")
@Consumes
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"os-start\":null}")
ListenableFuture<Void> start(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#confirmResize
*/
@Named("server:resize")
@POST
@Path("/servers/{id}/action")
@Consumes
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"confirmResize\":null}")
ListenableFuture<Void> confirmResize(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#revertResize
*/
@Named("server:resize")
@POST
@Path("/servers/{id}/action")
@Consumes
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"revertResize\":null}")
ListenableFuture<Void> revertResize(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* Returns the account of the current user.
*/
@Named("getAccountsListOfUser")
@POST
@XMLResponseParser(AccountHandler.class)
@Payload("<v01:getAccountsListOfUser/>")
IdAndName getCurrentAccount();
代码示例来源:origin: jclouds/legacy-jclouds
/**
* Returns all traffic controller pools in the zone.
*
* @throws ResourceNotFoundException
* if the zone doesn't exist
*/
@Named("getLoadBalancingPoolsByZone")
@POST
@XMLResponseParser(TrafficControllerPoolListHandler.class)
@Payload("<v01:getLoadBalancingPoolsByZone><zoneName>{zoneName}</zoneName><lbPoolType>TC</lbPoolType></v01:getLoadBalancingPoolsByZone>")
FluentIterable<TrafficControllerPool> list() throws ResourceNotFoundException;
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerAdminApi#resume(String)
*/
@Named("serveradmin:resume")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"resume\":null}")
@Fallback(FalseOnNotFoundOr404.class)
ListenableFuture<Boolean> resume(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerAdminApi#migrate(String)
*/
@Named("serveradmin:migrate")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"migrate\":null}")
@Fallback(FalseOnNotFoundOr404.class)
ListenableFuture<Boolean> migrate(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerAdminApi#injectNetworkInfo(String)
*/
@Named("serveradmin:injectnetwork")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"injectNetworkInfo\":null}")
@Fallback(FalseOnNotFoundOr404.class)
ListenableFuture<Boolean> injectNetworkInfo(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerAdminApi#lock(String)
*/
@Named("serveradmin:lock")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Payload("{\"lock\":null}")
@Fallback(FalseOnNotFoundOr404.class)
ListenableFuture<Boolean> lock(@PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see HostAdministrationApi#disable(String)
*/
@Named("hostadmin:disable")
@PUT
@Produces(MediaType.APPLICATION_JSON)
@Path("/{id}")
@Payload("{\"status\":\"disable\"}")
@ResponseParser(StatusDisabledResponseParser.class)
ListenableFuture<Boolean> disable(@PathParam("id") String hostId);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#changeAdminPass
*/
@Named("server:changeadminpass")
@POST
@Path("/servers/{id}/action")
@Consumes
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"changePassword\":%7B\"adminPass\":\"{adminPass}\"%7D%7D")
ListenableFuture<Void> changeAdminPass(@PathParam("id") String id, @PayloadParam("adminPass") String adminPass);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#rename
*/
@Named("server:rename")
@PUT
@Path("/servers/{id}")
@Consumes
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"server\":%7B\"name\":\"{name}\"%7D%7D")
ListenableFuture<Void> rename(@PathParam("id") String id, @PayloadParam("name") String newName);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see CloudServersClient#rebootServer
*/
@POST
@QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/action")
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"reboot\":%7B\"type\":\"{type}\"%7D%7D")
ListenableFuture<Void> rebootServer(@PathParam("id") int id, @PayloadParam("type") RebootType rebootType);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see CloudServersClient#resizeServer
*/
@POST
@QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/action")
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"resize\":%7B\"flavorId\":{flavorId}%7D%7D")
ListenableFuture<Void> resizeServer(@PathParam("id") int id, @PayloadParam("flavorId") int flavorId);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see CloudSigmaClient#setVLANConfiguration
*/
@POST
@ResponseParser(KeyValuesDelimitedByBlankLinesToVLANInfo.class)
@Path("/resources/vlan/{uuid}/set")
@Payload("name {name}\n")
@Produces(MediaType.TEXT_PLAIN)
ListenableFuture<VLANInfo> renameVLAN(@PathParam("uuid") String uuid, @PayloadParam("name") String name);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* clears a background task in either a COMPLETE or ERROR state.
*
* @param guid
* guid of the task to clear.
*/
@Named("clearTask")
@POST
@Payload("<v01:clearTask><id><guid>{guid}</guid></id></v01:clearTask>")
@Fallback(VoidOnNotFoundOr404.class)
void clear(@PayloadParam("guid") String name);
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see ServerApi#createImageFromServer
*/
@Named("server:create")
@POST
@Path("/servers/{id}/action")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"createImage\":%7B\"name\":\"{name}\", \"metadata\": %7B%7D%7D%7D")
@Fallback(MapHttp4xxCodesToExceptions.class)
@ResponseParser(ParseImageIdFromLocationHeader.class)
ListenableFuture<String> createImageFromServer(@PayloadParam("name") String name, @PathParam("id") String id);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* @see VolumeTypeApi#updateExtraSpec(String, String, String)
*/
@Named("volumetype:updateextraspec")
@PUT
@Path("/{id}/extra_specs/{key}")
@Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"{key}\":\"{value}\"%7D")
@Fallback(FalseOnNotFoundOr404.class)
ListenableFuture<Boolean> updateExtraSpec(@PathParam("id") String id,
@PathParam("key") @PayloadParam("key") String key,
@PayloadParam("value") String value);
代码示例来源:origin: jclouds/legacy-jclouds
/**
* schedules creation of the resource record set.
*/
@Named("ChangeResourceRecordSets")
@POST
@Produces(APPLICATION_XML)
@Path("/rrset")
@Payload("<ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><ChangeBatch><Changes><Change><Action>CREATE</Action>{rrs}</Change></Changes></ChangeBatch></ChangeResourceRecordSetsRequest>")
@XMLResponseParser(ChangeHandler.class)
Change create(@PayloadParam("rrs") @ParamParser(SerializeRRS.class) ResourceRecordSet rrs);
代码示例来源:origin: jclouds/legacy-jclouds
@POST
@Path("/{foo}")
@PayloadParams(keys = "rat", values = "atat")
@org.jclouds.rest.annotations.Payload("name {fooble}")
@Produces(MediaType.TEXT_PLAIN)
public void testPayload(@PathParam("foo") @PayloadParam("fooble") String path);
}
内容来源于网络,如有侵权,请联系作者删除!