Class SqlDatabaseConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.sql_database.SqlDatabaseConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SqlDatabaseConfig>
- Enclosing interface:
- SqlDatabaseConfig
@Stability(Stable) public static final class SqlDatabaseConfig.Builder extends Object implements software.amazon.jsii.Builder<SqlDatabaseConfig>
A builder forSqlDatabaseConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlDatabaseConfigbuild()Builds the configured instance.SqlDatabaseConfig.Buildercharset(String charset)Sets the value ofSqlDatabaseConfig.getCharset()SqlDatabaseConfig.Buildercollation(String collation)Sets the value ofSqlDatabaseConfig.getCollation()SqlDatabaseConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SqlDatabaseConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SqlDatabaseConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()SqlDatabaseConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()SqlDatabaseConfig.BuilderdeletionPolicy(String deletionPolicy)Sets the value ofSqlDatabaseConfig.getDeletionPolicy()SqlDatabaseConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()SqlDatabaseConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()SqlDatabaseConfig.Builderid(String id)Sets the value ofSqlDatabaseConfig.getId()SqlDatabaseConfig.Builderinstance(String instance)Sets the value ofSqlDatabaseConfig.getInstance()SqlDatabaseConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()SqlDatabaseConfig.Buildername(String name)Sets the value ofSqlDatabaseConfig.getName()SqlDatabaseConfig.Builderproject(String project)Sets the value ofSqlDatabaseConfig.getProject()SqlDatabaseConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()SqlDatabaseConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()SqlDatabaseConfig.Buildertimeouts(SqlDatabaseTimeouts timeouts)Sets the value ofSqlDatabaseConfig.getTimeouts()
-
-
-
Method Detail
-
instance
@Stability(Stable) public SqlDatabaseConfig.Builder instance(String instance)
Sets the value ofSqlDatabaseConfig.getInstance()- Parameters:
instance- The name of the Cloud SQL instance. This does not include the project ID. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#instance SqlDatabase#instance}- Returns:
this
-
name
@Stability(Stable) public SqlDatabaseConfig.Builder name(String name)
Sets the value ofSqlDatabaseConfig.getName()- Parameters:
name- The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#name SqlDatabase#name}- Returns:
this
-
charset
@Stability(Stable) public SqlDatabaseConfig.Builder charset(String charset)
Sets the value ofSqlDatabaseConfig.getCharset()- Parameters:
charset- The charset value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) for more details and supported values. Postgres databases only support a value of 'UTF8' at creation time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#charset SqlDatabase#charset}- Returns:
this
-
collation
@Stability(Stable) public SqlDatabaseConfig.Builder collation(String collation)
Sets the value ofSqlDatabaseConfig.getCollation()- Parameters:
collation- The collation value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) for more details and supported values. Postgres databases only support a value of 'en_US.UTF8' at creation time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#collation SqlDatabase#collation}- Returns:
this
-
deletionPolicy
@Stability(Stable) public SqlDatabaseConfig.Builder deletionPolicy(String deletionPolicy)
Sets the value ofSqlDatabaseConfig.getDeletionPolicy()- Parameters:
deletionPolicy- The deletion policy for the database. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be deleted from the API if there are users other than cloudsqlsuperuser with access. Possible values are: "ABANDON", "DELETE". Defaults to "DELETE". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#deletion_policy SqlDatabase#deletion_policy}- Returns:
this
-
id
@Stability(Stable) public SqlDatabaseConfig.Builder id(String id)
Sets the value ofSqlDatabaseConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#id SqlDatabase#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
-
project
@Stability(Stable) public SqlDatabaseConfig.Builder project(String project)
Sets the value ofSqlDatabaseConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#project SqlDatabase#project}.- Returns:
this
-
timeouts
@Stability(Stable) public SqlDatabaseConfig.Builder timeouts(SqlDatabaseTimeouts timeouts)
Sets the value ofSqlDatabaseConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_database#timeouts SqlDatabase#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public SqlDatabaseConfig.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 SqlDatabaseConfig.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 SqlDatabaseConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public SqlDatabaseConfig.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 SqlDatabaseConfig.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 SqlDatabaseConfig.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 SqlDatabaseConfig.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 SqlDatabaseConfig.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 SqlDatabaseConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public SqlDatabaseConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SqlDatabaseConfig>- Returns:
- a new instance of
SqlDatabaseConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-