Class InstanceResource


  • @Path("/instances")
    @Produces("application/json")
    public class InstanceResource
    extends java.lang.Object
    Resource for controlling Instance objects.

    Roles defined: INSTANCE_LIST

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deleteInstance​(java.lang.String instanceId)  
      java.util.Map<java.lang.String,​uk.co.ractf.polaris.api.instance.Instance> getInstances​(java.lang.String hostFilter, java.lang.String challengeFilter)
      Return a Map of instance id to Instance for all instances matching the host id regex and the challenge id regex.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InstanceResource

        @Inject
        public InstanceResource​(ClusterState clusterState)
    • Method Detail

      • getInstances

        @GET
        @Timed
        @ExceptionMetered
        @RolesAllowed("INSTANCE_LIST")
        public java.util.Map<java.lang.String,​uk.co.ractf.polaris.api.instance.Instance> getInstances​(@QueryParam("hostfilter") @DefaultValue("")
                                                                                                            java.lang.String hostFilter,
                                                                                                            @QueryParam("challengefilter") @DefaultValue("")
                                                                                                            java.lang.String challengeFilter)
        Return a Map of instance id to Instance for all instances matching the host id regex and the challenge id regex. Results are only filtered if a filter is not omitted.
        Parameters:
        hostFilter - regex to apply to host ids
        challengeFilter - regex to apply to challenge ids
        Returns:
        map of instance id to instance
      • deleteInstance

        @DELETE
        @Timed
        @ExceptionMetered
        @RolesAllowed("INSTANCE_DELETE")
        public void deleteInstance​(java.lang.String instanceId)