Annotation Type Get


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Get
    HTTP GET method annotation describing the parameterized relative path to a REST endpoint for resource retrieval.

    The required value can be either a relative path or an absolute path. When it's an absolute path, it must start with a protocol or a parameterized segment (otherwise the parse cannot tell if it's absolute or relative).

    Example 1: Relative path segments

     @Get("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft
     .Compute/virtualMachines/{vmName}")
      VirtualMachine getByResourceGroup(@PathParam("resourceGroupName") String rgName, @PathParam("vmName") String
      vmName, @PathParam("subscriptionId") String subscriptionId);

    Example 2: Absolute path segment

     @Get({nextLink})
     List<VirtualMachine> listNext(@PathParam("nextLink") String nextLink);
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      Get the relative path of the annotated method's GET URL.
    • Element Detail

      • value

        String value
        Get the relative path of the annotated method's GET URL.
        Returns:
        The relative path of the annotated method's GET URL.