Interface Databases
public interface Databases
Resource collection API of Databases.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Database resource.voidDeletes an existing database.voiddelete(String resourceGroupName, String serverName, String databaseName, com.azure.core.util.Context context) Deletes an existing database.voiddeleteById(String id) Deletes an existing database.voiddeleteByIdWithResponse(String id, com.azure.core.util.Context context) Deletes an existing database.Gets information about an existing database.Gets information about an existing database.com.azure.core.http.rest.Response<Database> getByIdWithResponse(String id, com.azure.core.util.Context context) Gets information about an existing database.com.azure.core.http.rest.Response<Database> getWithResponse(String resourceGroupName, String serverName, String databaseName, com.azure.core.util.Context context) Gets information about an existing database.com.azure.core.http.rest.PagedIterable<Database> listByServer(String resourceGroupName, String serverName) Lists all databases in a server.com.azure.core.http.rest.PagedIterable<Database> listByServer(String resourceGroupName, String serverName, com.azure.core.util.Context context) Lists all databases in a server.
-
Method Details
-
delete
Deletes an existing database.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.databaseName- Name of the database (case-sensitive). Exact database names can be retrieved by getting the list of all existing databases in 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.
-
delete
void delete(String resourceGroupName, String serverName, String databaseName, com.azure.core.util.Context context) Deletes an existing database.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.databaseName- Name of the database (case-sensitive). Exact database names can be retrieved by getting the list of all existing databases in 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.
-
getWithResponse
com.azure.core.http.rest.Response<Database> getWithResponse(String resourceGroupName, String serverName, String databaseName, com.azure.core.util.Context context) Gets information about an existing database.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.databaseName- Name of the database (case-sensitive). Exact database names can be retrieved by getting the list of all existing databases in a server.context- The context to associate with this operation.- Returns:
- information about an existing database 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.
-
get
Gets information about an existing database.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.databaseName- Name of the database (case-sensitive). Exact database names can be retrieved by getting the list of all existing databases in a server.- Returns:
- information about an existing database.
- 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.
-
listByServer
com.azure.core.http.rest.PagedIterable<Database> listByServer(String resourceGroupName, String serverName) Lists all databases in a server.- Parameters:
resourceGroupName- The name of the resource group. The name is case insensitive.serverName- The name of the server.- Returns:
- list of all databases in a server 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.
-
listByServer
com.azure.core.http.rest.PagedIterable<Database> listByServer(String resourceGroupName, String serverName, com.azure.core.util.Context context) Lists all databases in 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:
- list of all databases in a server 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.
-
getById
Gets information about an existing database.- Parameters:
id- the resource ID.- Returns:
- information about an existing database 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<Database> getByIdWithResponse(String id, com.azure.core.util.Context context) Gets information about an existing database.- Parameters:
id- the resource ID.context- The context to associate with this operation.- Returns:
- information about an existing database 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 an existing database.- 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 an existing database.- 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 Database resource.- Parameters:
name- resource name.- Returns:
- the first stage of the new Database definition.
-