ProxyTargetArgs

data class ProxyTargetArgs(val dbClusterIdentifier: Output<String>? = null, val dbInstanceIdentifier: Output<String>? = null, val dbProxyName: Output<String>? = null, val targetGroupName: Output<String>? = null) : ConvertibleToJava<ProxyTargetArgs>

Provides an RDS DB proxy target resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Proxy;
import com.pulumi.aws.rds.ProxyArgs;
import com.pulumi.aws.rds.inputs.ProxyAuthArgs;
import com.pulumi.aws.rds.ProxyDefaultTargetGroup;
import com.pulumi.aws.rds.ProxyDefaultTargetGroupArgs;
import com.pulumi.aws.rds.inputs.ProxyDefaultTargetGroupConnectionPoolConfigArgs;
import com.pulumi.aws.rds.ProxyTarget;
import com.pulumi.aws.rds.ProxyTargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleProxy = new Proxy("exampleProxy", ProxyArgs.builder()
.debugLogging(false)
.engineFamily("MYSQL")
.idleClientTimeout(1800)
.requireTls(true)
.roleArn(aws_iam_role.example().arn())
.vpcSecurityGroupIds(aws_security_group.example().id())
.vpcSubnetIds(aws_subnet.example().id())
.auths(ProxyAuthArgs.builder()
.authScheme("SECRETS")
.description("example")
.iamAuth("DISABLED")
.secretArn(aws_secretsmanager_secret.example().arn())
.build())
.tags(Map.ofEntries(
Map.entry("Name", "example"),
Map.entry("Key", "value")
))
.build());
var exampleProxyDefaultTargetGroup = new ProxyDefaultTargetGroup("exampleProxyDefaultTargetGroup", ProxyDefaultTargetGroupArgs.builder()
.dbProxyName(exampleProxy.name())
.connectionPoolConfig(ProxyDefaultTargetGroupConnectionPoolConfigArgs.builder()
.connectionBorrowTimeout(120)
.initQuery("SET x=1, y=2")
.maxConnectionsPercent(100)
.maxIdleConnectionsPercent(50)
.sessionPinningFilters("EXCLUDE_VARIABLE_SETS")
.build())
.build());
var exampleProxyTarget = new ProxyTarget("exampleProxyTarget", ProxyTargetArgs.builder()
.dbInstanceIdentifier(aws_db_instance.example().id())
.dbProxyName(exampleProxy.name())
.targetGroupName(exampleProxyDefaultTargetGroup.name())
.build());
}
}

Import

RDS DB Proxy Targets can be imported using the db_proxy_name, target_group_name, target type (e.g., RDS_INSTANCE or TRACKED_CLUSTER), and resource identifier separated by forward slashes (/), e.g., Instances

$ pulumi import aws:rds/proxyTarget:ProxyTarget example example-proxy/default/RDS_INSTANCE/example-instance

Provisioned Clusters

$ pulumi import aws:rds/proxyTarget:ProxyTarget example example-proxy/default/TRACKED_CLUSTER/example-cluster

Constructors

Link copied to clipboard
constructor(dbClusterIdentifier: Output<String>? = null, dbInstanceIdentifier: Output<String>? = null, dbProxyName: Output<String>? = null, targetGroupName: Output<String>? = null)

Properties

Link copied to clipboard
val dbClusterIdentifier: Output<String>? = null

DB cluster identifier. NOTE: Either db_instance_identifier or db_cluster_identifier should be specified and both should not be specified together

Link copied to clipboard
val dbInstanceIdentifier: Output<String>? = null

DB instance identifier.

Link copied to clipboard
val dbProxyName: Output<String>? = null

The name of the DB proxy.

Link copied to clipboard
val targetGroupName: Output<String>? = null

The name of the target group.

Functions

Link copied to clipboard
open override fun toJava(): ProxyTargetArgs