use of com.azure.cosmos.models.CosmosDatabaseRequestOptions in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class AnalyticalContainerCRUDQuickstart method deleteADatabase.
// Database delete
private void deleteADatabase() throws Exception {
logger.info("Last step: delete database " + databaseName + " by ID.");
// Delete database
CosmosDatabaseResponse dbResp = client.getDatabase(databaseName).delete(new CosmosDatabaseRequestOptions());
logger.info("Status code for database delete: {}", dbResp.getStatusCode());
logger.info("Done.");
}
use of com.azure.cosmos.models.CosmosDatabaseRequestOptions in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class DocumentCRUDQuickstart method deleteADatabase.
// Database delete
private void deleteADatabase() throws Exception {
logger.info("Last step: delete database " + databaseName + " by ID.");
// Delete database
CosmosDatabaseResponse dbResp = client.getDatabase(databaseName).delete(new CosmosDatabaseRequestOptions());
logger.info("Status code for database delete: {}", dbResp.getStatusCode());
logger.info("Done.");
}
use of com.azure.cosmos.models.CosmosDatabaseRequestOptions in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class DatabaseCRUDQuickstart method deleteADatabase.
// Database delete
private void deleteADatabase() throws Exception {
logger.info("Last step: delete database " + databaseName + " by ID.");
// Delete database
CosmosDatabaseResponse dbResp = client.getDatabase(databaseName).delete(new CosmosDatabaseRequestOptions());
logger.info("Status code for database delete: {}", dbResp.getStatusCode());
logger.info("Done.");
}
use of com.azure.cosmos.models.CosmosDatabaseRequestOptions in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class CosmosDiagnosticsQuickStartAsync method deleteDatabase.
// Database delete
private void deleteDatabase() throws Exception {
logger.info("Last step: delete database {} by ID", databaseName);
// Delete database
CosmosDatabaseResponse dbResp = client.getDatabase(databaseName).delete(new CosmosDatabaseRequestOptions()).block();
logger.info("Status code for database delete: {}", dbResp.getStatusCode());
logger.info("Done.");
}
use of com.azure.cosmos.models.CosmosDatabaseRequestOptions in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class CosmosDiagnosticsQuickStart method deleteDatabase.
// Database delete
private void deleteDatabase() throws Exception {
logger.info("Last step: delete database {} by ID", databaseName);
// Delete database
CosmosDatabaseResponse dbResp = client.getDatabase(databaseName).delete(new CosmosDatabaseRequestOptions());
logger.info("Status code for database delete: {}", dbResp.getStatusCode());
logger.info("Done.");
}
Aggregations