Interface Servers
public interface Servers
Resource collection API of Servers.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Server resource.void
Deletes a server.void
deleteById
(String id) Deletes a server.void
deleteByIdWithResponse
(String id, com.azure.core.util.Context context) Deletes a server.void
deleteByResourceGroup
(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.void
Restarts a server.void
Restarts a server.void
Starts a stopped server.void
Starts a stopped server.void
Stops a running server.void
Stops a running 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
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
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
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
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
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
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.
-