com.pulumi.aws.rds.ProxyDefaultTargetGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.rds;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.rds.ProxyDefaultTargetGroupArgs;
import com.pulumi.aws.rds.inputs.ProxyDefaultTargetGroupState;
import com.pulumi.aws.rds.outputs.ProxyDefaultTargetGroupConnectionPoolConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;
/**
* Provides a resource to manage an RDS DB proxy default target group resource.
*
* The `aws.rds.ProxyDefaultTargetGroup` behaves differently from normal resources, in that the provider does not _create_ or _destroy_ this resource, since it implicitly exists as part of an RDS DB Proxy. On the provider resource creation it is automatically imported and on resource destruction, the provider performs no actions in RDS.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 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 example = new Proxy("example", ProxyArgs.builder()
* .name("example")
* .debugLogging(false)
* .engineFamily("MYSQL")
* .idleClientTimeout(1800)
* .requireTls(true)
* .roleArn(exampleAwsIamRole.arn())
* .vpcSecurityGroupIds(exampleAwsSecurityGroup.id())
* .vpcSubnetIds(exampleAwsSubnet.id())
* .auths(ProxyAuthArgs.builder()
* .authScheme("SECRETS")
* .description("example")
* .iamAuth("DISABLED")
* .secretArn(exampleAwsSecretsmanagerSecret.arn())
* .build())
* .tags(Map.ofEntries(
* Map.entry("Name", "example"),
* Map.entry("Key", "value")
* ))
* .build());
*
* var exampleProxyDefaultTargetGroup = new ProxyDefaultTargetGroup("exampleProxyDefaultTargetGroup", ProxyDefaultTargetGroupArgs.builder()
* .dbProxyName(example.name())
* .connectionPoolConfig(ProxyDefaultTargetGroupConnectionPoolConfigArgs.builder()
* .connectionBorrowTimeout(120)
* .initQuery("SET x=1, y=2")
* .maxConnectionsPercent(100)
* .maxIdleConnectionsPercent(50)
* .sessionPinningFilters("EXCLUDE_VARIABLE_SETS")
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import DB proxy default target groups using the `db_proxy_name`. For example:
*
* ```sh
* $ pulumi import aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup example example
* ```
*
*/
@ResourceType(type="aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup")
public class ProxyDefaultTargetGroup extends com.pulumi.resources.CustomResource {
/**
* The Amazon Resource Name (ARN) representing the target group.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The Amazon Resource Name (ARN) representing the target group.
*
*/
public Output arn() {
return this.arn;
}
/**
* The settings that determine the size and behavior of the connection pool for the target group.
*
*/
@Export(name="connectionPoolConfig", refs={ProxyDefaultTargetGroupConnectionPoolConfig.class}, tree="[0]")
private Output connectionPoolConfig;
/**
* @return The settings that determine the size and behavior of the connection pool for the target group.
*
*/
public Output connectionPoolConfig() {
return this.connectionPoolConfig;
}
/**
* Name of the RDS DB Proxy.
*
*/
@Export(name="dbProxyName", refs={String.class}, tree="[0]")
private Output dbProxyName;
/**
* @return Name of the RDS DB Proxy.
*
*/
public Output dbProxyName() {
return this.dbProxyName;
}
/**
* The name of the default target group.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the default target group.
*
*/
public Output name() {
return this.name;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ProxyDefaultTargetGroup(java.lang.String name) {
this(name, ProxyDefaultTargetGroupArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ProxyDefaultTargetGroup(java.lang.String name, ProxyDefaultTargetGroupArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public ProxyDefaultTargetGroup(java.lang.String name, ProxyDefaultTargetGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ProxyDefaultTargetGroup(java.lang.String name, Output id, @Nullable ProxyDefaultTargetGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup", name, state, makeResourceOptions(options, id), false);
}
private static ProxyDefaultTargetGroupArgs makeArgs(ProxyDefaultTargetGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ProxyDefaultTargetGroupArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static ProxyDefaultTargetGroup get(java.lang.String name, Output id, @Nullable ProxyDefaultTargetGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ProxyDefaultTargetGroup(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy