Class SqlDatabaseInstanceConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.sql_database_instance.SqlDatabaseInstanceConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SqlDatabaseInstanceConfig>
- Enclosing interface:
- SqlDatabaseInstanceConfig
@Stability(Stable) public static final class SqlDatabaseInstanceConfig.Builder extends Object implements software.amazon.jsii.Builder<SqlDatabaseInstanceConfig>
A builder forSqlDatabaseInstanceConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
databaseVersion
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder databaseVersion(String databaseVersion)
Sets the value ofSqlDatabaseInstanceConfig.getDatabaseVersion()- Parameters:
databaseVersion- The MySQL, PostgreSQL or SQL Server (beta) version to use. This parameter is required. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#database_version SqlDatabaseInstance#database_version}- Returns:
this
-
clone
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder clone(SqlDatabaseInstanceClone clone)
Sets the value ofSqlDatabaseInstanceConfig.getClone()- Parameters:
clone- clone block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#clone SqlDatabaseInstance#clone}- Returns:
this
-
deletionProtection
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder deletionProtection(Boolean deletionProtection)
Sets the value ofSqlDatabaseInstanceConfig.getDeletionProtection()- Parameters:
deletionProtection- Used to block Terraform from deleting a SQL Instance. Defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#deletion_protection SqlDatabaseInstance#deletion_protection}- Returns:
this
-
deletionProtection
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder deletionProtection(com.hashicorp.cdktf.IResolvable deletionProtection)
Sets the value ofSqlDatabaseInstanceConfig.getDeletionProtection()- Parameters:
deletionProtection- Used to block Terraform from deleting a SQL Instance. Defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#deletion_protection SqlDatabaseInstance#deletion_protection}- Returns:
this
-
encryptionKeyName
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder encryptionKeyName(String encryptionKeyName)
Sets the value ofSqlDatabaseInstanceConfig.getEncryptionKeyName()- Parameters:
encryptionKeyName- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#encryption_key_name SqlDatabaseInstance#encryption_key_name}.- Returns:
this
-
id
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder id(String id)
Sets the value ofSqlDatabaseInstanceConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#id SqlDatabaseInstance#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
instanceType
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder instanceType(String instanceType)
Sets the value ofSqlDatabaseInstanceConfig.getInstanceType()- Parameters:
instanceType- The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED', 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#instance_type SqlDatabaseInstance#instance_type}- Returns:
this
-
maintenanceVersion
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder maintenanceVersion(String maintenanceVersion)
Sets the value ofSqlDatabaseInstanceConfig.getMaintenanceVersion()- Parameters:
maintenanceVersion- Maintenance version. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#maintenance_version SqlDatabaseInstance#maintenance_version}- Returns:
this
-
masterInstanceName
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder masterInstanceName(String masterInstanceName)
Sets the value ofSqlDatabaseInstanceConfig.getMasterInstanceName()- Parameters:
masterInstanceName- The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#master_instance_name SqlDatabaseInstance#master_instance_name}- Returns:
this
-
name
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder name(String name)
Sets the value ofSqlDatabaseInstanceConfig.getName()- Parameters:
name- The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#name SqlDatabaseInstance#name}- Returns:
this
-
project
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder project(String project)
Sets the value ofSqlDatabaseInstanceConfig.getProject()- Parameters:
project- The ID of the project in which the resource belongs. If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#project SqlDatabaseInstance#project}- Returns:
this
-
region
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder region(String region)
Sets the value ofSqlDatabaseInstanceConfig.getRegion()- Parameters:
region- The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#region SqlDatabaseInstance#region}- Returns:
this
-
replicaConfiguration
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder replicaConfiguration(SqlDatabaseInstanceReplicaConfiguration replicaConfiguration)
Sets the value ofSqlDatabaseInstanceConfig.getReplicaConfiguration()- Parameters:
replicaConfiguration- replica_configuration block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#replica_configuration SqlDatabaseInstance#replica_configuration}- Returns:
this
-
restoreBackupContext
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder restoreBackupContext(SqlDatabaseInstanceRestoreBackupContext restoreBackupContext)
Sets the value ofSqlDatabaseInstanceConfig.getRestoreBackupContext()- Parameters:
restoreBackupContext- restore_backup_context block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#restore_backup_context SqlDatabaseInstance#restore_backup_context}- Returns:
this
-
rootPassword
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder rootPassword(String rootPassword)
Sets the value ofSqlDatabaseInstanceConfig.getRootPassword()- Parameters:
rootPassword- Initial root password. Required for MS SQL Server. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#root_password SqlDatabaseInstance#root_password}- Returns:
this
-
settings
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder settings(SqlDatabaseInstanceSettings settings)
Sets the value ofSqlDatabaseInstanceConfig.getSettings()- Parameters:
settings- settings block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#settings SqlDatabaseInstance#settings}- Returns:
this
-
timeouts
@Stability(Stable) public SqlDatabaseInstanceConfig.Builder timeouts(SqlDatabaseInstanceTimeouts timeouts)
Sets the value ofSqlDatabaseInstanceConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database_instance#timeouts SqlDatabaseInstance#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public SqlDatabaseInstanceConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public SqlDatabaseInstanceConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SqlDatabaseInstanceConfig>- Returns:
- a new instance of
SqlDatabaseInstanceConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-