Package com.pulumi.gcp.sql.inputs
Class DatabaseInstanceState.Builder
- java.lang.Object
-
- com.pulumi.gcp.sql.inputs.DatabaseInstanceState.Builder
-
- Enclosing class:
- DatabaseInstanceState
public static final class DatabaseInstanceState.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(DatabaseInstanceState defaults)
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(DatabaseInstanceState defaults)
-
-
Method Detail
-
availableMaintenanceVersions
public DatabaseInstanceState.Builder availableMaintenanceVersions(@Nullable com.pulumi.core.Output<java.util.List<java.lang.String>> availableMaintenanceVersions)
- Parameters:
availableMaintenanceVersions
- The list of all maintenance versions applicable on the instance.- Returns:
- builder
-
availableMaintenanceVersions
public DatabaseInstanceState.Builder availableMaintenanceVersions(java.util.List<java.lang.String> availableMaintenanceVersions)
- Parameters:
availableMaintenanceVersions
- The list of all maintenance versions applicable on the instance.- Returns:
- builder
-
availableMaintenanceVersions
public DatabaseInstanceState.Builder availableMaintenanceVersions(java.lang.String... availableMaintenanceVersions)
- Parameters:
availableMaintenanceVersions
- The list of all maintenance versions applicable on the instance.- Returns:
- builder
-
clone_
public DatabaseInstanceState.Builder clone_(@Nullable com.pulumi.core.Output<DatabaseInstanceCloneArgs> clone)
- Parameters:
clone
- The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.- Returns:
- builder
-
clone_
public DatabaseInstanceState.Builder clone_(DatabaseInstanceCloneArgs clone)
- Parameters:
clone
- The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.- Returns:
- builder
-
connectionName
public DatabaseInstanceState.Builder connectionName(@Nullable com.pulumi.core.Output<java.lang.String> connectionName)
- Parameters:
connectionName
- The connection name of the instance to be used in connection strings. For example, when connecting with [Cloud SQL Proxy](https://cloud.google.com/sql/docs/mysql/connect-admin-proxy).- Returns:
- builder
-
connectionName
public DatabaseInstanceState.Builder connectionName(java.lang.String connectionName)
- Parameters:
connectionName
- The connection name of the instance to be used in connection strings. For example, when connecting with [Cloud SQL Proxy](https://cloud.google.com/sql/docs/mysql/connect-admin-proxy).- Returns:
- builder
-
databaseVersion
public DatabaseInstanceState.Builder databaseVersion(@Nullable com.pulumi.core.Output<java.lang.String> databaseVersion)
- Parameters:
databaseVersion
- The MySQL, PostgreSQL or SQL Server version to use. 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`. `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, `SQLSERVER_2019_WEB`. [Database Version Policies](https://cloud.google.com/sql/docs/db-versions) includes an up-to-date reference of supported versions.- Returns:
- builder
-
databaseVersion
public DatabaseInstanceState.Builder databaseVersion(java.lang.String databaseVersion)
- Parameters:
databaseVersion
- The MySQL, PostgreSQL or SQL Server version to use. 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`. `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, `SQLSERVER_2019_WEB`. [Database Version Policies](https://cloud.google.com/sql/docs/db-versions) includes an up-to-date reference of supported versions.- Returns:
- builder
-
deletionProtection
public DatabaseInstanceState.Builder deletionProtection(@Nullable com.pulumi.core.Output<java.lang.Boolean> deletionProtection)
- Parameters:
deletionProtection
- Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a `destroy` or `update` command that deletes the instance will fail. Defaults to `true`.- Returns:
- builder
-
deletionProtection
public DatabaseInstanceState.Builder deletionProtection(java.lang.Boolean deletionProtection)
- Parameters:
deletionProtection
- Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a `destroy` or `update` command that deletes the instance will fail. Defaults to `true`.- Returns:
- builder
-
dnsName
public DatabaseInstanceState.Builder dnsName(@Nullable com.pulumi.core.Output<java.lang.String> dnsName)
- Parameters:
dnsName
- The dns name of the instance.- Returns:
- builder
-
dnsName
public DatabaseInstanceState.Builder dnsName(java.lang.String dnsName)
- Parameters:
dnsName
- The dns name of the instance.- Returns:
- builder
-
encryptionKeyName
public DatabaseInstanceState.Builder encryptionKeyName(@Nullable com.pulumi.core.Output<java.lang.String> encryptionKeyName)
- Parameters:
encryptionKeyName
- The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see [this step](https://cloud.google.com/sql/docs/mysql/configure-cmek#service-account). That service account needs the `Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter` role on your key - please see [this step](https://cloud.google.com/sql/docs/mysql/configure-cmek#grantkey).- Returns:
- builder
-
encryptionKeyName
public DatabaseInstanceState.Builder encryptionKeyName(java.lang.String encryptionKeyName)
- Parameters:
encryptionKeyName
- The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see [this step](https://cloud.google.com/sql/docs/mysql/configure-cmek#service-account). That service account needs the `Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter` role on your key - please see [this step](https://cloud.google.com/sql/docs/mysql/configure-cmek#grantkey).- Returns:
- builder
-
firstIpAddress
public DatabaseInstanceState.Builder firstIpAddress(@Nullable com.pulumi.core.Output<java.lang.String> firstIpAddress)
- Parameters:
firstIpAddress
- The first IPv4 address of any type assigned.- Returns:
- builder
-
firstIpAddress
public DatabaseInstanceState.Builder firstIpAddress(java.lang.String firstIpAddress)
- Parameters:
firstIpAddress
- The first IPv4 address of any type assigned.- Returns:
- builder
-
instanceType
public DatabaseInstanceState.Builder instanceType(@Nullable com.pulumi.core.Output<java.lang.String> instanceType)
- Parameters:
instanceType
- The type of the instance. The supported values are `SQL_INSTANCE_TYPE_UNSPECIFIED`, `CLOUD_SQL_INSTANCE`, `ON_PREMISES_INSTANCE` and `READ_REPLICA_INSTANCE`.- Returns:
- builder
-
instanceType
public DatabaseInstanceState.Builder instanceType(java.lang.String instanceType)
- Parameters:
instanceType
- The type of the instance. The supported values are `SQL_INSTANCE_TYPE_UNSPECIFIED`, `CLOUD_SQL_INSTANCE`, `ON_PREMISES_INSTANCE` and `READ_REPLICA_INSTANCE`.- Returns:
- builder
-
ipAddresses
public DatabaseInstanceState.Builder ipAddresses(@Nullable com.pulumi.core.Output<java.util.List<DatabaseInstanceIpAddressArgs>> ipAddresses)
-
ipAddresses
public DatabaseInstanceState.Builder ipAddresses(java.util.List<DatabaseInstanceIpAddressArgs> ipAddresses)
-
ipAddresses
public DatabaseInstanceState.Builder ipAddresses(DatabaseInstanceIpAddressArgs... ipAddresses)
-
maintenanceVersion
public DatabaseInstanceState.Builder maintenanceVersion(@Nullable com.pulumi.core.Output<java.lang.String> maintenanceVersion)
- Parameters:
maintenanceVersion
- The current software version on the instance. This attribute can not be set during creation. Refer to `available_maintenance_versions` attribute to see what `maintenance_version` are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a `maintenance_version` value that is older than the current one on the instance will be ignored.- Returns:
- builder
-
maintenanceVersion
public DatabaseInstanceState.Builder maintenanceVersion(java.lang.String maintenanceVersion)
- Parameters:
maintenanceVersion
- The current software version on the instance. This attribute can not be set during creation. Refer to `available_maintenance_versions` attribute to see what `maintenance_version` are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a `maintenance_version` value that is older than the current one on the instance will be ignored.- Returns:
- builder
-
masterInstanceName
public DatabaseInstanceState.Builder masterInstanceName(@Nullable com.pulumi.core.Output<java.lang.String> masterInstanceName)
- Parameters:
masterInstanceName
- The name of the existing 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.- Returns:
- builder
-
masterInstanceName
public DatabaseInstanceState.Builder masterInstanceName(java.lang.String masterInstanceName)
- Parameters:
masterInstanceName
- The name of the existing 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.- Returns:
- builder
-
name
public DatabaseInstanceState.Builder name(@Nullable com.pulumi.core.Output<java.lang.String> name)
- Parameters:
name
- The name of the instance. If the name is left blank, the provider 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](https://cloud.google.com/sql/docs/delete-instance).- Returns:
- builder
-
name
public DatabaseInstanceState.Builder name(java.lang.String name)
- Parameters:
name
- The name of the instance. If the name is left blank, the provider 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](https://cloud.google.com/sql/docs/delete-instance).- Returns:
- builder
-
privateIpAddress
public DatabaseInstanceState.Builder privateIpAddress(@Nullable com.pulumi.core.Output<java.lang.String> privateIpAddress)
- Parameters:
privateIpAddress
- The first private (`PRIVATE`) IPv4 address assigned.- Returns:
- builder
-
privateIpAddress
public DatabaseInstanceState.Builder privateIpAddress(java.lang.String privateIpAddress)
- Parameters:
privateIpAddress
- The first private (`PRIVATE`) IPv4 address assigned.- Returns:
- builder
-
project
public DatabaseInstanceState.Builder project(@Nullable com.pulumi.core.Output<java.lang.String> project)
- Parameters:
project
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.- Returns:
- builder
-
project
public DatabaseInstanceState.Builder project(java.lang.String project)
- Parameters:
project
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.- Returns:
- builder
-
pscServiceAttachmentLink
public DatabaseInstanceState.Builder pscServiceAttachmentLink(@Nullable com.pulumi.core.Output<java.lang.String> pscServiceAttachmentLink)
- Parameters:
pscServiceAttachmentLink
- The link to service attachment of PSC instance.- Returns:
- builder
-
pscServiceAttachmentLink
public DatabaseInstanceState.Builder pscServiceAttachmentLink(java.lang.String pscServiceAttachmentLink)
- Parameters:
pscServiceAttachmentLink
- The link to service attachment of PSC instance.- Returns:
- builder
-
publicIpAddress
public DatabaseInstanceState.Builder publicIpAddress(@Nullable com.pulumi.core.Output<java.lang.String> publicIpAddress)
- Parameters:
publicIpAddress
- The first public (`PRIMARY`) IPv4 address assigned.- Returns:
- builder
-
publicIpAddress
public DatabaseInstanceState.Builder publicIpAddress(java.lang.String publicIpAddress)
- Parameters:
publicIpAddress
- The first public (`PRIMARY`) IPv4 address assigned.- Returns:
- builder
-
region
public DatabaseInstanceState.Builder region(@Nullable com.pulumi.core.Output<java.lang.String> region)
- Parameters:
region
- The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead. ***- Returns:
- builder
-
region
public DatabaseInstanceState.Builder region(java.lang.String region)
- Parameters:
region
- The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead. ***- Returns:
- builder
-
replicaConfiguration
public DatabaseInstanceState.Builder replicaConfiguration(@Nullable com.pulumi.core.Output<DatabaseInstanceReplicaConfigurationArgs> replicaConfiguration)
- Parameters:
replicaConfiguration
- The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.- Returns:
- builder
-
replicaConfiguration
public DatabaseInstanceState.Builder replicaConfiguration(DatabaseInstanceReplicaConfigurationArgs replicaConfiguration)
- Parameters:
replicaConfiguration
- The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.- Returns:
- builder
-
restoreBackupContext
public DatabaseInstanceState.Builder restoreBackupContext(@Nullable com.pulumi.core.Output<DatabaseInstanceRestoreBackupContextArgs> restoreBackupContext)
- Parameters:
restoreBackupContext
- The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. **NOTE:** Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.- Returns:
- builder
-
restoreBackupContext
public DatabaseInstanceState.Builder restoreBackupContext(DatabaseInstanceRestoreBackupContextArgs restoreBackupContext)
- Parameters:
restoreBackupContext
- The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. **NOTE:** Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.- Returns:
- builder
-
rootPassword
public DatabaseInstanceState.Builder rootPassword(@Nullable com.pulumi.core.Output<java.lang.String> rootPassword)
- Parameters:
rootPassword
- Initial root password. Can be updated. Required for MS SQL Server.- Returns:
- builder
-
rootPassword
public DatabaseInstanceState.Builder rootPassword(java.lang.String rootPassword)
- Parameters:
rootPassword
- Initial root password. Can be updated. Required for MS SQL Server.- Returns:
- builder
-
selfLink
public DatabaseInstanceState.Builder selfLink(@Nullable com.pulumi.core.Output<java.lang.String> selfLink)
- Parameters:
selfLink
- The URI of the created resource.- Returns:
- builder
-
selfLink
public DatabaseInstanceState.Builder selfLink(java.lang.String selfLink)
- Parameters:
selfLink
- The URI of the created resource.- Returns:
- builder
-
serverCaCerts
public DatabaseInstanceState.Builder serverCaCerts(@Nullable com.pulumi.core.Output<java.util.List<DatabaseInstanceServerCaCertArgs>> serverCaCerts)
-
serverCaCerts
public DatabaseInstanceState.Builder serverCaCerts(java.util.List<DatabaseInstanceServerCaCertArgs> serverCaCerts)
-
serverCaCerts
public DatabaseInstanceState.Builder serverCaCerts(DatabaseInstanceServerCaCertArgs... serverCaCerts)
-
serviceAccountEmailAddress
public DatabaseInstanceState.Builder serviceAccountEmailAddress(@Nullable com.pulumi.core.Output<java.lang.String> serviceAccountEmailAddress)
- Parameters:
serviceAccountEmailAddress
- The service account email address assigned to the instance.- Returns:
- builder
-
serviceAccountEmailAddress
public DatabaseInstanceState.Builder serviceAccountEmailAddress(java.lang.String serviceAccountEmailAddress)
- Parameters:
serviceAccountEmailAddress
- The service account email address assigned to the instance.- Returns:
- builder
-
settings
public DatabaseInstanceState.Builder settings(@Nullable com.pulumi.core.Output<DatabaseInstanceSettingsArgs> settings)
- Parameters:
settings
- The settings to use for the database. The configuration is detailed below. Required if `clone` is not set.- Returns:
- builder
-
settings
public DatabaseInstanceState.Builder settings(DatabaseInstanceSettingsArgs settings)
- Parameters:
settings
- The settings to use for the database. The configuration is detailed below. Required if `clone` is not set.- Returns:
- builder
-
build
public DatabaseInstanceState build()
-
-