Skip to content

Commit d7ecb90

Browse files
authored
Tidy up comments and code in CreateDatabase.java
1 parent 99c8dfd commit d7ecb90

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation/CreateDatabase.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@
22

33
import com.dtsx.astra.sdk.AstraDBAdmin;
44
import com.dtsx.astra.sdk.db.domain.CloudProviderType;
5-
65
import java.util.UUID;
76

87
public class CreateDatabase {
9-
public static void main(String[] args) {
10-
AstraDBAdmin client = new AstraDBAdmin("<replace_with_token>");
8+
public static void main(String[] args) {
9+
AstraDBAdmin client = new AstraDBAdmin("<token>");
1110

12-
String databaseName = "<replace_with_db_name>";
13-
// GCP, AZURE or AWS
14-
CloudProviderType cloudProvider = CloudProviderType.GCP;
15-
// To get the list of available regions see below
16-
String cloudRegion = "us-east1";
17-
UUID newDbId = client.createDatabase(databaseName, cloudProvider, cloudRegion);
18-
}
11+
// Choose a cloud provider (GCP, AZURE, AWS) and a region
12+
CloudProviderType cloudProvider = CloudProviderType.GCP;
13+
String cloudRegion = "us-east1";
14+
15+
// Create a database
16+
UUID newDbId = client.createDatabase("<database_name>", cloudProvider, cloudRegion);
17+
}
1918
}

0 commit comments

Comments
 (0)