Interface Servers


public interface Servers
Resource collection API of Servers.
  • Method Details

    • deleteByResourceGroup

      void deleteByResourceGroup(String resourceGroupName, String serverName)
      Deletes a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • delete

      void delete(String resourceGroupName, String serverName, com.azure.core.util.Context context)
      Deletes a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getByResourceGroupWithResponse

      com.azure.core.http.rest.Response<Server> getByResourceGroupWithResponse(String resourceGroupName, String serverName, com.azure.core.util.Context context)
      Gets information about a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      context - The context to associate with this operation.
      Returns:
      information about a server along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getByResourceGroup

      Server getByResourceGroup(String resourceGroupName, String serverName)
      Gets information about a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      Returns:
      information about a server.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listByResourceGroup

      com.azure.core.http.rest.PagedIterable<Server> listByResourceGroup(String resourceGroupName)
      List all the servers in a given resource group.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      Returns:
      a list of servers as paginated response with PagedIterable.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listByResourceGroup

      com.azure.core.http.rest.PagedIterable<Server> listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context)
      List all the servers in a given resource group.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      context - The context to associate with this operation.
      Returns:
      a list of servers as paginated response with PagedIterable.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • list

      com.azure.core.http.rest.PagedIterable<Server> list()
      List all the servers in a given subscription.
      Returns:
      a list of servers as paginated response with PagedIterable.
      Throws:
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • list

      com.azure.core.http.rest.PagedIterable<Server> list(com.azure.core.util.Context context)
      List all the servers in a given subscription.
      Parameters:
      context - The context to associate with this operation.
      Returns:
      a list of servers as paginated response with PagedIterable.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • restart

      void restart(String resourceGroupName, String serverName)
      Restarts a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • restart

      void restart(String resourceGroupName, String serverName, com.azure.core.util.Context context)
      Restarts a server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • start

      void start(String resourceGroupName, String serverName)
      Starts a stopped server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • start

      void start(String resourceGroupName, String serverName, com.azure.core.util.Context context)
      Starts a stopped server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stop

      void stop(String resourceGroupName, String serverName)
      Stops a running server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stop

      void stop(String resourceGroupName, String serverName, com.azure.core.util.Context context)
      Stops a running server.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serverName - The name of the server.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getById

      Server getById(String id)
      Gets information about a server.
      Parameters:
      id - the resource ID.
      Returns:
      information about a server along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getByIdWithResponse

      com.azure.core.http.rest.Response<Server> getByIdWithResponse(String id, com.azure.core.util.Context context)
      Gets information about a server.
      Parameters:
      id - the resource ID.
      context - The context to associate with this operation.
      Returns:
      information about a server along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteById

      void deleteById(String id)
      Deletes a server.
      Parameters:
      id - the resource ID.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteByIdWithResponse

      void deleteByIdWithResponse(String id, com.azure.core.util.Context context)
      Deletes a server.
      Parameters:
      id - the resource ID.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • define

      Begins definition for a new Server resource.
      Parameters:
      name - resource name.
      Returns:
      the first stage of the new Server definition.