Interface Servers
public interface Servers
Resource collection API of Servers.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Server resource.voidDeletes a server.voiddeleteById(String id) Deletes a server.voiddeleteByIdWithResponse(String id, com.azure.core.util.Context context) Deletes a server.voiddeleteByResourceGroup(String resourceGroupName, String serverName) Deletes a server.Gets information about a server.com.azure.core.http.rest.Response<Server>getByIdWithResponse(String id, com.azure.core.util.Context context) Gets information about a server.getByResourceGroup(String resourceGroupName, String serverName) Gets information about a server.com.azure.core.http.rest.Response<Server>getByResourceGroupWithResponse(String resourceGroupName, String serverName, com.azure.core.util.Context context) Gets information about a server.com.azure.core.http.rest.PagedIterable<Server>list()List all the servers in a given subscription.com.azure.core.http.rest.PagedIterable<Server>list(com.azure.core.util.Context context) List all the servers in a given subscription.com.azure.core.http.rest.PagedIterable<Server>listByResourceGroup(String resourceGroupName) List all the servers in a given resource group.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.voidRestarts a server.voidrestart(String resourceGroupName, String serverName, RestartParameter parameters, com.azure.core.util.Context context) Restarts a server.voidStarts a server.voidStarts a server.voidStops a server.voidStops a server.
-
Method Details
-
deleteByResourceGroup
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
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
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
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
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
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, RestartParameter parameters, 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.parameters- The parameters for restarting a 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
Starts 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.
-
start
Starts 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.
-
stop
Stops 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.
-
stop
Stops 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.
-
getById
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
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
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.
-