com.pulumi.alicloud.rds.kotlin.DdrInstance.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.rds.kotlin
import com.pulumi.alicloud.rds.kotlin.outputs.DdrInstanceParameter
import com.pulumi.alicloud.rds.kotlin.outputs.DdrInstancePgHbaConf
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.alicloud.rds.kotlin.outputs.DdrInstanceParameter.Companion.toKotlin as ddrInstanceParameterToKotlin
import com.pulumi.alicloud.rds.kotlin.outputs.DdrInstancePgHbaConf.Companion.toKotlin as ddrInstancePgHbaConfToKotlin
/**
* Builder for [DdrInstance].
*/
@PulumiTagMarker
public class DdrInstanceResourceBuilder internal constructor() {
public var name: String? = null
public var args: DdrInstanceArgs = DdrInstanceArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend DdrInstanceArgsBuilder.() -> Unit) {
val builder = DdrInstanceArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): DdrInstance {
val builtJavaResource = com.pulumi.alicloud.rds.DdrInstance(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DdrInstance(builtJavaResource)
}
}
/**
*
* ## Import
* RDS ddr instance can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:rds/ddrInstance:DdrInstance example rm-abc12345678
* ```
*/
public class DdrInstance internal constructor(
override val javaResource: com.pulumi.alicloud.rds.DdrInstance,
) : KotlinCustomResource(javaResource, DdrInstanceMapper) {
/**
* The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
* - cert
* - perfer
* - verify-ca
* - verify-full (supported only when the instance runs PostgreSQL 12 or later)
*/
public val acl: Output
get() = javaResource.acl().applyValue({ args0 -> args0 })
/**
* Whether to renewal a DB instance automatically or not. It is valid when payment_type is `Subscription`. Default to `false`.
*/
public val autoRenew: Output
get() = javaResource.autoRenew().applyValue({ args0 -> args0 })
/**
* Auto-renewal period of an instance, in the unit of the month. It is valid when payment_type is `Subscription`. Valid value:[1~12], Default to 1.
*/
public val autoRenewPeriod: Output
get() = javaResource.autoRenewPeriod().applyValue({ args0 -> args0 })
/**
* The upgrade method to use. Valid values:
* - Auto: Instances are automatically upgraded to a higher minor version.
* - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
* See more [details and limitation](https://www.alibabacloud.com/help/doc-detail/123605.htm).
*/
public val autoUpgradeMinorVersion: Output
get() = javaResource.autoUpgradeMinorVersion().applyValue({ args0 -> args0 })
/**
* The ID of the backup set that is used for the restoration. You can call the DescribeCrossRegionBackups operation to query the ID of the backup set.
*/
public val backupSetId: Output?
get() = javaResource.backupSetId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
* - aliyun: a cloud certificate
* - custom: a custom certificate
*/
public val caType: Output
get() = javaResource.caType().applyValue({ args0 -> args0 })
/**
* The RDS edition of the instance.
*/
public val category: Output
get() = javaResource.category().applyValue({ args0 -> args0 })
/**
* The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
*/
public val clientCaCert: Output?
get() = javaResource.clientCaCert().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
* - 1: enables the public key
* - 0: disables the public key
*/
public val clientCaEnabled: Output?
get() = javaResource.clientCaEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
*/
public val clientCertRevocationList: Output?
get() = javaResource.clientCertRevocationList().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
* - 1: enables the CRL
* - 0: disables the CRL
*/
public val clientCrlEnabled: Output?
get() = javaResource.clientCrlEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* RDS database connection string.
*/
public val connectionString: Output
get() = javaResource.connectionString().applyValue({ args0 -> args0 })
/**
* The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
* > **NOTE:** The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+\|{};:'",<>/?
*/
public val connectionStringPrefix: Output
get() = javaResource.connectionStringPrefix().applyValue({ args0 -> args0 })
/**
* The attribute of the IP address whitelist. By default, this parameter is empty.
* > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
*/
public val dbInstanceIpArrayAttribute: Output?
get() = javaResource.dbInstanceIpArrayAttribute().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the IP address whitelist. Default value: Default.
* > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
*/
public val dbInstanceIpArrayName: Output?
get() = javaResource.dbInstanceIpArrayName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The storage type of the instance. Valid values:
* - local_ssd: specifies to use local SSDs. This value is recommended.
* - cloud_ssd: specifies to use standard SSDs.
* - cloud_essd: specifies to use enhanced SSDs (ESSDs).
* - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
* - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
* > **NOTE:** You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
*/
public val dbInstanceStorageType: Output
get() = javaResource.dbInstanceStorageType().applyValue({ args0 -> args0 })
/**
* The switch of delete protection. Valid values:
* - true: delete protect.
* - false: no delete protect.
* > **NOTE:** `deletion_protection` is valid only when attribute `payment_type` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
*/
public val deletionProtection: Output
get() = javaResource.deletionProtection().applyValue({ args0 -> args0 })
/**
* The method to update the engine version and change. Default value: Immediate. Valid values:
* - Immediate: The change immediately takes effect.
* - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
*/
public val effectiveTime: Output?
get() = javaResource.effectiveTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
*/
public val encryptionKey: Output?
get() = javaResource.encryptionKey().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Database type. Value options: MySQL, SQLServer.
* > **NOTE:** When the 'EngineVersion' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
*/
public val engine: Output
get() = javaResource.engine().applyValue({ args0 -> args0 })
/**
* Database version. Value options can refer to the latest docs [CreateDdrInstance](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/restore-data-to-a-new-instance-across-regions) `EngineVersion`.
*/
public val engineVersion: Output
get() = javaResource.engineVersion().applyValue({ args0 -> args0 })
/**
* Set it to true to make some parameter efficient when modifying them. Default to false.
*/
public val forceRestart: Output
get() = javaResource.forceRestart().applyValue({ args0 -> args0 })
/**
* The read-only instances to which you want to synchronize the IP address whitelist.
* * If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
* * If the instance is not attached with a read-only instance, this parameter is empty.
*/
public val freshWhiteListReadins: Output?
get() = javaResource.freshWhiteListReadins().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
* - Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
* - Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
* > **NOTE:** If you set this parameter to Manual, you must specify the ManualHATime parameter.
*/
public val haConfig: Output
get() = javaResource.haConfig().applyValue({ args0 -> args0 })
/**
* The name of DB instance. It a string of 2 to 256 characters.
*/
public val instanceName: Output?
get() = javaResource.instanceName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The storage capacity of the destination instance. Valid values: 5 to 2000. Unit: GB.
* This value must be a multiple of 5 GB. For more information, see Primary ApsaraDB RDS instance types.
*/
public val instanceStorage: Output
get() = javaResource.instanceStorage().applyValue({ args0 -> args0 })
/**
* DB Instance type.
* > **NOTE:** When `storage_auto_scale="Enable"`, do not perform `instance_storage` check. when `storage_auto_scale="Disable"`, if the instance itself `instance_storage`has changed. You need to manually revise the `instance_storage` in the template value.
*/
public val instanceType: Output
get() = javaResource.instanceType().applyValue({ args0 -> args0 })
/**
* Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
*/
public val maintainTime: Output
get() = javaResource.maintainTime().applyValue({ args0 -> args0 })
/**
* The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
* > **NOTE:** This parameter only takes effect when the HAConfig parameter is set to Manual.
*/
public val manualHaTime: Output?
get() = javaResource.manualHaTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
* - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
* - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
* - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
*/
public val modifyMode: Output?
get() = javaResource.modifyMode().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
*/
public val monitoringPeriod: Output
get() = javaResource.monitoringPeriod().applyValue({ args0 -> args0 })
/**
* Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) . See `parameters` below.
*/
public val parameters: Output>
get() = javaResource.parameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
ddrInstanceParameterToKotlin(args0)
})
})
})
/**
* Valid values are `Subscription`, `PayAsYouGo`, Default to `PayAsYouGo`.
*/
public val paymentType: Output
get() = javaResource.paymentType().applyValue({ args0 -> args0 })
/**
* The duration that you will buy DB instance (in month). It is valid when payment_type is `Subscription`. Valid values: [1~9], 12, 24, 36.
* > **NOTE:** The attribute `period` is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running `pulumi up` will not effect the resource.
*/
public val period: Output?
get() = javaResource.period().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
*/
public val pgHbaConfs: Output>
get() = javaResource.pgHbaConfs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
ddrInstancePgHbaConfToKotlin(args0)
})
})
})
/**
* The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
*/
public val port: Output
get() = javaResource.port().applyValue({ args0 -> args0 })
/**
* The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
*/
public val privateIpAddress: Output
get() = javaResource.privateIpAddress().applyValue({ args0 -> args0 })
/**
* The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
* - None: No archived backup files are retained.
* - Lastest: Only the last archived backup file is retained.
* - All: All the archived backup files are retained.
* > **NOTE:** This parameter is supported only when the instance runs the MySQL database engine.
*/
public val releasedKeepPolicy: Output?
get() = javaResource.releasedKeepPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
* - cert
* - perfer
* - verify-ca
* - verify-full (supported only when the instance runs PostgreSQL 12 or later)
*/
public val replicationAcl: Output
get() = javaResource.replicationAcl().applyValue({ args0 -> args0 })
/**
* The ID of resource group which the DB instance belongs.
*/
public val resourceGroupId: Output
get() = javaResource.resourceGroupId().applyValue({ args0 -> args0 })
/**
* The point in time to which you want to restore data. The point in time that you specify must be earlier than the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
*/
public val restoreTime: Output?
get() = javaResource.restoreTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The method that is used to restore data. Valid values:
* - BackupSet: Data is restored from a backup set. If you use this value, you must also specify the BackupSetID parameter.
* - BackupTime: restores data to a point in time. You must also specify the RestoreTime, SourceRegion, and SourceDBInstanceName parameters.
*/
public val restoreType: Output
get() = javaResource.restoreType().applyValue({ args0 -> args0 })
/**
* ) The list IDs to join ECS Security Group. At most supports three security groups.
*/
public val securityGroupIds: Output>
get() = javaResource.securityGroupIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode.
*/
public val securityIpMode: Output
get() = javaResource.securityIpMode().applyValue({ args0 -> args0 })
/**
* The type of IP address in the IP address whitelist.
*/
public val securityIpType: Output?
get() = javaResource.securityIpType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
*/
public val securityIps: Output>
get() = javaResource.securityIps().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
*/
public val serverCert: Output
get() = javaResource.serverCert().applyValue({ args0 -> args0 })
/**
* The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
*/
public val serverKey: Output
get() = javaResource.serverKey().applyValue({ args0 -> args0 })
/**
* The ID of the source instance if you want to restore data to a point in time.
*/
public val sourceDbInstanceName: Output?
get() = javaResource.sourceDbInstanceName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The region ID of the source instance if you want to restore data to a point in time.
*/
public val sourceRegion: Output?
get() = javaResource.sourceRegion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
*/
public val sqlCollectorConfigValue: Output
get() = javaResource.sqlCollectorConfigValue().applyValue({ args0 -> args0 })
/**
* The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
*/
public val sqlCollectorStatus: Output
get() = javaResource.sqlCollectorStatus().applyValue({ args0 -> args0 })
/**
* Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
*/
public val sslAction: Output
get() = javaResource.sslAction().applyValue({ args0 -> args0 })
/**
* Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
*/
public val sslStatus: Output
get() = javaResource.sslStatus().applyValue({ args0 -> args0 })
/**
* Automatic storage space expansion switch. Valid values:
* - Enable
* - Disable
* > **NOTE:** This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
*/
public val storageAutoScale: Output?
get() = javaResource.storageAutoScale().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The trigger threshold (percentage) for automatic storage space expansion. Valid values:
* - 10
* - 20
* - 30
* - 40
* - 50
* > **NOTE:** This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
*/
public val storageThreshold: Output?
get() = javaResource.storageThreshold().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
* > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
*/
public val storageUpperBound: Output?
get() = javaResource.storageUpperBound().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgrade_db_instance_kernel_version = true`. The time must be in UTC.
* > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
*/
public val switchTime: Output?
get() = javaResource.switchTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A mapping of tags to assign to the resource.
* - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
* - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
*/
public val tags: Output