Interface Servers
public interface Servers
Resource collection API of Servers.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Server resource.voidDeletes or drops an existing server.voiddeleteById(String id) Deletes or drops an existing server.voiddeleteByIdWithResponse(String id, com.azure.core.util.Context context) Deletes or drops an existing server.voiddeleteByResourceGroup(String resourceGroupName, String serverName) Deletes or drops an existing server.Gets information about an existing server.com.azure.core.http.rest.Response<Server> getByIdWithResponse(String id, com.azure.core.util.Context context) Gets information about an existing server.getByResourceGroup(String resourceGroupName, String serverName) Gets information about an existing server.com.azure.core.http.rest.Response<Server> getByResourceGroupWithResponse(String resourceGroupName, String serverName, com.azure.core.util.Context context) Gets information about an existing server.com.azure.core.http.rest.PagedIterable<Server> list()Lists all servers in a subscription.com.azure.core.http.rest.PagedIterable<Server> list(com.azure.core.util.Context context) Lists all servers in a subscription.com.azure.core.http.rest.PagedIterable<Server> listByResourceGroup(String resourceGroupName) Lists all servers in a resource group.com.azure.core.http.rest.PagedIterable<Server> listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context) Lists all servers in a resource group.voidRestarts PostgreSQL database engine in a server.voidrestart(String resourceGroupName, String serverName, RestartParameter parameters, com.azure.core.util.Context context) Restarts PostgreSQL database engine in a server.voidStarts a stopped server.voidStarts a stopped server.voidStops a server.voidStops a server.
-
Method Details
-
deleteByResourceGroup
Deletes or drops an existing 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 or drops an existing 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 an existing 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 an existing 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 an existing server.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.- Returns:
- information about an existing 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
Lists all servers in a 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) Lists all servers in a 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()Lists all servers in a 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
Lists all servers in a 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 PostgreSQL database engine in 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 PostgreSQL database engine in a server.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.parameters- Parameters to restart 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 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 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 an existing server.- Parameters:
id- the resource ID.- Returns:
- information about an existing 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 an existing server.- Parameters:
id- the resource ID.context- The context to associate with this operation.- Returns:
- information about an existing 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 or drops an existing 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 or drops an existing 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.
-