Interface Servers
-
public interface ServersResource collection API of Servers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Server.DefinitionStages.Blankdefine(String name)Begins definition for a new Server resource.voiddelete(String resourceGroupName, String serverName, com.azure.core.util.Context context)Deletes 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.ServergetById(String id)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.ServergetByResourceGroup(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.voidrestart(String resourceGroupName, String serverName)Restarts a server.voidrestart(String resourceGroupName, String serverName, com.azure.core.util.Context context)Restarts a server.voidstart(String resourceGroupName, String serverName)Starts a stopped server.voidstart(String resourceGroupName, String serverName, com.azure.core.util.Context context)Starts a stopped server.voidstop(String resourceGroupName, String serverName)Stops a running server.voidstop(String resourceGroupName, String serverName, com.azure.core.util.Context context)Stops a running server.voidupgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters)Upgrade server version.voidupgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters, com.azure.core.util.Context context)Upgrade server version.
-
-
-
Method Detail
-
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.
-
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.
-
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.
-
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.
- 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.
- 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.
- 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.
- 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.
-
upgrade
void upgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters)
Upgrade server version.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.parameters- The required parameters for updating 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.
-
upgrade
void upgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters, com.azure.core.util.Context context)
Upgrade server version.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.parameters- The required parameters for updating 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.
-
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
Server.DefinitionStages.Blank define(String name)
Begins definition for a new Server resource.- Parameters:
name- resource name.- Returns:
- the first stage of the new Server definition.
-
-