Class SqlUserConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.sql_user.SqlUserConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SqlUserConfig>
- Enclosing interface:
- SqlUserConfig
@Stability(Stable) public static final class SqlUserConfig.Builder extends Object implements software.amazon.jsii.Builder<SqlUserConfig>
A builder forSqlUserConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlUserConfigbuild()Builds the configured instance.SqlUserConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SqlUserConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SqlUserConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()SqlUserConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()SqlUserConfig.BuilderdeletionPolicy(String deletionPolicy)Sets the value ofSqlUserConfig.getDeletionPolicy()SqlUserConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()SqlUserConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()SqlUserConfig.Builderhost(String host)Sets the value ofSqlUserConfig.getHost()SqlUserConfig.Builderid(String id)Sets the value ofSqlUserConfig.getId()SqlUserConfig.Builderinstance(String instance)Sets the value ofSqlUserConfig.getInstance()SqlUserConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()SqlUserConfig.Buildername(String name)Sets the value ofSqlUserConfig.getName()SqlUserConfig.Builderpassword(String password)Sets the value ofSqlUserConfig.getPassword()SqlUserConfig.BuilderpasswordPolicy(SqlUserPasswordPolicy passwordPolicy)Sets the value ofSqlUserConfig.getPasswordPolicy()SqlUserConfig.Builderproject(String project)Sets the value ofSqlUserConfig.getProject()SqlUserConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()SqlUserConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()SqlUserConfig.Buildertimeouts(SqlUserTimeouts timeouts)Sets the value ofSqlUserConfig.getTimeouts()SqlUserConfig.Buildertype(String type)Sets the value ofSqlUserConfig.getType()
-
-
-
Method Detail
-
instance
@Stability(Stable) public SqlUserConfig.Builder instance(String instance)
Sets the value ofSqlUserConfig.getInstance()- Parameters:
instance- The name of the Cloud SQL instance. Changing this forces a new resource to be created. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#instance SqlUser#instance}- Returns:
this
-
name
@Stability(Stable) public SqlUserConfig.Builder name(String name)
Sets the value ofSqlUserConfig.getName()- Parameters:
name- The name of the user. Changing this forces a new resource to be created. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#name SqlUser#name}- Returns:
this
-
deletionPolicy
@Stability(Stable) public SqlUserConfig.Builder deletionPolicy(String deletionPolicy)
Sets the value ofSqlUserConfig.getDeletionPolicy()- Parameters:
deletionPolicy- The deletion policy for the user. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. Possible values are: "ABANDON". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#deletion_policy SqlUser#deletion_policy}- Returns:
this
-
host
@Stability(Stable) public SqlUserConfig.Builder host(String host)
Sets the value ofSqlUserConfig.getHost()- Parameters:
host- The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#host SqlUser#host}- Returns:
this
-
id
@Stability(Stable) public SqlUserConfig.Builder id(String id)
Sets the value ofSqlUserConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#id SqlUser#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
-
password
@Stability(Stable) public SqlUserConfig.Builder password(String password)
Sets the value ofSqlUserConfig.getPassword()- Parameters:
password- The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#password SqlUser#password}- Returns:
this
-
passwordPolicy
@Stability(Stable) public SqlUserConfig.Builder passwordPolicy(SqlUserPasswordPolicy passwordPolicy)
Sets the value ofSqlUserConfig.getPasswordPolicy()- Parameters:
passwordPolicy- password_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#password_policy SqlUser#password_policy}- Returns:
this
-
project
@Stability(Stable) public SqlUserConfig.Builder project(String project)
Sets the value ofSqlUserConfig.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_user#project SqlUser#project}- Returns:
this
-
timeouts
@Stability(Stable) public SqlUserConfig.Builder timeouts(SqlUserTimeouts timeouts)
Sets the value ofSqlUserConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#timeouts SqlUser#timeouts}- Returns:
this
-
type
@Stability(Stable) public SqlUserConfig.Builder type(String type)
Sets the value ofSqlUserConfig.getType()- Parameters:
type- The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/sql_user#type SqlUser#type}- Returns:
this
-
connection
@Stability(Experimental) public SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.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 SqlUserConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public SqlUserConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SqlUserConfig>- Returns:
- a new instance of
SqlUserConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-